GNU bug report logs - #74700
[PATCH] Revert Dired buffer when clicking on last segment of directory name

Previous Next

Package: emacs;

Reported by: Visuwesh <visuweshm <at> gmail.com>

Date: Thu, 5 Dec 2024 06:13:01 UTC

Severity: normal

Tags: patch

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #31 received at 74700-done <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Visuwesh <visuweshm <at> gmail.com>
Cc: 74700-done <at> debbugs.gnu.org
Subject: Re: bug#74700: [PATCH] Revert Dired buffer when clicking on last
 segment of directory name
Date: Thu, 12 Dec 2024 12:31:15 +0200
> From: Visuwesh <visuweshm <at> gmail.com>
> Cc: 74700 <at> debbugs.gnu.org
> Date: Thu, 05 Dec 2024 13:56:44 +0530
> 
> > Thanks, a few comments below.
> >
> >> +---
> >> +*** Clicking on last segment of directory reverts buffer
> >> +When 'dired-make-directory-clickable' is non-nil, clicking on the last
> >> +segment of the directory name now reverts the Dired buffer.
> >
> > We don't call these "segments", we call them "components".  And since
> > you are talking about the last one, you could also say "base name of
> > the directory".
> 
> I've changed it to base name.
> 
> >> +        (when (search-forward ":" bound t)
> >> +          (add-text-properties
> >> +           segment-start (1- (point))
> >> +           `( mouse-face highlight
> >                ^^
> > We don't leave whitespace after the opening parenthesis.
> 
> I removed the whitespace.  But isn't that way to make lists such as
> 
>     ( 1
>       2
>       3)
> 
> aligned without manual intervention?  It is used in the list above too.
> 
> >> +              help-echo "mouse-1: revert this buffer"
> >
> > I think the help-echo should say something more similar to what we say
> > for the other components of the directory shown in the header line.
> > Something like "re-read this buffer's directory".
> 
> Now done.
> 
> >> +              keymap ,(define-keymap
> >> +                        "<mouse-2>" #'revert-buffer
> >> +                        "<follow-link>" 'follow-link
> >> +                        "RET" #'revert-buffer))))))))
> >
> > Should we perhaps call dired-revert directly?
> 
> revert-buffer-function is set to dired-revert by dired.  If someone has
> changed it, for some reason, using revert-buffer would heed their
> customisation.  So I've left it as revert-buffer.

Thanks, installed on master, and closing the bug.




This bug report was last modified 148 days ago.

Previous Next


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