From unknown Fri Sep 05 08:42:32 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#9030 <9030@debbugs.gnu.org> To: bug#9030 <9030@debbugs.gnu.org> Subject: Status: `where-is' doesn't play well `with with-output-to-string' Reply-To: bug#9030 <9030@debbugs.gnu.org> Date: Fri, 05 Sep 2025 15:42:32 +0000 retitle 9030 `where-is' doesn't play well `with with-output-to-string' reassign 9030 emacs submitter 9030 PJ Weisberg severity 9030 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Fri Jul 08 22:39:42 2011 Received: (at submit) by debbugs.gnu.org; 9 Jul 2011 02:39:43 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QfNSH-0006Xh-UM for submit@debbugs.gnu.org; Fri, 08 Jul 2011 22:39:42 -0400 Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QfNSF-0006XQ-Pz for submit@debbugs.gnu.org; Fri, 08 Jul 2011 22:39:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QfNS9-0000rk-I4 for submit@debbugs.gnu.org; Fri, 08 Jul 2011 22:39:34 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE autolearn=unavailable version=3.3.1 Received: from lists.gnu.org ([140.186.70.17]:37318) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QfNS9-0000rg-9H for submit@debbugs.gnu.org; Fri, 08 Jul 2011 22:39:33 -0400 Received: from eggs.gnu.org ([140.186.70.92]:44654) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QfNS7-0004qj-VE for bug-gnu-emacs@gnu.org; Fri, 08 Jul 2011 22:39:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QfNS6-0000rR-CD for bug-gnu-emacs@gnu.org; Fri, 08 Jul 2011 22:39:31 -0400 Received: from p3plsmtpa01-03.prod.phx3.secureserver.net ([72.167.82.83]:41717) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1QfNS5-0000r7-Ma for bug-gnu-emacs@gnu.org; Fri, 08 Jul 2011 22:39:30 -0400 Received: (qmail 3468 invoked from network); 9 Jul 2011 02:39:26 -0000 Received: from unknown (209.85.161.52) by p3plsmtpa01-03.prod.phx3.secureserver.net (72.167.82.83) with ESMTP; 09 Jul 2011 02:39:26 -0000 Received: by fxd18 with SMTP id 18so2356189fxd.39 for ; Fri, 08 Jul 2011 19:39:24 -0700 (PDT) MIME-Version: 1.0 Received: by 10.223.143.67 with SMTP id t3mr3956570fau.105.1310179164343; Fri, 08 Jul 2011 19:39:24 -0700 (PDT) Received: by 10.223.73.201 with HTTP; Fri, 8 Jul 2011 19:39:24 -0700 (PDT) Date: Fri, 8 Jul 2011 19:39:24 -0700 Message-ID: Subject: `where-is' doesn't play well `with with-output-to-string' From: PJ Weisberg To: bug-gnu-emacs@gnu.org Content-Type: text/plain; charset=ISO-8859-1 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 140.186.70.17 X-Spam-Score: -5.4 (-----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -5.4 (-----) This expression: (with-output-to-string (where-is 'yank)) returns nil, and prints a message in the echo area. This one-line change fixes it: diff --git a/lisp/help.el b/lisp/help.el index e6496f6..53e99e7 100644 --- a/lisp/help.el +++ b/lisp/help.el @@ -527,7 +527,7 @@ If INSERT (the prefix arg) is non-nil, insert the message in the buffer." (unless definition (error "No command")) (let ((func (indirect-function definition)) (defs nil) - (standard-output (if insert (current-buffer) t))) + (standard-output (if insert (current-buffer) standard-output))) ;; In DEFS, find all symbols that are aliases for DEFINITION. (mapatoms (lambda (symbol) (and (fboundp symbol) From debbugs-submit-bounces@debbugs.gnu.org Tue Jul 12 18:33:57 2011 Received: (at 9030) by debbugs.gnu.org; 12 Jul 2011 22:33:57 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QglWe-0007pX-SL for submit@debbugs.gnu.org; Tue, 12 Jul 2011 18:33:57 -0400 Received: from fencepost.gnu.org ([140.186.70.10]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QglWd-0007pH-3H for 9030@debbugs.gnu.org; Tue, 12 Jul 2011 18:33:55 -0400 Received: from localhost ([127.0.0.1]:42998) by fencepost.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QglWR-00063p-G4; Tue, 12 Jul 2011 18:33:43 -0400 From: Glenn Morris To: PJ Weisberg Subject: Re: bug#9030: `where-is' doesn't play well `with with-output-to-string' References: X-Spook: BATF SAFE Consul lynch Al-Qaeda ASO New World Order red X-Ran: 4=tzDc0p~Khte1a3h(NimKeBFo/2*Fi`*2kJIX3thgIk=>lYfNf.n?aYxB (PJ Weisberg's message of "Fri, 8 Jul 2011 19:39:24 -0700") Message-ID: User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -4.8 (----) X-Debbugs-Envelope-To: 9030 Cc: 9030@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -4.8 (----) PJ Weisberg wrote: > (with-output-to-string > (where-is 'yank)) > > returns nil, and prints a message in the echo area. This one-line > change fixes it: [...] > --- a/lisp/help.el > +++ b/lisp/help.el > @@ -527,7 +527,7 @@ If INSERT (the prefix arg) is non-nil, insert the > message in the buffer." > (unless definition (error "No command")) > (let ((func (indirect-function definition)) > (defs nil) > - (standard-output (if insert (current-buffer) t))) > + (standard-output (if insert (current-buffer) standard-output))) > ;; In DEFS, find all symbols that are aliases for DEFINITION. > (mapatoms (lambda (symbol) > (and (fboundp symbol) Tangentially, I wonder why where-is needs an optional INSERT argument that means "don't print the result, instead insert it (oh, and use a slightly different format)". From debbugs-submit-bounces@debbugs.gnu.org Tue Jul 12 23:54:51 2011 Received: (at 9030) by debbugs.gnu.org; 13 Jul 2011 03:54:51 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QgqXD-0000pU-A8 for submit@debbugs.gnu.org; Tue, 12 Jul 2011 23:54:51 -0400 Received: from fencepost.gnu.org ([140.186.70.10]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QgqXB-0000pI-2p for 9030@debbugs.gnu.org; Tue, 12 Jul 2011 23:54:49 -0400 Received: from cpe-66-108-39-217.nyc.res.rr.com ([66.108.39.217]:60578 helo=ceviche.home) by fencepost.gnu.org with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1QgqX4-0004Tt-FY; Tue, 12 Jul 2011 23:54:42 -0400 Received: by ceviche.home (Postfix, from userid 20848) id 8A89C660D5; Tue, 12 Jul 2011 23:54:41 -0400 (EDT) From: Stefan Monnier To: Glenn Morris Subject: Re: bug#9030: `where-is' doesn't play well `with with-output-to-string' Message-ID: References: Date: Tue, 12 Jul 2011 23:54:41 -0400 In-Reply-To: (Glenn Morris's message of "Tue, 12 Jul 2011 18:33:42 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -6.0 (------) X-Debbugs-Envelope-To: 9030 Cc: 9030@debbugs.gnu.org, PJ Weisberg X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.0 (------) > Tangentially, I wonder why where-is needs an optional INSERT argument > that means "don't print the result, instead insert it (oh, and use a > slightly different format)". It's clearly meant for interactive use. I'm not sure if it answers your question, tho. Stefan From debbugs-submit-bounces@debbugs.gnu.org Wed Jul 13 00:44:37 2011 Received: (at 9030) by debbugs.gnu.org; 13 Jul 2011 04:44:37 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QgrJN-0001xD-95 for submit@debbugs.gnu.org; Wed, 13 Jul 2011 00:44:37 -0400 Received: from p3plsmtpa01-10.prod.phx3.secureserver.net ([72.167.82.90]) by debbugs.gnu.org with smtp (Exim 4.69) (envelope-from ) id 1QgrJK-0001wz-EB for 9030@debbugs.gnu.org; Wed, 13 Jul 2011 00:44:35 -0400 Received: (qmail 26190 invoked from network); 13 Jul 2011 04:44:28 -0000 Received: from unknown (209.85.161.42) by p3plsmtpa01-10.prod.phx3.secureserver.net (72.167.82.90) with ESMTP; 13 Jul 2011 04:44:28 -0000 Received: by fxe23 with SMTP id 23so7294116fxe.29 for <9030@debbugs.gnu.org>; Tue, 12 Jul 2011 21:44:26 -0700 (PDT) MIME-Version: 1.0 Received: by 10.223.1.68 with SMTP id 4mr1042766fae.74.1310532266345; Tue, 12 Jul 2011 21:44:26 -0700 (PDT) Received: by 10.223.89.142 with HTTP; Tue, 12 Jul 2011 21:44:26 -0700 (PDT) In-Reply-To: References: Date: Tue, 12 Jul 2011 21:44:26 -0700 Message-ID: Subject: Re: bug#9030: `where-is' doesn't play well `with with-output-to-string' From: PJ Weisberg To: Stefan Monnier Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -3.5 (---) X-Debbugs-Envelope-To: 9030 Cc: "9030@debbugs.gnu.org" <9030@debbugs.gnu.org>, Glenn Morris , PJ Weisberg X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -3.4 (---) On Tuesday, July 12, 2011, Stefan Monnier wrote: >> Tangentially, I wonder why where-is needs an optional INSERT argument >> that means "don't print the result, instead insert it (oh, and use a >> slightly different format)". > > It's clearly meant for interactive use. =A0I'm not sure if it answers you= r > question, tho. For what it's worth, the code that gives what I was actually trting to get from `what-is' is `(mapcar 'key-description (where-is-internal foo))'. I don't know if there's a way to get that without using a function with "internal" in the name. --=20 -PJ From debbugs-submit-bounces@debbugs.gnu.org Sun Aug 07 13:22:44 2011 Received: (at 9030) by debbugs.gnu.org; 7 Aug 2011 17:22:44 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Qq73k-0005gL-Ht for submit@debbugs.gnu.org; Sun, 07 Aug 2011 13:22:44 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.183] helo=ironport2-out.pppoe.ca) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Qq73j-0005gE-37 for 9030@debbugs.gnu.org; Sun, 07 Aug 2011 13:22:43 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av0EAFrJPk5FxKeo/2dsb2JhbABCpzR4gUABAQQBViMQCzQSFBgNJIgAuGmGRgSfVYQx X-IronPort-AV: E=Sophos;i="4.67,333,1309752000"; d="scan'208";a="129416522" Received: from 69-196-167-168.dsl.teksavvy.com (HELO ceviche.home) ([69.196.167.168]) by ironport2-out.pppoe.ca with ESMTP/TLS/ADH-AES256-SHA; 07 Aug 2011 13:21:43 -0400 Received: by ceviche.home (Postfix, from userid 20848) id C616266386; Sun, 7 Aug 2011 13:21:42 -0400 (EDT) From: Stefan Monnier To: PJ Weisberg Subject: Re: bug#9030: `where-is' doesn't play well `with with-output-to-string' Message-ID: References: Date: Sun, 07 Aug 2011 13:21:42 -0400 In-Reply-To: (PJ Weisberg's message of "Tue, 12 Jul 2011 21:44:26 -0700") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.1 (--) X-Debbugs-Envelope-To: 9030 Cc: "9030@debbugs.gnu.org" <9030@debbugs.gnu.org>, Glenn Morris X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.1 (--) >>> Tangentially, I wonder why where-is needs an optional INSERT argument >>> that means "don't print the result, instead insert it (oh, and use a >>> slightly different format)". >> It's clearly meant for interactive use. =A0I'm not sure if it answers yo= ur >> question, tho. > For what it's worth, the code that gives what I was actually trting to > get from `what-is' is `(mapcar 'key-description (where-is-internal > foo))'. I don't know if there's a way to get that without using a > function with "internal" in the name. Yes, this is not quite right: where-is-internal is not nearly as internal as the name implies. It's just the natural function to use, whereas where-is is the corresponding command. Maybe we should fix the names to make where-is-internal less scary. Stefan From debbugs-submit-bounces@debbugs.gnu.org Tue Sep 13 03:23:03 2011 Received: (at 9030-done) by debbugs.gnu.org; 13 Sep 2011 07:23:03 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1R3NKg-0004Mm-Lz for submit@debbugs.gnu.org; Tue, 13 Sep 2011 03:23:02 -0400 Received: from fencepost.gnu.org ([140.186.70.10]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1R3NKf-0004MP-2G for 9030-done@debbugs.gnu.org; Tue, 13 Sep 2011 03:23:01 -0400 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1R3NGM-00014m-SK; Tue, 13 Sep 2011 03:18:34 -0400 From: Glenn Morris To: 9030-done@debbugs.gnu.org Subject: Re: bug#9030: `where-is' doesn't play well `with with-output-to-string' References: X-Spook: national information infrastructure propaganda Uzbekistan X-Ran: Ly$Fw#5<^X;{uCRbOqNp((m;OL(h^cd2$e (PJ Weisberg's message of "Fri, 8 Jul 2011 19:39:24 -0700") Message-ID: <5wk49cq59x.fsf@fencepost.gnu.org> User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -6.4 (------) X-Debbugs-Envelope-To: 9030-done X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.4 (------) Version: 24.1 Thanks; applied. From unknown Fri Sep 05 08:42:32 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Tue, 11 Oct 2011 11:24:02 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator