all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: era@iki.fi
Subject: Re: Emacs Improvement
Date: 13 Jan 2004 09:33:37 +0200	[thread overview]
Message-ID: <873caknw22.fsf@era.iki.fi> (raw)
In-Reply-To: 20040112172750.GB593@pikatoste.homeip.net

On Mon, 12 Jan 2004 18:27:51 +0100, Arturo García Ares
<arturo@pikatoste.homeip.net> posted to bug-gnu-emacs:
 > On Mon, Jan 12, 2004 at 01:44:14PM +0200, era@iki.fi wrote:
 >> > This is such a snippet:
 >> > (add-hook 'find-file-hooks
 >> >           (lambda ()
 >> >             (add-to-list 'file-name-history
 >> >                          (abbreviate-file-name (buffer-file-name)))))
 >> This modifies what happens when you M-x find-file within Emacs, not
 >> what happens with file name arguments passed in on the command line.
 >> Also it duplicates what Emacs already does by itself (you don't get
 >> duplicates on file-name-history because add-to-list won't add a file
 >> name which is there already).
 > File names passed as arguments to emacs are opened via find-file, so in
 > effect the above code adds those files to file-name-history.
 > Yes: duplicates are (intentionally) avoided by add-to-list, and it's
 > not optimal to let the hook execute for every visited file when it's
 > only required for non-interactive (by interactive I mean those opened
 > via C-x C-f) file opens. Nevertheless, it's harmless, except for the
 > extra cpu cycles. It's just a quick hack tu put in your .emacs, but it
 > does the job (have you tried it?)

Yes, I tried it, and it didn't work for me. But maybe my Emacs is too
old (or too new? :-)

/* era */

-- 
The email address era     the contact information   Just for kicks, imagine
at iki dot fi is heavily  link on my home page at   what it's like to get
spam filtered.  If you    <http://www.iki.fi/era/>  500 pieces of spam for
want to reach me, see     instead.                  each wanted message.

  reply	other threads:[~2004-01-13  7:33 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.229.1073581027.928.bug-gnu-emacs@gnu.org>
2004-01-08 16:45 ` Emacs Improvement Klaus Uhl
2004-01-09 13:04   ` era
2004-01-10  0:43     ` Arturo García Ares
2004-01-12 11:44       ` era
2004-01-12 17:27         ` Arturo García Ares
2004-01-13  7:33           ` era [this message]
2004-01-13 21:21             ` Arturo García Ares
2004-01-08 15:36 Adam Morton

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

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

  git send-email \
    --in-reply-to=873caknw22.fsf@era.iki.fi \
    --to=era@iki.fi \
    /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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.