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, 12 Dec 2024 12:31:15 +0200 Message-ID: <8634it19cc.fsf@gnu.org> References: <874j3iodzb.fsf@gmail.com> <86ttbiy5na.fsf@gnu.org> <87zflamt6j.fsf@gmail.com> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="30332"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 74700-done@debbugs.gnu.org To: Visuwesh Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Dec 12 11:32:19 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 1tLgUU-0007nu-JJ for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 12 Dec 2024 11:32:18 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tLgUF-0001rq-No; Thu, 12 Dec 2024 05:32:03 -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 1tLgUE-0001rZ-Jh for bug-gnu-emacs@gnu.org; Thu, 12 Dec 2024 05:32: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 1tLgUE-0000nT-B7 for bug-gnu-emacs@gnu.org; Thu, 12 Dec 2024 05:32:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=References:In-Reply-To:From:Date:To:Subject; bh=a6FCpFA5CyqWM/pygSPxEgWdtLx71cQT6icdXTuimxI=; b=AwbkN0++Dt6RpanPmNBjCW3+FGw28MLjAIumCX3iDgxJcoGecGbllS5n+EMAQeZCVEMfsnLlwxeOjejKmEwgF2RjU9vU8wZ7Bi48GcxoGM04wqF0bUQa5EP3W4YB6I4MRzGByjw37j5chDGQfLVcgExWOJGpdF6OguZUyqWdtZQIHzSP1uCRIySYl2Oz5JuwK3jydt9+RSwu0XMm3IUQqozua8OKdiaO7Io3rMxtoxdKIUPM8vnoHpHqoH74rU9LxWUdRmODAMeVS3TQ+oB34oOuwF55m3A70CLV95kflhbZSlj7OYEpMfTpd39I0KRmdCpXPgukotNZyH5cz1RkIA==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tLgUE-0007Rb-0S for bug-gnu-emacs@gnu.org; Thu, 12 Dec 2024 05:32:02 -0500 Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-To: bug-gnu-emacs@gnu.org Resent-Date: Thu, 12 Dec 2024 10:32:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 74700 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Mail-Followup-To: 74700@debbugs.gnu.org, eliz@gnu.org, visuweshm@gmail.com Original-Received: via spool by 74700-done@debbugs.gnu.org id=D74700.173399949028568 (code D ref 74700); Thu, 12 Dec 2024 10:32:01 +0000 Original-Received: (at 74700-done) by debbugs.gnu.org; 12 Dec 2024 10:31:30 +0000 Original-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 Original-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 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 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==; In-Reply-To: <87zflamt6j.fsf@gmail.com> (message from Visuwesh on Thu, 05 Dec 2024 13:56:44 +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:296899 Archived-At: > 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.