GNU bug report logs -
#45577
27.1; please document default-directory for filters and sentinels
Previous Next
Reported by: Hendrik Tews <hendrik <at> askra.de>
Date: Thu, 31 Dec 2020 20:41:01 UTC
Severity: normal
Tags: notabug
Found in version 27.1
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
Message #14 received at 45577 <at> debbugs.gnu.org (full text, mbox):
Hi,
> Process filters and sentinels are functions, so default-directory, as
> any other buffer-local variable, will have the value that is bound in
> the current buffer.
This means that my guess was wrong. The current buffer may change
independently of the working directory of the process.
> because process filters and sentinels are not very different from other
> functions.
They are called asynchronously and the current buffer may change
arbitrarily and unrelated to the process. For functions called
from the command loop, the user has control over the current
buffer and therefore also default-directory. For filters and
sentinels the user cannot reliably control the current buffer and
neither can the programmer. IMO this is enough difference to
include a warning in the manual that filters and sentinels need
to set the current buffer in case they are not agnostic to the
current buffer of the value of default-directory.
Hendrik
This bug report was last modified 4 years and 216 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.