all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Spencer Baugh <sbaugh@janestreet.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: sbaugh@catern.com, Stefan Monnier <monnier@iro.umontreal.ca>,
	62732@debbugs.gnu.org
Subject: bug#62732: 29.0.60; uniquify-trailing-separator-p affects any buffer whose name matches a dir in CWD
Date: Tue, 11 Jul 2023 08:31:51 -0400	[thread overview]
Message-ID: <ierv8eqeiiw.fsf@janestreet.com> (raw)
In-Reply-To: <83v8eq7j3i.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 11 Jul 2023 15:01:21 +0300")

Eli Zaretskii <eliz@gnu.org> writes:
>> From: Stefan Monnier <monnier@iro.umontreal.ca>
>> Cc: sbaugh@catern.com,  62732@debbugs.gnu.org
>> Date: Mon, 10 Jul 2023 22:55:23 -0400
>> 
>> >> No, `create-file-buffer` used to throw away the trailing slash, rather
>> >> than make use of this information.
>> 
>> [ And instead uniquify had to try and recover that information by checking
>>   the file-system.  ]
>> 
>> >> Not sure why Dired bothered to remove the tailing slash when calling
>> >> it, maybe because a long time ago `create-file-buffer` had a bug if
>> >> the name had a trailing slash.
>> > So why the need for the change in dired.el?
>> 
>> Because we do want Dired to tell `create-file-buffer` that this is
>> a directory and it should thus obey `uniquify-trailing-separator-p`.
>
> When will we NOT want to tell create-file-buffer that the file is a
> directory?  Your original response, viz.:
>
>> I think the fact that the callers get to control this regardless of
>> whether there is a file or directory by that name is one of the best
>> part of this change.
>
> seemed to indicate that there are cases where we would not want
> create-file-buffer to know that, but I suspect that we will always
> want, because otherwise uniquify will not work in those cases, and
> Spencer will report a bug.
>
> My comments assumed that indeed we will (almost) always want to tell
> create-file-buffer this is a directory.

One contribution, not intended to be exhaustive of all use cases, and
not intended to be definitively a good idea: a user could want opened
tar files with their file listing view to have a trailing slash, even
though they aren't actually directories.

And with my approach that is possibly just by running
file-name-as-directory over the name before passing it to
create-file-buffer.





  reply	other threads:[~2023-07-11 12:31 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-09  1:37 bug#62732: 29.0.60; uniquify-trailing-separator-p affects any buffer whose name matches a dir in CWD sbaugh
2023-04-09  1:49 ` sbaugh
2023-04-09 12:13   ` sbaugh
2023-04-21 20:59     ` sbaugh
2023-05-05  6:06       ` Eli Zaretskii
2023-07-03 18:54         ` sbaugh
2023-07-03 19:19           ` Eli Zaretskii
2023-05-05 20:30     ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-07-08 17:48       ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-07-09 14:49         ` sbaugh
2023-05-05 20:13   ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-05-05 20:37     ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-05-05 21:14     ` Spencer Baugh
2023-07-09 15:38     ` sbaugh
2023-07-09 16:15       ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-07-10  1:36         ` sbaugh
2023-07-10  2:04           ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-07-10  2:55             ` sbaugh
2023-07-10  3:38               ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-07-10 12:57             ` Eli Zaretskii
2023-07-10 12:56           ` Eli Zaretskii
2023-07-10 13:39             ` Spencer Baugh
2023-07-10 14:25               ` Eli Zaretskii
2023-07-10 16:53             ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-07-10 19:12               ` Eli Zaretskii
2023-07-10 19:18                 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-07-11  2:25                   ` Eli Zaretskii
2023-07-11  2:55                     ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-07-11 12:01                       ` Eli Zaretskii
2023-07-11 12:31                         ` Spencer Baugh [this message]
2023-07-11 15:31                           ` Eli Zaretskii
2023-07-12 13:04                             ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-07-12 13:42                               ` Eli Zaretskii
2023-07-12 13:57                                 ` Spencer Baugh
2023-07-12 19:43                                   ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-07-13  4:50                                 ` Eli Zaretskii
2023-07-13 15:52                                   ` sbaugh
2023-07-13 16:02                                     ` Eli Zaretskii
2023-07-13 16:21                                       ` sbaugh
2023-07-17  5:03                                         ` Michael Heerdegen
2023-07-17 11:35                                           ` Eli Zaretskii
2023-07-18  4:13                                             ` Michael Heerdegen
2023-07-18 11:12                                               ` Eli Zaretskii
2023-07-13 21:51                                 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ierv8eqeiiw.fsf@janestreet.com \
    --to=sbaugh@janestreet.com \
    --cc=62732@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    --cc=sbaugh@catern.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.