GNU bug report logs -
#9030
`where-is' doesn't play well `with with-output-to-string'
Previous Next
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 9030 in the body.
You can then email your comments to 9030 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#9030; Package
emacs.
(Sat, 09 Jul 2011 02:40:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
PJ Weisberg <pj <at> irregularexpressions.net>:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org.
(Sat, 09 Jul 2011 02:40:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
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)
Information forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#9030; Package
emacs.
(Tue, 12 Jul 2011 22:34:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 9030 <at> debbugs.gnu.org (full text, mbox):
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)".
Information forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#9030; Package
emacs.
(Wed, 13 Jul 2011 03:55:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 9030 <at> debbugs.gnu.org (full text, mbox):
> 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
Information forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#9030; Package
emacs.
(Wed, 13 Jul 2011 04:45:03 GMT)
Full text and
rfc822 format available.
Message #14 received at 9030 <at> debbugs.gnu.org (full text, mbox):
On Tuesday, July 12, 2011, Stefan Monnier <monnier <at> iro.umontreal.ca> 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. I'm not sure if it answers your
> 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.
--
-PJ
Information forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#9030; Package
emacs.
(Sun, 07 Aug 2011 17:23:02 GMT)
Full text and
rfc822 format available.
Message #17 received at 9030 <at> debbugs.gnu.org (full text, mbox):
>>> 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.
> 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
Reply sent
to
Glenn Morris <rgm <at> gnu.org>:
You have taken responsibility.
(Tue, 13 Sep 2011 07:24:01 GMT)
Full text and
rfc822 format available.
Notification sent
to
PJ Weisberg <pj <at> irregularexpressions.net>:
bug acknowledged by developer.
(Tue, 13 Sep 2011 07:24:02 GMT)
Full text and
rfc822 format available.
Message #22 received at 9030-done <at> debbugs.gnu.org (full text, mbox):
Version: 24.1
Thanks; applied.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org.
(Tue, 11 Oct 2011 11:24:02 GMT)
Full text and
rfc822 format available.
This bug report was last modified 12 years and 107 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.