GNU bug report logs - #10770
info-display-manual replaces existing *info* buffer

Previous Next

Package: emacs;

Reported by: Glenn Morris <rgm <at> gnu.org>

Date: Thu, 9 Feb 2012 06:35:01 UTC

Severity: wishlist

Tags: patch

Found in version 24.0.93

Done: Chong Yidong <cyd <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 10770 in the body.
You can then email your comments to 10770 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#10770; Package emacs. (Thu, 09 Feb 2012 06:35:02 GMT) Full text and rfc822 format available.

Message #3 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: submit <at> debbugs.gnu.org
Subject: info-display-manual replaces existing *info* buffer
Date: Thu, 09 Feb 2012 01:33:40 -0500
Package: emacs
Version: 24.0.93
Severity: wishlist

emacs -Q
M-x info-display-manual RET gnus RET
M-x info-display-manual RET emacs RET

Now my Gnus manual is gone, replaced by the Emacs manual.
I expected it to use a new buffer for the Emacs manual.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#10770; Package emacs. (Thu, 09 Feb 2012 09:33:01 GMT) Full text and rfc822 format available.

Message #6 received at 10770 <at> debbugs.gnu.org (full text, mbox):

From: Juri Linkov <juri <at> jurta.org>
To: Glenn Morris <rgm <at> gnu.org>
Cc: 10770 <at> debbugs.gnu.org
Subject: Re: bug#10770: info-display-manual replaces existing *info* buffer
Date: Thu, 09 Feb 2012 11:28:03 +0200
tags 10770 patch
thanks

> M-x info-display-manual RET gnus RET
> M-x info-display-manual RET emacs RET
>
> Now my Gnus manual is gone, replaced by the Emacs manual.
> I expected it to use a new buffer for the Emacs manual.

Maybe it would be good to append manual names to buffer names
as suffixes like "*info*<gnu>" and "*info*<emacs>" to make
unique and recognizable buffer names?

But since currently uniqueness is provided by adding a number
like "*info*<2>", the following patch will work with the
current naming convention:

=== modified file 'lisp/info.el'
--- lisp/info.el	2012-01-25 17:54:01 +0000
+++ lisp/info.el	2012-02-09 09:27:10 +0000
@@ -4999,7 +5005,7 @@ (defun info-display-manual (manual)
     (if found
 	(switch-to-buffer found)
       (info-initialize)
-      (info (Info-find-file manual)))))
+      (info (Info-find-file manual) (generate-new-buffer-name "*info*")))))
 
 (provide 'info)
 





Added tag(s) patch. Request was from Juri Linkov <juri <at> jurta.org> to control <at> debbugs.gnu.org. (Thu, 09 Feb 2012 09:33:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#10770; Package emacs. (Thu, 09 Feb 2012 18:38:01 GMT) Full text and rfc822 format available.

Message #11 received at 10770 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Glenn Morris <rgm <at> gnu.org>
Cc: 10770 <at> debbugs.gnu.org
Subject: Re: bug#10770: info-display-manual replaces existing *info* buffer
Date: Thu, 09 Feb 2012 20:36:16 +0200
> From: Glenn Morris <rgm <at> gnu.org>
> Date: Thu, 09 Feb 2012 01:33:40 -0500
> 
> M-x info-display-manual RET gnus RET
> M-x info-display-manual RET emacs RET
> 
> Now my Gnus manual is gone, replaced by the Emacs manual.
> I expected it to use a new buffer for the Emacs manual.

It doesn't create new buffers, only finds existing ones.  (Did the doc
string suggest otherwise?)

IOW, do it like this:

  M-x info-display-manual RET gnus RET
  M-x rename-buffer *info*<1> RET
  M-x info-display-manual RET emacs RET
  M-x rename-buffer *info*<2> RET

(The second rename is not necessary, but it clears the way for yet
another info-display-manual.)

Now you can use info-display-manual, and it will switch to the right
buffer automatically.

I wrote that command because I always have several dozens of Info
manuals open in my Emacs session, and I want to be able to switch
between them without any hassle.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#10770; Package emacs. (Thu, 09 Feb 2012 18:45:01 GMT) Full text and rfc822 format available.

Message #14 received at 10770 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Juri Linkov <juri <at> jurta.org>
Cc: 10770 <at> debbugs.gnu.org, rgm <at> gnu.org
Subject: Re: bug#10770: info-display-manual replaces existing *info* buffer
Date: Thu, 09 Feb 2012 20:43:16 +0200
> From: Juri Linkov <juri <at> jurta.org>
> Date: Thu, 09 Feb 2012 11:28:03 +0200
> Cc: 10770 <at> debbugs.gnu.org
> 
> > M-x info-display-manual RET gnus RET
> > M-x info-display-manual RET emacs RET
> >
> > Now my Gnus manual is gone, replaced by the Emacs manual.
> > I expected it to use a new buffer for the Emacs manual.
> 
> Maybe it would be good to append manual names to buffer names
> as suffixes like "*info*<gnu>" and "*info*<emacs>" to make
> unique and recognizable buffer names?

How would that help?

> But since currently uniqueness is provided by adding a number
> like "*info*<2>", the following patch will work with the
> current naming convention:
> 
> === modified file 'lisp/info.el'
> --- lisp/info.el	2012-01-25 17:54:01 +0000
> +++ lisp/info.el	2012-02-09 09:27:10 +0000
> @@ -4999,7 +5005,7 @@ (defun info-display-manual (manual)
>      (if found
>  	(switch-to-buffer found)
>        (info-initialize)
> -      (info (Info-find-file manual)))))
> +      (info (Info-find-file manual) (generate-new-buffer-name "*info*")))))

