all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Kevin Ryde <user42@zip.com.au>
To: emacs-devel@gnu.org
Subject: Re: `next-file' in etags.el signaling error to denote end of operation
Date: Sun, 27 Dec 2009 11:34:44 +1100	[thread overview]
Message-ID: <87aax5i7a3.fsf@blah.blah> (raw)
In-Reply-To: <87y6l1uogd.fsf@freebits.de> (Tobias C. Rittweiler's message of "Fri, 18 Dec 2009 01:15:46 +0100")

[-- Attachment #1: Type: text/plain, Size: 909 bytes --]

"Tobias C. Rittweiler" <tcr@freebits.de> 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  <user42@zip.com.au>

	* 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.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: etags.el.exapnd-file-name.diff --]
[-- Type: text/x-diff, Size: 661 bytes --]

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*")

      reply	other threads:[~2009-12-27  0:34 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-18  0:15 `next-file' in etags.el signaling error to denote end of operation Tobias C. Rittweiler
2009-12-27  0:34 ` Kevin Ryde [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

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

  git send-email \
    --in-reply-to=87aax5i7a3.fsf@blah.blah \
    --to=user42@zip.com.au \
    --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 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.