unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* RE: dired-sort-toggle-or-edit and point on first file
       [not found] <87oe1x1gqe.fsf@jidanni.org>
@ 2006-01-29 15:56 ` Drew Adams
  2006-01-31 19:38   ` Kevin Rodgers
  0 siblings, 1 reply; 2+ messages in thread
From: Drew Adams @ 2006-01-29 15:56 UTC (permalink / raw)
  Cc: bug-gnu-emacs

     s runs the command dired-sort-toggle-or-edit
     Toggle between sort by date/name and refresh the dired buffer.

    Nice, but when we hit it we don't stay at the top of the list, but are
    sent tumbling below, cursor glued to that former (often) first file.
    Yes, a feature I know, but no way offered to start afresh at top
    without adding stuff to ~/.emacs.

As you say, this is not a bug - it is by design. But perhaps the design
could be improved (made more flexible).

I must admit that I too have been annoyed by this. I've grown used to it, so
I work around it in various ways unconsciously.

The design is to permit the current line to stay in view, and that makes
sense in many contexts - in particular, if you have inserted subdirectories.

However, sorting the directory listing is an operation on the whole listing,
not on an individual entry, and there are other contexts (or work habits) in
which it makes more sense to redisplay the listing starting at the top.

I think it would be good if this behavior were configurable. Personally, I
usually do not care about keeping the current line in view; I prefer to see
the top of the listing.

(Follow-ups should go to emacs-devel, not bug-gnu-emacs, since this is a
design issue, not a bug.)

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

* Re: dired-sort-toggle-or-edit and point on first file
  2006-01-29 15:56 ` dired-sort-toggle-or-edit and point on first file Drew Adams
@ 2006-01-31 19:38   ` Kevin Rodgers
  0 siblings, 0 replies; 2+ messages in thread
From: Kevin Rodgers @ 2006-01-31 19:38 UTC (permalink / raw)


Drew Adams wrote:
>      s runs the command dired-sort-toggle-or-edit
>      Toggle between sort by date/name and refresh the dired buffer.
> 
>     Nice, but when we hit it we don't stay at the top of the list, but are
>     sent tumbling below, cursor glued to that former (often) first file.
>     Yes, a feature I know, but no way offered to start afresh at top
>     without adding stuff to ~/.emacs.
> 
> As you say, this is not a bug - it is by design. But perhaps the design
> could be improved (made more flexible).
> 
> I must admit that I too have been annoyed by this. I've grown used to it, so
> I work around it in various ways unconsciously.
> 
> The design is to permit the current line to stay in view, and that makes
> sense in many contexts - in particular, if you have inserted subdirectories.
> 
> However, sorting the directory listing is an operation on the whole listing,
> not on an individual entry, and there are other contexts (or work habits) in
> which it makes more sense to redisplay the listing starting at the top.

The revert-buffer buffer command (on `g' in Dired) also applies to the
whole listing, but I find it very convenient that it leaves point on the
same file (when possible).

> I think it would be good if this behavior were configurable. Personally, I
> usually do not care about keeping the current line in view; I prefer to see
> the top of the listing.

(defadvice dired-revert (after beginning-of-buffer activate)
   "Move to beginning of buffer (instead of keeping point on the current 
file)."
   (goto-char (point-min)))

-- 
Kevin Rodgers

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

end of thread, other threads:[~2006-01-31 19:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <87oe1x1gqe.fsf@jidanni.org>
2006-01-29 15:56 ` dired-sort-toggle-or-edit and point on first file Drew Adams
2006-01-31 19:38   ` Kevin Rodgers

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).