Thanks.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#10770; Package emacs. (Thu, 09 Feb 2012 18:48:02 GMT) Full text and rfc822 format available.

Message #17 received at 10770 <at> debbugs.gnu.org (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 10770 <at> debbugs.gnu.org
Subject: Re: bug#10770: info-display-manual replaces existing *info* buffer
Date: Thu, 09 Feb 2012 13:46:14 -0500
Eli Zaretskii wrote:

> IOW, do it like this:
>
>   M-x info-display-manual RET gnus RET
>   M-x rename-buffer *info*<1> RET
>   M-x info-display-manual RET emacs RET
>   M-x rename-buffer *info*<2> RET

Yes, I can do that. But I think it would be more useful to me if it
worked the way Juri suggested:

  Maybe it would be good to append manual names to buffer names as
  suffixes like "*info*<gnu>" and "*info*<emacs>" to make unique and
  recognizable buffer names?

Maybe require a prefix arg, or have an option, to get that behaviour if
you don't like it.

Anyway, just a feature request, not a bug report.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#10770; Package emacs. (Thu, 09 Feb 2012 18:55:02 GMT) Full text and rfc822 format available.

Message #20 received at 10770 <at> debbugs.gnu.org (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 10770 <at> debbugs.gnu.org
Subject: Re: bug#10770: info-display-manual replaces existing *info* buffer
Date: Thu, 09 Feb 2012 13:53:20 -0500
PS maybe there should be an `info-rename' command that renames an info
buffer to include the name of the displayed manual. Presumably it was
the fact that you had *info*<1>, *info*<2> etc rather than *info*<emacs>
that led you to write info-display-manual in the first place.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#10770; Package emacs. (Thu, 09 Feb 2012 19:06:02 GMT) Full text and rfc822 format available.

Message #23 received at 10770 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Glenn Morris <rgm <at> gnu.org>
Cc: 10770 <at> debbugs.gnu.org
Subject: Re: bug#10770: info-display-manual replaces existing *info* buffer
Date: Thu, 09 Feb 2012 21:04:40 +0200
> From: Glenn Morris <rgm <at> gnu.org>
> Cc: 10770 <at> debbugs.gnu.org
> Date: Thu, 09 Feb 2012 13:46:14 -0500
> 
> Maybe require a prefix arg, or have an option, to get that behaviour if
> you don't like it.

Juri's patch for generating *info*<N> automatically is OK with me.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#10770; Package emacs. (Thu, 09 Feb 2012 19:08:02 GMT) Full text and rfc822 format available.

Message #26 received at 10770 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Glenn Morris <rgm <at> gnu.org>
Cc: 10770 <at> debbugs.gnu.org
Subject: Re: bug#10770: info-display-manual replaces existing *info* buffer
Date: Thu, 09 Feb 2012 21:05:54 +0200
> From: Glenn Morris <rgm <at> gnu.org>
> Cc: 10770 <at> debbugs.gnu.org
> Date: Thu, 09 Feb 2012 13:53:20 -0500
> 
> 
> PS maybe there should be an `info-rename' command that renames an info
> buffer to include the name of the displayed manual. Presumably it was
> the fact that you had *info*<1>, *info*<2> etc rather than *info*<emacs>
> that led you to write info-display-manual in the first place.

