emacs-devel
[Top][All Lists]
Advanced

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

Re: How to run code after a dired buffer is fully initialized?


From: Tassilo Horn
Subject: Re: How to run code after a dired buffer is fully initialized?
Date: Tue, 07 Apr 2009 08:23:27 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.92 (gnu/linux)

address@hidden (Johan Bockgård) writes:

Hi Johan,

>> This works quite well, but I would like dired to remember the line
>> point was on the last time I visited that directory, and to go to
>> that line when I come back. I tried to use a hashtable
>> (`th-dired-dir-line-map') mapping the directory to the line number.
>> The remembering part works (`th-dired-save-line'), but I cannot find
>> out where I should call `th-dired-goto-line'.
>
> [dired.el]
>
>     (defun dired-initial-position (dirname)
>       ;; Where point should go in a new listing of DIRNAME.
>       ;; Point assumed at beginning of new subdir line.
>       ;; You may redefine this function as you wish, e.g. like in dired-x.el.
>       (end-of-line)
>       (if dired-trivial-filenames (dired-goto-next-nontrivial-file)))

Ah, great!  Since the function seems to be intended for redefinition, I
think a user var `dired-initial-position-function' would be better
(easier to find) for users.

Bye,
Tassilo




reply via email to

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