help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: no-word.el fails on Windows NT


From: Kevin Rodgers
Subject: Re: no-word.el fails on Windows NT
Date: Fri, 01 Jun 2007 08:05:23 -0600
User-agent: Thunderbird 1.5.0.10 (Macintosh/20070221)

poti@potis.org wrote:
On 10:21 Thu 24 May     , Eli Zaretskii wrote:
Try to change the above line to this (untested):

        (if file (setq file (shell-quote-argument file)))

(this uses the quoting rules suitable for the underlying platform's
shell).

...
Also, you should probably report the problem to the author.

With the help of the author, I was able to come up with a solution. Rather than treating "-" as input from stdin, Windows treated "-" as a filename. Changing this to (buffer-name) worked across platforms. I added shell quoting, for good measure. Unless I hear of a more elegant solution, I will update no-word.el on the Emacs wiki.

(buffer-name) does not return a file name that corresponds to stdin on
any platform, so why does that work?

If you want the name of the file that the buffer is visiting, use
(buffer-file-name) or (file-name-nondirectory (buffer-file-name)),
shell-quoted of course.

--
Kevin Rodgers
Denver, Colorado, USA





reply via email to

[Prev in Thread] Current Thread [Next in Thread]