[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Using button-label in pcase
From: |
uzibalqa |
Subject: |
Using button-label in pcase |
Date: |
Mon, 24 Jul 2023 19:14:27 +0000 |
Want to print some text as a result of clicking a button. With the code below
I end up with
(wrong-type-argument integer-or-marker-p nil)
buffer-substring-no-properties(nil nil)
button-label(#<overlay in no buffer>)
(let* ((val (button-label button))) (if (equal val '"[FA]") (let nil (insert
qrh-c))))
(closure ((button . #<overlay in no buffer>)) nil (let* ((val (button-label
button))) (if (equal val '"[FA]") (let nil (insert qrh-c)))))()
help--window-setup("*Help*" (closure ((button . #<overlay in no buffer>)) nil
(let* ((val (button-label button))) (if (equal val '"[FA]") (let nil (insert
qrh-c))))))
qrh-b(#<overlay in no buffer>)
button-activate(#<overlay in no buffer> t)
push-button(3 t)
What is going on. Is there a fix?
(defconst qrh-c "[FA] Some Text")
(defun qrh-b (button)
"Prints information about how to install emacs."
(with-help-window (help-buffer)
(pcase (button-label button)
("[FA]" (insert qrh-c))) ))
(defun qrh-a ()
"Prints information about how to install emacs."
(interactive)
(with-help-window (help-buffer)
(insert-button "[FC]"
'action 'qrh-b 'follow-link t) ))
- Using button-label in pcase,
uzibalqa <=
- Re: Using button-label in pcase, Stephen Berman, 2023/07/24
- Re: Using button-label in pcase, uzibalqa, 2023/07/24
- Re: Using button-label in pcase, Stephen Berman, 2023/07/24
- Re: Using button-label in pcase, uzibalqa, 2023/07/24
- Re: Using button-label in pcase, Stephen Berman, 2023/07/24
- Re: Using button-label in pcase, uzibalqa, 2023/07/24
- Re: Using button-label in pcase, Stephen Berman, 2023/07/24
- Re: Using button-label in pcase, uzibalqa, 2023/07/24