all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* etags -f /dev/stdout enhancement request
@ 2003-01-02  1:08 Lyndon Nerenberg {VE6BBM}
  0 siblings, 0 replies; 3+ messages in thread
From: Lyndon Nerenberg {VE6BBM} @ 2003-01-02  1:08 UTC (permalink / raw)


etags treats "-f -" as a special case in that the pathname of the
source file is not made relative to the location of the tags file.
Specifying "-f /dev/stdout" defeats this check, resulting in bogus
source file pathnames in the tags file. Enclosed is a patch that causes
"-f /dev/stdout" to be treated the same as "-f -" is.

This diff is against the 21.2 released sources.

===================================================================
RCS file: lib-src/etags.c,v
retrieving revision 1.1
diff -u -r1.1 lib-src/etags.c
--- lib-src/etags.c     2003/01/02 00:49:42     1.1
+++ lib-src/etags.c     2003/01/02 00:50:44
@@ -1094,6 +1094,10 @@
       cwd = concat (oldcwd, "/", "");
       free (oldcwd);
     }
+  if (streq (tagfile, "/dev/stdout"))
+    {
+      tagfile = "-";
+    }
   if (streq (tagfile, "-"))
     tagfiledir = cwd;
   else

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: etags -f /dev/stdout enhancement request
@ 2003-01-07 12:40 ` Francesco Potorti`
  2003-01-07 17:16   ` Lyndon Nerenberg
  0 siblings, 1 reply; 3+ messages in thread
From: Francesco Potorti` @ 2003-01-07 12:40 UTC (permalink / raw)
  Cc: Emacs developers

Lyndon, thank for your bug report.

>etags treats "-f -" as a special case in that the pathname of the
>source file is not made relative to the location of the tags file.
>Specifying "-f /dev/stdout" defeats this check, resulting in bogus
>source file pathnames in the tags file.

Yes, etags creates relative file names in tag files if the names of the
tagged files on the command line are relative names.  Otherwise it
creates absolute file names.

When it creates relative file names, they are made relative to the
directory of the tag file, which does not make sense for /dev/stdout.

Lyndon proposes to treat /dev/stdout the way it is done with "-", that
is, making file names relative to the current directory.  I see other
possibilities, on which I ask for advice:

1. when the tag file is under the /dev directory, use the current
   directory rather than /dev for creating relative file names
2. do the above only for /dev/stdout (as proposed by Lyndon)
3. when the tag file is under the /dev directory, use the root directory
   rather than /dev, which means to always create absolute file names

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: etags -f /dev/stdout enhancement request
  2003-01-07 12:40 ` Francesco Potorti`
@ 2003-01-07 17:16   ` Lyndon Nerenberg
  0 siblings, 0 replies; 3+ messages in thread
From: Lyndon Nerenberg @ 2003-01-07 17:16 UTC (permalink / raw)
  Cc: Emacs developers

>1. when the tag file is under the /dev directory, use the current
>   directory rather than /dev for creating relative file names

I think this is a better solution (e.g. /dev/fd/1).

--lyndon

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2003-01-07 17:16 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-01-02  1:08 etags -f /dev/stdout enhancement request Lyndon Nerenberg {VE6BBM}
     [not found] <pot@gnu.org>
2003-01-07 12:40 ` Francesco Potorti`
2003-01-07 17:16   ` Lyndon Nerenberg

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.