From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Visuwesh Newsgroups: gmane.emacs.bugs Subject: bug#74700: [PATCH] Revert Dired buffer when clicking on last segment of directory name Date: Thu, 05 Dec 2024 14:32:18 +0530 Message-ID: <8734j2y02t.fsf@gmail.com> References: <874j3iodzb.fsf@gmail.com> <86ttbiy5na.fsf@gnu.org> <87zflamt6j.fsf@gmail.com> <86frn2y10v.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="25201"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: 74700@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Dec 05 10:04:26 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 1tJ7mb-0006Pk-I0 for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 05 Dec 2024 10:04:25 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tJ7mJ-00024H-IX; Thu, 05 Dec 2024 04:04:09 -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 1tJ7mF-00023c-Te for bug-gnu-emacs@gnu.org; Thu, 05 Dec 2024 04:04:03 -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 1tJ7mE-0005po-Ba for bug-gnu-emacs@gnu.org; Thu, 05 Dec 2024 04:04:03 -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:Date:References:In-Reply-To:From:To:Subject; bh=nQQeHZEq4EpU94HdzzEPEZ7S6mS2qjHOy6U7msiiphc=; b=bqDDMv/3XSuZVUHArJyJHFKwU8NG3egK1GrpMELWOqM0u4fbB6vVazahRMY5N2f+OkorluA3PyxtASnoLAXYywf4/g73zr+9FY7YVytLO2+VeI1Uo3uoDgI2YWahLfDkczgxqNcbRukyWIu1qv4rhbJpBBxYI8Bw1KUFba7rPqVQpl7Lmhc3Q91jdMTYWIc5ZCfvoB6s4hqYud1wGobWpWpioehg9Eux0Gm6ZehSWb/ZMBhZjXsH2bUrKD5yaBGn7Crq4reIt2VTWKyfC+4/UsNHv7cUH23peKhWPcAMO2vMwQra7/LGPZL/nUx4aOOM8KHZcM9GgEhRFMeEeZR0oQ==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tJ7mE-0000v3-12 for bug-gnu-emacs@gnu.org; Thu, 05 Dec 2024 04:04:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Visuwesh Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 05 Dec 2024 09:04: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.17333894073405 (code B ref 74700); Thu, 05 Dec 2024 09:04:01 +0000 Original-Received: (at 74700) by debbugs.gnu.org; 5 Dec 2024 09:03:27 +0000 Original-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 Original-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 Original-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) Original-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) In-Reply-To: <86frn2y10v.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 05 Dec 2024 10:41:52 +0200") 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:296459 Archived-At: [=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.