From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Kevin Ryde Newsgroups: gmane.emacs.devel Subject: Re: `next-file' in etags.el signaling error to denote end of operation Date: Sun, 27 Dec 2009 11:34:44 +1100 Organization: Bah Humbug Message-ID: <87aax5i7a3.fsf@blah.blah> References: <87y6l1uogd.fsf@freebits.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: ger.gmane.org 1261874144 15136 80.91.229.12 (27 Dec 2009 00:35:44 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 27 Dec 2009 00:35:44 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Dec 27 01:35:31 2009 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1NOh6Y-0000pI-JB for ged-emacs-devel@m.gmane.org; Sun, 27 Dec 2009 01:35:30 +0100 Original-Received: from localhost ([127.0.0.1]:41997 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NOh6W-0007Si-Ab for ged-emacs-devel@m.gmane.org; Sat, 26 Dec 2009 19:35:28 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NOh6Q-0007QW-MQ for emacs-devel@gnu.org; Sat, 26 Dec 2009 19:35:22 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NOh6M-0007Kp-KV for emacs-devel@gnu.org; Sat, 26 Dec 2009 19:35:22 -0500 Original-Received: from [199.232.76.173] (port=39297 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NOh6M-0007Ke-GM for emacs-devel@gnu.org; Sat, 26 Dec 2009 19:35:18 -0500 Original-Received: from mailout2-16.pacific.net.au ([125.255.80.143]:41457 helo=mailout2.pacific.net.au) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NOh6M-0002JI-0U for emacs-devel@gnu.org; Sat, 26 Dec 2009 19:35:18 -0500 Original-Received: from mailproxy1.pacific.net.au (mailproxy1.pacific.net.au [61.8.2.162]) by mailout2.pacific.net.au (Postfix) with ESMTP id E306F19C2F7 for ; Sun, 27 Dec 2009 11:35:13 +1100 (EST) Original-Received: from blah.blah (ppp2BAA.dyn.pacific.net.au [61.8.43.170]) by mailproxy1.pacific.net.au (Postfix) with ESMTP id 308778C04 for ; Sun, 27 Dec 2009 11:35:12 +1100 (EST) Original-Received: from gg by blah.blah with local (Exim 4.71) (envelope-from ) id 1NOh5o-0004GX-HP for emacs-devel@gnu.org; Sun, 27 Dec 2009 11:34:44 +1100 In-Reply-To: <87y6l1uogd.fsf@freebits.de> (Tobias C. Rittweiler's message of "Fri, 18 Dec 2009 01:15:46 +0100") User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.1 (gnu/linux) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:118828 Archived-At: --=-=-= "Tobias C. Rittweiler" writes: > > This makes it not all that easy to call `tags-query-replace' multiple > times in a row programmatically as far as I can see. I struck that recently too, trying to use it programmatically. I wondered if it was the right tool for the job. I also struck that if you pass relative filenames then they can be taken relative to the directories of other files in the list, if some of those are in buffers already. I've been contemplating the change below, without being sure if it affects anything except programmed usages, which may not be its purpose ... 2009-11-16 Kevin Ryde * progmodes/etags.el (next-file): expand-file-name on files from the eval, the same as in the tags-table-files case. This lets tags-query-replace go to the right place if the evalled form gives relative filenames some of which are already in buffers. --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=etags.el.exapnd-file-name.diff Index: etags.el =================================================================== RCS file: /sources/emacs/emacs/lisp/progmodes/etags.el,v retrieving revision 1.218 diff -u -u -r1.218 etags.el --- etags.el 5 Dec 2009 22:01:04 -0000 1.218 +++ etags.el 27 Dec 2009 00:26:41 -0000 @@ -1708,7 +1708,8 @@ (tags-table-files)))))))) (t ;; Initialize the list by evalling the argument. - (setq next-file-list (eval initialize)))) + ;; expand-file-name in case the tags-loop-operate goes to a new dir. + (setq next-file-list (mapcar 'expand-file-name (eval initialize))))) (unless next-file-list (and novisit (get-buffer " *next-file*") --=-=-=--