From unknown Mon Jun 23 07:47:51 2025 X-Loop: help-debbugs@gnu.org Subject: bug#21973: 24.5; feature proposal: make dired header clickable Resent-From: William Xu Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 21 Nov 2015 20:04:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 21973 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 21973@debbugs.gnu.org X-Debbugs-Original-To: "bug-gnu-emacs@gnu.org" Received: via spool by submit@debbugs.gnu.org id=B.144813623828109 (code B ref -1); Sat, 21 Nov 2015 20:04:01 +0000 Received: (at submit) by debbugs.gnu.org; 21 Nov 2015 20:03:58 +0000 Received: from localhost ([127.0.0.1]:47313 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1a0EO5-0007JI-PP for submit@debbugs.gnu.org; Sat, 21 Nov 2015 15:03:58 -0500 Received: from eggs.gnu.org ([208.118.235.92]:35916) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1a0ENl-0007It-7W for submit@debbugs.gnu.org; Sat, 21 Nov 2015 15:03:55 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a0ENj-0002qR-NE for submit@debbugs.gnu.org; Sat, 21 Nov 2015 15:03:36 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM, HTML_MESSAGE,T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:60106) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a0ENj-0002qN-KV for submit@debbugs.gnu.org; Sat, 21 Nov 2015 15:03:35 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45920) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a0ENi-00085d-Cl for bug-gnu-emacs@gnu.org; Sat, 21 Nov 2015 15:03:35 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a0ENh-0002oq-4w for bug-gnu-emacs@gnu.org; Sat, 21 Nov 2015 15:03:34 -0500 Received: from mail-wm0-x233.google.com ([2a00:1450:400c:c09::233]:36547) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a0ENg-0002om-Rr for bug-gnu-emacs@gnu.org; Sat, 21 Nov 2015 15:03:33 -0500 Received: by wmww144 with SMTP id w144so54973770wmw.1 for ; Sat, 21 Nov 2015 12:03:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to:content-type; bh=U6T8pzATAzW5q7PJ3flV0+iQDR6l5HKjc49FbnCH6TE=; b=UoBbRIY7YVCNrwsGnIGSgOPPXaTt7KjigRnXyE7GVCUXMZrlezSpl7FluordjLnw89 eXFsfCkY95bJKq8KqjExyJhAp9MlxGVtIjbmWP1jBjGYj6bxQSE66qOFdZNcjtef/pMQ o/+xKQFR1ZN9Bq8amtfbDy91+d5fCGTU6RdMVWpiNzC8Gqk2RnSroZU/Qa0zYMXRPAgF pjI2WQ59xsEiX7QhR77479ipd930tHwY3L4UeyitSjo1jLIJUBqQWiUVo1NKpMGfc7Ig k3CuSJ9e372IvwZhS5sZzcuR+qHKDDzy/52jHW05wCqFXA7vIO4OFhzD3a/Y4BV9hIXs ncsw== X-Received: by 10.28.234.200 with SMTP id g69mr9631121wmi.97.1448136211907; Sat, 21 Nov 2015 12:03:31 -0800 (PST) MIME-Version: 1.0 From: William Xu Date: Sat, 21 Nov 2015 20:03:21 +0000 Message-ID: Content-Type: multipart/alternative; boundary=001a11477b7e7f4ddc0525127cc4 X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 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: -4.0 (----) --001a11477b7e7f4ddc0525127cc4 Content-Type: text/plain; charset=UTF-8 Sometimes when we are in some deep directory, it would be really convenient to be able to jump to an arbitrary parent directory shown by dired header. e.g., a dired header line may be: /this/is/a/really/long/project/dir/curr: If i want to open dired with `/this/is/a/really', i could simply click at `really', without having to `^' a few times carefully. I have something like below in my config file. But it should be easy to integrate it with `dired-insert-directory' in dired.el. ---------------------------------8<------------------------------------- (defun xwl-dired-jump-to-parent (event) (interactive "e") (let (window pos file) (save-excursion (setq window (posn-window (event-end event)) pos (posn-point (event-end event))) (with-current-buffer (window-buffer window) (goto-char pos) (when (search-forward "/" (line-end-position) t 1) (let ((beg 3) (end (point))) (dired (buffer-substring beg end)))))))) (defun xwl-dired-make-header-jumpable () "Click on dired header will jump to that directory directly." (let ((inhibit-read-only t)) (save-excursion (goto-char (point-min)) (let ((bound (line-end-position)) start end) (when (search-forward "/" bound t 1) (setq start (point)) (while (search-forward "/" bound t 1) (setq end (1- (point))) (add-text-properties start end `(mouse-face highlight help-echo "mouse-1: goto here" keymap ,(let ((map (make-sparse-keymap))) (define-key map [down-mouse-1] 'xwl-dired-jump-to-parent) map))) (setq start (point)))))))) (add-hook 'dired-after-readin-hook 'xwl-dired-make-header-jumpable) ---------------------------------8<------------------------------------- In GNU Emacs 24.5.2 (x86_64-apple-darwin14.5.0, Carbon Version 157 AppKit 1404.13) of 2015-11-08 on ULMMAC029 Repository revision: 232183c1fbb3665a51cfb1e9dbd380127bb4a971 Windowing system distributor `Apple Inc.', version 10.11.1 Configured using: `configure --with-mac' - William --001a11477b7e7f4ddc0525127cc4 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Sometimes when we are in some deep directory, it woul= d be really
convenient to be able to jump to an arbitrary parent = directory shown by
dired header. =C2=A0e.g., a dired header line = may be:

=C2=A0 /this/is/a/really/long/project/dir/= curr:

If i want to open dired with `/this/is/a/rea= lly', i could simply click
at `really', without having to= `^' a few times carefully.

I have something l= ike below in my config file.=C2=A0 But it should be easy to
integ= rate it with `dired-insert-directory' in dired.el. =C2=A0
---------------------------------8<-------------------------= ------------=C2=A0
(defun xwl-dired-jump-to-parent (event)
<= div>=C2=A0 (interactive "e")
=C2=A0 (let (window pos fi= le)
=C2=A0 =C2=A0 (save-excursion
=C2=A0 =C2=A0 =C2=A0 = (setq window (posn-window (event-end event))
=C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 pos (posn-point (event-end event)))
=C2=A0 = =C2=A0 =C2=A0 (with-current-buffer (window-buffer window)
=C2=A0 = =C2=A0 =C2=A0 =C2=A0 (goto-char pos)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 = (when (search-forward "/" (line-end-position) t 1)
=C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (let ((beg 3)
=C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (end (point)))
=C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (dired (buffer-substring beg end))))))))

(defun xwl-dired-make-header-jumpable ()
= =C2=A0 "Click on dired header will jump to that directory directly.&qu= ot;
=C2=A0 (let ((inhibit-read-only t))
=C2=A0 =C2=A0 (= save-excursion
=C2=A0 =C2=A0 =C2=A0 (goto-char (point-min))
=
=C2=A0 =C2=A0 =C2=A0 (let ((bound (line-end-position))
=C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 start end)
=C2=A0 =C2=A0 = =C2=A0 =C2=A0 (when (search-forward "/" bound t 1)
=C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (setq start (point))
=C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 (while (search-forward "/" bound t 1)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (setq end (1- (point)))
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (add-text-properties sta= rt end
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0`(mouse-face<= /div>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0highlight
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0help-echo "= mouse-1: goto here"
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0keymap ,(let ((map (make-sparse-keymap)))
=C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0(define-key map [down-mouse-1] 'xwl-dired-jump-to-parent)
= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0map)))
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (se= tq start (point))))))))

(add-hook 'dired-after= -readin-hook 'xwl-dired-make-header-jumpable)
---------------= ------------------8<-------------------------------------