Also because typing "emacs" or "make" is shorter than "*info*<emacs>"
etc., and completion doesn't help much when all the candidates begin
with the same substring.





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#10770; Package emacs. (Thu, 09 Feb 2012 19:18:01 GMT) Full text and rfc822 format available.

Message #29 received at 10770 <at> debbugs.gnu.org (full text, mbox):

From: "Drew Adams" <drew.adams <at> oracle.com>
To: "'Eli Zaretskii'" <eliz <at> gnu.org>, "'Glenn Morris'" <rgm <at> gnu.org>
Cc: 10770 <at> debbugs.gnu.org
Subject: RE: bug#10770: info-display-manual replaces existing *info* buffer
Date: Thu, 9 Feb 2012 11:16:34 -0800
> Also because typing "emacs" or "make" is shorter than "*info*<emacs>"
> etc., and completion doesn't help much when all the candidates begin
> with the same substring.

Huh?  Prefix completion for things that share a common prefix just abstracts
away that prefix (by completing to it), so you do not have to type it.  The
difference would be that completion would help with the *non*-prefix part.

(I do not have a particular opinion about the rest of what was discussed.  Just
pointing out that it is not the case that completion doesn't help much when all
candidates share a common prefix.)





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#10770; Package emacs. (Thu, 09 Feb 2012 19:21:02 GMT) Full text and rfc822 format available.

Message #32 received at 10770 <at> debbugs.gnu.org (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 10770 <at> debbugs.gnu.org
Subject: Re: bug#10770: info-display-manual replaces existing *info* buffer
Date: Thu, 09 Feb 2012 14:19:33 -0500
Eli Zaretskii wrote:

> Also because typing "emacs" or "make" is shorter than "*info*<emacs>"
> etc., and completion doesn't help much when all the candidates begin
> with the same substring.

But completion is smart now! :)

C-x b <emTAB

will happily complete to *info*<emacs>




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#10770; Package emacs. (Thu, 09 Feb 2012 19:25:01 GMT) Full text and rfc822 format available.

Message #35 received at 10770 <at> debbugs.gnu.org (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: 10770 <at> debbugs.gnu.org
Subject: Re: bug#10770: info-display-manual replaces existing *info* buffer
Date: Thu, 09 Feb 2012 14:23:12 -0500
Glenn Morris wrote:

> PS maybe there should be an `info-rename' command that renames an info
> buffer to include the name of the displayed manual.

Or maybe `rename-uniquely' should get some (optional) smart behaviour to
use more meaningful names. Names of manuals in info, names of recipient
of current mail message, etc.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#10770; Package emacs. (Thu, 09 Feb 2012 22:06:02 GMT) Full text and rfc822 format available.

Message #38 received at 10770 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Glenn Morris <rgm <at> gnu.org>
Cc: 10770 <at> debbugs.gnu.org
Subject: Re: bug#10770: info-display-manual replaces existing *info* buffer
Date: Fri, 10 Feb 2012 00:04:12 +0200
> From: Glenn Morris <rgm <at> gnu.org>
> Cc: 10770 <at> debbugs.gnu.org
> Date: Thu, 09 Feb 2012 14:19:33 -0500
> 
> But completion is smart now! :)
> 
> C-x b <emTAB
> 
> will happily complete to *info*<emacs>

But for that, I need to _think_ first.  When I go to another manual, I
don't want to think about how to set up the completion thingy.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#10770; Package emacs. (Fri, 10 Feb 2012 10:25:01 GMT) Full text and rfc822 format available.

