unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [PATCH] Inconsistent defaults for uniquify
@ 2013-12-08 22:20 Matthias Meulien
  2013-12-10 23:52 ` Juri Linkov
  0 siblings, 1 reply; 3+ messages in thread
From: Matthias Meulien @ 2013-12-08 22:20 UTC (permalink / raw)
  To: emacs-devel

After:
 
   emacs -q

in the Options menu I can see that `Use Directory Names in Buffer 
Names' is checked. Then:

   M-! mkdir a; mkdir b; touch a/test; touch b/test
   C-xC-f a/test
   C-xC-f b/test

Then there are two buffers named `test|a' and `test|b'. Uncheck 
`Use...' in the Options menu and check again `Use...' in the 
Options menu. Now buffers are named `a/test' and `b/test'. The 
buffer name style has changed!!

Line 12227 of `menu-bar.el' and line 96 of uniquify.el define 
different defaults for `uniquify-buffer-name-style'.

diff --git a/lisp/menu-bar.el b/lisp/menu-bar.el
index 13c4c36..38fe5ab 100644
--- a/lisp/menu-bar.el
+++ b/lisp/menu-bar.el
@@ -1226,7 +1226,7 @@ mail status in mode line"))
        (require 'uniquify)
        (setq uniquify-buffer-name-style
 	     (if (not uniquify-buffer-name-style)
-		 'forward))))
+		 'post-forward))))
 
     (bindings--define-key menu [edit-options-separator]
       menu-bar-separator)

-- 
Matthias



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: Inconsistent defaults for uniquify
  2013-12-08 22:20 [PATCH] Inconsistent defaults for uniquify Matthias Meulien
@ 2013-12-10 23:52 ` Juri Linkov
  2013-12-11  4:13   ` Stefan Monnier
  0 siblings, 1 reply; 3+ messages in thread
From: Juri Linkov @ 2013-12-10 23:52 UTC (permalink / raw)
  To: Matthias Meulien; +Cc: emacs-devel

>        (require 'uniquify)
>        (setq uniquify-buffer-name-style
> 	     (if (not uniquify-buffer-name-style)
> -		 'forward))))
> +		 'post-forward))))

Why the default is `post-forward'?  Its formatting "name|bar/mumble"
is too confusing, especially for newbies that might have a hard time
understanding what does this `|' mean that usually indicates the
logical `or' operator.

OTOH, `post-forward-angle-brackets' with "name<bar/mumble>"
is backward-compatible with the naming standard "name<2>"
so it doesn't break customizations in display-buffer-alist
that contains such regexps as "\\*Buffer\\*<[^>]+>".



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Inconsistent defaults for uniquify
  2013-12-10 23:52 ` Juri Linkov
@ 2013-12-11  4:13   ` Stefan Monnier
  0 siblings, 0 replies; 3+ messages in thread
From: Stefan Monnier @ 2013-12-11  4:13 UTC (permalink / raw)
  To: Juri Linkov; +Cc: Matthias Meulien, emacs-devel

> OTOH, `post-forward-angle-brackets' with "name<bar/mumble>"
> is backward-compatible with the naming standard "name<2>"
> so it doesn't break customizations in display-buffer-alist
> that contains such regexps as "\\*Buffer\\*<[^>]+>".

Go for it.


        Stefan



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-12-11  4:13 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-12-08 22:20 [PATCH] Inconsistent defaults for uniquify Matthias Meulien
2013-12-10 23:52 ` Juri Linkov
2013-12-11  4:13   ` Stefan Monnier

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).