=
In GNU Emacs 24.5.2 (x86_64-apple-darwin14.5.0, Carbon Version 1= 57 AppKit 1404.13)
=C2=A0of 2015-11-08 on ULMMAC029
Rep= ository revision: 232183c1fbb3665a51cfb1e9dbd380127bb4a971
Window= ing system distributor `Apple Inc.', version 10.11.1
Configur= ed using:
=C2=A0`configure --with-mac'

- William

--001a11477b7e7f4ddc0525127cc4-- From unknown Mon Jun 23 07:47:51 2025 X-Loop: help-debbugs@gnu.org Subject: bug#21973: 24.5; feature proposal: make dired header clickable Resent-From: Stefan Kangas Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 23 Oct 2021 00:01:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 21973 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: William Xu Cc: 21973@debbugs.gnu.org Received: via spool by 21973-submit@debbugs.gnu.org id=B21973.16349472155156 (code B ref 21973); Sat, 23 Oct 2021 00:01:02 +0000 Received: (at 21973) by debbugs.gnu.org; 23 Oct 2021 00:00:15 +0000 Received: from localhost ([127.0.0.1]:33986 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1me4SN-0001L5-Ch for submit@debbugs.gnu.org; Fri, 22 Oct 2021 20:00:15 -0400 Received: from mail-pg1-f179.google.com ([209.85.215.179]:33566) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1me4SJ-0001Jn-2R for 21973@debbugs.gnu.org; Fri, 22 Oct 2021 20:00:14 -0400 Received: by mail-pg1-f179.google.com with SMTP id r28so350928pga.0 for <21973@debbugs.gnu.org>; Fri, 22 Oct 2021 17:00:10 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:in-reply-to:references:user-agent :mime-version:date:message-id:subject:to:cc; bh=NM34qYrdIPWhGrYXIqpVp0c6totMDtPFiAQd4j/RpL8=; b=ild/iEGgOGnaFTMYWjHIe3V8i6panudttRLl/xvCdAGhb8wljEtZUeTEMhl1PlkoGe cpsECZav77INraO/WLHpB2IRFWY8HfkuCC+BP8ZGCNu9jD2NL42IRibyfJ/GBA++EIam W4lEiWS2ASBOGrx6dVBtmjS72i7zoCp8COk9JsXKca9XgkGA5DUHwLziT3eRGIIXIUjt 85eidV7V+16uBSSx+/lTbZ8GnmEabdDXnO/NoQY+oy89fjW6iwxUGdAfCzE0Plnkz8Sm h6C7KlowzMkVLy0X7Ie9Umm0PYNLvaGGlt1BOLlxuCU3fZe6Qz5Y/usq6o0sDA6Lebkr qlsQ== X-Gm-Message-State: AOAM5307Yae3/HgMMctIRkbwLGDdvxQvzxrTTvdefododLamQpNzTQdc fCusIU3uY2Cz64umuz6VHXcLElSv2hwMBPoXhgbCiHC1 X-Google-Smtp-Source: ABdhPJxfxNRu7ZpWWiW4CakRwRQZ4a/e0oCkyIJzxXf0Lfcwto5zbyhlXZMYSTx9/pEkzj64GqMiI4rzY/8AkA+Pn98= X-Received: by 2002:a63:81c2:: with SMTP id t185mr2173184pgd.114.1634947205356; Fri, 22 Oct 2021 17:00:05 -0700 (PDT) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Fri, 22 Oct 2021 17:00:05 -0700 From: Stefan Kangas In-Reply-To: (William Xu's message of "Sat, 21 Nov 2015 20:03:21 +0000") References: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Date: Fri, 22 Oct 2021 17:00:05 -0700 Message-ID: Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.5 (/) 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: -0.5 (/) William Xu writes: > Sometimes when we are in some deep directory, it would be really > convenient to be able to jump to an arbitrary parent directory shown by > dired header. e.g., a dired header line may be: > > /this/is/a/really/long/project/dir/curr: > > If i want to open dired with `/this/is/a/really', i could simply click > at `really', without having to `^' a few times carefully. > > I have something like below in my config file. But it should be easy to > integrate it with `dired-insert-directory' in dired.el. I didn't read your patch in detail, but the feature sounds like a good idea. Could you perhaps write it up as a patch? > ---------------------------------8<------------------------------------- > (defun xwl-dired-jump-to-parent (event) > (interactive "e") > (let (window pos file) > (save-excursion > (setq window (posn-window (event-end event)) > pos (posn-point (event-end event))) > (with-current-buffer (window-buffer window) > (goto-char pos) > (when (search-forward "/" (line-end-position) t 1) > (let ((beg 3) > (end (point))) > (dired (buffer-substring beg end)))))))) > > (defun xwl-dired-make-header-jumpable () > "Click on dired header will jump to that directory directly." > (let ((inhibit-read-only t)) > (save-excursion > (goto-char (point-min)) > (let ((bound (line-end-position)) > start end) > (when (search-forward "/" bound t 1) > (setq start (point)) > (while (search-forward "/" bound t 1) > (setq end (1- (point))) > (add-text-properties start end > `(mouse-face > highlight > help-echo "mouse-1: goto here" > keymap ,(let ((map (make-sparse-keymap))) > (define-key map [down-mouse-1] 'xwl-dired-jump-to-parent) > map))) > (setq start (point)))))))) > > (add-hook 'dired-after-readin-hook 'xwl-dired-make-header-jumpable) > ---------------------------------8<------------------------------------- From unknown Mon Jun 23 07:47:51 2025 X-Loop: help-debbugs@gnu.org Subject: bug#21973: 24.5; feature proposal: make dired header clickable In-Reply-To: Resent-From: William Xu Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 23 Oct 2021 15:46:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 21973 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 21973@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.163500393030155 (code B ref -1); Sat, 23 Oct 2021 15:46:01 +0000 Received: (at submit) by debbugs.gnu.org; 23 Oct 2021 15:45:30 +0000 Received: from localhost ([127.0.0.1]:36980 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1meJD7-0007qJ-DE for submit@debbugs.gnu.org; Sat, 23 Oct 2021 11:45:29 -0400 Received: from lists.gnu.org ([209.51.188.17]:58598) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1meJD6-0007q6-8Q for submit@debbugs.gnu.org; Sat, 23 Oct 2021 11:45:28 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33292) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1meJD5-0005uG-QT for bug-gnu-emacs@gnu.org; Sat, 23 Oct 2021 11:45:28 -0400 Received: from ciao.gmane.io ([116.202.254.214]:49502) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1meJCz-0003a1-IU for bug-gnu-emacs@gnu.org; Sat, 23 Oct 2021 11:45:24 -0400 Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1meJCw-0002qK-2p for bug-gnu-emacs@gnu.org; Sat, 23 Oct 2021 17:45:18 +0200 X-Injected-Via-Gmane: http://gmane.org/ From: William Xu Date: Sat, 23 Oct 2021 17:45:10 +0200 Organization: the Church of Emacs Message-ID: <87fssr68zd.fsf@gmail.com> References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cancel-Lock: sha1:bwQd6/lFn16U3uAdzcbEDJ0+SN0= Received-SPF: pass client-ip=116.202.254.214; envelope-from=geb-bug-gnu-emacs@m.gmane-mx.org; helo=ciao.gmane.io X-Spam_score_int: 5 X-Spam_score: 0.5 X-Spam_bar: / X-Spam_report: (0.5 / 5.0 requ) BAYES_00=-1.9, DKIM_ADSP_CUSTOM_MED=0.001, FORGED_GMAIL_RCVD=1, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, NML_ADSP_CUSTOM_MED=0.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-Spam-Score: 0.1 (/) 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: -0.9 (/) --=-=-= Content-Type: text/plain Stefan Kangas writes: > I didn't read your patch in detail, but the feature sounds like a good > idea. Could you perhaps write it up as a patch? Done. -- William --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=0001-Make-Dired-path-segments-jumpable-by-mouse-click-bug.patch >From 7a6ddf62541b65876cbc210fe7e49197ab8908a3 Mon Sep 17 00:00:00 2001 From: William Xu Date: Sat, 23 Oct 2021 17:07:21 +0200 Subject: [PATCH] Make Dired path segments jumpable by mouse click (bug#21973) * lisp/dired.el (dired-readin): Call dired-make-path-jumpable. (dired-make-path-jumpable, dired-jump-to-path-segment): New functions. --- lisp/dired.el | 40 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 39 insertions(+), 1 deletion(-) diff --git a/lisp/dired.el b/lisp/dired.el index 4652589122..ba9fa21f89 100644 --- a/lisp/dired.el +++ b/lisp/dired.el @@ -1317,10 +1317,11 @@ dired-readin (erase-buffer) (dired-readin-insert)) (goto-char (point-min)) - ;; Must first make alist buffer local and set it to nil because + ;; Must first make alist buffer local and set it to nil because ;; dired-build-subdir-alist will call dired-clear-alist first (setq-local dired-subdir-alist nil) (dired-build-subdir-alist)) + (dired-make-path-jumpable) (let ((attributes (file-attributes dirname))) (if (eq (car attributes) t) (set-visited-file-modtime (file-attribute-modification-time @@ -1643,6 +1644,43 @@ dired-insert-set-properties 'invisible 'dired-hide-details-link)))) (forward-line 1)))) +(defun dired-make-path-jumpable () + "Make dired path line at top jumpable." + (let ((inhibit-read-only t)) + (save-excursion + (goto-char (point-min)) + (let ((bound (line-end-position)) + segment-start segment-end) + (when (search-forward "/" bound t 1) + (setq segment-start (point)) + (while (search-forward "/" bound t 1) + (setq segment-end (1- (point))) + (add-text-properties segment-start segment-end + `(mouse-face + highlight + help-echo "mouse-1: goto here" + keymap ,(let ((map (make-sparse-keymap))) + (define-key map [down-mouse-1] 'dired-jump-to-path-segment) + map))) + (setq segment-start (point)))))))) + +(defun dired-jump-to-path-segment (event) + "Jump to the directory from a segment of the dired path." + (interactive "e") + (let* ((ev (event-end event)) + (window (posn-window ev)) + (pos (posn-point ev))) + (with-current-buffer (window-buffer window) + (save-excursion + (goto-char pos) + (when (search-forward "/" (line-end-position) t 1) + (let ((end (point)) + beg) + (while (search-backward "/" (line-beginning-position) t 1) + (setq beg (point))) + (when beg + (dired (buffer-substring-no-properties beg end))))))))) + ;;; Reverting a dired buffer -- 2.25.1 --=-=-=-- From unknown Mon Jun 23 07:47:51 2025 X-Loop: help-debbugs@gnu.org Subject: bug#21973: [External] : bug#21973: 24.5; feature proposal: make dired header clickable Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 23 Oct 2021 16:38:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 21973 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: William Xu , "21973@debbugs.gnu.org" <21973@debbugs.gnu.org> Received: via spool by 21973-submit@debbugs.gnu.org id=B21973.16350070603224 (code B ref 21973); Sat, 23 Oct 2021 16:38:02 +0000 Received: (at 21973) by debbugs.gnu.org; 23 Oct 2021 16:37:40 +0000 Received: from localhost ([127.0.0.1]:37049 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1meK1b-0000pw-HH for submit@debbugs.gnu.org; Sat, 23 Oct 2021 12:37:40 -0400 Received: from mx0b-00069f02.pphosted.com ([205.220.177.32]:56230) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1meK1V-0000pj-NI for 21973@debbugs.gnu.org; Sat, 23 Oct 2021 12:37:38 -0400 Received: from pps.filterd (m0246632.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 19NEC1SB008371; Sat, 23 Oct 2021 16:37:32 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : subject : date : message-id : references : in-reply-to : content-type : content-transfer-encoding : mime-version; s=corp-2021-07-09; bh=3Tuu0IvYQlnwSxPJpcYhyJ4ZRafgtkdecy76t6GmP1k=; b=mj6r95m617H7VumiavdsgAj4PT88MmMaf+xAGOEz7AlEulOuFIc0/x2IaVZ8S3Sdtf8v emdw5DXG2F8AnMi1FnQk5ANKk+qohNw76kprZ5g+rJynsfndcMFJ6X7pNYtoARadgUOl L+Q7KwNPHNhN3/rojQrGAxO6qF/iUp4n+RKWOrJGGdDV8OW8bewR+uttue8Bi7UC3wB2 aqwSXJaKJG//lOi450MBda/50dhZlb88uCS7myjhuctJH4odixudkLF9bzqWh5mMKCIU zIa4ltmS/QO+WMUiPgW3T7xnqWjAY1EKgbO+QSGchVwR8zZi8Vf7ELY/8T9XgKDa7iiS jw== Received: from aserp3020.oracle.com (aserp3020.oracle.com [141.146.126.70]) by mx0b-00069f02.pphosted.com with ESMTP id 3bva0tskf1-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sat, 23 Oct 2021 16:37:32 +0000 Received: from pps.filterd (aserp3020.oracle.com [127.0.0.1]) by aserp3020.oracle.com (8.16.1.2/8.16.1.2) with SMTP id 19NGVKXG126089; Sat, 23 Oct 2021 16:37:31 GMT Received: from nam11-co1-obe.outbound.protection.outlook.com (mail-co1nam11lp2169.outbound.protection.outlook.com [104.47.56.169]) by aserp3020.oracle.com with ESMTP id 3bva72fgk5-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sat, 23 Oct 2021 16:37:31 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Owfbw5T4XQQ4FJidlT8M7Sq0YdlndUlxLfa9veFcv1Fv6a8dSIwA9mjOI3DaCEZG50AjY9jsoUuEtsua2PMB7ApeGsN1dughir16Nid9Dyxu1FIac4qbsLeBmfin4vPwrUlgTMYaAYx7Cvfrj3Mf0uDc87tXaOG5OcDf7ZbuKDnC8UfUwlQY+Pmo/L22bTG9M0shR4xstMIy+bz5yBjYQdmjIatCU63f2fLhapzxnm5xxF11hsM1UrGXdlun/VpZODmm8FfghFglhxJjh7q1nu3OcJRtiC5gKxQnc6J8dsGpQuKiPErsP4VBkubaNW9yaFRHkoZXn3o6y0YFQou7zw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=3Tuu0IvYQlnwSxPJpcYhyJ4ZRafgtkdecy76t6GmP1k=; b=F4n/+KGnowrpE0FzFHDrVqlstpSfCrsAlWDqzX+8HV+Se2e0HIA1j/+906cwbyg83IMxLkXzR3Sn5eEp3fhPgberN3Dy56mlywZK2n3VxctsKFqxVps5yCRi0RDagBkV082Rdq75hlUfRJF91K4M8M/t5uQWDP7gP9TuvWlZhF0UYv8OZHvfFilEylbNcdvu3grkSuyDOB6rAJhISeoUb8cE8Xh0gE4afafs3IqBgf+eUev/kdGKwmY52qNoHzq7oAUPthAeTry9/h2uotSJo2WXuB2y6grH5upbeW2zeIYlvmdC7bqEIRIn/d8ac73xqW+EI2m+Lm6lsBqcKX+66g== 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=3Tuu0IvYQlnwSxPJpcYhyJ4ZRafgtkdecy76t6GmP1k=; b=GtoC6oo9lO9IpELMHzro5VJXXlk0XF7p55wRz7QUKDzETc1k4BAqjgPB6bAt1cWAELatl/o1o7wcQpqrUiOGh9F/MzEs41vWCwizy7ymcn5Pqy56Wl6I2L67wR2MZ+OTkEWBGnRk7supFSSubwQuotb7OSLG8i30r3WVHZotwhA= Received: from SJ0PR10MB5488.namprd10.prod.outlook.com (2603:10b6:a03:37e::19) by BYAPR10MB3109.namprd10.prod.outlook.com (2603:10b6:a03:14d::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4628.18; Sat, 23 Oct 2021 16:37:28 +0000 Received: from SJ0PR10MB5488.namprd10.prod.outlook.com ([fe80::c0bc:7c3a:292f:8a82]) by SJ0PR10MB5488.namprd10.prod.outlook.com ([fe80::c0bc:7c3a:292f:8a82%8]) with mapi id 15.20.4628.020; Sat, 23 Oct 2021 16:37:28 +0000 From: Drew Adams Thread-Topic: [External] : bug#21973: 24.5; feature proposal: make dired header clickable Thread-Index: AQHXyCUblIsamo7aBkW3WPYWysFy26vgxtbA Date: Sat, 23 Oct 2021 16:37:28 +0000 Message-ID: References: <87fssr68zd.fsf@gmail.com> In-Reply-To: <87fssr68zd.fsf@gmail.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: gmail.com; dkim=none (message not signed) header.d=none;gmail.com; dmarc=none action=none header.from=oracle.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 4cdee6ef-3623-426f-a164-08d9964366f0 x-ms-traffictypediagnostic: BYAPR10MB3109: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:8273; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: caHRdhuLpW7nW9qt8+ttmW3weN1JdRHr0hf90jW+knqcDwi+8Oc+rWi6RjpKFN3P3czm9wV/hiylkDS0EMqlKkQT7Az8Q0OsNmVLoygbNH0+OQ4vWTkZUJUT/FOW+yWyM8UgaqnLmjInUuYaBp0WZ7et0WOxxErEhc6p6U6QcOcoR+GUzlon90gbkm+zemhW3p2wH6VslURvoW31oQlFwMPOd3doYCTGqak7E8wkWM9iPuX+LmTL4j2ErPa1IW+9FknN0PZQ6ARJnIYR64Adt2gbOD/Q8qHN6kdgLfekvOOecVAgO8rvlHmLwyp3gK2tAxu4xbWCP6aZMzqISF0mr4FY+5+Q/iJnEjTrb1tM54ELqYyctxuu8BlDlSLuR2/y/ZlST5yBLgb8xgI9Sj8SJYCIapsznVji0Jp4FoTQ9JQMr5gZUo1CBsn5yDA9JCKktcI9Dl+olYywtDK8+3ghWxrUKbciVHuvf5ZXHW8bsLOJxEN+9ACgg7izEsIQdlGJv1yM36qOFNp+syb1o41utwsaTuz5NlI+MpqdFg7qR4ZkNKJ5TcQK/Lr0Ang7O/dtYLyythex+RpkD8LZDRe+2LBrLeUClfn5q/FCLBsOy1Y4EPwu0pBaArJ6KPmf4D3MrEhUUlKnHPESeWSBVlKs6R9r2Us1hS06qPbq3m0cu+LocKIch9COJjjYUKhqRC+SvCB/9p4FxBGLcbaEZH5JCQ== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SJ0PR10MB5488.namprd10.prod.outlook.com; PTR:; CAT:NONE; SFS:(366004)(26005)(122000001)(64756008)(4744005)(6506007)(186003)(66446008)(66476007)(66556008)(66946007)(5660300002)(76116006)(44832011)(9686003)(86362001)(316002)(8936002)(71200400001)(8676002)(33656002)(110136005)(508600001)(7696005)(55016002)(2906002)(38100700002)(52536014)(38070700005); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: ZcItWxyuI42uBp203kfbEPugV9sxVs7KPJh+iEvIedY/qjetRDJV4gMxq0ASm4E+o97fXWge9E/Dg2IQAoK4xuLlF2TlmXTSJE/YmaDSM2m7+irsPswAtEGx61wY69qqV90mvAN9plf/ZnuqEXJwK9ez0gD0xN+j9Zf8Rg8/zW+dxiQgYyBKy1Sb2JHYTbR3ndzh1jtjAdbSFFu/AgLVqMWfLFmvQ0zVl7xX6feJcVF0xq7/M/8HdpwJGZWf4HQZ+dwg1AF1FbLwacYAs+atVPl6qoxyvGpohDqhDQBnSJfdiqT+Ds208OyHJtXfQdMZIdrSho90/kfWyFncAm2KDDLDsJL9KIDau++FToTjTbFrDbx8jixqNIf7Pz+0U5TiwHxCcwg2YzYXEiEWcB0wFV86CFRDxRBN8YZEF/QQcx/UAGxmJDJ0HEl2i1f9aOGgwJ1DTse/NBPShei/3tXzU/kd8LYf4rN516r3YctQpUgtFKz/4S3r+TLXsvq+u//f7iDC0GerdRerTMyWoWX1qkj7N0wSbG9AprhE4e6tKw/u1M/4U9+o6mlcdKveEAWHvF6UCZ0V0QKaWRh5vV3s5YsgNKNFkqtXtjJHqCA72HJPB/yOjvRgnXDH4ihp68Iz/VJU3esFKSRnFvjzWWt+UvL8ToSVqtvYfO8y0l4TiCxJH/FiKYePnYMGXseYmTfkBLOE37ktkVIIMEzGcENo3Z1EdfU6ex5N39Z5oInQJQH4VyFJHKnbVvJnW7Ph6gS+mk/t/8sBdZPuMS2dU044CRbBDvC+oTvDd5U8/2eET+wzTa0YliUG5cipGp24bFbXm2U1EoiERq1wFunD267OQ//QtIZB3dDOj2XPbb4mY09bSOiHSuULEUfoegYKzZ86LP3C9lzVvg7wdgp3FH2o7s5bXq+HuCm0yygnl3SuEFM/ZcvTo6iSszoV/fvgPT/ZtGwPo9NX/014gPQArNQtOkGyEgedz+dFryKdgz2/Bfl1HX6M/iwrRONnGiGXEKo+CCSJPTTj/ihGJ3YouZGuyiB/golfj8xYrLVsxOTwQdm5QXU1JD4Dr+Dew3cV4BpuMcyLKE0klsSQE3MKtDx3TK9d0O28U+LUHWrGAtQZRgdpbm9h6cc6GFX67oFzd+hmwXzdBtBPrNRfzdLw40ghs8/hEQ3Lxp0V9hHj0Xdk/PhtxB2YjtxT7RqSze0tOGJ6KVptjM+Bh+D/stPu8E3m7dTtQpDgeA7hZjPwPKXn+CDPVxdcCGgACO5paiZ+ykUSAYdslw9Pp3LOSIhy+krOEgO+s2NRc2c0r/Ti71lIuBB/XXIHua1NqO76HjZFPhuE+89pz3QYhx0U3jUhzABp1ye+WNpZhwmAVLM4odne88OS14Fi3gsEjTLXv7GO1PCSJrqs01xumnk5Cq69m/BgvmTi0H+1BG98fOmblSdC+bg8IOyj17istLZkFmCzZIhrUCui4M4SL86hxvLTvdQzlMobQDbmvl9YsXN15Y9TVnr5RDamN5xOGvcuw7B7HDoNWVsQwt4AW18J7UCYjikLqbpEcOshdFtfxBQ70fLSG0R9yoVN47cjz6OmSJhEOJWAetO6menOKtV+gGnjYJbZZA== Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: SJ0PR10MB5488.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4cdee6ef-3623-426f-a164-08d9964366f0 X-MS-Exchange-CrossTenant-originalarrivaltime: 23 Oct 2021 16:37:28.2601 (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: Gj1BgGLt17w5ajPcKcdJdTMdiAMOIidpc+LvCH3VjdLnV6yZF9QOXTz8KR3gVY2CKL0RSshLTjlBbX39/fLBfw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR10MB3109 X-Proofpoint-Virus-Version: vendor=nai engine=6300 definitions=10146 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 phishscore=0 suspectscore=0 adultscore=0 mlxscore=0 mlxlogscore=712 bulkscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2109230001 definitions=main-2110230104 X-Proofpoint-ORIG-GUID: 51e-mrKeZEvAq5Wvs0Gvg0ynth5Q3y0W X-Proofpoint-GUID: 51e-mrKeZEvAq5Wvs0Gvg0ynth5Q3y0W X-Spam-Score: -0.7 (/) 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 (-) Looked at this only quickly. +1. It's a good idea to make dir-listing headers into, essentially, clickable/RETable breadcrumbs. I can't speak to whether the patch sent is the best/right way to do it - don't have time now to look into it. But this should be done (maybe optionally, i.e., under user control) for each dir header in the buffer. That is, do it for inserted subdir headers, as well as for the first (top-level) dir header. From unknown Mon Jun 23 07:47:51 2025 X-Loop: help-debbugs@gnu.org Subject: bug#21973: [External] : bug#21973: 24.5; feature proposal: make dired header clickable In-Reply-To: Resent-From: William Xu Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 24 Oct 2021 11:10:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 21973 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 21973@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.16350737833585 (code B ref -1); Sun, 24 Oct 2021 11:10:02 +0000 Received: (at submit) by debbugs.gnu.org; 24 Oct 2021 11:09:43 +0000 Received: from localhost ([127.0.0.1]:37981 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mebNm-0000vl-TK for submit@debbugs.gnu.org; Sun, 24 Oct 2021 07:09:43 -0400 Received: from lists.gnu.org ([209.51.188.17]:57988) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mebNm-0000ve-1h for submit@debbugs.gnu.org; Sun, 24 Oct 2021 07:09:42 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59700) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mebNk-0003Jr-MS for bug-gnu-emacs@gnu.org; Sun, 24 Oct 2021 07:09:41 -0400 Received: from ciao.gmane.io ([116.202.254.214]:54714) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mebNj-0006Yl-Al for bug-gnu-emacs@gnu.org; Sun, 24 Oct 2021 07:09:40 -0400 Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1mebNh-0003iS-CZ for bug-gnu-emacs@gnu.org; Sun, 24 Oct 2021 13:09:37 +0200 X-Injected-Via-Gmane: http://gmane.org/ From: William Xu Date: Sun, 24 Oct 2021 13:09:28 +0200 Organization: the Church of Emacs Message-ID: <87fssqk7br.fsf@gmail.com> References: <87fssr68zd.fsf@gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cancel-Lock: sha1:Qy+nqHkFanXtQYhlr5BaZv/rKY0= Received-SPF: pass client-ip=116.202.254.214; envelope-from=geb-bug-gnu-emacs@m.gmane-mx.org; helo=ciao.gmane.io X-Spam_score_int: 5 X-Spam_score: 0.5 X-Spam_bar: / X-Spam_report: (0.5 / 5.0 requ) BAYES_00=-1.9, DKIM_ADSP_CUSTOM_MED=0.001, FORGED_GMAIL_RCVD=1, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, NML_ADSP_CUSTOM_MED=0.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-Spam-Score: 0.1 (/) 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: -0.9 (/) --=-=-= Content-Type: text/plain Drew Adams writes: > Looked at this only quickly. > > +1. It's a good idea to make dir-listing headers > into, essentially, clickable/RETable breadcrumbs. > > I can't speak to whether the patch sent is the > best/right way to do it - don't have time now to > look into it. > > But this should be done (maybe optionally, i.e., > under user control) for each dir header in the > buffer. That is, do it for inserted subdir > headers, as well as for the first (top-level) > dir header. I've revised the patch to support also subdir headers in the buffer, using dired-after-readin-hook. -- William --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=0001-Make-Dired-path-segments-jumpable-by-mouse-click-bug.patch >From cdae3738782a356dda632d1b78d5f5b45bdc89a0 Mon Sep 17 00:00:00 2001 From: William Xu Date: Sun, 24 Oct 2021 13:03:54 +0200 Subject: [PATCH] Make Dired path segments jumpable by mouse click (bug#21973) * lisp/dired.el (dired-readin): Call dired-make-path-jumpable. (dired-make-path-jumpable, dired-jump-to-path-segment): New functions. --- lisp/dired.el | 42 +++++++++++++++++++++++++++++++++++++++++- 1 file changed, 41 insertions(+), 1 deletion(-) diff --git a/lisp/dired.el b/lisp/dired.el index 4652589122..216c082e7b 100644 --- a/lisp/dired.el +++ b/lisp/dired.el @@ -272,7 +272,7 @@ dired-before-readin-hook :group 'dired :type 'hook) -(defcustom dired-after-readin-hook nil +(defcustom dired-after-readin-hook '(dired-make-path-jumpable) "Hook run after each time a file or directory is read by Dired. After each listing of a file or directory, this hook is run with the buffer narrowed to the listing." @@ -1643,6 +1643,46 @@ dired-insert-set-properties 'invisible 'dired-hide-details-link)))) (forward-line 1)))) +(defun dired-make-path-jumpable () + "Make dired path line at top jumpable." + (let ((inhibit-read-only t)) + (save-excursion + (goto-char (point-min)) + (while (re-search-forward "^ /" nil t 1) + (let ((bound (line-end-position)) + (segment-start (point)) + segment-end) + (while (search-forward "/" bound t 1) + (setq segment-end (1- (point))) + (add-text-properties segment-start segment-end + `(mouse-face + highlight + help-echo "mouse-1: goto here" + keymap ,(let ((map (make-sparse-keymap))) + (define-key map [down-mouse-1] 'dired-jump-to-path-segment) + map))) + (setq segment-start (point)))))))) + +(defun dired-jump-to-path-segment (event) + "Jump to the directory from a segment of the dired path." + (interactive "e") + (let* ((ev (event-end event)) + (window (posn-window ev)) + (pos (posn-point ev))) + (with-current-buffer (window-buffer window) + (let (beg end) + (save-excursion + (goto-char pos) + (when (search-forward "/" (line-end-position) t 1) + (setq end (point)) + (while (search-backward "/" (line-beginning-position) t 1) + (setq beg (point))))) + (when beg + (let ((dir (buffer-substring-no-properties beg end))) + (if (member dir (mapcar 'car dired-subdir-alist)) + (dired-goto-subdir dir) + (dired dir)))))))) + ;;; Reverting a dired buffer -- 2.25.1 --=-=-=-- From unknown Mon Jun 23 07:47:51 2025 X-Loop: help-debbugs@gnu.org Subject: bug#21973: [External] : bug#21973: 24.5; feature proposal: make dired header clickable Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 24 Oct 2021 14:08:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 21973 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: William Xu Cc: 21973@debbugs.gnu.org Received: via spool by 21973-submit@debbugs.gnu.org id=B21973.163508446232204 (code B ref 21973); Sun, 24 Oct 2021 14:08:01 +0000 Received: (at 21973) by debbugs.gnu.org; 24 Oct 2021 14:07:42 +0000 Received: from localhost ([127.0.0.1]:40451 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1meeA2-0008NM-HG for submit@debbugs.gnu.org; Sun, 24 Oct 2021 10:07:42 -0400 Received: from quimby.gnus.org ([95.216.78.240]:44536) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1meeA0-0008N7-Nk for 21973@debbugs.gnu.org; Sun, 24 Oct 2021 10:07:41 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=fAqLiE07J6A6+rIVO6iPBfLucQuqFJqkUVsSh7iQANc=; b=jg2DE4CJc14EvgrThuT4fKWiep VYLC87bZ1/cITefFB0CskOGN/QrgLVLGslxQEmQBZjVZG7U4atejsje8FeclUCP2KLNy+KLaNuqNQ iMRVpt36bd7QVSIWvWieB/oi6H1VTnJe1BIXLCs2TOk4FmqPisXnIpn4cpi2yQ9O2yYM=; Received: from [84.212.220.105] (helo=elva) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mee9r-0007lQ-CF; Sun, 24 Oct 2021 16:07:34 +0200 From: Lars Ingebrigtsen References: <87fssr68zd.fsf@gmail.com> <87fssqk7br.fsf@gmail.com> Date: Sun, 24 Oct 2021 16:07:30 +0200 In-Reply-To: <87fssqk7br.fsf@gmail.com> (William Xu's message of "Sun, 24 Oct 2021 13:09:28 +0200") Message-ID: <87bl3e8qjh.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: William Xu writes: > I've revised the patch to support also subdir headers in the buffer, > using dired-after-readin-hook. Thanks; looks good to me. I've now applied this to Emacs 29, but I rewrote it somewhat so that it works hitting RET on the segments, too. Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) 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 (---) William Xu writes: > I've revised the patch to support also subdir headers in the buffer, > using dired-after-readin-hook. Thanks; looks good to me. I've now applied this to Emacs 29, but I rewrote it somewhat so that it works hitting RET on the segments, too. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Sun Oct 24 10:15:32 2021 Received: (at control) by debbugs.gnu.org; 24 Oct 2021 14:15:32 +0000 Received: from localhost ([127.0.0.1]:40463 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1meeHc-00007M-OP for submit@debbugs.gnu.org; Sun, 24 Oct 2021 10:15:32 -0400 Received: from quimby.gnus.org ([95.216.78.240]:44586) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1meeHb-00007A-15 for control@debbugs.gnu.org; Sun, 24 Oct 2021 10:15:31 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Subject:From:To:Message-Id:Date:Sender:Reply-To:Cc: MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=kTwVIMSAWpZ3LAytvufYmsXPvYVAVKAsdgq7SWmjpjg=; b=dWHqwmsRLDMQXvtofcwwoJ8g3e 1hma3EmdiVFXzTA2S79mhneYi4UfoUMV+ljcUZL3oGdcAtwE7Jmj10qfQFJ+MhfMZP+vuCEVqnUOU Z3l3ojBnt0vHL6BgFNRnk/7JVYr/7eAH4GNA9nnxDb/3ZCNkd/WOWF2rG23ZX4FhdJxA=; Received: from [84.212.220.105] (helo=elva) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1meeHS-0007nz-K0 for control@debbugs.gnu.org; Sun, 24 Oct 2021 16:15:25 +0200 Date: Sun, 24 Oct 2021 16:15:21 +0200 Message-Id: <87a6iy8q6e.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #21973 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: close 21973 29.1 quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: control 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 (---) close 21973 29.1 quit From unknown Mon Jun 23 07:47:51 2025 X-Loop: help-debbugs@gnu.org Subject: bug#21973: [External] : bug#21973: 24.5; feature proposal: make dired header clickable Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 24 Oct 2021 19:18:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 21973 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Lars Ingebrigtsen Cc: William Xu , 21973@debbugs.gnu.org Received: via spool by 21973-submit@debbugs.gnu.org id=B21973.163510307631694 (code B ref 21973); Sun, 24 Oct 2021 19:18:02 +0000 Received: (at 21973) by debbugs.gnu.org; 24 Oct 2021 19:17:56 +0000 Received: from localhost ([127.0.0.1]:40959 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mej0G-0008F8-Jt for submit@debbugs.gnu.org; Sun, 24 Oct 2021 15:17:56 -0400 Received: from relay6-d.mail.gandi.net ([217.70.183.198]:56121) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mej0E-0008Ef-2r for 21973@debbugs.gnu.org; Sun, 24 Oct 2021 15:17:54 -0400 Received: (Authenticated sender: juri@linkov.net) by relay6-d.mail.gandi.net (Postfix) with ESMTPSA id 6AC34C0007; Sun, 24 Oct 2021 19:17:45 +0000 (UTC) From: Juri Linkov Organization: LINKOV.NET References: <87fssr68zd.fsf@gmail.com> <87fssqk7br.fsf@gmail.com> <87bl3e8qjh.fsf@gnus.org> Date: Sun, 24 Oct 2021 22:05:23 +0300 In-Reply-To: <87bl3e8qjh.fsf@gnus.org> (Lars Ingebrigtsen's message of "Sun, 24 Oct 2021 16:07:30 +0200") Message-ID: <87bl3ejm7w.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) 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 (-) >> I've revised the patch to support also subdir headers in the buffer, >> using dired-after-readin-hook. > > Thanks; looks good to me. I've now applied this to Emacs 29, but I > rewrote it somewhat so that it works hitting RET on the segments, too. I tried this out and see that it would be much better to bind it to [mouse-1] instead of [down-mouse-1] because with [down-mouse-1] releasing the mouse button moves point to wrong place in the new buffer. From unknown Mon Jun 23 07:47:51 2025 X-Loop: help-debbugs@gnu.org Subject: bug#21973: [External] : bug#21973: 24.5; feature proposal: make dired header clickable Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 24 Oct 2021 19:21:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 21973 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Juri Linkov Cc: William Xu , 21973@debbugs.gnu.org Received: via spool by 21973-submit@debbugs.gnu.org id=B21973.163510324532028 (code B ref 21973); Sun, 24 Oct 2021 19:21:02 +0000 Received: (at 21973) by debbugs.gnu.org; 24 Oct 2021 19:20:45 +0000 Received: from localhost ([127.0.0.1]:40976 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mej2z-0008KW-I1 for submit@debbugs.gnu.org; Sun, 24 Oct 2021 15:20:45 -0400 Received: from quimby.gnus.org ([95.216.78.240]:47576) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mej2y-0008KF-56 for 21973@debbugs.gnu.org; Sun, 24 Oct 2021 15:20:44 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=zaCSPsWpi0LRWEI9+DRvfzgJ4d+ZG9lP7Gn+l7Mcvs4=; b=QGI4tQG2QwBpL/J3yrvoiTAur9 qvJ1kHdl5iOs9QGdg9dHDSn6xLUFlrjPy6HcFZRG+tlYkGOQBuZkU3Gr4Rforz8NlHNdgkJzT/e1B 1wQjJldNHDzZDNJSOAQ7PV/TFjGYuX3OG0R9+8GT++Qmc/7ymE7TTS4egO0Y8ODo2xr0=; Received: from [84.212.220.105] (helo=elva) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mej2o-0001qX-Rj; Sun, 24 Oct 2021 21:20:37 +0200 From: Lars Ingebrigtsen References: <87fssr68zd.fsf@gmail.com> <87fssqk7br.fsf@gmail.com> <87bl3e8qjh.fsf@gnus.org> <87bl3ejm7w.fsf@mail.linkov.net> Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAElBMVEWbmpu2qs14cY5T Yo9EM1b///9aDEYQAAAAAWJLR0QF+G/pxwAAAAd0SU1FB+UKGBMJCJQ5aRIAAAGTSURBVDjLZZOL rcMgDEWJ0wFavQWQYQAUM0AF3n+mZ5tvGlRViU/u9Qdwzh2fj3MOgHS5x8pEgejyMwAoS15PonTS tb6EAJgEqNNbJA4mONMASQEucClATZ0pgZ85IHl54cCUWcqaCnmQ5MCcmavKuht4cCpnXRKuTKF4 U4hRByrIVRyvbuWHQpCBol4YrKooUfllYWwKJ4MQgHjJkyH5SwayKE6t5o+sMCa25AFlJKe32eaW iNcQIVhBHdQ1So2T5TWygMWlwQfINGLqlhaIw0VFm8CdddZ0E7QkHdQbUMlQMI4dsZ0V+3TENrAG MHOWJnPF4/PSbeR+VjCqWhaR7CMFkbR9fw1r3VyuqJ81Enlb1mE/kPAA3esuubZhTQkh2SDLAFNi R4HZP8DP2OEe5wJjJitm8xoC/HH6jvgQlPYFTsEsNgcttmypC8d+dOMGnIJep+cdwD37dwL3svy1 cg21wA48vtoVCHW76eLlcDZfXPQb8qP7bPeP8iTvPrCCx6E93wy93POrH7+VxR1a90r9DwbDn2gc 12KoAAAAJXRFWHRkYXRlOmNyZWF0ZQAyMDIxLTEwLTI0VDE5OjA5OjA4KzAwOjAwq75rBwAAACV0 RVh0ZGF0ZTptb2RpZnkAMjAyMS0xMC0yNFQxOTowOTowOCswMDowMNrj07sAAAAASUVORK5CYII= Date: Sun, 24 Oct 2021 21:20:34 +0200 In-Reply-To: <87bl3ejm7w.fsf@mail.linkov.net> (Juri Linkov's message of "Sun, 24 Oct 2021 22:05:23 +0300") Message-ID: <87o87e2prx.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Juri Linkov writes: > I tried this out and see that it would be much better to bind it > to [mouse-1] instead of [down-mouse-1] because with [down-mouse-1] > releasing the mouse button moves point to wrong place in the n [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) 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 (---) Juri Linkov writes: > I tried this out and see that it would be much better to bind it > to [mouse-1] instead of [down-mouse-1] because with [down-mouse-1] > releasing the mouse button moves point to wrong place in the new buffer. Yeah, it should probably be the mysterious incantation [mouse-2] click [follow-link] 'mouse-face to make it work as it's supposed to for a clickable thing. I've now adjusted this. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From unknown Mon Jun 23 07:47:51 2025 X-Loop: help-debbugs@gnu.org Subject: bug#21973: [External] : bug#21973: 24.5; feature proposal: make dired header clickable Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 24 Oct 2021 21:32:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 21973 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: William Xu , "21973@debbugs.gnu.org" <21973@debbugs.gnu.org> Received: via spool by 21973-submit@debbugs.gnu.org id=B21973.163511110221226 (code B ref 21973); Sun, 24 Oct 2021 21:32:01 +0000 Received: (at 21973) by debbugs.gnu.org; 24 Oct 2021 21:31:42 +0000 Received: from localhost ([127.0.0.1]:41115 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mel5i-0005WI-7s for submit@debbugs.gnu.org; Sun, 24 Oct 2021 17:31:42 -0400 Received: from mx0b-00069f02.pphosted.com ([205.220.177.32]:26904) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mel5f-0005W7-5B for 21973@debbugs.gnu.org; Sun, 24 Oct 2021 17:31:40 -0400 Received: from pps.filterd (m0246630.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 19OIg7lI005456; Sun, 24 Oct 2021 21:31:38 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : subject : date : message-id : references : in-reply-to : content-type : content-transfer-encoding : mime-version; s=corp-2021-07-09; bh=hepXitzhFNvXnrSMBRWP28hsB1ti8HEaVBSxPFZMsu4=; b=aQyK+aU9h9ATp+2aFbmeNbnzJ9ZXfRYKR+qGIwQjPj9ZUG1dwg46gs+flwugnnkJOzZ+ QyB9pR83nXqOx5h7eZN+BCkBrAxJdjylFKaiGjPyy6IAtS1NFgfh1FIdYmH5q8227W+l MEa+8tc+gkfPXFcbqA4c5ykn57C2gYlwyPknXa16OWrDSOWmD19XOYQSU8cUIQJ25aK0 ry3GBYHoffGMbCzvXGIqRnlcH4lIWv+JNHvRhYTDGUKr8JajbSz73IEJFCFXIQMyKusw uyGgCpRKKuvMkwNemIImOZ2dMk+NFk5f32HejO2V1uds06A6E7q+XANq81xgydtoQ/cV XA== Received: from aserp3020.oracle.com (aserp3020.oracle.com [141.146.126.70]) by mx0b-00069f02.pphosted.com with ESMTP id 3bw5wwgn6k-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sun, 24 Oct 2021 21:31:38 +0000 Received: from pps.filterd (aserp3020.oracle.com [127.0.0.1]) by aserp3020.oracle.com (8.16.1.2/8.16.1.2) with SMTP id 19OLVYp7185330; Sun, 24 Oct 2021 21:31:37 GMT Received: from nam10-bn7-obe.outbound.protection.outlook.com (mail-bn7nam10lp2104.outbound.protection.outlook.com [104.47.70.104]) by aserp3020.oracle.com with ESMTP id 3bva74q63p-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sun, 24 Oct 2021 21:31:37 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WOWMbkcdONNM/hjlqkGtKCtUL/MRNyj6geERsSzGLtyD+Ch4W80aTtR4cfNI4zfilicWiJ1xP44Y1KuHTlcrApXjoqw+Rwp8ZD50n1LaFeDhJKvoHnKJZhmyUYiMxrp8mtzjE0HbjnUtDjqp93OJ60QEuvxVdki/qVsCxGHqQ05k8DDGwLTiyK2jPcuVO165JIqgfzq4YRWhl+tc+goSapkmzdZsf3JGKG54F4G1ln4GEsyruzU/cJVdkreUFrrJ3a+3Amci24vFHHM5gP+P/kJlDWOemclKCY6EUn5Ut4ChV6QU0xNekop47qu7Z1pJ37rquXm0IWt0N9sL8htnFQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=hepXitzhFNvXnrSMBRWP28hsB1ti8HEaVBSxPFZMsu4=; b=jCiA4jLWVpNlfLZjsghpKaTuTy/V5pcslUqu0sUdqhgsYBN9LhJPshxPnfVxHOU3Y7VRCsrURbnSqEsAYWEKQj2jW5ADMbuZuIuWRsqmwAi4bIg2r/ApkcU0bnpIwrFj5o2Q4clrRkAYc9y96OAqJLyTrBpkAK1n/Xlcx6EwcUHMQEoLha+JiCUY6OLP3oZWCVhaNh3FoP6EvIJXuW0Pl37iMPQjNSJMlVLXuJSeXq/UYlZ4Vt3gOVZnYzy/3Z74yC2ILr9mb8eCvKWcAx24ADVm05hla6exiy+YOkOIhOe4YN9RFndhuX1vAR2cP4qcqWVutMX8LRU+ujBddHWCbA== 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=hepXitzhFNvXnrSMBRWP28hsB1ti8HEaVBSxPFZMsu4=; b=hctyHN9A5TfsmyYTW/6gIsFy76R9v948GpuPsnHY+HdiRsPBlH52kgNhdmIi6Kh+QH3JZywUhgcv0MEE7AvmsrU5tpz+G9VxBQVpVmyCDL56JYtoFlFkZ6bGITr84p6Gjp6IRHFT8GK4DzVVShIBrtZJahRXOL1KnYOrTEuLqC8= Received: from SJ0PR10MB5488.namprd10.prod.outlook.com (2603:10b6:a03:37e::19) by BYAPR10MB3559.namprd10.prod.outlook.com (2603:10b6:a03:11e::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4628.18; Sun, 24 Oct 2021 21:31:34 +0000 Received: from SJ0PR10MB5488.namprd10.prod.outlook.com ([fe80::c0bc:7c3a:292f:8a82]) by SJ0PR10MB5488.namprd10.prod.outlook.com ([fe80::c0bc:7c3a:292f:8a82%8]) with mapi id 15.20.4628.020; Sun, 24 Oct 2021 21:31:34 +0000 From: Drew Adams Thread-Topic: bug#21973: [External] : bug#21973: 24.5; feature proposal: make dired header clickable Thread-Index: AQHXyMe2oSH0UViAy0SBNBsyOgSVFqviq1Vw Date: Sun, 24 Oct 2021 21:31:34 +0000 Message-ID: References: <87fssr68zd.fsf@gmail.com> <87fssqk7br.fsf@gmail.com> In-Reply-To: <87fssqk7br.fsf@gmail.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: gmail.com; dkim=none (message not signed) header.d=none;gmail.com; dmarc=none action=none header.from=oracle.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 8552aa95-e5ac-4b50-765b-08d99735a73f x-ms-traffictypediagnostic: BYAPR10MB3559: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:8882; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: CDgZVCiDsCemTEFL7QBNBc980WoTv6l+rNtZu0DyJrlo/CINXYWwOcNZj2S5LIFmTeEFHypBvx+sHKBqtNBZnV0gijdyRAfd1hzHK3MLB/jSj2C3maIIfxjTpQ2vMorRh83lO9Pf4NvkSqC6AxtVyycHrSNxwdqlco9S+YWY95Z65d2LAkClid4tIR3jZJ/MWrI2G0uh9eiI813lLuGDa1LSX5DRooRUYZ3vtNG/yRfmpk4wsMotR4QrcO96NpUuJBqKizK90Yv/huzN/h1B4tYJhDmzKCduqAOlJMBcZVbVZP9HDI6MY1KvvYL+OKznfbia4vRsnHL0UXPap13BHYg23NgDESBy7iaywcecEgmDPAUiAvK1ox2Glt38HTd9gIwNtAb9AU2O8DZQXXw6P6DX88fNFSCTPLX9twIpAbJPlguOr8HxgC4KoFVctboCBW7k7taKUt3A+7zSJd0VmvRcC4HFDfAkZ85ZJUK39XiGeQwygECxjAeGmTSfagDB9pu97X9UU5jswCpq0e4uJIF7/0ls/CoOtczDp08dPCjhceptAzbM63F7/znEwzux6bVj+cnA6+beOCFsie5oeDELGi9rfhPIPKrmu7wpheopJBIHsJhhiMzHMRmRkt2tp4wvrE+nvzMOP1ZbOBTeDowamG2xKvh2xUbAoU38tWGWSwiRjIJTSKZq6+xOGBRiH2pnfdR0aRNscISDTIOprw== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SJ0PR10MB5488.namprd10.prod.outlook.com; PTR:; CAT:NONE; SFS:(366004)(33656002)(9686003)(55016002)(7696005)(6506007)(508600001)(110136005)(8936002)(38100700002)(2906002)(122000001)(66476007)(86362001)(52536014)(66556008)(66946007)(71200400001)(76116006)(64756008)(66446008)(38070700005)(44832011)(8676002)(26005)(4744005)(5660300002)(186003)(316002); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: ZhKsAY8pFu0iykaHyId4seS9FnW2XEetWXiKHjJjC+HDvmaQm8lK5TAt5hnm/ArBZYK0x/xapapQoUrbv6G7fRm+3+xGxK1Jk8sUElvoi4bOU05P/hhDU/JUC0XxbQEzbJR6FWrhdVCLQvmOWH/fVCXzwBs/7nuWuPVGiN98+Zz6ZahumCpcgsmPzCxn3YGfEvKuxbPd/SHtkXabuelv2fhsrGy7mdIGJlKZhRsJFbnFF33NseX/izx//5eRHw4mVkxwHZNIQOtHkHLgr2KOOvyW5bkwjiAD3iJ0ZeKo27vU9KkmGIn/C9pM9A/rQjQHCupVJRkyeMuGKtb3jyoJHIPNvmAXRCNKkyRqa0Mlnd+pa2j/mOijWmEon9XXFF5vNx4+1lsSf2Ye5D/pisEAimj2ONvsJDlpmbWkO14h0lkxtuuvXqGb1t1j413BX4cuLBU2hCiFGi2y5J8JiUK2PH7OVozpZs7WgH9n1yadQUBK+tWXmponsSapba7XgC7i2a5K1y6iF5chRZyc/cgMkCTRIOX6iqQMmDibt51LxTCzSdP94Suh6kHD06wUpftJgEFYOusmrlGt2nfXSwrLzMgPM/sj+wpk0CfaHbbL5BCCbd5+zwsbYGIfcxBTFdbHcgHSPPJ2oLkyK4xtCp+pgwOTFnFD/IQ+b1NslV2TYNXC3Yk/l/kh7OXpFnU3yQH1ZvUUttGEJw24Ak9uQhq7yU/QX6ARsBpVDjG48LXmL0s+toKQs/BKfQAst3pPljSNTkh14w6FtW14ES2mZME640PqAlwBwKpgIP/2moSwm/gNSpZ6o+jM9/4MJRFaPaSgdPYKiheSjFdBAldi4VlT9GTlwluWLbFYrKoUHrNA01awvGvW7FKVTEWCYMOsjlaqIK0E+/PJqngGg5pS08bm0kgSpU+fspPqRSeVqOoQ7c5QwwbeyuxSJn2Dn2N17urBGVm6L7cmnXMjPAuzgtaN1fURBRMbvQFGZQM/sCFs3iQ5coj3eFS6e0Y72Gb7Z5lavMeFQ1PRWX4IPTIN1++/tdzY81d/Mu/FlBFOJMoYRNBFZ5v528WhUeJp3+SrEnlRqMNfB+mw3jJIuYwkbp0zERxrfhqV4K6XTes7huoLg5l+9YKs0k73mbKPfWUEd56FyYYEPmq0mvAXu47trT4pXnm0zy5MK9He7C1o2M3SmKf4OWj9dEZOOw63xgMZ89rjzUYG0H7LCf8+sIV2RzrFzImWv761OCC5+DZPUktZr9uxlYzh2skojAduQ2hayZp+sIYnOhrZ02aLLZp3jaSXi+A1izisP1Z6SKw3JMZm9X1+Xj7+dhfXRqEQqxgwIgTuIc/4cqKHqZxoT3t5PrRJkAIrDoYN8s7FbRAHayGLIjXevF2ps4d0o8uv6isbVj3vV8eEL3NwOWbxCOmRQ5PyI7qkDZ1qu4X+ae+rVO8e+QkRheJFXas1nFuxrJHhrNi38gO2Pp2OjiwfxxAF9uPbM7y56xXj85QpHtOIBadxLSGSX2bHncwuRpO+/rXz0nl6QUUHrXyXia2aXU/7wULFr+dxHOPIT+e8RgSgpxaLtxrLySvnf3h6Yo8q6EUFMxGWUxJhP+FC9+F7SVgCt353LA== Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: SJ0PR10MB5488.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8552aa95-e5ac-4b50-765b-08d99735a73f X-MS-Exchange-CrossTenant-originalarrivaltime: 24 Oct 2021 21:31:34.4421 (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: 0pVAcR/vm3uPz9guy+iHOqVi/CFNEyA1lLz1kcCQGZFvvHpqaoOAT7eFqikjmhq6oCRXCI5zOZ9YewAHqeDtVw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR10MB3559 X-Proofpoint-Virus-Version: vendor=nai engine=6300 definitions=10147 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 phishscore=0 suspectscore=0 adultscore=0 mlxscore=0 mlxlogscore=800 bulkscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2109230001 definitions=main-2110240148 X-Proofpoint-ORIG-GUID: rbh6Hle3XPjIHWoipwfgHWlEgsfoCoc5 X-Proofpoint-GUID: rbh6Hle3XPjIHWoipwfgHWlEgsfoCoc5 X-Spam-Score: -0.7 (/) 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 (-) > > Looked at this only quickly. > > > > +1. It's a good idea to make dir-listing headers > > into, essentially, clickable/RETable breadcrumbs. > > > > I can't speak to whether the patch sent is the > > best/right way to do it - don't have time now to > > look into it. > > > > But this should be done (maybe optionally, i.e., > > under user control) for each dir header in the > > buffer. That is, do it for inserted subdir > > headers, as well as for the first (top-level) > > dir header. >=20 > I've revised the patch to support also subdir headers > in the buffer, using dired-after-readin-hook. Sounds good.