unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: "David Chappaz" <david.chappaz@free.fr>
To: "'Eli Zaretskii'" <eliz@gnu.org>, <help-gnu-emacs@gnu.org>
Subject: RE: shell-command causes problems with absolute/relative paths in TAGS
Date: Fri, 6 Jan 2012 16:03:47 -0000	[thread overview]
Message-ID: <96C2AF32F1EC4A1997BB692A003ED374@EUROPE.ROOT.PRI> (raw)
In-Reply-To: <83ipkoon0g.fsf@gnu.org>


> > The variable name depends on which shell you use. By default, only
> > explicit-bash-args and explicit-sh-args are defined in emacs.
> > On windows, cmdproxy.exe is the default shell, hence the variable name.
> 
> Well, I tried that on Windows with cmdproxy as the shell, and I still
> don't see this variable.

Ah well I haven't been accurate enough.
It's for the user to create this variable if they want to. It will only be
used if its name perfectly matches that of the shell.
See details in section 7.10 of
http://www.gnu.org/software/emacs/windows/Sub_002dprocesses.html

 
> > 2/ Now from e.g. a scratch buffer, I evaluate
> >
> > (progn
> >    (cd "C:/test/")
> >    (call-process-region (point) (point) "C:/Program
> > Files/Emacs/emacs-23.3/bin/cmdproxy.exe" nil (current-buffer) nil "-c"
> > "ctags -e -L filelist.txt"))
> >
> > which is more or less what M-x shell-command would do... then the result
> is
> > incorrect.
> 
> Yes, I see the problem.

That's a start, I'm not the only one any more :-)

 
> > 3/ Worse, if you kill the original shell buffer created in 1/, and
> repeat
> > the same operation as in 1/... then the result is incorrect.
> >
> > So it really looks like something is happening in call-process-region...
> 
> It must be a bug in ctags, no matter what call-process-region does.  I
> suspect that it doesn't correctly handle the backslash in file names,
> and fails to realize that C:\foo\bar\baz.c and C:/foo/bar share the
> same directory.  That's because the "absolute" file names it produces
> are of the form "C:\foo\bar\./file", note the mixture of forward- and
> back-slashes.

Yes, what you're saying makes perfect sense. The mixture of slashes is
indeed an indication, but what I can't explain, is why ctags would produce a
different result before and after call-process-region is called (steps 1/
and 3/ respectively)

Surely emacs must be passing slightly different arguments to ctags (perhaps
slashes in a different orientation), before and after the first call to
call-process-region ?





  reply	other threads:[~2012-01-06 16:03 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-02 22:33 M-x mystery Silvio Levy
2012-01-02 23:25 ` Drew Adams
2012-01-04 16:05   ` shell-command causes problems with absolute/relative paths in TAGS David Chappaz
2012-01-04 16:15     ` Vladimir Murzin
2012-01-04 16:27       ` David Chappaz
2012-01-05  5:41     ` Bob Proulx
2012-01-05 12:20       ` David Chappaz
2012-01-05 16:53         ` Unknown
2012-01-05 22:20         ` Bob Proulx
2012-01-06 11:12           ` David Chappaz
2012-01-06 11:38             ` Eli Zaretskii
2012-01-06 13:04               ` David Chappaz
2012-01-06 15:42                 ` Eli Zaretskii
2012-01-06 16:03                   ` David Chappaz [this message]
2012-01-06 16:12                     ` David Chappaz
2012-01-06 18:46                     ` Eli Zaretskii
2012-01-06 11:25     ` Eli Zaretskii
2012-01-06 14:04       ` David Chappaz
2012-01-06 15:12         ` Eli Zaretskii
2012-01-06 15:52           ` Juanma Barranquero
2012-01-06 11:34     ` Eli Zaretskii

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=96C2AF32F1EC4A1997BB692A003ED374@EUROPE.ROOT.PRI \
    --to=david.chappaz@free.fr \
    --cc=eliz@gnu.org \
    --cc=help-gnu-emacs@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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).