* rename-buffer and ido-everythwere
@ 2007-12-11 12:30 William Xu
2007-12-11 14:01 ` Kim F. Storm
0 siblings, 1 reply; 6+ messages in thread
From: William Xu @ 2007-12-11 12:30 UTC (permalink / raw)
To: emacs-devel
When ido-everythwere is turned on, M-x rename-buffer now would prompt up
a list of opened buffers for selection, which is awkward. I think the
old behavior that prompts nothing is a lot better.
This behavior looks like introduced by this change:
,----[ src/buffer.c ]
| Revision 1.542 - (view) (download) (as text) (annotate) - [select for diffs]
| Sun Dec 9 23:49:00 2007 UTC (36 hours, 25 minutes ago) by jurta
| Branch: MAIN
| Changes since 1.541: +2 -1 lines
| Diff to previous 1.541
|
| (Frename_buffer): Change interactive spec from "s" to
| Lisp code that uses `read-buffer' with current buffer as default.
`----
CVSROOT: /sources/emacs
Module name: emacs
Changes by: Juri Linkov <jurta> 07/12/09 23:49:00
Index: buffer.c
===================================================================
RCS file: /sources/emacs/emacs/src/buffer.c,v
retrieving revision 1.541
retrieving revision 1.542
diff -u -b -r1.541 -r1.542
--- buffer.c 28 Nov 2007 04:46:22 -0000 1.541
+++ buffer.c 9 Dec 2007 23:49:00 -0000 1.542
@@ -1169,7 +1169,8 @@
}
\f
DEFUN ("rename-buffer", Frename_buffer, Srename_buffer, 1, 2,
- "sRename buffer (to new name): \nP",
+ "(list (read-buffer \"Rename buffer (to new name): \" \
+ (current-buffer)) current-prefix-arg)",
doc: /* Change current buffer's name to NEWNAME (a string).
If second arg UNIQUE is nil or omitted, it is an error if a
buffer named NEWNAME already exists.
--
William
http://williamxu.net9.org
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: rename-buffer and ido-everythwere
2007-12-11 12:30 rename-buffer and ido-everythwere William Xu
@ 2007-12-11 14:01 ` Kim F. Storm
2007-12-11 14:43 ` William Xu
2007-12-11 14:57 ` Stefan Monnier
0 siblings, 2 replies; 6+ messages in thread
From: Kim F. Storm @ 2007-12-11 14:01 UTC (permalink / raw)
To: William Xu; +Cc: emacs-devel
William Xu <william.xwl@gmail.com> writes:
> When ido-everythwere is turned on, M-x rename-buffer now would prompt up
> a list of opened buffers for selection, which is awkward. I think the
> old behavior that prompts nothing is a lot better.
Does this fix the problem?
(put rename-buffer 'ido 'ignore)
[Sorry I don't have a recent 23.x build to test this myself]
--
Kim F. Storm <storm@cua.dk> http://www.cua.dk
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: rename-buffer and ido-everythwere
2007-12-11 14:01 ` Kim F. Storm
@ 2007-12-11 14:43 ` William Xu
2007-12-11 14:57 ` Stefan Monnier
1 sibling, 0 replies; 6+ messages in thread
From: William Xu @ 2007-12-11 14:43 UTC (permalink / raw)
To: emacs-devel
storm@cua.dk (Kim F. Storm) writes:
> Does this fix the problem?
>
> (put rename-buffer 'ido 'ignore)
You mean: (put 'rename-buffer 'ido 'ignore) ?
Hm, it makes no difference.
--
William
http://williamxu.net9.org
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: rename-buffer and ido-everythwere
2007-12-11 14:01 ` Kim F. Storm
2007-12-11 14:43 ` William Xu
@ 2007-12-11 14:57 ` Stefan Monnier
2007-12-11 21:47 ` Kim F. Storm
2007-12-12 0:12 ` Juri Linkov
1 sibling, 2 replies; 6+ messages in thread
From: Stefan Monnier @ 2007-12-11 14:57 UTC (permalink / raw)
To: Kim F. Storm; +Cc: William Xu, emacs-devel
>> When ido-everythwere is turned on, M-x rename-buffer now would prompt up
>> a list of opened buffers for selection, which is awkward. I think the
>> old behavior that prompts nothing is a lot better.
> Does this fix the problem?
> (put rename-buffer 'ido 'ignore)
Maybe a better solution (not specific to ido) is to replace
`read-buffer' with `read-string'.
Stefan
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: rename-buffer and ido-everythwere
2007-12-11 14:57 ` Stefan Monnier
@ 2007-12-11 21:47 ` Kim F. Storm
2007-12-12 0:12 ` Juri Linkov
1 sibling, 0 replies; 6+ messages in thread
From: Kim F. Storm @ 2007-12-11 21:47 UTC (permalink / raw)
To: Stefan Monnier; +Cc: William Xu, emacs-devel
Stefan Monnier <monnier@iro.umontreal.ca> writes:
>>> When ido-everythwere is turned on, M-x rename-buffer now would prompt up
>>> a list of opened buffers for selection, which is awkward. I think the
>>> old behavior that prompts nothing is a lot better.
>
>> Does this fix the problem?
>
>> (put rename-buffer 'ido 'ignore)
>
> Maybe a better solution (not specific to ido) is to replace
> `read-buffer' with `read-string'.
Indeed, that makes sense.
--
Kim F. Storm <storm@cua.dk> http://www.cua.dk
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: rename-buffer and ido-everythwere
2007-12-11 14:57 ` Stefan Monnier
2007-12-11 21:47 ` Kim F. Storm
@ 2007-12-12 0:12 ` Juri Linkov
1 sibling, 0 replies; 6+ messages in thread
From: Juri Linkov @ 2007-12-12 0:12 UTC (permalink / raw)
To: Stefan Monnier; +Cc: William Xu, emacs-devel, Kim F. Storm
> Maybe a better solution (not specific to ido) is to replace
> `read-buffer' with `read-string'.
As its documentation says, `read-buffer' is supposed to read an arbitrary
buffer name. In practice, it seems it can read only a name to switch the
buffer to.
OTOH, `rename-buffer' doesn't need the full functionality of `read-buffer':
buffer name completion and the default name in the prompt are no needed,
but the default accessible via M-n for editing and its history list are
needed, and `read-string' supports this. Fixed in CVS.
--
Juri Linkov
http://www.jurta.org/emacs/
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2007-12-12 0:12 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-12-11 12:30 rename-buffer and ido-everythwere William Xu
2007-12-11 14:01 ` Kim F. Storm
2007-12-11 14:43 ` William Xu
2007-12-11 14:57 ` Stefan Monnier
2007-12-11 21:47 ` Kim F. Storm
2007-12-12 0:12 ` Juri Linkov
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.