[Top][All Lists]

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

Re: woman doesn't work if current buffer's directory doesn't exist

From: Eli Zaretskii
Subject: Re: woman doesn't work if current buffer's directory doesn't exist
Date: Tue, 23 Jan 2007 02:00:55 -0500

> From: Richard Stallman <address@hidden>
> Date: Mon, 22 Jan 2007 21:07:03 -0500
> Cc: address@hidden
> Reply-To: address@hidden
>     This should probably be fixed in call-process (I can't use
>     shell-command-on-region to pipe a region of a buffer through a shell
>     command if default-directory doesn't exist, for example, and I'd like
>     to be able to).  Perhaps default-directory could default to the value
>     of temporary-file-directory if it doesn't exist.
> It would be easy to change what call-process does when
> default-directory does not exist.  What is the best thing for it to do
> in that case?

There's no ``best way'', it depends on what code calls call-process.
In some cases, you could bind default-directory to something sensible
(e.g., invocation-directory), in others you _must_ fail, because the
command arguments could use something like "./foo/bar" which precludes
us from changing directories.

So I think this problem cannot be solved inside call-process, but
instead an application (WoMan in this case) should cater to such
situations, where it indeed doesn't matter what is the value of

Another possibility would be to add an optional argument to
call-process, which, when non-nil, will bind default-directory to some
value that is guaranteed to be an existing directory, if
default-directory is nil.  Applications like WoMan could then use that
optional argument.

reply via email to

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