From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Newsgroups: gmane.emacs.help Subject: Re: ask for the value of several variables at once Date: Thu, 8 Mar 2018 22:55:17 +0100 Message-ID: <20180308215517.GA12322@tuxteam.de> References: <87sh9a36pw.fsf@mat.ucm.es> <20180308160838.GA32404@tuxteam.de> <87fu5aqwml.fsf@mat.ucm.es> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; x-action=pgp-signed X-Trace: blaine.gmane.org 1520546494 18531 195.159.176.226 (8 Mar 2018 22:01:34 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 8 Mar 2018 22:01:34 +0000 (UTC) User-Agent: Mutt/1.5.21 (2010-09-15) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Mar 08 23:01:30 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 1eu3bL-0004bF-E2 for geh-help-gnu-emacs@m.gmane.org; Thu, 08 Mar 2018 23:01:28 +0100 Original-Received: from localhost ([::1]:42059 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eu3Vx-000323-1x for geh-help-gnu-emacs@m.gmane.org; Thu, 08 Mar 2018 16:55:53 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47609) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eu3VX-00031h-7W for help-gnu-emacs@gnu.org; Thu, 08 Mar 2018 16:55:28 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eu3VS-0001vc-6C for help-gnu-emacs@gnu.org; Thu, 08 Mar 2018 16:55:27 -0500 Original-Received: from mail.tuxteam.de ([5.199.139.25]:46592) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eu3VR-0001uq-Nm for help-gnu-emacs@gnu.org; Thu, 08 Mar 2018 16:55:21 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tuxteam.de; s=20171004; h=From:In-Reply-To:Content-Type:MIME-Version:References:Message-ID:Subject:To:Date; bh=qGIa1xlz1l8o6bnyvA4ECD9/0qFTqWx3nqphJFAwJV0=; b=bxXnO14PzsjG7Bmn8LAcnw8euWqXr3qNylCtr7/f46WUUUF13/8F88I6dteEA6ytsS/LaMLyQpYgH5C/to1hDYaKnqjTnCDhd6F9I4WVrDPud3jZq8dcdrsPCVM7rQuZLjtZ1Xkh6ghr+droJuc1xQjVS5TlF5O9Xo1HY3onhmoOLrNt6ggkQYYJsZe9p1oPYqjwDZSWxzzW5fzlMX7gP2Bkllg2FpDCAgr9GVdo9eWg2xsIwFV60ujvdStSS4zGhJ7+XsueJpH8jfXqTx7sjakTC/hgS06pv94aavTDwRa+4MqJZLaEMNCFPgre8oVDdsWe+a+BJUHdkCEWnBQMnA==; Original-Received: from tomas by mail.tuxteam.de with local (Exim 4.80) (envelope-from ) id 1eu3VN-0003SC-QB for help-gnu-emacs@gnu.org; Thu, 08 Mar 2018 22:55:17 +0100 In-Reply-To: <87fu5aqwml.fsf@mat.ucm.es> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 5.199.139.25 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:116135 Archived-At: -----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-----