emacs-pretest-bug
[Top][All Lists]
Advanced

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

Re: Update filename history after several actions


From: Dan Nicolaescu
Subject: Re: Update filename history after several actions
Date: Wed, 14 Sep 2005 11:13:31 -0700


"Richard M. Stallman" <address@hidden> writes:

  >     ;; update file-name-history after loading a file with the gnuclient
  >     ;; uses gnuclient(w)
  >     (eval-after-load "gnuserv"
  >       '(defadvice server-find-file( after server-find-file-update act )
  >      (setq file-name-history (cons (ad-get-arg 0) file-name-history))))

This one works already for emacsclient/emacsserver maybe gnuserv needs
to do the same thing as emacsserver...

  >     ;; update file-name-history after loading a file with dired
  >     (eval-after-load "dired"
  >       '(defadvice dired-find-file( around dired-find-file-history act )
  >      (let ((file (dired-get-file-for-visit)))
  >        ad-do-it
  >        (setq file-name-history (cons file file-name-history)))))
  > 
  > Can you explain the scenario where you would want to use these file
  > names from the history?  When you're in that buffer, the file name is
  > available as the default, and can be yanked with M-p.

As a user I would like this one.
A lot of times I do M-x locate to find a file and then press RET in
the *Locate* buffer to edit it. Later after killing both the locate
and the file buffer I need to edit the same file again. I would be
nice if it was available in the C-x C-f history. 
In the *Locate* buffer RET is bound to dired-advertised-find-file.




reply via email to

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