* strange generate-new-buffer-name behaviour
@ 2010-12-11 19:26 Alin Soare
2010-12-11 20:06 ` Ken Raeburn
0 siblings, 1 reply; 4+ messages in thread
From: Alin Soare @ 2010-12-11 19:26 UTC (permalink / raw)
To: Emacs Dev
[-- Attachment #1: Type: text/plain, Size: 503 bytes --]
I discovered an error while reading the info page for generating a name for
an unexisting buffer :
In 27.3 Buffer Names I see written so:
(generate-new-buffer-name "foo")
=> "foo<5>"
(generate-new-buffer-name "foo" "foo<3>")
=> "foo<3>"
(generate-new-buffer-name "foo" "foo<6>")
=> "foo<5>"
However, for me all these forms evaluate to "foo"
Did I miss something, or is this an error concerning the second parameter?
Alin
[-- Attachment #2: Type: text/html, Size: 769 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: strange generate-new-buffer-name behaviour
2010-12-11 19:26 strange generate-new-buffer-name behaviour Alin Soare
@ 2010-12-11 20:06 ` Ken Raeburn
2010-12-11 22:53 ` Alin Soare
0 siblings, 1 reply; 4+ messages in thread
From: Ken Raeburn @ 2010-12-11 20:06 UTC (permalink / raw)
To: Alin Soare; +Cc: Emacs Dev
On Dec 11, 2010, at 14:26, Alin Soare wrote:
> I discovered an error while reading the info page for generating a name for an unexisting buffer :
>
> In 27.3 Buffer Names I see written so:
>
> (generate-new-buffer-name "foo")
> => "foo<5>"
> (generate-new-buffer-name "foo" "foo<3>")
> => "foo<3>"
> (generate-new-buffer-name "foo" "foo<6>")
> => "foo<5>"
>
> However, for me all these forms evaluate to "foo"
This might be obvious, but: Do you actually have existing buffers named "foo", "foo<2>", "foo<3>", and "foo<4>" as described in the paragraph before that example code?
Ken
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: strange generate-new-buffer-name behaviour
2010-12-11 20:06 ` Ken Raeburn
@ 2010-12-11 22:53 ` Alin Soare
2010-12-12 2:46 ` Ken Raeburn
0 siblings, 1 reply; 4+ messages in thread
From: Alin Soare @ 2010-12-11 22:53 UTC (permalink / raw)
To: Ken Raeburn; +Cc: Emacs Dev
[-- Attachment #1: Type: text/plain, Size: 550 bytes --]
>
>
> > (generate-new-buffer-name "foo")
> > => "foo<5>"
> > (generate-new-buffer-name "foo" "foo<3>")
> > => "foo<3>"
> > (generate-new-buffer-name "foo" "foo<6>")
> > => "foo<5>"
> >
> > However, for me all these forms evaluate to "foo"
>
> This might be obvious, but: Do you actually have existing buffers named
> "foo", "foo<2>", "foo<3>", and "foo<4>" as described in the paragraph before
> that example code?
>
I did not create the buffers with the given names.
alin
[-- Attachment #2: Type: text/html, Size: 1054 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: strange generate-new-buffer-name behaviour
2010-12-11 22:53 ` Alin Soare
@ 2010-12-12 2:46 ` Ken Raeburn
0 siblings, 0 replies; 4+ messages in thread
From: Ken Raeburn @ 2010-12-12 2:46 UTC (permalink / raw)
To: Alin Soare; +Cc: Emacs Dev
[-- Attachment #1: Type: text/plain, Size: 906 bytes --]
On Dec 11, 2010, at 17:53, Alin Soare wrote:
>
> > (generate-new-buffer-name "foo")
> > => "foo<5>"
> > (generate-new-buffer-name "foo" "foo<3>")
> > => "foo<3>"
> > (generate-new-buffer-name "foo" "foo<6>")
> > => "foo<5>"
> >
> > However, for me all these forms evaluate to "foo"
>
> This might be obvious, but: Do you actually have existing buffers named "foo", "foo<2>", "foo<3>", and "foo<4>" as described in the paragraph before that example code?
>
> I did not create the buffers with the given names.
Then that explains why you're getting different results. The function gives you back "foo" if that buffer doesn't exist, or finds a number to append so that it doesn't match the name of an existing buffer. The text before the example explains how it assumes some of those buffers already exist.
Ken
[-- Attachment #2: Type: text/html, Size: 1756 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2010-12-12 2:46 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-12-11 19:26 strange generate-new-buffer-name behaviour Alin Soare
2010-12-11 20:06 ` Ken Raeburn
2010-12-11 22:53 ` Alin Soare
2010-12-12 2:46 ` Ken Raeburn
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.