[Top][All Lists]
[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: |
Johan Bockgård |
Subject: |
Re: How to run code after a dired buffer is fully initialized? |
Date: |
Tue, 07 Apr 2009 00:17:19 +0200 |
User-agent: |
Gnus/5.110009 (No Gnus v0.9) Emacs/23.0.90 (gnu/linux) |
Tassilo Horn <address@hidden> writes:
> 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)))