From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Hendrik Tews Newsgroups: gmane.emacs.bugs Subject: bug#45577: 27.1; please document default-directory for filters and sentinels Date: Mon, 04 Jan 2021 23:39:25 +0100 Message-ID: <87im8ciaxu.fsf@cert.kernkonzept.com> References: <87y2hdzp44.fsf@cert.kernkonzept.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="17389"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) Cc: 45577@debbugs.gnu.org To: Daniel =?UTF-8?Q?Mart=C3=ADn?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Jan 04 23:40:13 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kwYWL-0004Ok-0O for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 04 Jan 2021 23:40:13 +0100 Original-Received: from localhost ([::1]:42794 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kwYWK-00040d-2T for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 04 Jan 2021 17:40:12 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:48830) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kwYWA-0003zS-7d for bug-gnu-emacs@gnu.org; Mon, 04 Jan 2021 17:40:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:48984) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kwYW9-0000bH-SU for bug-gnu-emacs@gnu.org; Mon, 04 Jan 2021 17:40:01 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kwYW9-0008Dl-N7 for bug-gnu-emacs@gnu.org; Mon, 04 Jan 2021 17:40:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Hendrik Tews Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 04 Jan 2021 22:40:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 45577 X-GNU-PR-Package: emacs Original-Received: via spool by 45577-submit@debbugs.gnu.org id=B45577.160979997031559 (code B ref 45577); Mon, 04 Jan 2021 22:40:01 +0000 Original-Received: (at 45577) by debbugs.gnu.org; 4 Jan 2021 22:39:30 +0000 Original-Received: from localhost ([127.0.0.1]:60529 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kwYVe-0008Cx-9d for submit@debbugs.gnu.org; Mon, 04 Jan 2021 17:39:30 -0500 Original-Received: from serv1.kernkonzept.com ([159.69.200.6]:51793 helo=mx.kernkonzept.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kwYVc-0008Cl-9c for 45577@debbugs.gnu.org; Mon, 04 Jan 2021 17:39:28 -0500 Original-Received: from ip5f5a9a82.dynamic.kabel-deutschland.de ([95.90.154.130] helo=cert) by mx.kernkonzept.com with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) id 1kwYVa-0003lk-Sl; Mon, 04 Jan 2021 23:39:27 +0100 Original-Received: from localhost ([::1] helo=cert) by cert with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94) (envelope-from ) id 1kwYVa-000joM-Fw; Mon, 04 Jan 2021 23:39:25 +0100 In-Reply-To: ("Daniel =?UTF-8?Q?Mart=C3=ADn?="'s message of "Fri, 01 Jan 2021 02:55:15 +0100") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:197340 Archived-At: 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