unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Tassilo Horn <tassilo@member.fsf.org>
To: emacs-devel@gnu.org
Subject: Re: How to run code after a dired buffer is fully initialized?
Date: Tue, 07 Apr 2009 08:23:27 +0200	[thread overview]
Message-ID: <87ocv9t21s.fsf@thinkpad.tsdh.de> (raw)
In-Reply-To: <yoijtz51o2a8.fsf@remote2.student.chalmers.se> ("Johan Bockgård"'s message of "Tue, 07 Apr 2009 00:17:19 +0200")

bojohan+news@dd.chalmers.se (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	other threads:[~2009-04-07  6:23 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-06 20:27 How to run code after a dired buffer is fully initialized? Tassilo Horn
2009-04-06 22:17 ` Johan Bockgård
2009-04-07  6:23   ` Tassilo Horn [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87ocv9t21s.fsf@thinkpad.tsdh.de \
    --to=tassilo@member.fsf.org \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).