Message #41 received at 10770 <at> debbugs.gnu.org (full text, mbox):

From: Juri Linkov <juri <at> jurta.org>
To: Glenn Morris <rgm <at> gnu.org>
Cc: 10770 <at> debbugs.gnu.org
Subject: Re: bug#10770: info-display-manual replaces existing *info* buffer
Date: Fri, 10 Feb 2012 12:14:56 +0200
>> PS maybe there should be an `info-rename' command that renames an info
>> buffer to include the name of the displayed manual.
>
> Or maybe `rename-uniquely' should get some (optional) smart behaviour to
> use more meaningful names. Names of manuals in info, names of recipient
> of current mail message, etc.

Then functions like `occur-rename-buffer' could be replaced with a simple
buffer-local naming function (named e.g. `rename-buffer-name-function')
with the behaviour similar to `compilation-buffer-name-function'.

This will help to replace such customizations as:

(add-hook 'occur-hook (lambda () (occur-rename-buffer t)))
(setq compilation-buffer-name-function
      (lambda (mode-name)
        (generate-new-buffer-name
         (concat "*" (downcase mode-name) "*"))))

with just:

(add-hook 'occur-hook 'rename-uniquely)
(add-hook 'compilation-mode-hook 'rename-uniquely)




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#10770; Package emacs. (Fri, 10 Feb 2012 15:15:02 GMT) Full text and rfc822 format available.

Message #44 received at 10770 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Glenn Morris <rgm <at> gnu.org>
Cc: 10770 <at> debbugs.gnu.org
Subject: Re: bug#10770: info-display-manual replaces existing *info* buffer
Date: Fri, 10 Feb 2012 10:13:29 -0500
>> PS maybe there should be an `info-rename' command that renames an info
>> buffer to include the name of the displayed manual.
> Or maybe `rename-uniquely' should get some (optional) smart behaviour to
> use more meaningful names. Names of manuals in info, names of recipient
> of current mail message, etc.

You mean improve uniquify to handle these cases as well?
Agreed, that would be good,


        Stefan




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#10770; Package emacs. (Fri, 10 Feb 2012 15:17:02 GMT) Full text and rfc822 format available.

Message #47 received at 10770 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Glenn Morris <rgm <at> gnu.org>
Cc: 10770 <at> debbugs.gnu.org, Eli Zaretskii <eliz <at> gnu.org>
Subject: Re: bug#10770: info-display-manual replaces existing *info* buffer
Date: Fri, 10 Feb 2012 10:15:06 -0500
>   Maybe it would be good to append manual names to buffer names as
>   suffixes like "*info*<gnu>" and "*info*<emacs>" to make unique and
>   recognizable buffer names?

If we want info-display-manual to do that, we'd need to make sure that
either you can't move up to `dir' and select some other manual in those
info buffers, or otherwise catch this case and dynamically rename the
buffer (e.g. with uniquify).


        Stefan




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#10770; Package emacs. (Sun, 02 Dec 2012 06:27:02 GMT) Full text and rfc822 format available.

Message #50 received at 10770 <at> debbugs.gnu.org (full text, mbox):

From: Chong Yidong <cyd <at> gnu.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 10770 <at> debbugs.gnu.org, Glenn Morris <rgm <at> gnu.org>
Subject: Re: bug#10770: info-display-manual replaces existing *info* buffer
Date: Sun, 02 Dec 2012 14:24:27 +0800
Eli Zaretskii <eliz <at> gnu.org> writes:

>> Maybe require a prefix arg, or have an option, to get that behaviour
>> if you don't like it.
>
> Juri's patch for generating *info*<N> automatically is OK with me.

Me too; added to trunk.  The other suggestions discussed in this thread
don't seem particularly necessary to me.




bug closed, send any further explanations to 10770 <at> debbugs.gnu.org and Glenn Morris <rgm <at> gnu.org> Request was from Chong Yidong <cyd <at> gnu.org> to control <at> debbugs.gnu.org. (Sun, 02 Dec 2012 06:28:03 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sun, 30 Dec 2012 12:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 11 years and 129 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.