From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Nick Dokos Newsgroups: gmane.emacs.help Subject: Re: ask for the value of several variables at once Date: Fri, 09 Mar 2018 15:07:16 -0500 Message-ID: <87sh99813f.fsf@alphaville.usersys.redhat.com> References: <87sh9a36pw.fsf@mat.ucm.es> <20180308160838.GA32404@tuxteam.de> <87fu5aqwml.fsf@mat.ucm.es> <20180308215517.GA12322@tuxteam.de> <878tb1p15l.fsf@mat.ucm.es> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1520625972 14218 195.159.176.226 (9 Mar 2018 20:06:12 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 9 Mar 2018 20:06:12 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Mar 09 21:06:08 2018 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1euOHG-0003Zp-RN for geh-help-gnu-emacs@m.gmane.org; Fri, 09 Mar 2018 21:06:06 +0100 Original-Received: from localhost ([::1]:47832 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1euOJJ-0003W8-MU for geh-help-gnu-emacs@m.gmane.org; Fri, 09 Mar 2018 15:08:13 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:44534) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1euOId-0003UK-M2 for help-gnu-emacs@gnu.org; Fri, 09 Mar 2018 15:07:32 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1euOIZ-0006im-Mf for help-gnu-emacs@gnu.org; Fri, 09 Mar 2018 15:07:31 -0500 Original-Received: from [195.159.176.226] (port=36803 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1euOIZ-0006i1-F3 for help-gnu-emacs@gnu.org; Fri, 09 Mar 2018 15:07:27 -0500 Original-Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1euOGU-0002jb-Fo for help-gnu-emacs@gnu.org; Fri, 09 Mar 2018 21:05:18 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 53 Original-X-Complaints-To: usenet@blaine.gmane.org Cancel-Lock: sha1:qmyJRV08KL5vdIJvkX+HG4EJPGg= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 195.159.176.226 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:116162 Archived-At: Uwe Brauer 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