help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ask for the value of several variables at once


From: Nick Dokos
Subject: Re: ask for the value of several variables at once
Date: Fri, 09 Mar 2018 15:07:16 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

Uwe Brauer <oub@mat.ucm.es> writes:

>    > On Thu, Mar 08, 2018 at 06:56:34PM +0100, Uwe Brauer wrote:
>
>    > Oh. That makes it clearer :-)
>
>    > You want the variable's name and the variable's value. Then
>    > `describe-variable' is far too verbose.
>
>    > Try `symbol-value', that may be closer to what you want.
>
>
>    > Now a bit clearer.
>
>
>    > Try this (beware: not thoroughly tested):
>
>    >   (defun my-ask-mail-yank ()
>    >     (interactive)
>    >     (mapconcat
>    >       (lambda (sym)
>    >         (format "%s: %s" sym (symbol-value sym)))
>    >       '(sc-citation-leader sc-reference-tag-string
>    >         message-yank-cited-prefix message-yank-prefix)
>    >       "\n"))
>
> Thanks, I just tried it out but it does not return anything neither in
> the minibuffer nor in the message buffer.
>
> What do I miss?
>
I don't know, but it does return a string, which I get in the echo area and in 
the *Messages* buffer.
Try to paste the defun into your *scratch* buffer (make sure that it is in 
lisp-interaction mode),
then evaluate it with C-x C-e and then call it (I don't use supercite, so I 
replaced the two supercite
variables with gnus-cite-prefix-alist):

   (defun my-ask-mail-yank ()
     (interactive)
     (mapconcat
       (lambda (sym)
         (format "%s: %s" sym (symbol-value sym)))
       '(gnus-cite-prefix-alist
         message-yank-cited-prefix message-yank-prefix)
       "\n")) ;;; press C-j here
my-ask-mail-yank

(my-ask-mail-yank) ;;; press C-j here
"gnus-cite-prefix-alist: nil
message-yank-cited-prefix: >
message-yank-prefix: > "

-- 
Nick




reply via email to

[Prev in Thread] Current Thread [Next in Thread]