help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: looping cursor position in dired


From: rgb
Subject: Re: looping cursor position in dired
Date: 17 Nov 2005 15:54:28 -0800
User-agent: G2/0.2

Sebastian Luque wrote:
> Hello,
>
> Before I start writing something too complicated, what is the best way to
> allow the cursor to loop through the dired buffer?  i.e. if the cursor is
> at the end of the buffer and you hit [up] (dired-next-line), then the
> cursor would move to the first line; likewise for the opposite action.
>
> Thanks,

Yes it would be a shame if you did something complicated;)

(defadvice dired-next-line
  (before my-buff-wrap activate compile) "With wrapping"
  (when (eobp) (goto-char (point-min))))

(defadvice dired-previous-line
  (before my-buff-wrap activate compile) "With wrapping"
  (when (bobp) (goto-char (point-max))))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]