[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: ask for the value of several variables at once
From: |
tomas |
Subject: |
Re: ask for the value of several variables at once |
Date: |
Thu, 8 Mar 2018 22:55:17 +0100 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Thu, Mar 08, 2018 at 06:56:34PM +0100, Uwe Brauer wrote:
>
> > On Thu, Mar 08, 2018 at 04:52:27PM +0100, Uwe Brauer wrote:
>
> > That's called `list' :-)
>
> > Try this (I did some indentation cosmetics, hope that's OK)
>
> > (defun my-ask-mail-yank ()
> > (interactive)
> > (list
> > (describe-variable 'sc-citation-leader)
> > (describe-variable 'sc-reference-tag-string)
> > (describe-variable 'message-yank-cited-prefix)
> > (describe-variable 'message-yank-prefix)))
>
> > If you want to get fancy, you might try:
>
>
> > (defun my-ask-mail-yank ()
> > (interactive)
> > (mapcar #'describe-variable
> > '(sc-citation-leader sc-reference-tag-string
> > message-yank-cited-prefix message-yank-prefix)))
>
> Thanks but none worked as I expected.
>
> I want to have an output like this
>
>
> sc-citation-leader " "
> sc-reference-tag-string ">>"
> message-yank-cited-prefix " >"
> message-yank-prefix " >"
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.
> Say, best with the documentation text suppressed.
>
> > Although I'm a bit confused on what you really want to
> > achieve, I must admit.
Now a bit clearer.
> What is the purpose? Well I have since ages set
> these variables in a way to obtain and indentations + the >
>
>
>
> This is why you see your quotations with that indentation space. Now in
> some newsgroup this is disliked and no indentation is preferred. I am
> using gnus so I thought that via gnus-group-customize I could set these
> variables just for the group. But for some reasons this does not work.
>
> Since I was not sure which of the variable really is responsible for the
> indentation I wanted to find a way to ask their values in one go.
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"))
Season to taste :-)
Cheers
- -- t
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
iEYEARECAAYFAlqhsUUACgkQBcgs9XrR2kacjACeKlSHsVA+Lq1AAwtmepEgBo3o
i64An1RN8Nhwo/LfwA6N3KW8PRERX46L
=9Jdu
-----END PGP SIGNATURE-----
- ask for the value of several variables at once, Uwe Brauer, 2018/03/08
- Message not available
- Re: ask for the value of several variables at once, Emanuel Berg, 2018/03/09
- Re: ask for the value of several variables at once, Uwe Brauer, 2018/03/14
- Re: ask for the value of several variables at once, Yuri Khan, 2018/03/14
- Message not available
- Re: ask for the value of several variables at once, Emanuel Berg, 2018/03/14
- Re: ask for the value of several variables at once, Yuri Khan, 2018/03/14
- Message not available
- Re: ask for the value of several variables at once, Emanuel Berg, 2018/03/14