From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: era@iki.fi Newsgroups: gmane.emacs.bugs Subject: Re: Emacs Improvement Date: 13 Jan 2004 09:33:37 +0200 Organization: People Who Are Not Old Enough For Unix (Honorary Member Emeritus) Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Message-ID: <873caknw22.fsf@era.iki.fi> References: <87u136s81m.fsf@ulm.my.lan> <87zncxtgvo.fsf@era.iki.fi> <20040110004309.GA593@pikatoste.homeip.net> <87vfnhquny.fsf@era.iki.fi> <20040112172750.GB593@pikatoste.homeip.net> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: sea.gmane.org 1073979306 1148 80.91.224.253 (13 Jan 2004 07:35:06 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 13 Jan 2004 07:35:06 +0000 (UTC) Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Jan 13 08:35:03 2004 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1AgJ4o-0006Rc-00 for ; Tue, 13 Jan 2004 08:35:03 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AgJ45-0003YA-2D for geb-bug-gnu-emacs@m.gmane.org; Tue, 13 Jan 2004 02:34:17 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1AgJ3z-0003Vf-SG for bug-gnu-emacs@gnu.org; Tue, 13 Jan 2004 02:34:11 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1AgJ3T-0002wz-LL for bug-gnu-emacs@gnu.org; Tue, 13 Jan 2004 02:34:10 -0500 Original-Received: from [80.91.224.249] (helo=main.gmane.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AgJ3T-0002vi-1A for bug-gnu-emacs@gnu.org; Tue, 13 Jan 2004 02:33:39 -0500 Original-Received: from list by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 1AgJ3S-0001qq-00 for ; Tue, 13 Jan 2004 08:33:38 +0100 Mail-Followup-To: bug-gnu-emacs@gnu.org X-Injected-Via-Gmane: http://gmane.org/ Original-To: bug-gnu-emacs@gnu.org Original-Received: from sea.gmane.org ([80.91.224.252]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1AgJ3R-0001qh-00 for ; Tue, 13 Jan 2004 08:33:37 +0100 Original-Received: from news by sea.gmane.org with local (Exim 3.35 #1 (Debian)) id 1AgJ3R-0000GI-00 for ; Tue, 13 Jan 2004 08:33:37 +0100 Original-Lines: 32 Original-X-Complaints-To: usenet@sea.gmane.org Mail-Copies-To: nobody User-Agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Bug reports for GNU Emacs, the Swiss army knife of text editors List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.bugs:6552 X-Report-Spam: http://spam.gmane.org/gmane.emacs.bugs:6552 On Mon, 12 Jan 2004 18:27:51 +0100, Arturo García Ares 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 500 pieces of spam for want to reach me, see instead. each wanted message.