From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#74700: [PATCH] Revert Dired buffer when clicking on last segment of directory name Date: Thu, 26 Dec 2024 10:56:48 +0200 Message-ID: <865xn6zusv.fsf@gnu.org> 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 Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="12012"; mail-complaints-to="usenet@ciao.gmane.io" Cc: michael_heerdegen@web.de, 74700@debbugs.gnu.org To: Visuwesh Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Dec 26 09:57:11 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1tQjg6-0002xv-JY for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 26 Dec 2024 09:57:10 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tQjg0-0002m9-51; Thu, 26 Dec 2024 03:57:04 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tQjfy-0002lu-4D for bug-gnu-emacs@gnu.org; Thu, 26 Dec 2024 03:57:02 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tQjfx-0003rF-Rl for bug-gnu-emacs@gnu.org; Thu, 26 Dec 2024 03:57:01 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-version:References:In-Reply-To:From:Date:To:Subject; bh=P4ZAucxaMWWGbDit6PGtNWly+8lvp+mRFstyXsqdDBA=; b=UdeOoZThAm/xpuBCrYoFWqufWPA9dmXllMNzbiiI/DsuA6PW7ipKHfsEZD5p9Zk/x4Y6RqjSnxxtoEGwyFYS50mxwF1DZ0aVrvsTNKNfs1A4AySpy30OWp0ue8KAdpFCgPqOVFsFx44UaJimWpsfsFvDske+o9bdmT1FTczN57RdoSc3w7zAkDAvxnwM3Esu12n0fgkMXQAuV7tBdYN57OtSohZCfmwwruFXNs9XnqDdJN68PeUcorc7fsTAjoU3ZQS36k1nRkR4xdZdTap2+GQCWWc+dTMGXfzYUwzU2idxKMz48zh+u5qTU5heKJHn3JMUfxJ8IwFOk1r6pMfV1A==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tQjfx-0001ym-KT for bug-gnu-emacs@gnu.org; Thu, 26 Dec 2024 03:57:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 26 Dec 2024 08:57:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74700 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 74700-submit@debbugs.gnu.org id=B74700.17352034187596 (code B ref 74700); Thu, 26 Dec 2024 08:57:01 +0000 Original-Received: (at 74700) by debbugs.gnu.org; 26 Dec 2024 08:56:58 +0000 Original-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 Original-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 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 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==; In-Reply-To: <87r05w9xmo.fsf@gmail.com> (message from Visuwesh on Wed, 25 Dec 2024 10:17:59 +0530) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:297759 Archived-At: > 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.