From unknown Fri Jun 20 05:35:46 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#74700 <74700@debbugs.gnu.org> To: bug#74700 <74700@debbugs.gnu.org> Subject: Status: [PATCH] Revert Dired buffer when clicking on last segment of directory name Reply-To: bug#74700 <74700@debbugs.gnu.org> Date: Fri, 20 Jun 2025 12:35:46 +0000 retitle 74700 [PATCH] Revert Dired buffer when clicking on last segment of = directory name reassign 74700 emacs submitter 74700 Visuwesh severity 74700 normal tag 74700 patch thanks From debbugs-submit-bounces@debbugs.gnu.org Thu Dec 05 01:12:20 2024 Received: (at submit) by debbugs.gnu.org; 5 Dec 2024 06:12:20 +0000 Received: from localhost ([127.0.0.1]:37813 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tJ564-000124-DF for submit@debbugs.gnu.org; Thu, 05 Dec 2024 01:12:20 -0500 Received: from lists.gnu.org ([209.51.188.17]:41074) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tJ562-00011w-0s for submit@debbugs.gnu.org; Thu, 05 Dec 2024 01:12:18 -0500 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 1tJ561-0000Lr-MH for bug-gnu-emacs@gnu.org; Thu, 05 Dec 2024 01:12:17 -0500 Received: from mail-pj1-x1043.google.com ([2607:f8b0:4864:20::1043]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tJ55z-0000N0-17 for bug-gnu-emacs@gnu.org; Thu, 05 Dec 2024 01:12:17 -0500 Received: by mail-pj1-x1043.google.com with SMTP id 98e67ed59e1d1-2ee69fc0507so537315a91.0 for ; Wed, 04 Dec 2024 22:12:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1733379132; x=1733983932; darn=gnu.org; h=mime-version:user-agent:message-id:date:subject:to:from:from:to:cc :subject:date:message-id:reply-to; bh=M9BDWz2SoCPCc7NGIsN1rk9nb7liLYQ6IWqXHYrnYj0=; b=WV7WtvXr4sSR36GNhRT1GDPjTc8oHYv9gIqVR+eLYHzCmpBBdx6SNc90HolLqCR9sT rRvNgk1tyMulbJxZPGp9dvD2v0Kik7Iy7U+baV7e7YJB/trcavZhOqzmeCPajcjQDgC4 4+qKv05sSSuJhuF0twtStzWrULswgBGXJtLEEu7/fIaJDzoMdXH3qrmEGv8q5Yv9FYAx PpFJ7A7zzIZlvJxXlPpflNG9h08UtPa+lTqZnfY8Pl/qArPkm8dqlYqHwthwTUJlVFru W1q9vaQXfNkciwOyLf0RlizAZ53VSi0JgA2P+xLg4ebTR+vayAGXnnC1mRfoK5pI13mn cU3Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733379132; x=1733983932; h=mime-version:user-agent:message-id:date:subject:to:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=M9BDWz2SoCPCc7NGIsN1rk9nb7liLYQ6IWqXHYrnYj0=; b=poZd0Cl0X+t/jJ9upO0urUGrX5ZG7Fd/9fTsZ2o+ILH62xLVn9B7UJVz+L8FRJFOda 4c91wqJXYlpWXe9ICEOGlza0NnPOv8i+mk1xCkFsS1VUvOi/Em4oHPLoA3xIC+TZCv5U bF93vcFbwPTWfLeTiEgw4EjnGAd3i3uh2pW3e6HOZ2HiFOO6GKjNMW/AnQVY/IzMlKPw xx2f9Shyy+NHO40EHeHjpnke4M6APdnRKPnX47Fuzeo0WrRH56pMizGEHaHS48S1fSyt vwBKodmiCLj+5dPXfKCOwfEULYwnzHPQfiFji9rrcQoh8oBF26dppzp9TtQyloMeBnli vpjg== X-Gm-Message-State: AOJu0Yz/3fpIrRzG5pmu+23St23tZah8GiTqwOyv1KGVyXvqcR300mOs HaWfCSrbr1U8k8kBI+VkX0Cxaud+qNZ8KFH6DuOF6Hy3uUkzAauOCu3/tjkL X-Gm-Gg: ASbGncvtFRKCILRdZKBzELuznD3z0BMMo1oqvoqH5SD/jI/pYg5nXmWob/tVkX9FXeA fKWHDz7PUJCiENgkQlKBq9Yu0+L3omflPmD7ahn1tUEsf95ZguSA4tb0zuuSByd7qE291qnvWBg nKb162HgVj7LCDzo4zPJ0cZ8QxNJXz1foU2CJ6ZSQ+Sv1VYVFVAiyMakY8d+JGSkSxg7J7fIYEK re2ZVOfubM0n7SYj93vI48nu1RCpED1N8KLYF2JDKCF6x5yZ5o= X-Google-Smtp-Source: AGHT+IEG06zlXwzQZ3ufQ72t3PUm5xSEx0O9WeFFy+yFNubnmf4+XcLBJAEkcuyozh6JVySC5tZr5g== X-Received: by 2002:a17:90b:3907:b0:2ee:f550:3837 with SMTP id 98e67ed59e1d1-2ef011e3692mr12771631a91.7.1733379132439; Wed, 04 Dec 2024 22:12:12 -0800 (PST) Received: from localhost ([115.240.90.130]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2ef45f95852sm559437a91.19.2024.12.04.22.12.10 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Dec 2024 22:12:11 -0800 (PST) From: Visuwesh To: bug-gnu-emacs@gnu.org Subject: [PATCH] Revert Dired buffer when clicking on last segment of directory name X-Debbugs-Cc: Date: Thu, 05 Dec 2024 11:42:08 +0530 Message-ID: <874j3iodzb.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: pass client-ip=2607:f8b0:4864:20::1043; envelope-from=visuweshm@gmail.com; helo=mail-pj1-x1043.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) --=-=-= Content-Type: text/plain Tags: patch Attached patch makes it possible to revert the current Dired buffer by clicking on the last segment of the directory line. With the patch applied, /home/viz/lib/ports/emacs: clicking on 'emacs' now reverts the buffer that shows ~/lib/ports/emacs. Previously, it did nothing. This makes it possible to update the Dired listing without needing to use the keyboard. In GNU Emacs 31.0.50 (build 25, x86_64-pc-linux-gnu, X toolkit, cairo version 1.18.2, Xaw scroll bars) of 2024-11-10 built on astatine Repository revision: 1704fa4fb4164a15c7e258b922dbba190811d92d Repository branch: master Windowing system distributor 'The X.Org Foundation', version 11.0.12101014 System Description: Debian GNU/Linux trixie/sid Configured using: 'configure --with-sound=alsa --with-x-toolkit=lucid --without-xaw3d --without-gconf --without-libsystemd --with-cairo CFLAGS=-g3' --=-=-= Content-Type: text/patch Content-Disposition: attachment; filename=0001-Revert-Dired-buffer-when-clicking-on-last-segment-of.patch >From 83da5ad8ef930ed6d093b6b5dec2322599fac763 Mon Sep 17 00:00:00 2001 From: Visuwesh Date: Thu, 5 Dec 2024 11:40:02 +0530 Subject: [PATCH] Revert Dired buffer when clicking on last segment of directory name * lisp/dired.el (dired--make-directory-clickable): Make clicking on the last segment of the directory line revert the Dired buffer. * etc/NEWS: Announce the change. --- etc/NEWS | 5 +++++ lisp/dired.el | 11 ++++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/etc/NEWS b/etc/NEWS index e63132efeda..e35f007dbe1 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -587,6 +587,11 @@ Without 'dired-hide-details-hide-absolute-location': /absolute/path/to/my/important/project: (100 GiB available) +--- +*** Clicking on last segment of directory reverts buffer +When 'dired-make-directory-clickable' is non-nil, clicking on the last +segment of the directory name now reverts the Dired buffer. + ** Grep +++ diff --git a/lisp/dired.el b/lisp/dired.el index f79a2220bea..4e300879f88 100644 --- a/lisp/dired.el +++ b/lisp/dired.el @@ -2082,7 +2082,16 @@ dired--make-directory-clickable "" click "" 'mouse-face "RET" click)))) - (setq segment-start (point))))))) + (setq segment-start (point))) + (when (search-forward ":" bound t) + (add-text-properties + segment-start (1- (point)) + `( mouse-face highlight + help-echo "mouse-1: revert this buffer" + keymap ,(define-keymap + "" #'revert-buffer + "" 'follow-link + "RET" #'revert-buffer)))))))) (defun dired--get-ellipsis-length () "Return length of ellipsis." -- 2.45.2 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Thu Dec 05 02:02:16 2024 Received: (at 74700) by debbugs.gnu.org; 5 Dec 2024 07:02:16 +0000 Received: from localhost ([127.0.0.1]:37907 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tJ5sN-0003XH-Lv for submit@debbugs.gnu.org; Thu, 05 Dec 2024 02:02:16 -0500 Received: from eggs.gnu.org ([209.51.188.92]:54068) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tJ5sL-0003Wv-DJ for 74700@debbugs.gnu.org; Thu, 05 Dec 2024 02:02:14 -0500 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 1tJ5sF-0006jy-UJ; Thu, 05 Dec 2024 02:02:07 -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=IAhZcxYcjqf8OIcmmiQTjTx3XRTkuHxRcD6HOjwDb2E=; b=bzjtd9yfvJ7+ rxRT/MviqfQ1C4N/M2v+UlxAM5UXFq3CvSqrJ2I94+MC9b1Wt6pk7PNLMNEgwMCYeqpzX7JniZBtJ 8JUdp3iigxa8hXLC8w7i7Jr+tTvUFvDhjZnovTX5irbnrGkHZ7s1/QMdefjFMGr/8qE733+Z26e7S 44IsQuUcF39Ht4XHJtUo2Sm+6CwYG8h5cWBN6lMn3F/hSPtyobCgBMvZvkf2f7PRPvRjdoj06/H1s ofNOdaA3lvu3f8CybqlOIQnbS/ITwLB2K6ngSqYhVUEWT/Zu6x6pgK4c83mqoiee/l6rDG7nTCRxt jPowt/aG8mmmT64BhWhsTA==; Date: Thu, 05 Dec 2024 09:02:01 +0200 Message-Id: <86ttbiy5na.fsf@gnu.org> From: Eli Zaretskii To: Visuwesh In-Reply-To: <874j3iodzb.fsf@gmail.com> (message from Visuwesh on Thu, 05 Dec 2024 11:42:08 +0530) Subject: Re: bug#74700: [PATCH] Revert Dired buffer when clicking on last segment of directory name References: <874j3iodzb.fsf@gmail.com> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 74700 Cc: 74700@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Visuwesh > Date: Thu, 05 Dec 2024 11:42:08 +0530 > > Attached patch makes it possible to revert the current Dired buffer by > clicking on the last segment of the directory line. With the patch > applied, > > /home/viz/lib/ports/emacs: > > clicking on 'emacs' now reverts the buffer that shows ~/lib/ports/emacs. > Previously, it did nothing. This makes it possible to update the Dired > listing without needing to use the keyboard. Thanks, a few comments below. > +--- > +*** Clicking on last segment of directory reverts buffer > +When 'dired-make-directory-clickable' is non-nil, clicking on the last > +segment of the directory name now reverts the Dired buffer. We don't call these "segments", we call them "components". And since you are talking about the last one, you could also say "base name of the directory". > + (when (search-forward ":" bound t) > + (add-text-properties > + segment-start (1- (point)) > + `( mouse-face highlight ^^ We don't leave whitespace after the opening parenthesis. > + help-echo "mouse-1: revert this buffer" I think the help-echo should say something more similar to what we say for the other components of the directory shown in the header line. Something like "re-read this buffer's directory". > + keymap ,(define-keymap > + "" #'revert-buffer > + "" 'follow-link > + "RET" #'revert-buffer)))))))) Should we perhaps call dired-revert directly? From debbugs-submit-bounces@debbugs.gnu.org Thu Dec 05 03:27:56 2024 Received: (at 74700) by debbugs.gnu.org; 5 Dec 2024 08:27:56 +0000 Received: from localhost ([127.0.0.1]:38098 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tJ7DI-0007cG-6a for submit@debbugs.gnu.org; Thu, 05 Dec 2024 03:27:56 -0500 Received: from mail-pl1-f194.google.com ([209.85.214.194]:47354) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tJ7DG-0007c2-Hb for 74700@debbugs.gnu.org; Thu, 05 Dec 2024 03:27:55 -0500 Received: by mail-pl1-f194.google.com with SMTP id d9443c01a7336-215ac560292so5798065ad.2 for <74700@debbugs.gnu.org>; Thu, 05 Dec 2024 00:27:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1733387209; x=1733992009; darn=debbugs.gnu.org; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=7pxsmZxhn8kmrvW6VkmIIEaTp9HrILL4D3KGGIvG5tw=; b=VWV2dfjT0VkiyXIDSdUWuriZJbtFa1FuTLP6X7gmlMGrkHNKmZtegVIh+A7FQpNdNo pL63SyaiiIUJ4Itr9MXsd1irjWIvCARxeod/CvjGscrYKPFkhvSE8/qeetcPFfAG34/E TmJF4ULoILdYoMcdZrnZTyXOAep0Jb3NQEcx1XhwWPejbtJCQvIEQuhEzWx99Hd2kHOC ePH4drWM5wMU6QJkDU9BSRsBpON28kARb1FsZvocpOyxezvzMggqlbTlVSL2NclODn1K /agWIgeeuwGvvTs2YdCl+Hjx96uEt8k1ErTcoRZ9TiJdz+LjlIJ9vfKmpkeKY4+IB8r4 2pKQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733387209; x=1733992009; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=7pxsmZxhn8kmrvW6VkmIIEaTp9HrILL4D3KGGIvG5tw=; b=OPuBwKGNqqRfDFupD2LGsJnLzY2SyyHKBf0FIet2TmiF9WNAxOZKM2awB76KJvBdV9 BGyrST3WzxgE7xSVZe6ARutCRbp+EVZPg6A7a5/fyVvFEuqFvOlvnthTCUgpcjcvbgAY /JezN53DdkamzvKwZC7d2cR8dWx3SsWEQfjRI7MU+WqtQtq5QHu0cNFJjpbh8E7ypEz6 kdSfHfgoyytBWgGBOr/cCoCinu4wUzY6UOp0ad+t8ZhjAaFvpXf+64ttxW71UG99I82E Vho5WDEf2aqYB/11v3C/rcVQgjsu1GzxLTq71Ln+wairKcK3h14jKGZy03j7bO4gzF1B 0IOg== X-Gm-Message-State: AOJu0Yz8lfbtbT5QaoL4n3sjOSUvReNxUpkaVS3yH6NAuTA+k9YUjJxi G3pGXgVWxpW//uxpcu7+wY0jzc0wrPDqwInJYfuA38NbDga3VLX1 X-Gm-Gg: ASbGncsqRG/8TyNcPicWepZe30jpBxq+Q23Kdv95XQl2Ttp1+EhqE86IqTBuu9XAhop Ux6CvEsBh4IybgdL4ll72inwi1xDJBd1B1FK/VlcCcFGZuaja4WK/YoPAebF69A0vcVtih29V7b VvdIBWkniRLd6D7tW/TDY7jCTPHXYO1dNRfUvshkc5FJpQtDn9D2XiMEDBPAYZzjQCZ6hT3eePF kCzV+y+JH5tY1Uj0WSVLgyRlK/XGl264EyeUExM0apGL+8= X-Google-Smtp-Source: AGHT+IEN3AixE1VsQE8Oq8GFJsknxT6yTWJ+kqlfWGjLEwID5BoIz9FUcWxAz1iHiQ1fmUCcCkIYAQ== X-Received: by 2002:a17:902:d505:b0:215:9091:4f56 with SMTP id d9443c01a7336-215bceb588amr137975985ad.14.1733387208658; Thu, 05 Dec 2024 00:26:48 -0800 (PST) Received: from localhost ([115.240.90.130]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-215f8e3ef8esm7593105ad.24.2024.12.05.00.26.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Dec 2024 00:26:47 -0800 (PST) From: Visuwesh To: Eli Zaretskii Subject: Re: bug#74700: [PATCH] Revert Dired buffer when clicking on last segment of directory name In-Reply-To: <86ttbiy5na.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 05 Dec 2024 09:02:01 +0200") References: <874j3iodzb.fsf@gmail.com> <86ttbiy5na.fsf@gnu.org> Date: Thu, 05 Dec 2024 13:56:44 +0530 Message-ID: <87zflamt6j.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 74700 Cc: 74700@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable [=E0=AE=B5=E0=AE=BF=E0=AE=AF=E0=AE=BE=E0=AE=B4=E0=AE=A9=E0=AF=8D =E0=AE=9F= =E0=AE=BF=E0=AE=9A=E0=AE=AE=E0=AF=8D=E0=AE=AA=E0=AE=B0=E0=AF=8D 05, 2024] E= li Zaretskii wrote: >> From: Visuwesh >> Date: Thu, 05 Dec 2024 11:42:08 +0530 >>=20 >> Attached patch makes it possible to revert the current Dired buffer by >> clicking on the last segment of the directory line. With the patch >> applied, >>=20 >> /home/viz/lib/ports/emacs: >>=20 >> clicking on 'emacs' now reverts the buffer that shows ~/lib/ports/emacs. >> Previously, it did nothing. This makes it possible to update the Dired >> listing without needing to use the keyboard. > > Thanks, a few comments below. > >> +--- >> +*** Clicking on last segment of directory reverts buffer >> +When 'dired-make-directory-clickable' is non-nil, clicking on the last >> +segment of the directory name now reverts the Dired buffer. > > We don't call these "segments", we call them "components". And since > you are talking about the last one, you could also say "base name of > the directory". I've changed it to base name. >> + (when (search-forward ":" bound t) >> + (add-text-properties >> + segment-start (1- (point)) >> + `( mouse-face highlight > ^^ > We don't leave whitespace after the opening parenthesis. I removed the whitespace. But isn't that way to make lists such as ( 1 2 3) aligned without manual intervention? It is used in the list above too. >> + help-echo "mouse-1: revert this buffer" > > I think the help-echo should say something more similar to what we say > for the other components of the directory shown in the header line. > Something like "re-read this buffer's directory". Now done. >> + keymap ,(define-keymap >> + "" #'revert-buffer >> + "" 'follow-link >> + "RET" #'revert-buffer)))))))) > > Should we perhaps call dired-revert directly? revert-buffer-function is set to dired-revert by dired. If someone has changed it, for some reason, using revert-buffer would heed their customisation. So I've left it as revert-buffer. --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=0001-Revert-Dired-buffer-when-clicking-on-basename-of-dir.patch >From 642338b96d5f39f3b11285fff319f744c1a07164 Mon Sep 17 00:00:00 2001 From: Visuwesh Date: Thu, 5 Dec 2024 11:40:02 +0530 Subject: [PATCH] Revert Dired buffer when clicking on basename of directory * lisp/dired.el (dired--make-directory-clickable): Make clicking on basename of the directory revert the Dired buffer. * etc/NEWS: Announce the change. (Bug#74700) --- etc/NEWS | 5 +++++ lisp/dired.el | 11 ++++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/etc/NEWS b/etc/NEWS index e63132efeda..1ed529b0792 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -587,6 +587,11 @@ Without 'dired-hide-details-hide-absolute-location': /absolute/path/to/my/important/project: (100 GiB available) +--- +*** Clicking on base name of directory reverts buffer. +When 'dired-make-directory-clickable' is non-nil, clicking on the base +name of the directory now reverts the Dired buffer. + ** Grep +++ diff --git a/lisp/dired.el b/lisp/dired.el index f79a2220bea..9895229694a 100644 --- a/lisp/dired.el +++ b/lisp/dired.el @@ -2082,7 +2082,16 @@ dired--make-directory-clickable "" click "" 'mouse-face "RET" click)))) - (setq segment-start (point))))))) + (setq segment-start (point))) + (when (search-forward ":" bound t) + (add-text-properties + segment-start (1- (point)) + `(mouse-face highlight + help-echo "mouse-1: re-read this buffer's directory" + keymap ,(define-keymap + "" #'revert-buffer + "" 'follow-link + "RET" #'revert-buffer)))))))) (defun dired--get-ellipsis-length () "Return length of ellipsis." -- 2.45.2 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Thu Dec 05 03:42:28 2024 Received: (at 74700) by debbugs.gnu.org; 5 Dec 2024 08:42:28 +0000 Received: from localhost ([127.0.0.1]:38163 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tJ7RL-0008Kt-Re for submit@debbugs.gnu.org; Thu, 05 Dec 2024 03:42:28 -0500 Received: from eggs.gnu.org ([209.51.188.92]:50538) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tJ7RK-0008Kd-Nd for 74700@debbugs.gnu.org; Thu, 05 Dec 2024 03:42:27 -0500 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 1tJ7RF-0005Q3-ED; Thu, 05 Dec 2024 03:42:21 -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=0BuQzikeC10EpjzJgqU1VcxVM59+wgl7OtYTq9X4xkI=; b=InGZDM1+B3oz nY3GvpGCy3Ta9SnxeooiB3rk9rSnJyt5UFWb/stXk3s1YfTnJ2vOm+yyq1VtP4M9R2TYk4vLFHZ7J Bkswfj2/eED7nvzG4YP2+Xsqn8DRlMFJ01Gr7kIGh7sXk16g5YItIU8Mwy5L/g64RZSrSHWP1774S lcZxuzysWtSvsSnxl/488tim/hpLNlnPMpBVt1JrS4fRRPv3jwgPz7VXXLeEnJLQZkA/zV3oWUILR IOwKG1h5KjFnrkyC4O0HhpB/Bu1wLPbZRtCoI4+ANuuPhQ2PWizx2Mntra/uIVgS56SAY3h4zbL5b TbbnUeJxYwg1OJcGbSSxZA==; Date: Thu, 05 Dec 2024 10:41:52 +0200 Message-Id: <86frn2y10v.fsf@gnu.org> From: Eli Zaretskii To: Visuwesh In-Reply-To: <87zflamt6j.fsf@gmail.com> (message from Visuwesh on Thu, 05 Dec 2024 13:56:44 +0530) Subject: Re: bug#74700: [PATCH] Revert Dired buffer when clicking on last segment of directory name References: <874j3iodzb.fsf@gmail.com> <86ttbiy5na.fsf@gnu.org> <87zflamt6j.fsf@gmail.com> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 74700 Cc: 74700@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Visuwesh > Cc: 74700@debbugs.gnu.org > Date: Thu, 05 Dec 2024 13:56:44 +0530 > > >> + (when (search-forward ":" bound t) > >> + (add-text-properties > >> + segment-start (1- (point)) > >> + `( mouse-face highlight > > ^^ > > We don't leave whitespace after the opening parenthesis. > > I removed the whitespace. But isn't that way to make lists such as > > ( 1 > 2 > 3) > > aligned without manual intervention? Typing something like (setq foo (1 2 3) aligns the members for me. So I don't think I understand what you are saying here. > >> + keymap ,(define-keymap > >> + "" #'revert-buffer > >> + "" 'follow-link > >> + "RET" #'revert-buffer)))))))) > > > > Should we perhaps call dired-revert directly? > > revert-buffer-function is set to dired-revert by dired. If someone has > changed it, for some reason, using revert-buffer would heed their > customisation. So I've left it as revert-buffer. That's exactly what I wonder: should we call whatever customized value of revert-buffer-function? It could be something completely different, not a function that refreshes the directory listing. What do people think about this? From debbugs-submit-bounces@debbugs.gnu.org Thu Dec 05 04:03:27 2024 Received: (at 74700) by debbugs.gnu.org; 5 Dec 2024 09:03:27 +0000 Received: from localhost ([127.0.0.1]:38202 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tJ7ld-0000sh-5B for submit@debbugs.gnu.org; Thu, 05 Dec 2024 04:03:26 -0500 Received: from mail-pg1-f195.google.com ([209.85.215.195]:59724) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tJ7lb-0000sK-7C for 74700@debbugs.gnu.org; Thu, 05 Dec 2024 04:03:23 -0500 Received: by mail-pg1-f195.google.com with SMTP id 41be03b00d2f7-7fc99fc2b16so521176a12.3 for <74700@debbugs.gnu.org>; Thu, 05 Dec 2024 01:03:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1733389342; x=1733994142; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=nQQeHZEq4EpU94HdzzEPEZ7S6mS2qjHOy6U7msiiphc=; b=C4kpdgFnv8YhwSUSkSh+YXo7bHKqOcTU6PVL4OlUCw/JQ/KvUqG+Jtlw/oUpWJV9o5 wI8sr5byw0ug0zy6as0zkyEmd+WvkA4MA+sOfunFdDFJtuEiyL08MZmcZ0agCVIEc3N9 V3VG/xluPMVAiWOEqdrOISuUZUQ9fFt/AE7pWkOD7GBC05YBOjYVcFBczPBAlsTdRMGl UFz8wm0iRF84OTUyOobcZ+dRLrLtAJ6Aug67p7YH8/oBj2LSc264my3OdSrSD04URZMB hPvhYONbuVns3tmC2DSdKc0WZK9ii0XnPP+NwKzd7jd6+U6XLn5jsCBHX/I2rfno5Z4i 8WJQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733389342; x=1733994142; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=nQQeHZEq4EpU94HdzzEPEZ7S6mS2qjHOy6U7msiiphc=; b=Lgnbd/Xvexe6BIC6YIF/hKN6fI5JDxMygEC1JmayC7WPZvVJGoy5MvvXRCEWU57sDV Gt4EAN2hfUtYKb6BTmmNUtapUTb1pn1SLzHSwJAs0bkEPSTwyqABwE/XA9M2/WQv7JzB dK44DW+JYoE8/9Qk4n/nP5ZVwjlnpoGEt0eR9zMlQUwyv9iQIIMyQwUeslxxh7mIL+9O Yd4NH91ienueGFPWsNOar3oszSZhn0vgvkrmRBUaJs/BQgUHuz4C+YV67K0t5/Mobk9Q RuROOYvyPiNMMHh+v7y+HQgJvBPphDysiHyO+hf70wOMnp3iImpwmbjolFSoc3fF/1N4 FUfQ== X-Gm-Message-State: AOJu0YwFVIX2hOSQIswX8aCHfO4/kP4QOdVVNnSOLR3j8XwazO/GlKYt 36xOVBpmKDGCNREcnLjaWAwpYP//6W0FHKWJ2gaxw6AHlOVwKfa/ X-Gm-Gg: ASbGncsukxkwZBhcX/z0piM3Cua39h9pkm4P5ZSGpg1dHD2Qzt0FiW9Q1XhvC6JnYSM xlElty6TSsiRlF7MKh77LmfSjtZ18ziJqCiiBhRymCTubN+RgTM1ZQm1XbB77t5dk/Yo7qdn1lI RiXg5RXlSOgsKpibRAvPCDO4lBKB8rkQr3zUQ65pWPagn9CZEBIs6BFVdWQv5aTYeJ+vto7U1d9 Cm9g8mh6KszURleN0anZ6EAM3k3JxB7TL2ld3MoHzCJIc0= X-Google-Smtp-Source: AGHT+IG3sTJ097wlo/pa5sYDUq540LpDz8ox+L/req/2iJku4r4J8dlHxGFvnRhK/AekUaEM9VwhWA== X-Received: by 2002:a05:6a21:99a7:b0:1d9:c753:6bad with SMTP id adf61e73a8af0-1e1653b7397mr13043499637.10.1733389342278; Thu, 05 Dec 2024 01:02:22 -0800 (PST) Received: from localhost ([115.240.90.130]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-725a29e8ee1sm795344b3a.42.2024.12.05.01.02.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Dec 2024 01:02:21 -0800 (PST) From: Visuwesh To: Eli Zaretskii Subject: Re: bug#74700: [PATCH] Revert Dired buffer when clicking on last segment of directory name In-Reply-To: <86frn2y10v.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 05 Dec 2024 10:41:52 +0200") References: <874j3iodzb.fsf@gmail.com> <86ttbiy5na.fsf@gnu.org> <87zflamt6j.fsf@gmail.com> <86frn2y10v.fsf@gnu.org> Date: Thu, 05 Dec 2024 14:32:18 +0530 Message-ID: <8734j2y02t.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 74700 Cc: 74700@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) [=E0=AE=B5=E0=AE=BF=E0=AE=AF=E0=AE=BE=E0=AE=B4=E0=AE=A9=E0=AF=8D =E0=AE=9F= =E0=AE=BF=E0=AE=9A=E0=AE=AE=E0=AF=8D=E0=AE=AA=E0=AE=B0=E0=AF=8D 05, 2024] E= li Zaretskii wrote: >> I removed the whitespace. But isn't that way to make lists such as >>=20 >> ( 1 >> 2 >> 3) >>=20 >> aligned without manual intervention? > > Typing something like > > (setq foo (1 > 2 > 3) > > aligns the members for me. So I don't think I understand what you are > saying here. Try to align (setq foo '(1 2 3)) instead. 3 would end up aligning at 2 instead of 1. Adding a space after ( prevents this. >> >> + keymap ,(define-keymap >> >> + "" #'revert-buffer >> >> + "" 'follow-link >> >> + "RET" #'revert-buffer)))))))) >> > >> > Should we perhaps call dired-revert directly? >>=20 >> revert-buffer-function is set to dired-revert by dired. If someone has >> changed it, for some reason, using revert-buffer would heed their >> customisation. So I've left it as revert-buffer. > > That's exactly what I wonder: should we call whatever customized value > of revert-buffer-function? It could be something completely > different, not a function that refreshes the directory listing. I was about to point out find-dired's value of revert-buffer-function which is different than dired-revert but as the directory is inserted as /home/user/lib/ports/emacs/ always, the change wouldn't affect the 'emacs' part. We could "fix" this as diff --git a/lisp/find-dired.el b/lisp/find-dired.el index 13c8bf722c3..12fc64c2151 100644 --- a/lisp/find-dired.el +++ b/lisp/find-dired.el @@ -281,7 +281,7 @@ find-dired-with-command (setq buffer-read-only nil) ;; Subdir headlerline must come first because the first marker in ;; subdir-alist points there. - (insert " " dir ":\n") + (insert " " (directory-file-name dir) ":\n") (when dired-make-directory-clickable (dired--make-directory-clickable)) ;; Make second line a ``find'' line in analogy to the ``total'' or to make it insert /home/user/lib/ports/emacs but I think clicking on 'emacs' to open the Dired buffer for ~/lib/ports/emacs is also a good option. From debbugs-submit-bounces@debbugs.gnu.org Thu Dec 05 04:24:36 2024 Received: (at 74700) by debbugs.gnu.org; 5 Dec 2024 09:24:36 +0000 Received: from localhost ([127.0.0.1]:38264 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tJ867-0001rJ-RN for submit@debbugs.gnu.org; Thu, 05 Dec 2024 04:24:36 -0500 Received: from eggs.gnu.org ([209.51.188.92]:36228) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tJ866-0001r3-4j for 74700@debbugs.gnu.org; Thu, 05 Dec 2024 04:24:34 -0500 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 1tJ860-0004Oc-Pd; Thu, 05 Dec 2024 04:24:28 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=z8vFkmqRnEp81/3TpJHziXvz+S6slYgviM5IQyzBtTk=; b=dvcoV8e88Dnp7ShxkN24 dqdpIMa86Z4QNDreaapvfJCmr1ha5kQb5dJ/ffPu3etVv23rMa5iJHR5AehYIGaEhbnBeEvroISCl k0z/IQi6e98am2sqifTHDyvBib44xGE5pxe03QFRetzmaUycFA/zXZ5be7PdiooYBXaoEEtpNMsvx dx5l6biMP3YyPshBCqt2tM/XM2JfWeIWA4JGU6gjd0ZDcsMskssOq72ZMp3P1Lmp3SEbC3elsC8Rt cGKtdw1SE8qHFIyPXCtxQ4ZTlMTMCusGgG38H7wvdKQ/f0GJQ8pxCSr/70PKbXsEht2bDroRfUnim 8HV6kfwwWLhMmQ==; Date: Thu, 05 Dec 2024 11:24:23 +0200 Message-Id: <86bjxqxz20.fsf@gnu.org> From: Eli Zaretskii To: Visuwesh In-Reply-To: <8734j2y02t.fsf@gmail.com> (message from Visuwesh on Thu, 05 Dec 2024 14:32:18 +0530) Subject: Re: bug#74700: [PATCH] Revert Dired buffer when clicking on last segment of directory name References: <874j3iodzb.fsf@gmail.com> <86ttbiy5na.fsf@gnu.org> <87zflamt6j.fsf@gmail.com> <86frn2y10v.fsf@gnu.org> <8734j2y02t.fsf@gmail.com> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 74700 Cc: 74700@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Visuwesh > Cc: 74700@debbugs.gnu.org > Date: Thu, 05 Dec 2024 14:32:18 +0530 > > [வியாழன் டிசம்பர் 05, 2024] Eli Zaretskii wrote: > > >> I removed the whitespace. But isn't that way to make lists such as > >> > >> ( 1 > >> 2 > >> 3) > >> > >> aligned without manual intervention? > > > > Typing something like > > > > (setq foo (1 > > 2 > > 3) > > > > aligns the members for me. So I don't think I understand what you are > > saying here. > > Try to align > > (setq foo '(1 2 > 3)) > > instead. 3 would end up aligning at 2 instead of 1. Yes, and why is that a problem? This is the standard Lisp indentation in Emacs. It makes it easy to find the end of the sexps. > Adding a space after ( prevents this. I'm not sure I understand why overriding the standard indentation would be a good idea. From debbugs-submit-bounces@debbugs.gnu.org Thu Dec 05 05:43:10 2024 Received: (at 74700) by debbugs.gnu.org; 5 Dec 2024 10:43:10 +0000 Received: from localhost ([127.0.0.1]:38425 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tJ9K9-0005a3-HL for submit@debbugs.gnu.org; Thu, 05 Dec 2024 05:43:09 -0500 Received: from mout.gmx.net ([212.227.17.21]:53035) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tJ9K7-0005Zl-KL for 74700@debbugs.gnu.org; Thu, 05 Dec 2024 05:43:08 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.net; s=s31663417; t=1733395371; x=1734000171; i=stephen.berman@gmx.net; bh=bfRMLLqaismng5a0cwUexJweOJvxfL7zRl/StYUioTI=; h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:Date: Message-ID:MIME-Version:Content-Type:Content-Transfer-Encoding:cc: content-transfer-encoding:content-type:date:from:message-id: mime-version:reply-to:subject:to; b=muJtWvhukzDSr+l3Jccj+MI8R2gzKYzglIDWnClZi7yN9QQ0WR9JewaGACf9MODp IyjDodzo+RIUiVFzyAZxRVGw5GEXQ5DY+2995A5E0ZgvTmuoLos18J194x2f8B6Ml IsdX3BAL4Hwm/6wzfW21sLUcO2wf1czX8MKHeD8KrShvfV3nV1LnREXwMpiBEQRoY ANmSMgWPYAh+Bo9KuZaJAg2ZGfJUAE2S0h32577d5ZHMDTugBtDBFk2m7+BDT+Gbi cG3CsNAAiSWZXB3X6XoIaJdNl0eH2//fMgM7PencLO9DHP1vugbZlQM44BPJw5DjE 0lSPuCTHv7eiWbMDbw== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from strobelfssd ([94.134.94.128]) by mail.gmx.net (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MxUrx-1tYEGQ2FB3-015hFL; Thu, 05 Dec 2024 11:42:51 +0100 From: Stephen Berman To: Eli Zaretskii Subject: Re: bug#74700: [PATCH] Revert Dired buffer when clicking on last segment of directory name In-Reply-To: <86bjxqxz20.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 05 Dec 2024 11:24:23 +0200") References: <874j3iodzb.fsf@gmail.com> <86ttbiy5na.fsf@gnu.org> <87zflamt6j.fsf@gmail.com> <86frn2y10v.fsf@gnu.org> <8734j2y02t.fsf@gmail.com> <86bjxqxz20.fsf@gnu.org> Date: Thu, 05 Dec 2024 11:42:50 +0100 Message-ID: <87a5dammvp.fsf@gmx.net> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:0tcBxNNRPJ91rZoW4Ib36OvumE7VFSaoDqCOtAPHf3Td5VKATWD zXOVD6Z2TTjrSJ9h4p5CFP+gTS+GLk9KrnJUQHeduwFYHKcFihJyxbejyrPxCw82FVffQU1 CAJMOxMwtJmkNw7dbmT6mck6SDn7W84ONoHsWr/BEvMJtFfBYvOpOC/orr+kpdYFts+ASUZ j/p/IabhZSVU123kdT+IQ== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:ahUi8II23eE=;rOBOeDJPnYDSsG2qgPvi3IPByW3 MZpdeq9uVwjPK6RsUnGIbbBoLoNtTpPPWnJGsAybaaWqfkaNa3A7kH0zSJdy11j5QZ495WMCB w7sOXKe33tpa5t7AxlcniqyKuj4//45CuK+o7fthXWJ//jftLNU13rslZ3sWSbfUhB5U5Fin2 iCCj2KjWaMww4khPV2bkmVcmr8UtNF1/+Gm5wazHwXu8OI1TC5IsGX665c/kk/4nbrJxeCHp2 kl9gjPbmbrX7O0g8hfZbms/+Za352tblhFiiDdRrNoQAPt/wjur8iF5OxiKvTPm0gzt4aBn9M E1M0idjT6XSR6rZAU7gK5LO8H/FgxXNpVxDbjJz4eYl3V//VJreqVFTXUqcVMOQ56C+nCfzn3 tkB5JckxnjnC63W4G71FcUo3RvlH9R+E4SFDzK1vd3CW7aCO2ZRQw0PrIhX5s91TXLCNPxBrE TkpPuNNIXa5H7SZulpvZbIlwNbD+fI6lirhMgEYjdLzU2TCD2JFEV/5RHVzG1LzHq+yHSIHJc TYU6NetMcijMLMj6u5TSxNNmhSUsVFobHsmEuAKuDCWjXVlVil31Af6oGuE+bHp1G0Fvl41J1 8io7wRBXSOB2La8fx6uiTja5lcrl7+Zmi3S1K7dYiQjERw8ZsE/bHRFoHKyVd1GAInszOoLTz dg7UPt01sHMwbY9/+z3DK1vJ0xsnnw4aVbVmC8El37JGkjRAtI+CvPWnAgLZxcFo6nNnU+3KD 64sQb8cecQW076c6EkaXlOF4sXgnZg+nBqsilFzZ3DhR7OLCGifkV47+hGA51OrTBfntSDImi oXmYbBmJx/OoD1LEBTmYFWkclkAWMag043vPdX7q0DlVZE+tcgEr+hwPWCXpyRD/Cxn9F3y89 WAY+1kTly9tiUI3jF7RKfVl+pVTA3lJ1R8iwCuf4tPFZEkgygfuhGWZggg33KCo8PFBNfW7A8 00BHY2vtQc4p3ckiJqBj7/aryZRU2MgmY9FlGeCine225qaluYs52LnSRMZPSzHpDFK70Y/5H qVpz4dC2L3/7IhTkebd07uY/cRxyfsFmcsT+++Ul2SObitgORk5NmJcQo9cMF4vsEtv11AZii yhDO0LOvMS0LmFf8fJr3oMU++IWJf2 X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 74700 Cc: 74700@debbugs.gnu.org, Visuwesh X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) On Thu, 05 Dec 2024 11:24:23 +0200 Eli Zaretskii wrote: >> From: Visuwesh >> Cc: 74700@debbugs.gnu.org >> Date: Thu, 05 Dec 2024 14:32:18 +0530 >>=20 >> [=E0=AE=B5=E0=AE=BF=E0=AE=AF=E0=AE=BE=E0=AE=B4=E0=AE=A9=E0=AF=8D =E0=AE= =9F=E0=AE=BF=E0=AE=9A=E0=AE=AE=E0=AF=8D=E0=AE=AA=E0=AE=B0=E0=AF=8D 05, 2024= ] Eli Zaretskii wrote: >>=20 >> >> I removed the whitespace. But isn't that way to make lists such as >> >>=20 >> >> ( 1 >> >> 2 >> >> 3) >> >>=20 >> >> aligned without manual intervention? >> > >> > Typing something like >> > >> > (setq foo (1 >> > 2 >> > 3) >> > >> > aligns the members for me. So I don't think I understand what you are >> > saying here. >>=20 >> Try to align >>=20 >> (setq foo '(1 2 >> 3)) >>=20 >> instead. 3 would end up aligning at 2 instead of 1. > > Yes, and why is that a problem? This is the standard Lisp indentation > in Emacs. It makes it easy to find the end of the sexps. > >> Adding a space after ( prevents this. > > I'm not sure I understand why overriding the standard indentation > would be a good idea. Sometimes the standard indentation makes the code harder to read, e.g., the sexp that the indentation in Visuwesh's patch took as an example is this (starting at column 10): (add-text-properties segment-start (1- (point)) `( mouse-face highlight help-echo "mouse-1: goto this directory" keymap ,(let* ((current-dir dir) (click (lambda () (interactive) (cond ((assoc current-dir dired-subdir-alist) (dired-goto-subdir current-dir)) ;; If there is a wildcard chars ;; in the directory name, don't ;; use the alternate file machinery ;; which tries to keep only one ;; dired buffer open at once. ;; ;; FIXME: Is this code path reachable? ((insert-directory-wildcard-in-dir-p current-dir) (dired current-dir)) (t (dired--find-possibly-alternative-file current-dir)))))) (define-keymap "" click "" 'mouse-face "RET" click)))) Here is the indentation without the space (in dired.el several lines of this code extend well beyond column 80): (add-text-properties segment-start (1- (point)) `(mouse-face highlight help-echo "mouse-1: goto this directory" keymap ,(let* ((current-dir dir) (click (lambda () (interactive) (cond ((assoc current-dir dired-subdir-ali= st) (dired-goto-subdir current-dir)) ;; If there is a wildcard chars ;; in the directory name, don't ;; use the alternate file machinery ;; which tries to keep only one ;; dired buffer open at once. ;; ;; FIXME: Is this code path reachabl= e? ((insert-directory-wildcard-in-dir-p current-dir) (dired current-dir)) (t (dired--find-possibly-alternative-f= ile current-dir)))))) (define-keymap "" click "" 'mouse-face "RET" click)))) Steve Berman From debbugs-submit-bounces@debbugs.gnu.org Thu Dec 05 13:01:38 2024 Received: (at 74700) by debbugs.gnu.org; 5 Dec 2024 18:01:38 +0000 Received: from localhost ([127.0.0.1]:40648 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tJGAT-0002N7-Vf for submit@debbugs.gnu.org; Thu, 05 Dec 2024 13:01:38 -0500 Received: from relay6-d.mail.gandi.net ([217.70.183.198]:49009) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tJGAS-0002Me-Ji for 74700@debbugs.gnu.org; Thu, 05 Dec 2024 13:01:37 -0500 Received: by mail.gandi.net (Postfix) with ESMTPSA id 2F7D2C0005; Thu, 5 Dec 2024 18:01:08 +0000 (UTC) From: Juri Linkov To: Visuwesh Subject: Re: bug#74700: [PATCH] Revert Dired buffer when clicking on last segment of directory name In-Reply-To: <8734j2y02t.fsf@gmail.com> (Visuwesh's message of "Thu, 05 Dec 2024 14:32:18 +0530") Organization: LINKOV.NET References: <874j3iodzb.fsf@gmail.com> <86ttbiy5na.fsf@gnu.org> <87zflamt6j.fsf@gmail.com> <86frn2y10v.fsf@gnu.org> <8734j2y02t.fsf@gmail.com> Date: Thu, 05 Dec 2024 19:56:17 +0200 Message-ID: <87ttbidnem.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/31.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-GND-Sasl: juri@linkov.net X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 74700 Cc: Eli Zaretskii , 74700@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) > but I think clicking on 'emacs' to open the Dired buffer for > ~/lib/ports/emacs is also a good option. Indeed, opening the Dired buffer would be better instead of directly refreshing the buffer. To force the directory to refresh, you can call dired with: (let ((dired-auto-revert-buffer t)) (dired "/...")) From debbugs-submit-bounces@debbugs.gnu.org Thu Dec 12 05:31:30 2024 Received: (at 74700-done) by debbugs.gnu.org; 12 Dec 2024 10:31:30 +0000 Received: from localhost ([127.0.0.1]:37767 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tLgTi-0007Qh-Aq for submit@debbugs.gnu.org; Thu, 12 Dec 2024 05:31:30 -0500 Received: from eggs.gnu.org ([209.51.188.92]:46428) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tLgTd-0007QQ-NS for 74700-done@debbugs.gnu.org; Thu, 12 Dec 2024 05:31:29 -0500 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 1tLgTY-0000ev-6y; Thu, 12 Dec 2024 05:31:20 -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=a6FCpFA5CyqWM/pygSPxEgWdtLx71cQT6icdXTuimxI=; b=QLsS6OR2K/04 PtK56DV5qksgROzCVCBAcKNAFqKMs1g33rTT0Ym9zngFBiCtK+TBK+QqaKBB1SlTTY1vqEZ9ABf1j 29njyY/uUIPau0FTDZcvSGacICxowe7t57PzwwFwnR8z1Zu7/wmFf68vH6kvhWPr0JqeaeGkPeHYO fsraRwzfbldZd41yLwtUeBTpmQ5yjYflNaILxW2S8uoGwQ1OR64AAzvDJV2n7hjUsfWLKQI7fjzpU HEdEVgbkn7OUoBqDLrb++Gkw7oqg52gNWozrqUy+vfOC2d1l4tPcKMho1eeAoZzxoLg44kkwYomX5 egsaRghcQJC+eSxNrugWYg==; Date: Thu, 12 Dec 2024 12:31:15 +0200 Message-Id: <8634it19cc.fsf@gnu.org> From: Eli Zaretskii To: Visuwesh In-Reply-To: <87zflamt6j.fsf@gmail.com> (message from Visuwesh on Thu, 05 Dec 2024 13:56:44 +0530) Subject: Re: bug#74700: [PATCH] Revert Dired buffer when clicking on last segment of directory name References: <874j3iodzb.fsf@gmail.com> <86ttbiy5na.fsf@gnu.org> <87zflamt6j.fsf@gmail.com> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 74700-done Cc: 74700-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Visuwesh > Cc: 74700@debbugs.gnu.org > Date: Thu, 05 Dec 2024 13:56:44 +0530 > > > Thanks, a few comments below. > > > >> +--- > >> +*** Clicking on last segment of directory reverts buffer > >> +When 'dired-make-directory-clickable' is non-nil, clicking on the last > >> +segment of the directory name now reverts the Dired buffer. > > > > We don't call these "segments", we call them "components". And since > > you are talking about the last one, you could also say "base name of > > the directory". > > I've changed it to base name. > > >> + (when (search-forward ":" bound t) > >> + (add-text-properties > >> + segment-start (1- (point)) > >> + `( mouse-face highlight > > ^^ > > We don't leave whitespace after the opening parenthesis. > > I removed the whitespace. But isn't that way to make lists such as > > ( 1 > 2 > 3) > > aligned without manual intervention? It is used in the list above too. > > >> + help-echo "mouse-1: revert this buffer" > > > > I think the help-echo should say something more similar to what we say > > for the other components of the directory shown in the header line. > > Something like "re-read this buffer's directory". > > Now done. > > >> + keymap ,(define-keymap > >> + "" #'revert-buffer > >> + "" 'follow-link > >> + "RET" #'revert-buffer)))))))) > > > > Should we perhaps call dired-revert directly? > > revert-buffer-function is set to dired-revert by dired. If someone has > changed it, for some reason, using revert-buffer would heed their > customisation. So I've left it as revert-buffer. Thanks, installed on master, and closing the bug. From debbugs-submit-bounces@debbugs.gnu.org Mon Dec 23 16:30:37 2024 Received: (at 74700) by debbugs.gnu.org; 23 Dec 2024 21:30:37 +0000 Received: from localhost ([127.0.0.1]:58287 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tPq0b-0004pG-Fl for submit@debbugs.gnu.org; Mon, 23 Dec 2024 16:30:37 -0500 Received: from mout.web.de ([212.227.15.4]:38597) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tPq0Y-0004p0-F9 for 74700@debbugs.gnu.org; Mon, 23 Dec 2024 16:30:35 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=web.de; s=s29768273; t=1734989425; x=1735594225; i=michael_heerdegen@web.de; bh=YlbOmCxLaHMyvHtC/F6V/0aVsyDCwf3/U8zlkDQdHmQ=; h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:Date: Message-ID:MIME-Version:Content-Type:cc:content-transfer-encoding: content-type:date:from:message-id:mime-version:reply-to:subject: to; b=AZba3kjeRXzmSCHq8n6dXy8I5YpEG4DSdpRYgFObcMTuQ+QxoinGK0ViZ1Eh9Uh4 kqBzPrPdH4ZnkfZ21EvHpUhJLCsmX2QndNKF/fR1dqqXth20iLiLE0DJH2mhjzp0c XW21gYV+wmm/RK0odmYFlLM+9sU7bt+NVJLW+yl8sL8c49fD+wTt1IHDiczaCvnxh gAdnTXMcApILw4fI8T+Ern6t4iRqWruuCLBlmhrb0UHmsyrBAmVJGycvDzjKXNtyM InTGuv0BKeRk9KGMMrn7HBdngthVc+6qALvy/iMaWBxpJ2cSVr9EOvQQk1ByB1To/ g2yr2oU60uZrUzIGOQ== X-UI-Sender-Class: 814a7b36-bfc1-4dae-8640-3722d8ec6cd6 Received: from drachen.dragon ([92.75.138.197]) by smtp.web.de (mrweb005 [213.165.67.108]) with ESMTPSA (Nemesis) id 1M8C07-1tUUhX42Tb-00759t; Mon, 23 Dec 2024 22:30:25 +0100 From: Michael Heerdegen To: 74700@debbugs.gnu.org Subject: Re: bug#74700: [PATCH] Revert Dired buffer when clicking on last segment of directory name In-Reply-To: <8634it19cc.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 12 Dec 2024 12:31:15 +0200") References: <874j3iodzb.fsf@gmail.com> <86ttbiy5na.fsf@gnu.org> <87zflamt6j.fsf@gmail.com> <8634it19cc.fsf@gnu.org> X-Debbugs-Cc: Dieter Faulbaum , michael_heerdegen@web.de Date: Mon, 23 Dec 2024 22:31:32 +0100 Message-ID: <87msgmozm3.fsf@web.de> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K1:J/velH3KVrm6h0nEwMdwK1JO4NoIluqorN/HEZ9Y1A7MUE7He/3 52/3UbegPkeiasZX6azStIiiFea3G5tUjArC2f8c2tIoStUVlWgrke5oPuZ9Y2lzyUa0ksh 7+f8AQscmtjmk8GdQa+YaA8j6kuFK53PEEaF0euF9Vv2SO+GOQMDUrMBSfXUPCLSUbaHFFb VDo6kk7NeCfAErSXYQBNw== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:rmKyezz5I+4=;hL/yvb5zoN7XEuh7EiLgYacptjN viRXA1lEaNp757iuGjHBkxG8aacUci6r1yiFhecSkL2LyXSEjZy/z9ov48lW+TIzmfYTlptWs nQq+vjYqazrp8pmza/Im+zbE8G88oqx804MNzhtvWG//GE11S0z+MI8qVL3Kc/nSGp4R0R4QJ vVt18kp71zFKmv2k/q4HV6q7wZ/2x+naKL4Id21+ONHd4LAWyaSp4MQXz6K5Ii5kcsSrUUQwQ riC17lbYSBCYNuBmh/9UpMvdvmcp6mdVdsyg1jfi+QOCk0cv7yAdJpCuHt5Qpvwwy3boWdcJ+ ZUztQI4f+Dbd/jUOnqZNgb6CnH3ofINsW2kM/4ggwJVh/IZOxxRkcoGVy18ZH8ATfVYfA9AOy xzqsUb+/jwNs1mfDY87G+8Qgj3mN47rmZHTymiaMqapnVZf1NlLU7DeX+YfYsLB9pzpTRL+Nd 1d4Cke3Jao11YQkI7VR/Dqs6gLVeqhZnhDL+zHfrt/2tfQ2ezvJE+N7bqbs6DCkuOWcRcsmPF Ozg/wn/tjAZu0jIp20IK9NGE+AbxQbewxEsEODcJVgxTFZzyqvPl58GutSMrswReovZ+FDPtY uJxzLZOALJiPLzV6jN9Ivd88oE4roqm767Skt28LypBaZEkkonIvg4BgZdmWuNGyembb0f7F9 IkQDlIHNNNbAhnxJsBsT/55/SkuPvjVVlakeQslswfpER8KjHu3PuVyCVxd7qcZqRU97JuQo+ BonIM8qb92azd1XjXJL55tMdrSxI6Wuoq+mPOzRaSIbnav7Z7EV6nAqZi17ale4XowqTIP9Vg 8lvvw1gD9ugXttHZ5bdycij3sjLYf0gogYFeOq+8elHP9f7nh2B3y8DYF4MNrUMQ/sfucVN5P TWeVcKuRC8mEipqemyDfvhAhVyVzq6j3F3Hv+NMsoNLF5s40UggANsbeixT2/hBzzXOESAfjV QfjMQl+nT0BbrHPDbYoYHLLknYcl0vT8hNBGCKp09xH5ormABA0SUGX6wrHBc6fpu6n/5z7t0 X/6co9hszpa0oVig0YxFGYnet7K3XQrMKFoW3KrA1l1R2qhNfEpwx5atl8aQMzrEuXlo+wt9j nHCMURmow= X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 74700 Cc: eliz@gnu.org, visuweshm@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Hello, a user on emacs-help (Dieter, CC'd) mentioned that in contrast to hitting g, reverting with this new method loses the position of point, instead, point is repositioned at the beginning of the buffer. And I agree that this is not the optimal behavior. Can we maybe improve this? Thx, Michael. From debbugs-submit-bounces@debbugs.gnu.org Mon Dec 23 22:23:25 2024 Received: (at 74700) by debbugs.gnu.org; 24 Dec 2024 03:23:25 +0000 Received: from localhost ([127.0.0.1]:58847 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tPvW0-0004Km-Pz for submit@debbugs.gnu.org; Mon, 23 Dec 2024 22:23:25 -0500 Received: from mail-pl1-f195.google.com ([209.85.214.195]:49455) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tPvVw-0004KZ-KD for 74700@debbugs.gnu.org; Mon, 23 Dec 2024 22:23:24 -0500 Received: by mail-pl1-f195.google.com with SMTP id d9443c01a7336-2166f1e589cso54218585ad.3 for <74700@debbugs.gnu.org>; Mon, 23 Dec 2024 19:23:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1735010540; x=1735615340; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Q2BKA/3DhWmP3ifr9rYisE1+FVuCRhr4pzDCBPm7xRA=; b=fhaLxTdZWVgxj+b3odykJfIKlaHbkoAjIA54mB39R2TizwcSwh88QgBQ4IcImPfJbs uvZqpS7RPSlKQw5TAiSDw1ppU1vL6WiZb0/9n2ZcDIb90UGkrXkog/A0BSPZCVBW3O/J 0ZPGNOYim13EErqb8fHwnPXjxNqYKeVlIvzw9ZP8bgeJRBHtOhmt39oyxXMh6IAO7iFY v4Yg3maDvkbfph8eVUTWQQCJoUeYpHvHPTLksNEhzy6KUupnTQCsTotj1S1NekNkMZ/n uJLd/lTD8nfFlJ202U4BXbo7ORf+RqOSJuSEz5IJyAp4IK8GU6tBNOzpZR+pwKI3Pla4 7thw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1735010540; x=1735615340; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=Q2BKA/3DhWmP3ifr9rYisE1+FVuCRhr4pzDCBPm7xRA=; b=uaeKRD2sxXc/AN6WE9ycTvZB4bbkSjE2L/nHNgfDmxfpgAreI9uYrVlXM2Mb1X98n0 2G1B0UhfQ7RRyw2db9sddYhzTgR+RiG9MLhwJr7KvGVIUrk25NFol6Dzm0Q0rgTLpwCf ydLQuwvFoGDLmxRXlheTy6kvs5iBEk1NleFOXz3Yh/l9yGB6+l1CGUxjADZ4Q3++tA5h 2cmHrmfER50uaPESOM2I7EKmhB9wrYr7bz+zlgqGFj1MAvwdbEtmvorcJl1uj1VYE2x8 x68HfaPjjzSRE95E6huh/D+FefPL/LTLanGpwgqHTJJMlS8f3TuWsFEe+w2Fz3+kB6H9 D7tQ== X-Gm-Message-State: AOJu0Yw6zRbEaeFv+QkPYkWzK2OM06hKkj5oOn3akUhF9KzXmJZ6QEuD 1W6RvcQtxg667a4lEzdwpOxzAyQerK5PsuOAvS3EmxFNMBylk9rTrJkbXvrI X-Gm-Gg: ASbGncubsrmJ3T1uY97fyCwGZ03O7o6Ckp2gwp7bBm1mDmKx30H3JWjuzGd8lz1e54C XeewH63szsrGNXdSoluDvx3bmTCBkXaS0y5VzKu6gWN8QI4DAuxbnWZq1w6PZXBy3csbtkFT39P jYY8sM1+Lcwc+q1xUgAGQ5HuMRi7cJx6Mn4V7lLODHXaqY0ywa9xo+FsNpYOKLUXiVyJndNbVw+ yYgy2Q0dlpPB9tdzrkgjNDv/fVhGXq2j77dg/7z5X/r6eTL12Hv X-Google-Smtp-Source: AGHT+IFwLrOKoqmEfe16EDRaoO2EiDC1p2kSKU0oLIItkm3DZBvqzZAOSvZ9DkWqD24aAgJjAprbWw== X-Received: by 2002:a17:902:db05:b0:216:1543:195e with SMTP id d9443c01a7336-219e6e8c5d1mr199051805ad.5.1735010539874; Mon, 23 Dec 2024 19:22:19 -0800 (PST) Received: from localhost ([49.204.129.41]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-219dc964f09sm80981025ad.26.2024.12.23.19.22.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Dec 2024 19:22:19 -0800 (PST) From: Visuwesh To: Michael Heerdegen Subject: Re: bug#74700: [PATCH] Revert Dired buffer when clicking on last segment of directory name In-Reply-To: <87msgmozm3.fsf@web.de> (Michael Heerdegen's message of "Mon, 23 Dec 2024 22:31:32 +0100") References: <874j3iodzb.fsf@gmail.com> <86ttbiy5na.fsf@gnu.org> <87zflamt6j.fsf@gmail.com> <8634it19cc.fsf@gnu.org> <87msgmozm3.fsf@web.de> Date: Tue, 24 Dec 2024 08:52:16 +0530 Message-ID: <874j2tbw9j.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 74700 Cc: eliz@gnu.org, 74700@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) [=E0=AE=A4=E0=AE=BF=E0=AE=99=E0=AF=8D=E0=AE=95=E0=AE=B3=E0=AF=8D =E0=AE=9F= =E0=AE=BF=E0=AE=9A=E0=AE=AE=E0=AF=8D=E0=AE=AA=E0=AE=B0=E0=AF=8D 23, 2024] M= ichael Heerdegen wrote: > Hello, > > a user on emacs-help (Dieter, CC'd) mentioned that in contrast to hitting= g, > reverting with this new method loses the position of point, instead, > point is repositioned at the beginning of the buffer. And I agree that > this is not the optimal behavior. Can we maybe improve this? > I didn't notice this, thanks for bringing this to my attention. This also caught another bug that I would not have noticed since I have mouse-autoselect-window set non-nil. With the following patch, using mouse-2 on the base name reverts the buffer without moving point. However, using mouse-1 still moves the point to bob. I believe we could fix it by directly binding mouse-1 but I would like to respect mouse-1-click-follows-link like the rest of the code in the function. I cannot tell how to prevent mouse-1 from moving point reading the Info nodes (info "(elisp) Clickable Text") and (info "(emacs) Mouse References"). I tried (with-selected-window (posn-window (event-start e)) ...) to no avail. This goes beyond my level of knowledge so someone else will have to take care of this. But please install the following patch because without it using mouse-2 on the base name tries to revert the current-buffer instead of the dired buffer when the dired buffer is not shown in the selected window. diff -u --label /home/viz/lib/ports/emacs/lisp/dired.el --label \#\ /home/viz/lib/ports/emacs/lisp/dired.el /tmp/buffer-content-C8k= gcN --- /home/viz/lib/ports/emacs/lisp/dired.el +++ # @@ -2089,8 +2089,10 @@ `( mouse-face highlight help-echo "mouse-1: revert this buffer" keymap ,(define-keymap - "" #'revert-buffer - "" 'follow-link + "" (lambda (_) + (interactive "@e") + (revert-buffer)) + "" 'mouse-face "RET" #'revert-buffer)))))))) =20 (defun dired--get-ellipsis-length () Diff finished. Tue Dec 24 08:40:30 2024 From debbugs-submit-bounces@debbugs.gnu.org Tue Dec 24 18:38:12 2024 Received: (at 74700) by debbugs.gnu.org; 24 Dec 2024 23:38:12 +0000 Received: from localhost ([127.0.0.1]:35388 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tQETb-0006F3-Om for submit@debbugs.gnu.org; Tue, 24 Dec 2024 18:38:12 -0500 Received: from mout.web.de ([217.72.192.78]:39067) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tQETZ-0006Em-99 for 74700@debbugs.gnu.org; Tue, 24 Dec 2024 18:38:10 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=web.de; s=s29768273; t=1735083482; x=1735688282; i=michael_heerdegen@web.de; bh=+gXl1T37Aqf32PFnyRcWD9J3AR5xVhyCzbV1oZsFD3w=; h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:Date: Message-ID:MIME-Version:Content-Type:Content-Transfer-Encoding:cc: content-transfer-encoding:content-type:date:from:message-id: mime-version:reply-to:subject:to; b=r72UtDluR/EsLkAQ/FtbXxLqpSkchVA01F7aiFLMt1ua9SOOow7WCF75witAN/ba +GRJqjxNopFEpt66vaD1pcvnPS7vN7pluwZgyjEiuD3LqWhhnOKnAMKohIrUo7g4N TgENr1LcsoEB/W0VoZKvoIJ88Ez5/TCehfZbdQoc68K8LcXMR2nmpu63K/z2zNZhg kqgKYFrX17AKzI1sSumMdOlxcC81YQG4HC7otYBMrARInZrmIj7nwLUcjXd7QNVYI 5Dh455y3U77BnYg7yGTtzz9ey6UJAnOV63tv94akgoST+83g1kxgYkGEvyhhc1p/R JsJBrZqhFVZ/jVving== X-UI-Sender-Class: 814a7b36-bfc1-4dae-8640-3722d8ec6cd6 Received: from drachen.dragon ([92.75.138.197]) by smtp.web.de (mrweb106 [213.165.67.124]) with ESMTPSA (Nemesis) id 1MZjET-1t4UKk3n3H-00TwTp; Wed, 25 Dec 2024 00:38:01 +0100 From: Michael Heerdegen To: Visuwesh Subject: Re: bug#74700: [PATCH] Revert Dired buffer when clicking on last segment of directory name In-Reply-To: <874j2tbw9j.fsf@gmail.com> (Visuwesh's message of "Tue, 24 Dec 2024 08:52:16 +0530") References: <874j3iodzb.fsf@gmail.com> <86ttbiy5na.fsf@gnu.org> <87zflamt6j.fsf@gmail.com> <8634it19cc.fsf@gnu.org> <87msgmozm3.fsf@web.de> <874j2tbw9j.fsf@gmail.com> Date: Wed, 25 Dec 2024 00:39:10 +0100 Message-ID: <875xn8mz1d.fsf@web.de> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:gbGXKS9w+NYMUEJUlJXGJEgyl8qsVO2F++Mr+M8bUTwClDYsHgp rWXb4Tm3N1jX2jqAl5NxvHN1U8lmBK5bXfJ7m1cQzTJ92kk6yAj5hBAxoUQEJ8Oux1tUECx jzF0jIH0yU31PEAublJQbn5ysHZhmC+piwtB8GkmRNLIcAerKGteuxWTyARv7K3cI3oOGTG HGFCn6IvHwj2ykmFdhpKg== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:fiN1EqolPkE=;MA2GyftSp8Oxh1t5uR711dyenbS DTNp/EtQrlX/JVwOiroyIZXxvoBNMXkk+32vpWxavAw4YlTD9o+hckkqV51hNGMqTRhk+1jbe IGbCl8tea0hcAlWUIM3ZSo4CzVjLViEFYlf1dS4AW136dycHee2q0j7qxp2DNkF6HQnK41jS1 u6QZhfQYgvBfWzO12k77zgJ9XLqGs+C/g/ADuq+MZm8Hzy4t1+awhsEkhYbXkH3G6MgN7+FPp cSziHVm+2QpHMMFe1DuJtGQ00eTPhCH9A8sqlPnZvzDWX9zhVzbaxQq9l+zrt14VvI0eMxFhQ z0073LyjLq37SPpyIlqC7dgYxml9aZCOCqj7lwsHt+Mzq52AYYeIXaHKIXhR0mBoXyWDibgOH i6zcVB8BcawTYO7veVqz+9m6cB0vpzio7ISwukcNeuu146YlyZLwRJkHvHnc2L2PLXCnXN2Jc g079duY9lJsN9oyZ7ZzDgDSuC2kSvRrsFXnSuaNqne3mFQqBHHwwPxyiir0Mp8hAITCEPTi6x Zelku6ak4BZuqyGC0DrWX2PUI8VHcGKddTxfYt3ci3Xes7YApQiWSliNH0C5WRWowAqYmvgBY NFCjUb6StBt6jrab5u5ihMCVT/e/GjKFmwX7pBXEH+OMAIh9T/m5oOpuxjhdCmeobEeURyzyI KiPMqhRhJclQPHJ5ebILs/M3KxhMsBZSOOU/o4GjPLFwwEd07yRwuzUPUv89w4A12wjQlv4qs cc3agJwh3G7eTBcVDH/NdgHrhPWONEnxfovStI8UVyib3OHIROfrjCiT3HdDMCTTBuHv5WY4/ wWY++AWuxALYz4qzmKdpl5emwV/FvPSpDEfBBaed31nPl5jEqPnIUU9ouVKiqCbY/bp6fsYSQ pbDVcJiq0Cl2w95Y9L77WrTurx8H/tVILFqrQa1h+DlDpQSC9UD+vp+IDvTszmTs9MFko8jX0 noC/oNGhVnYVPW6HN4ckLawpXsVog65IjTk/Si7ARU/28/5IOroB5p1V0VX0SpvaXDgsPW3GR QG+RKk4nACGJ436z2VoDrwndbg3zoFMEjxQdcD6DiQuIiOn9Hkg5OoMq09Qw5Cm38g42g4Je5 SSn0+eI2I= X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 74700 Cc: eliz@gnu.org, 74700@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Visuwesh writes: > [=E0=AE=A4=E0=AE=BF=E0=AE=99=E0=AF=8D=E0=AE=95=E0=AE=B3=E0=AF=8D =E0=AE= =9F=E0=AE=BF=E0=AE=9A=E0=AE=AE=E0=AF=8D=E0=AE=AA=E0=AE=B0=E0=AF=8D 23, 2024= ] Michael Heerdegen wrote: > > > Hello, > > > > a user on emacs-help (Dieter, CC'd) mentioned that in contrast to > > hitting g, > > reverting with this new method loses the position of point, instead, > > point is repositioned at the beginning of the buffer. And I agree that > > this is not the optimal behavior. Can we maybe improve this? > > > > I didn't notice this, thanks for bringing this to my attention. This > also caught another bug that I would not have noticed since I have > mouse-autoselect-window set non-nil. > With the following patch, using mouse-2 on the base name reverts the > buffer without moving point. Thank you. > However, using mouse-1 still moves the point to bob. I believe we > could fix it by directly binding mouse-1 but I would like to respect > mouse-1-click-follows-link like the rest of the code in the function. > I cannot tell how to prevent mouse-1 from moving point reading the > Info nodes (info "(elisp) Clickable Text") and (info "(emacs) Mouse > References"). I tried > > (with-selected-window (posn-window (event-start e)) ...) > > to no avail. Was that code line the attempt to fix the problem that the buffer in the wrong window was being reverted, or the attempt to fix the mouse-1 problem? > This goes beyond my level of knowledge so someone else will have to > take care of this. But please install the following patch because > without it using mouse-2 on the base name tries to revert the > current-buffer instead of the dired buffer when the dired buffer is > not shown in the selected window. > +++ # > @@ -2089,8 +2089,10 @@ > `( mouse-face highlight > help-echo "mouse-1: revert this buffer" > keymap ,(define-keymap > - "" #'revert-buffer > - "" 'follow-link > + "" (lambda (_) > + (interactive "@e") > + (revert-buffer)) > + "" 'mouse-face I don't know how to fix the mouse-1 problem in a sensible way either. Does anyone? (And I think in this version the "e" code in `interactive' isn't significant - but let's first see if we can improve the behavior even more.) Thx, Michael. From debbugs-submit-bounces@debbugs.gnu.org Tue Dec 24 22:43:58 2024 Received: (at 74700) by debbugs.gnu.org; 25 Dec 2024 03:43:58 +0000 Received: from localhost ([127.0.0.1]:35690 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tQIJS-00014r-B7 for submit@debbugs.gnu.org; Tue, 24 Dec 2024 22:43:58 -0500 Received: from mx0a-00069f02.pphosted.com ([205.220.165.32]:1172) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tQIJO-00014c-J4 for 74700@debbugs.gnu.org; Tue, 24 Dec 2024 22:43:57 -0500 Received: from pps.filterd (m0246629.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 4BP3UOab007603; Wed, 25 Dec 2024 03:43:53 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=cc :content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s= corp-2023-11-20; bh=NW+1AHdY3Y2Zexmm67khw0bzVwzLahLwqKTmFaSorW4=; b= ThzW1Nv5C2BGrj0JbgtQx3IW+hIvx20GlxH1QURSesOvJ/hUwwjcR6GBb9DGDGYA p7KlrJBc7ZMn6ieiGGfCpWzIseOqgnEJx1UJt9u6lFQN4oqArIMAdXHFgi8d8VF4 I/5co3y8sgcfVgt+vg4IO6fgQIW6Yr6L3lDXmfr6VKp8nFlRR6a5as3gfxeMm/WP AV1HE/1s3Bal2jDmvXkH+qt+uRsDR3m/wWBpngROylfqkvVYcTRqh7e1xZurCsMb g1AIT+DroG67neiYEgdCcdKLUKD8PnLcjoODbzpH/G0KtvOPRoG2q+FCMsFcFqMt +QuFYqMiE4JSqTcQqAunmg== Received: from iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta03.appoci.oracle.com [130.35.103.27]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 43nq7c4y7j-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 25 Dec 2024 03:43:53 +0000 (GMT) Received: from pps.filterd (iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (8.18.1.2/8.18.1.2) with ESMTP id 4BP11C4r029431; Wed, 25 Dec 2024 03:43:51 GMT Received: from nam11-co1-obe.outbound.protection.outlook.com (mail-co1nam11lp2172.outbound.protection.outlook.com [104.47.56.172]) by iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 43nm4eqwvv-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 25 Dec 2024 03:43:51 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=UUTos2Uu0Vzzgf+SK7JZ/6LNpLm0MlCsiCfhBUgacMtyXrHLfZPhcXcgmkAuRMQ6THxynZNMLSldz+q0nTm3Z7EdMD/S+ckuawVPgeEK48ZjZSMqN4b/E6NnODjRVZXyi/L9Nvysg3vWO0Wt54rzWNFMdoEvyhd38eqiwirC0fr2IZCVxgURtwj9wPWLYIUKy50MPdKgrTgQ4UxTOepnM5Fe0M7TeSYAn0rN0bf3SCrWLgG8vjkr2kdfu0Kk/YDq8ELDgseHywNWCUYrbIm5BfjB1pAqK2l6G7SSxX46m6LoZv+59NGRXMumMZimDEQZIxKTaCck/4buxLyDlXP/mQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=NW+1AHdY3Y2Zexmm67khw0bzVwzLahLwqKTmFaSorW4=; b=RVAbvPfX8dI1IeE8RB93N3ByPkkmH67eFW5R/WYiKzt4FbZTngbDQ2bNrhoGlfa1mF8SgrXdOrn/cxmFYKgAk5YcEOVj+6LW2d84r6JMMjH/qllEDZFVoCvm+8e0/9BTv8NYRk7gcNRWlwSWq1+syqISEma3N8FgHiczy9DaHjk5zIJ5sPBexPuehJBbSoFVRNKgEAJHtmzpfaimvPD+iRvLnbxaONiYKErKoz1J+KWRw5xv6DTUoZ99de1QF9o5/WSbWM/tDDS+ANgsIXZzoI3bp9gXayYZuLM6navlh8wa4im6aNNQpqfvGzasv1HhgZZx7rYSPEn51TWIyTwSHw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=NW+1AHdY3Y2Zexmm67khw0bzVwzLahLwqKTmFaSorW4=; b=GoJ6YdpNshnahVO0TLO0YAET4j44373u1Rx010YbWYQgChv6tJfPHU39VAAJe2SvNvCOn7asuI/0IYQO7RcDW1pkEK9Ulz6mNKPPQFEO6oKGx99GRoVZUjXqjbBiU0p1KQu3UdOBvKzNN68kC3vvhLdZiKMyMH01YzPDOgtW2Kg= Received: from DS7PR10MB5232.namprd10.prod.outlook.com (2603:10b6:5:3aa::24) by SJ0PR10MB4800.namprd10.prod.outlook.com (2603:10b6:a03:2da::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8272.21; Wed, 25 Dec 2024 03:43:44 +0000 Received: from DS7PR10MB5232.namprd10.prod.outlook.com ([fe80::8303:658f:14f8:2324]) by DS7PR10MB5232.namprd10.prod.outlook.com ([fe80::8303:658f:14f8:2324%5]) with mapi id 15.20.8272.013; Wed, 25 Dec 2024 03:43:44 +0000 From: Drew Adams To: Michael Heerdegen , Visuwesh Subject: RE: [External] : bug#74700: [PATCH] Revert Dired buffer when clicking on last segment of directory name Thread-Topic: [External] : bug#74700: [PATCH] Revert Dired buffer when clicking on last segment of directory name Thread-Index: AQHbVl0VPhUhlC3N30m0bUU4rbDoDLL2TXVQ Date: Wed, 25 Dec 2024 03:43:44 +0000 Message-ID: References: <874j3iodzb.fsf@gmail.com> <86ttbiy5na.fsf@gnu.org> <87zflamt6j.fsf@gmail.com> <8634it19cc.fsf@gnu.org> <87msgmozm3.fsf@web.de> <874j2tbw9j.fsf@gmail.com> <875xn8mz1d.fsf@web.de> In-Reply-To: <875xn8mz1d.fsf@web.de> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-traffictypediagnostic: DS7PR10MB5232:EE_|SJ0PR10MB4800:EE_ x-ms-office365-filtering-correlation-id: 788f993f-9ac1-4e74-3d5c-08dd249654f2 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; ARA:13230040|376014|366016|1800799024|38070700018; x-microsoft-antispam-message-info: =?utf-8?B?VzJ4VW9DTFZmL2lDR1lkbytweHZnaG9wR0V1MDlHZU53RUpJT3cxT0dMMDF3?= =?utf-8?B?bElMa2l0TlpHc29YKzF5YlFhbkRDQnhCNkM2RkVubzhHTkRvUDVTb0JSSTNL?= =?utf-8?B?VmVKSm5oS3FnSWprTmJkVnZTWVFDYW5MdHF2UlA4R2Q0WXN1a3RMbW45RWFs?= =?utf-8?B?cUY4Z2Z0Vk9DVzc3RVV4d1Rab3FJTDVRbWZQOVFNYnhSMlJabXg1aWZuUnpL?= =?utf-8?B?YWt6bzVSMm1YdEt0YXdHdjhFQ1NtR2hMOXlOeDJrM1VleWZpcUpNdEtRU2Z1?= =?utf-8?B?cWJoZm5jVXhML1Y5eS9lLzMydTAwNkk4ZW9NU0J0T0tiSVVKTGh3L0pvNzdO?= =?utf-8?B?d3MvVDlZNnNCbjhKVmVDaWN2VkFpUHo1Z1daN1ZVOWlkQ1RJYSsvbjZMTjFY?= =?utf-8?B?Yit6TG1FLzlSQkFKK2dTU0V0cHUvMm9EOHpCeVdqMG45YWwyUW5IU2lmSjlQ?= =?utf-8?B?a29xa1B0cStHYjdtTEt3cTBhd1o2b0RSRHB5RUtFUGdtRXRENW11WnhWcS9Z?= =?utf-8?B?OXRHUEVVeElIdDE0bUNYK1ZIdS93VkNBY2k5bmJpTmg3aG45WDBYVkdhdG1m?= =?utf-8?B?UFoxZ2t4QkVjSlNaaXIxa2l4aCtGZ1JMb2w0R0E2U0kycHV1azlVdllyK09u?= =?utf-8?B?cDJWU2tJejM2RjZWTWhPdXBQci8zdWc2T0JMNStMUmwzRGtOakxYVVdRbkhZ?= =?utf-8?B?NVg1NUZvUTN5Y0MzOFRhRFlNandCVHpZamZkWDVvV0pudmYzSk83bmMxWk9t?= =?utf-8?B?bWMrMmJhNGhxMG80eFdLQlIvS3BlNTBIZW1LZXVyZHYyUFI1ZVFqK3BNWlhD?= =?utf-8?B?T3BWSnlTT21ORmhQZlZvUnJhdk9vR002YVpjZlRrOWROS3VXbUdCMGVZZy9R?= =?utf-8?B?d1RTU0hncUtQa3pkb01oTFJmQ2lydStVM0NCUTYwN1l3V1grcTllcExMMGRO?= =?utf-8?B?SzZIKzFoTkd1RVJPUlZzS1pZanFrcmI1d3duOWxweTNEeGI3dXFQMVBXN1B4?= =?utf-8?B?M1NFY1ovTmpPd2VzV2w5ZytDNEVaNkF0V1lXOTR2d0E2M2xVWC9GY0xyK1lW?= =?utf-8?B?SHFEQWdYbi9iRFBuTUpGNG1mT0VMK1pqbWdETEFYdWNIRHdQQUZweVBvcUd3?= =?utf-8?B?UEFjekxKdmRCS1l1OTJNdFR3czQvN2MrSkRjbmN1NTZHTk1reTdEdWhxVGR4?= =?utf-8?B?Wm9JOHBPaXdYV1I2YTY3aFlWcjFlcWJKZXFKaWcxTU5ab1lMWWxRR2tld00x?= =?utf-8?B?WlFEWE9kVkNsU0xsV09hM1Fzb0dhOC8zTURKajQwVE1TZXlmTDZ0TjFQckpC?= =?utf-8?B?WUJTbFpCTWlBY0I5bWxmMVRMSEpNR3k4RW9mcmxsUk1Ya1NkUGZMWHFNUjZp?= =?utf-8?B?bEVHOHV5Z1RyWm1HNlhUcmdxcXZkOUMwajhhQmZwSXpTaVZIY2hTbENmOGhz?= =?utf-8?B?aUZueXpQRnNyb2tkUmdWbVRoZkE5SVZvQzJMOERMem9EQ0lPOTJNSEkycFFL?= =?utf-8?B?dzA2Y04ySHR0Z0ZDbmlOcEdSbC8zSkZ2NlZiTDNXSW9sM2JSNnpyNTV0VlRO?= =?utf-8?B?d1ErTnQwUDZnd2k5WGlQbk43Q1EzKzM2bjE5QktOZUdza3Riek0zTURFZ1JN?= =?utf-8?B?N3NWN092RjZvOG1QOVpRd0xJNjFWL1ZBZW51RmpDclhTbnAvRVJsekdLTTZH?= =?utf-8?B?M0RXVWhCMnQvZ1p1NEVnSHdDM3F0SGNrL3BSMkhDTkY3bGMxS2w3anYwN09a?= =?utf-8?B?NEdMelFEcGYrZngrL2VteTRJRDNXZFVsemI5VHNOV3NkYThZWWNReEE2dWZ2?= =?utf-8?B?MkdYZkJzd1FIUGs3YVppYU0xcXJCeG1xSUNrcEJJSnVCVUhVanR3VVpnVkZy?= =?utf-8?B?akNIUnE4Tm9DaXhGNGU4VlFHeG9DWFp4YkYvam9vZjlNc2V2ZVZLSm81dkhH?= =?utf-8?Q?EgivOU6WYZL555AHVsPsoLN3EdgwEGzW?= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DS7PR10MB5232.namprd10.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(376014)(366016)(1800799024)(38070700018); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?utf-8?B?djJLME5xay9ycUZXUmY4MFp5dXBGVlpVOWMyeU1aeGVjU2k3Rzc0ejVaU3ll?= =?utf-8?B?bTJVSDA5WWlFQzBQbTN6RURveW1NZmdTOE1ySjR3WXYxUDV6RG53VjVTNWhV?= =?utf-8?B?aWVLQ25ya0FoWFprcjlEL3NJd2dXN3RBRjFOZ0FVdkNOQTVOMUhqenE5QXE2?= =?utf-8?B?VEd3Q2lFYklWelRrdzArS3ZoYTZHU3FONkNBOG1ueE1wRkFKTmFRTU1LM25V?= =?utf-8?B?c3l6R3BOQ0FFOHgvaXJqVjgwdStmV3FJclVHb2lJcW1zK3krYURrL0lzZjF3?= =?utf-8?B?MUJBdkhwTjhMZkR4Q1pTL2NqNHA3OCtFZTN6RVdSUUxOT2hvUFNOUE1Fa2dk?= =?utf-8?B?ME5MWFo5NWxDWGFZV1FzQkN4K2MxanFCTHRwaExrMGdDVEdFSm9RTUdRajQ1?= =?utf-8?B?OFlaUlhJeEtXeFAvSy8yRkFLTXZRcHdtUWxDalVFMGFBdnZPK1ZHNXk5MXZm?= =?utf-8?B?UlJGMll0V2Y4ZWtSM3daeDN5cEpQTDlCSmZwYU9Pd0laeEV5T1N2QVBqOE96?= =?utf-8?B?eUcxMm5qZ0ZkS3hEblpNSWY3UGx6a0c5bHl6NHZ0a1pmQVNYNThadEJiUnFn?= =?utf-8?B?enR4enVFTTUzb3Zac2pZZ1FPYnNQVXl1aFJtd3hUazY0d3lRYStIRjhJMVN3?= =?utf-8?B?dGdnNmNjLzZjejRWT0RrK3k1R2hXYm8vWDJ3VFRRMUpGWG04aG1iUExkWDF0?= =?utf-8?B?V3VIeE5XeGErdzVObFJMZStxVUxtdzJZM3BJRlQyQS9Lbmt6aVBjOVIwbFln?= =?utf-8?B?ZHdXcmkwNE5VdzhpOGQvN3J5RGFHVDJlKzFsS3RRYUlrQm9IelYyMXJ5M05t?= =?utf-8?B?b2JSeTZKTTdCMFpYeHI1VFVWRlVyUlArUlBFaG82a0daSUlmUkZnS25LK0dU?= =?utf-8?B?ZDJsaFVXdFUrZUVjNzJIZ21aUTNydE9EYk9wMzNLbFJjUEtFcjJXVWM2SktK?= =?utf-8?B?b1ZKK2JrUTd3UUZIQVh2ZFR3T0dlRGpIdHRQNklsMEdpYk8vYmxDbENnRS90?= =?utf-8?B?c1FHOFpjbWxpL2hFMFhNZG1QVksrMytwK3FjZ1lGL3pTbG5OdkNDM3RCNUNx?= =?utf-8?B?bkVOTlk5ZGs1N3dTeEFTdTRJdW0wdE9YcnZ0TGg3cnYxWGo5V2xuUjFUME1v?= =?utf-8?B?ME1iRDJNaTVlNGhKQzBxcksxS3F4QnZhcFhiWXlzQkxJUjZhL05KSTUvcFF0?= =?utf-8?B?akNXUlhXTnNhWTVXUEtXS3hRWG4vUGhmQWx0YTdYWTBUSkJGMjV6NFMzSUZR?= =?utf-8?B?RXBuRWU2M1F5QUNGNys3Yk1PY3ozcXE2c2J5SmJzbHVQMGJucmRvYS9kMnNN?= =?utf-8?B?NWZseFlaeVhaazVTQW94cXI3VGJxcWtyNGlMWUxPOWhiTGsxZC9OVUpVK1Ns?= =?utf-8?B?RnpaTTR4QytSNUNiRUZ2cTJxSE1OT0RMUUhzN2tua3pBTm54eUdXM3dRQkpB?= =?utf-8?B?WVdPNE5kTlFpb0lmWWF6MWVweXErRk9Ca0Z2clhZblJwWkpsNytQV0xyUWJx?= =?utf-8?B?M0ZqbmdqbGtWNnlTb2JwN1ExMDlUYTE3UXpVamZBb3M3MHNCS2x4Q3l6Mllz?= =?utf-8?B?YzNrZ25WR3JiOGpySTFpR0hjaWR1ZERBZ2FqYXRjdkpDUVJsT0VObURWalhh?= =?utf-8?B?K3ZCUnZHQWU5YU4vNXRodm1DdkRMZ2phUFVkdm1hWXpYYzJMRDJaY3pQZmNS?= =?utf-8?B?NGtFYXYyS1l3OTNnQmxLdDNzNUkyeU9SL3NETmxUK0dhZFgrNk9yZkJtMjRD?= =?utf-8?B?S09OM2JEVmszdFNMSDloRk4wUzFuUzZBRjN5dWZoU0lQYzd4alBPVWFaMk9r?= =?utf-8?B?VVlLdU5OaUxEUVNvUUwwakFtbVFCeDhIUnpkcGdJbWN3cGxHYkg2QUlXTDh1?= =?utf-8?B?bGZJYklLNXk4T2tweGw1QllLYU5qdkQ2anJSMTZBRHRwMUgxenZLOVdEUVNm?= =?utf-8?B?Vzl5S1J5Zm85MUsrejY2NGVmOUpWRFQ0WWdINUxqZllUVXhDNlZIR2hQSXRv?= =?utf-8?B?ZmMyNzJwc1V0TnB1ZzFCWjNXdjlLME0vdEQ2dnhtbGhBanU3enRDNXR0WUMx?= =?utf-8?B?YTUxZzBONytMd0VDY3UwcGlwWU9ZL2FaQTl1VGlENXlQS3BOMzdYMXJzUzRs?= =?utf-8?Q?3eD5i7Bq+0uH5RoVFuhtiD2ZG?= Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 MIME-Version: 1.0 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: vENlFj8iAThCLDfUO9yaghbs52lGfjtaes+DPrJ2uDlrF+pFSckRD1XZh9+VH4vx+V+I6Ik0e2qTCBxVIBzVgwZUD0kQVcjI8vtPszZCRqe0U5KDP83AYHmkmReDkLUXUacXf7VqH8ZyGBThcUaKTvP/jX6BoBdWl2GDR3s7sKzfnMXdybJhIn7JIbqdwXav5CfimOofC8EUb5mUZzq0w+PPo50cImHPcct6ucWTLCQHdrKnj0QmxJdQCZcki3RgfA7jzli2KNMU0SeelFC0nMv9l94NUcES3WPaMnhQehnZJc6fAUMLdDPTaEQr2O4comTjB2fOwMvck7bY6FL+zhi/z64G+au1173nDPM2vDM8HT4J+KuG792shOoGyM4Ni56eUb7kP0mwNCyaLe94CqX+TmP8AWLUPctJx1jjyK/z4/0QrkSUnh6UEAF/fOKWEBrOGHzvV8QWu4yTdBEHsMnhgYEpXt7/ptxDYgrhzK2i0e5JuLuX12GvnoD8TLqv9AefyJuLbjhG2zcPceU6Xyaxr7yzyZo8Zsh+gPUGsoI9heZ//NaBEToFNpFC9U954PzFRtkRXeuSNQqk8ywz4fRkyQU4ji270IlfsUGCufA= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DS7PR10MB5232.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 788f993f-9ac1-4e74-3d5c-08dd249654f2 X-MS-Exchange-CrossTenant-originalarrivaltime: 25 Dec 2024 03:43:44.5211 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: O8GHIwp07tjYYtRel+MgxS9Gnj09CrSVaX+9D1aiCTEO0yxUBhRpwdWtHsKk7PfLzMpW86beYqzVa1wgfkS98Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR10MB4800 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1057,Hydra:6.0.680,FMLib:17.12.68.34 definitions=2024-12-25_01,2024-12-24_01,2024-11-22_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 adultscore=0 bulkscore=0 malwarescore=0 phishscore=0 spamscore=0 mlxlogscore=999 suspectscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2411120000 definitions=main-2412250030 X-Proofpoint-GUID: 9lSlhP89vuGUk8DRP9Len5jjmQLoqLhF X-Proofpoint-ORIG-GUID: 9lSlhP89vuGUk8DRP9Len5jjmQLoqLhF X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 74700 Cc: "eliz@gnu.org" , "74700@debbugs.gnu.org" <74700@debbugs.gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) PiA+ICAgICAgICAgICAgIGAoIG1vdXNlLWZhY2UgaGlnaGxpZ2h0DQo+ID4gICAgICAgICAgICAg ICAgaGVscC1lY2hvICJtb3VzZS0xOiByZXZlcnQgdGhpcyBidWZmZXIiDQo+ID4gICAgICAgICAg ICAgICAga2V5bWFwICwoZGVmaW5lLWtleW1hcA0KPiA+IC0gICAgICAgICAgICAgICAgICAgICAg ICAiPG1vdXNlLTI+IiAjJ3JldmVydC1idWZmZXINCj4gPiAtICAgICAgICAgICAgICAgICAgICAg ICAgIjxmb2xsb3ctbGluaz4iICdmb2xsb3ctbGluaw0KPiA+ICsgICAgICAgICAgICAgICAgICAg ICAgICAiPG1vdXNlLTI+IiAobGFtYmRhIChfKQ0KPiA+ICsgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgIChpbnRlcmFjdGl2ZSAiQGUiKQ0KPiA+ICsgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgIChyZXZlcnQtYnVmZmVyKSkNCj4gPiArICAgICAgICAgICAg ICAgICAgICAgICAgIjxmb2xsb3ctbGluaz4iICdtb3VzZS1mYWNlDQo+IA0KPiBJIGRvbid0IGtu b3cgaG93IHRvIGZpeCB0aGUgbW91c2UtMSBwcm9ibGVtIGluIGEgc2Vuc2libGUgd2F5IGVpdGhl ci4NCj4gRG9lcyBhbnlvbmU/DQo+IA0KPiAoQW5kIEkgdGhpbmsgaW4gdGhpcyB2ZXJzaW9uIHRo ZSAiZSIgY29kZSBpbiBgaW50ZXJhY3RpdmUnIGlzbid0DQo+IHNpZ25pZmljYW50IC0gYnV0IGxl dCdzIGZpcnN0IHNlZSBpZiB3ZSBjYW4gaW1wcm92ZSB0aGUgYmVoYXZpb3IgZXZlbg0KPiBtb3Jl LikNCg0KSSBkb24ndCB1bmRlcnN0YW5kIHRoZSBwcm9ibGVtLiAgSXMgaXQgdGhhdCB5b3UgdGhp bmsNCnNvbWVvbmUgbWlnaHQgd2FudCB0byBoYXZlIGBtb3VzZS0xJyBvbiB0aGUgbGVhZg0KYnJl YWRjcnVtYnMgY29tcG9uZW50ICh0aGUgZGVmYXVsdCBkaXJlY3RvcnkpIGp1c3Qgc2V0DQpwb2lu dCB0aGVyZSAtIG9uIHRoZSBoZWFkZXIgbGluZT8gIEkgY2FuJ3QgaW1hZ2luZSB0aGF0Lg0KDQpJ IGp1c3QgYmluZCBib3RoIGBtb3VzZS0xJyBhbmQgYG1vdXNlLTInIHRvIHRoZSBzYW1lDQpjb21t YW5kIHRoZXJlLCBgcmV2ZXJ0LWJ1ZmZlcicuDQoNCihPbiBub25sZWFmIGJyZWFkY3J1bWIgY29t cG9uZW50cyBJIGJpbmQgYG1vdXNlLTEnIGFuZA0KYG1vdXNlLTInIHRvIGRpZmZlcmVudCBjb21t YW5kcywgdG8gaW52b2tlIERpcmVkIG9uDQp0aGUgY29tcG9uZW50J3MgZGlyZWN0b3J5IGluIHRo ZSBzYW1lLCBhbmQgaW4gYW5vdGhlciwNCndpbmRvdywgcmVzcGVjdGl2ZWx5LikNCg== From debbugs-submit-bounces@debbugs.gnu.org Tue Dec 24 23:49:07 2024 Received: (at 74700) by debbugs.gnu.org; 25 Dec 2024 04:49:08 +0000 Received: from localhost ([127.0.0.1]:35788 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tQJKV-0004C9-IB for submit@debbugs.gnu.org; Tue, 24 Dec 2024 23:49:07 -0500 Received: from mail-pj1-f68.google.com ([209.85.216.68]:59724) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tQJKT-0004C0-Im for 74700@debbugs.gnu.org; Tue, 24 Dec 2024 23:49:06 -0500 Received: by mail-pj1-f68.google.com with SMTP id 98e67ed59e1d1-2ef72924e53so5954708a91.3 for <74700@debbugs.gnu.org>; Tue, 24 Dec 2024 20:49:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1735102084; x=1735706884; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=l1UUav3gP0oZey7xysmjN81ynGG0evY+I4XZn66T0x0=; b=mgag4+B2b+Jz+7/Z6RNp86U5OrHGov6+H7CiqM2mst99kieBWfocgFfBA0B104CdM0 DkF+eaDA+EtApKMayQ2wXjH2VfNX8ECHzJ5qQ2nlAI+FbS87BCsIGdkE16n9KBGCVu4x nOVN4fk35RQNn8Oh2j2LLlODA6ecqgmrOjDt/QtD6H4evxQdWsAnVd8ANCP9hfLJ6o/Y kV90pYg2QHbSAkNynp2nLOFxMdgAgn9O3CIFF9W7BLkgaHVnnbBv85oQuiOmFsFE7jGd RFTuTqFE1O4ieIFIcCr952lCsnCmxq1J5r0gxfh+S5pm7ju7nNWQvFH8dw+OU66NCVA8 rLhw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1735102084; x=1735706884; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=l1UUav3gP0oZey7xysmjN81ynGG0evY+I4XZn66T0x0=; b=mG4RYz/BBn58YXyZffLEqxT50sdH/FuLwt4cRwMjeoO16rp7wqH3i+F4805d4S0cF9 BLXjvHE+rohHq4Z19rQojvmGMppZmcjcPMacm3Zi8Cu360wFo7/NV5XQqTOE1W8T8RUD 2L/63GNRrhJh3YXguybnbZfrI6Mg4NEqT3FGnKGev/UznI4Q2ALPmyf+iNOe/20Fq/UJ W2pPAtGNHSj7C43mqw9+729hlsS/3PALezJQsgpxl/P+wF6opjBLeq4HQ2GQn4FB9+mX Zx9J/flYX1aTV/aB5v3B+Vs3nGpVwTxAd74hEsL8tekw4ukqAGucYTJFfXywRl+sYCja +Uuw== X-Gm-Message-State: AOJu0YxlWNW/ovaqFLmxEUJSHTbFT+pLi5JO5aMbebHp5TUSKpfZdsHI VAV0LD6gfvm2rW9lSgDwys0LSK8aoMy4mIhSKgDi0R+oduoocmbx X-Gm-Gg: ASbGnctM7q4LRlF+4iw157CT409VBA8QIJC0sxc6J9pcXtGDd9sWq5rGXwmsSBwoTue bDfvQKnPjv6akzVbHBD10fQYNNIxrbrLljGR13+za4juhT+ZrdU9J0CwxzWWiBIulsOVL8oX3Qu C2LO2z/2LsAvhZ+CJ/jOCToJYUBCnz37S2pDtTlNrYcb3nzolYaXWrXw4cLOy6ZOL5la6hyjfuv 0h7xwWyiVCsCOBadysQAeiTtBxodwO70WkQoikFfCnBOaMPyp72UA== X-Google-Smtp-Source: AGHT+IE/UH8DnPrulFoQO6seXteFtVhxV8vp+e0Tw/YD0IMAEwF2CEg4hYBt/pthbjMGMA54b2w3sw== X-Received: by 2002:a17:90a:e18f:b0:2ee:c291:765a with SMTP id 98e67ed59e1d1-2f452debd4fmr32305419a91.8.1735102084588; Tue, 24 Dec 2024 20:48:04 -0800 (PST) Received: from localhost ([49.204.119.117]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2f4478aa37esm11271814a91.46.2024.12.24.20.48.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 24 Dec 2024 20:48:04 -0800 (PST) From: Visuwesh To: Michael Heerdegen Subject: Re: bug#74700: [PATCH] Revert Dired buffer when clicking on last segment of directory name In-Reply-To: <875xn8mz1d.fsf@web.de> (Michael Heerdegen's message of "Wed, 25 Dec 2024 00:39:10 +0100") References: <874j3iodzb.fsf@gmail.com> <86ttbiy5na.fsf@gnu.org> <87zflamt6j.fsf@gmail.com> <8634it19cc.fsf@gnu.org> <87msgmozm3.fsf@web.de> <874j2tbw9j.fsf@gmail.com> <875xn8mz1d.fsf@web.de> Date: Wed, 25 Dec 2024 10:17:59 +0530 Message-ID: <87r05w9xmo.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 74700 Cc: eliz@gnu.org, 74700@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) [=E0=AE=AA=E0=AF=81=E0=AE=A4=E0=AE=A9=E0=AF=8D =E0=AE=9F=E0=AE=BF=E0=AE=9A= =E0=AE=AE=E0=AF=8D=E0=AE=AA=E0=AE=B0=E0=AF=8D 25, 2024] Michael Heerdegen w= rote: >> However, using mouse-1 still moves the point to bob. I believe we >> could fix it by directly binding mouse-1 but I would like to respect >> mouse-1-click-follows-link like the rest of the code in the function. >> I cannot tell how to prevent mouse-1 from moving point reading the >> Info nodes (info "(elisp) Clickable Text") and (info "(emacs) Mouse >> References"). I tried >> >> (with-selected-window (posn-window (event-start e)) ...) >> >> to no avail. > > Was that code line the attempt to fix the problem that the buffer in the > wrong window was being reverted, or the attempt to fix the mouse-1 > problem? It was an attempt to fix the mouse-1 problem. The former issue is fixed with the following patch. >> This goes beyond my level of knowledge so someone else will have to >> take care of this. But please install the following patch because >> without it using mouse-2 on the base name tries to revert the >> current-buffer instead of the dired buffer when the dired buffer is >> not shown in the selected window. > >> +++ # >> @@ -2089,8 +2089,10 @@ >> `( mouse-face highlight >> help-echo "mouse-1: revert this buffer" >> keymap ,(define-keymap >> - "" #'revert-buffer >> - "" 'follow-link >> + "" (lambda (_) >> + (interactive "@e") >> + (revert-buffer)) >> + "" 'mouse-face > > I don't know how to fix the mouse-1 problem in a sensible way either. > Does anyone? > > (And I think in this version the "e" code in `interactive' isn't > significant - but let's first see if we can improve the behavior even > more.) Indeed, I thought @ had to go with e _always_. From debbugs-submit-bounces@debbugs.gnu.org Thu Dec 26 03:56:58 2024 Received: (at 74700) by debbugs.gnu.org; 26 Dec 2024 08:56:58 +0000 Received: from localhost ([127.0.0.1]:40053 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tQjfu-0001yS-0j for submit@debbugs.gnu.org; Thu, 26 Dec 2024 03:56:58 -0500 Received: from eggs.gnu.org ([209.51.188.92]:45140) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tQjfs-0001yB-HX for 74700@debbugs.gnu.org; Thu, 26 Dec 2024 03:56:56 -0500 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 1tQjfn-0003qu-8r; Thu, 26 Dec 2024 03:56:51 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=P4ZAucxaMWWGbDit6PGtNWly+8lvp+mRFstyXsqdDBA=; b=DR042dT3lN78SfOKJIsC txNIUNdYtiqkY3PM3NQhebgDH4B/YAbzO2D4+tJDb+gnXGdBbHI8Of6++DbgbJBY9bCnz087hqshm 0yI1VpQs5Heikwkk5chLwb4afhdxzsIoaI00CSmATA/t4nBp52K1w/y+0R2wfsRXZ186XzMt1eN+v h+pcINl+tSNVHCfDUB33XL148q9i2T5mJl+ktF6oMFZDpnbsdc6MZ/PkqpFMNM+HwWabEg5jf9iwb GwaMIhz+LnSD27jsMZVwJj3erCzAgHEkeS/zL0FOxDi8B7KClh/lg2+B18k174jnwAda2Kp9NKBgn LnSL1ylIVmkdzQ==; Date: Thu, 26 Dec 2024 10:56:48 +0200 Message-Id: <865xn6zusv.fsf@gnu.org> From: Eli Zaretskii To: Visuwesh In-Reply-To: <87r05w9xmo.fsf@gmail.com> (message from Visuwesh on Wed, 25 Dec 2024 10:17:59 +0530) Subject: Re: bug#74700: [PATCH] Revert Dired buffer when clicking on last segment of directory name References: <874j3iodzb.fsf@gmail.com> <86ttbiy5na.fsf@gnu.org> <87zflamt6j.fsf@gmail.com> <8634it19cc.fsf@gnu.org> <87msgmozm3.fsf@web.de> <874j2tbw9j.fsf@gmail.com> <875xn8mz1d.fsf@web.de> <87r05w9xmo.fsf@gmail.com> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 74700 Cc: michael_heerdegen@web.de, 74700@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Visuwesh > Cc: 74700@debbugs.gnu.org, eliz@gnu.org > Date: Wed, 25 Dec 2024 10:17:59 +0530 > > [புதன் டிசம்பர் 25, 2024] Michael Heerdegen wrote: > > >> However, using mouse-1 still moves the point to bob. I believe we > >> could fix it by directly binding mouse-1 but I would like to respect > >> mouse-1-click-follows-link like the rest of the code in the function. > >> I cannot tell how to prevent mouse-1 from moving point reading the > >> Info nodes (info "(elisp) Clickable Text") and (info "(emacs) Mouse > >> References"). I tried > >> > >> (with-selected-window (posn-window (event-start e)) ...) > >> > >> to no avail. > > > > Was that code line the attempt to fix the problem that the buffer in the > > wrong window was being reverted, or the attempt to fix the mouse-1 > > problem? > > It was an attempt to fix the mouse-1 problem. The former issue is fixed > with the following patch. > > >> This goes beyond my level of knowledge so someone else will have to > >> take care of this. But please install the following patch because > >> without it using mouse-2 on the base name tries to revert the > >> current-buffer instead of the dired buffer when the dired buffer is > >> not shown in the selected window. > > > >> +++ # > >> @@ -2089,8 +2089,10 @@ > >> `( mouse-face highlight > >> help-echo "mouse-1: revert this buffer" > >> keymap ,(define-keymap > >> - "" #'revert-buffer > >> - "" 'follow-link > >> + "" (lambda (_) > >> + (interactive "@e") > >> + (revert-buffer)) > >> + "" 'mouse-face > > > > I don't know how to fix the mouse-1 problem in a sensible way either. > > Does anyone? > > > > (And I think in this version the "e" code in `interactive' isn't > > significant - but let's first see if we can improve the behavior even > > more.) > > Indeed, I thought @ had to go with e _always_. Thanks, so please post a proper patch with a commit log message, so I could install it. From debbugs-submit-bounces@debbugs.gnu.org Thu Dec 26 06:52:22 2024 Received: (at 74700) by debbugs.gnu.org; 26 Dec 2024 11:52:22 +0000 Received: from localhost ([127.0.0.1]:40349 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tQmPd-0001wH-N4 for submit@debbugs.gnu.org; Thu, 26 Dec 2024 06:52:22 -0500 Received: from mail-pl1-f194.google.com ([209.85.214.194]:42262) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tQmPc-0001w9-Gj for 74700@debbugs.gnu.org; Thu, 26 Dec 2024 06:52:21 -0500 Received: by mail-pl1-f194.google.com with SMTP id d9443c01a7336-2167141dfa1so71396085ad.1 for <74700@debbugs.gnu.org>; Thu, 26 Dec 2024 03:52:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1735213880; x=1735818680; darn=debbugs.gnu.org; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=4tRM3jrMq+FgSKxYFdWSUTk3cPTPYPZ0g3PRBmNUtKU=; b=XZp2rGIO75j214cps2u/9pWeC2ASWbDhSfeE9rpFXmPnq9C7CZnfb/7TsW1XNxIE4V yInHdkY8zYF6RuInKqKCoi9F8ylaJeEOCDTt1bpRyQFAf+nURaU+h1KOdncDQK3m81Yx bojplnNom5Rne79TeqtRDCJHWfzhTFWjJvHqg6G9K5XwtYkIrWvtz4kAQIBhprTVapUB +htOJHcqPPtgLqFd9vOWD5gKuiegyW8s/WB3Wc6c9Hc3tSMuC8k6nVh0aWX5GLNOh/m6 cu8i7dZuF5EwIT+e41lqEQm5vd3CXVra8lLsEM/Tp+gWkLm8VLpK7l6Q56s3QSC3bWea UEeA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1735213880; x=1735818680; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=4tRM3jrMq+FgSKxYFdWSUTk3cPTPYPZ0g3PRBmNUtKU=; b=pbagBMwmvLws+fE47hSBbTk+O5i32sBWoxO+heZD6zLG4GdLlJyrfOEUuW6Y67e74d dG5dgolgLor/JknuhgrkM6dlthT3F2CcA/wavUSiUO+xiAq1f//50Qw7bCDggci3khaj aVhq9qfqfowR2n1wpCp1HfUEvRZ+jJfGUh5o5O57lbi/XD67CnPJ4xo0+jjKZga3cNAx HzC4s3CL+iOfwKmQna1+FrAX/7wVgC7w7lnGb+R+Rp6zQuFeDLkQtBuXY0hpLlcai1dF DkhB2XFOew5w7LZf3zT6Y6qmKLLL2fXn1a/U4Z21Q6kQDJLgzyhGGexAqBwFbpNbv+te 4MEg== X-Forwarded-Encrypted: i=1; AJvYcCWq81xcfR3UJmcWaQ7dLOVENinj1bCdly+0pSxt7GfaSl7Tkz9uvMWUWI57E3LGD5bSVf/oqg==@debbugs.gnu.org X-Gm-Message-State: AOJu0YyWtHQraMaOv4Hfsk/ARGDBO1NMjUm5aP5KI+XSjda82DVXM1wA UDAqmEZxdZa5YtiFQpCfeTfJd+QtiC6BNzmEgy6J/mJWnvKvROdL X-Gm-Gg: ASbGncsxu9mN0BMBmadZVsPQ6PWkGtfJujwPAwlGk0dc1Xrhm9ExhlYQFdfHVjp2b4W UqjlmG7naMPAdgJXmuvZQNZA2ApYjaR50GcCe9aDfJeYX8KIlQiWE96OrcXbejRbNQQWqtjTLBb 1slAfGyszsfRVUbGBppDLIEDT403e9/0jFRMeuHIuzBMr2GjUFp2DP3Ob4Ik4qs5qiXDnMm7vti OxtWtA0OoapqApbyBFU0PZMiFLMeVPmHVEhB8grXx0CZ3jfZJs= X-Google-Smtp-Source: AGHT+IEvJhUjgxsLcsxmtWx7F3f8pNMIoEyYc7tlGijR9CR25dJwdMyXlGTRzQBpFXYjq6muS29iAA== X-Received: by 2002:a17:902:c94b:b0:215:ae61:27ca with SMTP id d9443c01a7336-219e6d6b172mr381536035ad.26.1735213879676; Thu, 26 Dec 2024 03:51:19 -0800 (PST) Received: from localhost ([49.205.85.12]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-219dc9705c1sm118358115ad.101.2024.12.26.03.51.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 Dec 2024 03:51:18 -0800 (PST) From: Visuwesh To: Eli Zaretskii Subject: Re: bug#74700: [PATCH] Revert Dired buffer when clicking on last segment of directory name In-Reply-To: <865xn6zusv.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 26 Dec 2024 10:56:48 +0200") References: <874j3iodzb.fsf@gmail.com> <86ttbiy5na.fsf@gnu.org> <87zflamt6j.fsf@gmail.com> <8634it19cc.fsf@gnu.org> <87msgmozm3.fsf@web.de> <874j2tbw9j.fsf@gmail.com> <875xn8mz1d.fsf@web.de> <87r05w9xmo.fsf@gmail.com> <865xn6zusv.fsf@gnu.org> Date: Thu, 26 Dec 2024 17:21:15 +0530 Message-ID: <87v7v6ek7g.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 74700 Cc: michael_heerdegen@web.de, 74700@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable [=E0=AE=B5=E0=AE=BF=E0=AE=AF=E0=AE=BE=E0=AE=B4=E0=AE=A9=E0=AF=8D =E0=AE=9F= =E0=AE=BF=E0=AE=9A=E0=AE=AE=E0=AF=8D=E0=AE=AA=E0=AE=B0=E0=AF=8D 26, 2024] E= li Zaretskii wrote: >> [...] >> >> +++ # >> >> @@ -2089,8 +2089,10 @@ >> >> `( mouse-face highlight >> >> help-echo "mouse-1: revert this buffer" >> >> keymap ,(define-keymap >> >> - "" #'revert-buffer >> >> - "" 'follow-link >> >> + "" (lambda (_) >> >> + (interactive "@e") >> >> + (revert-buffer)) >> >> + "" 'mouse-face >> > >> > I don't know how to fix the mouse-1 problem in a sensible way either. >> > Does anyone? >> > >> > (And I think in this version the "e" code in `interactive' isn't >> > significant - but let's first see if we can improve the behavior even >> > more.) >>=20 >> Indeed, I thought @ had to go with e _always_. > > Thanks, so please post a proper patch with a commit log message, so I > could install it. Thanks, patch attached. --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=0001-Ensure-Dired-window-is-selected-when-reverting-buffe.patch >From 53cf31f879811389b030d5af7a90aa823ce35bde Mon Sep 17 00:00:00 2001 From: Visuwesh Date: Thu, 26 Dec 2024 17:19:41 +0530 Subject: [PATCH] Ensure Dired window is selected when reverting buffer * lisp/dired.el (dired--make-directory-clickable): Ensure the Dired window is selected. This prevents erroneously reverting a non-Dired buffer. (Bug#74700) --- lisp/dired.el | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lisp/dired.el b/lisp/dired.el index 9895229694a..9632858703c 100644 --- a/lisp/dired.el +++ b/lisp/dired.el @@ -2089,8 +2089,10 @@ dired--make-directory-clickable `(mouse-face highlight help-echo "mouse-1: re-read this buffer's directory" keymap ,(define-keymap - "" #'revert-buffer - "" 'follow-link + "" (lambda () + (interactive "@") + (revert-buffer)) + "" 'mouse-face "RET" #'revert-buffer)))))))) (defun dired--get-ellipsis-length () -- 2.45.2 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Thu Dec 26 07:11:02 2024 Received: (at 74700) by debbugs.gnu.org; 26 Dec 2024 12:11:02 +0000 Received: from localhost ([127.0.0.1]:40371 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tQmhh-0002m8-U5 for submit@debbugs.gnu.org; Thu, 26 Dec 2024 07:11:02 -0500 Received: from eggs.gnu.org ([209.51.188.92]:33826) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tQmhe-0002lQ-6V for 74700@debbugs.gnu.org; Thu, 26 Dec 2024 07:10:58 -0500 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 1tQmfT-0003rj-1W; Thu, 26 Dec 2024 07:08:43 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=ePgay99YUh+StXmy5sgNGgrAlsMEHQ+Ox4ZIs08baTE=; b=d9UprCOtkzjPpuknl2iv tFc0I+r2gDQgIY74zQYvWxIN2+3P6QFdSuNotqE+OtMOgHnsYQFG0UrP+IY8233CWee7jw6RM0YuR Poiv31jJzU94cJHUeGJeYH+IC4gbHPyvtl2oY8VQ4s5BMkpU3ZzzFG0w8uIszTuWzV/up3p7X9XMx jRN/wM5wWXrm/15UjtK6gBEbglrINZay8Ndwy+tfn50uu/myVk9RqqRNENaeTu80KVAMiwVqbUCkl /7LrR6i+2Mc6TflsMzLOSsY+zZx55FtvHoxP8i2XKpvbwkL5S49rMEV8Ch12tMa1B/WTYrOZ4Jmz0 QMMop5hTvqIGYQ==; Date: Thu, 26 Dec 2024 14:08:40 +0200 Message-Id: <86v7v6y7cn.fsf@gnu.org> From: Eli Zaretskii To: Visuwesh In-Reply-To: <87v7v6ek7g.fsf@gmail.com> (message from Visuwesh on Thu, 26 Dec 2024 17:21:15 +0530) Subject: Re: bug#74700: [PATCH] Revert Dired buffer when clicking on last segment of directory name References: <874j3iodzb.fsf@gmail.com> <86ttbiy5na.fsf@gnu.org> <87zflamt6j.fsf@gmail.com> <8634it19cc.fsf@gnu.org> <87msgmozm3.fsf@web.de> <874j2tbw9j.fsf@gmail.com> <875xn8mz1d.fsf@web.de> <87r05w9xmo.fsf@gmail.com> <865xn6zusv.fsf@gnu.org> <87v7v6ek7g.fsf@gmail.com> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 74700 Cc: michael_heerdegen@web.de, 74700@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Visuwesh > Cc: michael_heerdegen@web.de, 74700@debbugs.gnu.org > Date: Thu, 26 Dec 2024 17:21:15 +0530 > > [வியாழன் டிசம்பர் 26, 2024] Eli Zaretskii wrote: > > >> [...] > >> >> +++ # > >> >> @@ -2089,8 +2089,10 @@ > >> >> `( mouse-face highlight > >> >> help-echo "mouse-1: revert this buffer" > >> >> keymap ,(define-keymap > >> >> - "" #'revert-buffer > >> >> - "" 'follow-link > >> >> + "" (lambda (_) > >> >> + (interactive "@e") > >> >> + (revert-buffer)) > >> >> + "" 'mouse-face > >> > > >> > I don't know how to fix the mouse-1 problem in a sensible way either. > >> > Does anyone? > >> > > >> > (And I think in this version the "e" code in `interactive' isn't > >> > significant - but let's first see if we can improve the behavior even > >> > more.) > >> > >> Indeed, I thought @ had to go with e _always_. > > > > Thanks, so please post a proper patch with a commit log message, so I > > could install it. > > Thanks, patch attached. Thanks, installed on master. From unknown Fri Jun 20 05:35:46 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Thu, 23 Jan 2025 12:24:17 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator