From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#60233: 30.0.50; Dired buffer not updating sometimes Date: Sat, 24 Dec 2022 14:23:07 +0200 Message-ID: <838rix56tw.fsf@gnu.org> References: <709e6a8fd515d54bca5aa44a3891d0e9.support1@rcdrun.com> <83a63haq53.fsf@gnu.org> <83edssa4z3.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="18542"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 60233@debbugs.gnu.org To: Jean Louis Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Dec 24 13:24:16 2022 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 1p93ZX-0004Ye-7z for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 24 Dec 2022 13:24:15 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p93ZM-00022t-La; Sat, 24 Dec 2022 07:24:04 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p93ZL-00022k-2b for bug-gnu-emacs@gnu.org; Sat, 24 Dec 2022 07:24:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p93ZK-0005AN-KO for bug-gnu-emacs@gnu.org; Sat, 24 Dec 2022 07:24:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1p93ZK-0006JY-7F for bug-gnu-emacs@gnu.org; Sat, 24 Dec 2022 07:24:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 24 Dec 2022 12:24:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 60233 X-GNU-PR-Package: emacs Original-Received: via spool by 60233-submit@debbugs.gnu.org id=B60233.167188459724220 (code B ref 60233); Sat, 24 Dec 2022 12:24:02 +0000 Original-Received: (at 60233) by debbugs.gnu.org; 24 Dec 2022 12:23:17 +0000 Original-Received: from localhost ([127.0.0.1]:42721 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p93Ya-0006Ia-RO for submit@debbugs.gnu.org; Sat, 24 Dec 2022 07:23:17 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:34262) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p93YZ-0006IO-A0 for 60233@debbugs.gnu.org; Sat, 24 Dec 2022 07:23:15 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p93YT-00053F-MK; Sat, 24 Dec 2022 07:23:09 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=36tN788Q081yUM55poEYtboHrNeHfn9KGDZGLhjIpRc=; b=KlyLtvfuznds 0F2UYrjPrW1ooxpmBOkbI9L1MZMAH1fQRkJn0HuC5xRpcv4axv6YCB1UxIEepJ1+D7Lupvv4Avibq dyBpF5te3oFERO9QqdlzSo/EkGZ0SltX+pCWNuOL+kW54TftzhXl90G5t6bWAw4Nf3RIOmZN1Rxri +CV34BrWMFdhGuHCSRCDC4A7jgkg5x6fP8aG4iboiiJMiFiX9t2EXSH0Jdy9HI5b05CJqcoI/M0hc 01lC6+Ss+79JFo7wi9Y8XwFpKXzXRsjR9F2KvcScfwXEaoYnOGePjPyvFsUiOEL8jVrqytfhnaTBO BdtI9xzS+OZXzY8QKriIUA==; Original-Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p93YS-0006Wt-QF; Sat, 24 Dec 2022 07:23:09 -0500 In-Reply-To: (message from Jean Louis on Fri, 23 Dec 2022 08:23:10 +0300) 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:251797 Archived-At: > Date: Fri, 23 Dec 2022 08:23:10 +0300 > From: Jean Louis > Cc: 60233@debbugs.gnu.org > > Conditions that Dired buffer will not update is related to default > directory being changed, being something else than what is the Dired > buffer. > > To reproduce it in `emacs -Q' you please do following: > > - go into any Dired buffer; > > - M-x cd RET and change default directory to something else than Dired > buffer > > - key B will inject new lines of a byte-compiled file without > refreshing, delete by moving to Trash will delete without refreshing > the Dired buffer. > > I can only assume that variable `default-directory' shall remain local > to Dired buffer even if user invokes `M-x cd' or programmatically `cd'. > > And I never invoke `M-x cd' in Dired buffers, but I may invoke it in > other functions such as below: > > (defun cf-send-sms (id) > "Sends the SMS by using default SMS function" > (cd (getenv "HOME")) > > And the reason to `cd' to HOME directory is to escape programs to try > external commands within Tramp directories. I will try using > `executable-find' for external programs, but again I think that when > my functions get Tramp directory as default directory then they don't > find either executables or directories, that is why I am changing to > $HOME. > > For Dired updating, I think that M-x cd shall not change the > default-directory for Dired buffer -- and again -- I am not using it > interactively but in functions. > > Now I can't remember how I invoked a function that uses `cd' but I can > focus on it next time. Maybe I just launched some of functions. Thanks. I think there's a misunderstanding here of what "M-x cd" does. Its _only_ effect is to change the default-directory of the current buffer. So: (1) doing this in a Dired buffer is shooting yourself in the foot; (2) if 'cd' is not allowed to change default-directory in Dired buffers, then it will have no effect, which sounds unjustified and unnecessary; (3) whatever you think you need "M-x cd" for in Dired buffers must be done in some other way I don't think I see any bug here. It's a cockpit error: you should not invoke "M-x cd" in Dired buffers if you want to keep updating them.