From unknown Sat Jun 14 21:30:55 2025 X-Loop: help-debbugs@gnu.org Subject: bug#39145: 28.0.50; dired: Show broken/circular links in different font Resent-From: Tino Calancha Original-Sender: "Debbugs-submit" Resent-CC: drew.adams@oracle.com, bug-gnu-emacs@gnu.org Resent-Date: Wed, 15 Jan 2020 21:07:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 39145 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 39145@debbugs.gnu.org Cc: drew adams X-Debbugs-Original-To: bug-gnu-emacs@gnu.org X-Debbugs-Original-Xcc: drew adams Received: via spool by submit@debbugs.gnu.org id=B.157912242015410 (code B ref -1); Wed, 15 Jan 2020 21:07:01 +0000 Received: (at submit) by debbugs.gnu.org; 15 Jan 2020 21:07:00 +0000 Received: from localhost ([127.0.0.1]:35848 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1irpsR-00040T-Q2 for submit@debbugs.gnu.org; Wed, 15 Jan 2020 16:07:00 -0500 Received: from lists.gnu.org ([209.51.188.17]:35996) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1irpsP-00040L-EK for submit@debbugs.gnu.org; Wed, 15 Jan 2020 16:06:58 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:50097) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1irpsO-00063N-17 for bug-gnu-emacs@gnu.org; Wed, 15 Jan 2020 16:06:57 -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, URIBL_BLOCKED autolearn=disabled version=3.3.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1irpsM-0008Cs-KR for bug-gnu-emacs@gnu.org; Wed, 15 Jan 2020 16:06:55 -0500 Received: from mail-wr1-x432.google.com ([2a00:1450:4864:20::432]:36569) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1irpsM-0008C1-Dh for bug-gnu-emacs@gnu.org; Wed, 15 Jan 2020 16:06:54 -0500 Received: by mail-wr1-x432.google.com with SMTP id z3so17126718wru.3 for ; Wed, 15 Jan 2020 13:06:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:mime-version; bh=Hb816k+bUd2NjQQh4dG4EUHk5s2yX5T3IiuANFElaCE=; b=DgScTmLtwxCBrZyJK88GmqtceYsT9C/KFRDuxUvFkxmFoBV40QXK8Mdna/Gn4QQuHT I0wOCrdPqeDosWw2smYyt3wIsfjMZFZ8OTYFF3o3aKkz3j/Z9Xa/0c9PY0YBRc3PoVfU ezeM59Sci3kzmBd+8HHHJbgbVmUqfw9sriMcPIIzSsrVUxGFd1zKatXHaJumZIGO5GDd DKDk0TD2LAEOtuUbeauN87GSp5/9IURta6iqTB65eIUO4xUPw1eVsIAGJuy1fhemCAJn 4xwn1dY2X7VpKnDl/ByRE9tybfAia8yFyNqhXBoTvMuag+tjbmr5HPQVxnmozHrWNkZK Yqxw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version; bh=Hb816k+bUd2NjQQh4dG4EUHk5s2yX5T3IiuANFElaCE=; b=ZxYXk7J25ZzvmhVJBtJFCe4kRKb0ZxVZt6ZQ24pIzUyxfKEthgPB7G8jDKhMehSlJ7 TNM+OMGmCpuxyoemB4/isVz0GQ6a+2DYqCxGV5KNsamWKfSLfqW+HVRpvifEcCjeuoOl 5oMGILTQMUqYcOp6ukwv9SYUkLFZutOqPnzbp4zvJ0rqh1OutqLMz/pLZNuV6PDpZpzF 13WVO9Dju9qH85S+BRQdkMDyXGkleglRxiG6fvkiPzTGG3bag7VOkgB3l77jxLiGm3mO Ydux6WL7IeqEG/p1yUHfpcwfyp/PSUYf6G2rFc8380/unJn2/rT1xKwtC83tMw4ilKyN m/Ow== X-Gm-Message-State: APjAAAVMxWzzKthq49nvd/YEhvA8ZEWYbR0nMyLpWXnUKSbV1/ohnv4p FaremOHu/anxEN49Dxm9COdjr8c5 X-Google-Smtp-Source: APXvYqzS0PASCrH2TkHbS3MjpXXpYc+agE2StYMDF6otFn/GcaEsFrtvdEiWXWKCUbB0PPAyfNLleQ== X-Received: by 2002:a5d:4805:: with SMTP id l5mr32424372wrq.3.1579122412428; Wed, 15 Jan 2020 13:06:52 -0800 (PST) Received: from calancha-pc.dy.bbexcite.jp ([31.7.242.222]) by smtp.gmail.com with ESMTPSA id u18sm25799500wrt.26.2020.01.15.13.06.51 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Jan 2020 13:06:51 -0800 (PST) From: Tino Calancha Date: Wed, 15 Jan 2020 22:06:50 +0100 Message-ID: <87d0bk1lat.fsf@calancha-pc.dy.bbexcite.jp> MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::432 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: -2.3 (--) X-Debbugs-Cc: Drew Adams Severity: wishlist Showing a broken/circular link w/ a special font might help users to promptly identify a possible issue. --8<-----------------------------cut here---------------start------------->8--- commit ecc6180be1afd795b5a998c7cbeb92dd1286a54b Author: Tino Calancha Date: Wed Jan 15 21:51:17 2020 +0100 dired: Show broken/circular links w/ different font * lisp/dired.el (dired-broken-symlink): New face. (dired-broken-symlink-face): Add variable for the new face. (dired-font-lock-keywords) Use the new face for broken/circular links. * etc/NEWS (Changes in Specialized Modes and Packages in Emacs 28.1): Announce this change. * test/lisp/dired-tests.el (dired-test-dired-broken-symlink-face): Add test. diff --git a/etc/NEWS b/etc/NEWS index 0e43c321d8..c3b183acf1 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -44,6 +44,9 @@ It was declared obsolete in Emacs 27.1. * Changes in Specialized Modes and Packages in Emacs 28.1 ++++ +** Dired shows in a different color broken or circular links. + * New Modes and Packages in Emacs 28.1 diff --git a/lisp/dired.el b/lisp/dired.el index 689ad1fbfa..56edae4e1d 100644 --- a/lisp/dired.el +++ b/lisp/dired.el @@ -475,6 +475,17 @@ dired-symlink (defvar dired-symlink-face 'dired-symlink "Face name used for symbolic links.") +(defface dired-broken-symlink + '((((class color)) + :foreground "yellow1" :background "red1" :weight bold) + (t :weight bold :slant italic :underline t)) + "Face used for broken symbolic links." + :group 'dired-faces + :version "28.1") + +(defvar dired-broken-symlink-face 'dired-broken-symlink + "Face name used for broken symbolic links.") + (defface dired-special '((t (:inherit font-lock-variable-name-face))) "Face used for sockets, pipes, block devices and char devices." @@ -538,6 +549,18 @@ dired-font-lock-keywords (list dired-re-dir '(".+" (dired-move-to-filename) nil (0 dired-directory-face))) ;; + ;; Broken Symbolic link. + (list dired-re-sym + (list (lambda (end) + (let* ((file (dired-file-name-at-point)) + (truename (ignore-errors (file-truename file)))) + ;; either links to unexistent files or circular links + (and (not (and truename (file-exists-p truename))) + (search-forward-regexp ".+-> ?.+" end t)))) + '(dired-move-to-filename) + nil + '(0 dired-broken-symlink-face))) + ;; ;; Symbolic link to a directory. (list dired-re-sym (list (lambda (end) diff --git a/test/lisp/dired-tests.el b/test/lisp/dired-tests.el index 5c6649cba4..47f8809727 100644 --- a/test/lisp/dired-tests.el +++ b/test/lisp/dired-tests.el @@ -440,6 +440,31 @@ dired-test-with-temp-dirs (should (= 6 (length (dired-get-marked-files)))) ; All empty dirs but zeta-empty-dir deleted. (advice-remove 'read-answer 'dired-test-bug27940-advice)))) +(ert-deftest dired-test-dired-broken-symlink-face () + "Test Dired fontifies correctly broken/circular links." + (let* ((dir (make-temp-file "test-symlink" 'dir)) + (file (make-temp-file (expand-file-name "test-file" dir))) + (circular-link (expand-file-name "circular-link" dir)) + (broken-link (expand-file-name "unexistent" dir)) + (ok-link (expand-file-name file "ok-link"))) + (unwind-protect + (with-current-buffer (dired dir) + (make-symbolic-link circular-link "circular-link") + (make-symbolic-link file "ok-link") + (make-symbolic-link broken-link "broken-link") + (dired-revert) + (sit-for 1) + ;; A circular link + (dired-goto-file circular-link) + (should (eq 'dired-broken-symlink (get-text-property (point) 'face))) + ;; A broken link + (dired-goto-file broken-link) + (should (eq 'dired-broken-symlink (get-text-property (point) 'face))) + ;; A valid link + (dired-goto-file ok-link) + (should-not (eq 'dired-broken-symlink (get-text-property (point) 'face)))) + (delete-directory dir 'recursive)))) + (provide 'dired-tests) ;; dired-tests.el ends here --8<-----------------------------cut here---------------end--------------->8--- In GNU Emacs 28.0.50 (build 7, x86_64-pc-linux-gnu, GTK+ Version 3.24.5, cairo version 1.16.0) of 2020-01-15 built on calancha-pc.dy.bbexcite.jp Repository revision: 576dfc8aa260957f4d0dc0c68cdcb8232a536f42 Repository branch: master Windowing system distributor 'The X.Org Foundation', version 11.0.12004000 System Description: Debian GNU/Linux 10 (buster) From unknown Sat Jun 14 21:30:55 2025 X-Loop: help-debbugs@gnu.org Subject: bug#39145: 28.0.50; dired: Show broken/circular links in different font Resent-From: Glenn Morris Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 15 Jan 2020 22:29:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 39145 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Tino Calancha Cc: 39145@debbugs.gnu.org Received: via spool by 39145-submit@debbugs.gnu.org id=B39145.157912733823693 (code B ref 39145); Wed, 15 Jan 2020 22:29:02 +0000 Received: (at 39145) by debbugs.gnu.org; 15 Jan 2020 22:28:58 +0000 Received: from localhost ([127.0.0.1]:36447 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1irr9m-0006A5-KR for submit@debbugs.gnu.org; Wed, 15 Jan 2020 17:28:58 -0500 Received: from eggs.gnu.org ([209.51.188.92]:56246) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1irr9k-00069p-Cc for 39145@debbugs.gnu.org; Wed, 15 Jan 2020 17:28:56 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:44857) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1irr9f-0003HJ-72; Wed, 15 Jan 2020 17:28:51 -0500 Received: from rgm by fencepost.gnu.org with local (Exim 4.82) (envelope-from ) id 1irr9b-0003NX-K9; Wed, 15 Jan 2020 17:28:48 -0500 From: Glenn Morris References: <87d0bk1lat.fsf@calancha-pc.dy.bbexcite.jp> X-Spook: AMEMB Closure Tucson Venezuela White House Panama SWAT X-Ran: X`r;r1+u=&_]Dm"ZN|`=Fg%EFEW-Ahd'PNN2;'zn{9%.iBi]*<s5s~XfU')5(Lsi><>N X-Hue: brightblue X-Attribution: GM Date: Wed, 15 Jan 2020 17:28:47 -0500 In-Reply-To: <87d0bk1lat.fsf@calancha-pc.dy.bbexcite.jp> (Tino Calancha's message of "Wed, 15 Jan 2020 22:06:50 +0100") Message-ID: User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -1.6 (-) 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.6 (--) Tino Calancha wrote: > +(defface dired-broken-symlink > + '((((class color)) > + :foreground "yellow1" :background "red1" :weight bold) > + (t :weight bold :slant italic :underline t)) > + "Face used for broken symbolic links." > + :group 'dired-faces > + :version "28.1") > + > +(defvar dired-broken-symlink-face 'dired-broken-symlink > + "Face name used for broken symbolic links.") Why have a variable at all, why not just customize the face? (If it's just for consistency with existing dired stuff, consider breaking that consistency.) From unknown Sat Jun 14 21:30:55 2025 X-Loop: help-debbugs@gnu.org Subject: bug#39145: 28.0.50; dired: Show broken/circular links in different font Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 15 Jan 2020 23:35:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 39145 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Tino Calancha Cc: 39145@debbugs.gnu.org Received: via spool by 39145-submit@debbugs.gnu.org id=B39145.157913127129711 (code B ref 39145); Wed, 15 Jan 2020 23:35:03 +0000 Received: (at 39145) by debbugs.gnu.org; 15 Jan 2020 23:34:31 +0000 Received: from localhost ([127.0.0.1]:36474 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1irsBC-0007j9-ML for submit@debbugs.gnu.org; Wed, 15 Jan 2020 18:34:30 -0500 Received: from black.elm.relay.mailchannels.net ([23.83.212.19]:36813) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1irsBA-0007iy-9A for 39145@debbugs.gnu.org; Wed, 15 Jan 2020 18:34:28 -0500 X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 0BBFC501D36; Wed, 15 Jan 2020 23:34:27 +0000 (UTC) Received: from pdx1-sub0-mail-a95.g.dreamhost.com (100-96-168-177.trex.outbound.svc.cluster.local [100.96.168.177]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 95DE8501CE0; Wed, 15 Jan 2020 23:34:26 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Received: from pdx1-sub0-mail-a95.g.dreamhost.com ([TEMPUNAVAIL]. [64.90.62.162]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384) by 0.0.0.0:2500 (trex/5.18.5); Wed, 15 Jan 2020 23:34:26 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|jurta@jurta.org X-MailChannels-Auth-Id: dreamhost X-Thread-Stretch: 20fac7d36d6e18b9_1579131266838_3004602450 X-MC-Loop-Signature: 1579131266838:3013794647 X-MC-Ingress-Time: 1579131266838 Received: from pdx1-sub0-mail-a95.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a95.g.dreamhost.com (Postfix) with ESMTP id 6F3C98262E; Wed, 15 Jan 2020 15:34:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=linkov.net; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; s=linkov.net; bh=F6cz30bQbRFNj/02iEL3QnESiWg=; b= gVScSDC19ZoFYemPxZE12/YgFYX+HvXt1BU0XgyR29mz25eCZE3uBmaxRClpz1oo CFO5umw4314J084+yTZ9629MwujI2AVOlJx3KAx8KyHS0Mj+iEuXc6VFGEcARhMx ZOvRh5YjWa1acnbe6N0m3bxo+Xr32MgWci6lsh3WyTU= Received: from mail.jurta.org (m91-129-104-253.cust.tele2.ee [91.129.104.253]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: jurta@jurta.org) by pdx1-sub0-mail-a95.g.dreamhost.com (Postfix) with ESMTPSA id E1A378261F; Wed, 15 Jan 2020 15:34:19 -0800 (PST) X-DH-BACKEND: pdx1-sub0-mail-a95 From: Juri Linkov Organization: LINKOV.NET References: <87d0bk1lat.fsf@calancha-pc.dy.bbexcite.jp> Date: Thu, 16 Jan 2020 01:13:32 +0200 In-Reply-To: <87d0bk1lat.fsf@calancha-pc.dy.bbexcite.jp> (Tino Calancha's message of "Wed, 15 Jan 2020 22:06:50 +0100") Message-ID: <87tv4wxsci.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.60 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-VR-OUT-STATUS: OK X-VR-OUT-SCORE: -100 X-VR-OUT-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedugedrtdeggddtkecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucggtfgfnhhsuhgsshgtrhhisggvpdfftffgtefojffquffvnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvffuohhfffgjkfgfgggtsehttdertddtredtnecuhfhrohhmpefluhhrihcunfhinhhkohhvuceojhhurhhisehlihhnkhhovhdrnhgvtheqnecukfhppeeluddruddvledruddtgedrvdehfeenucfrrghrrghmpehmohguvgepshhmthhppdhhvghlohepmhgrihhlrdhjuhhrthgrrdhorhhgpdhinhgvthepledurdduvdelrddutdegrddvheefpdhrvghtuhhrnhdqphgrthhhpefluhhrihcunfhinhhkohhvuceojhhurhhisehlihhnkhhovhdrnhgvtheqpdhmrghilhhfrhhomhepjhhurhhisehlihhnkhhovhdrnhgvthdpnhhrtghpthhtohepthhinhhordgtrghlrghntghhrgesghhmrghilhdrtghomhenucevlhhushhtvghrufhiiigvpedu X-Spam-Score: 0.0 (/) 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 (-) > @@ -538,6 +549,18 @@ dired-font-lock-keywords > (list dired-re-dir > '(".+" (dired-move-to-filename) nil (0 dired-directory-face))) > ;; > + ;; Broken Symbolic link. > + (list dired-re-sym > + (list (lambda (end) > + (let* ((file (dired-file-name-at-point)) > + (truename (ignore-errors (file-truename file)))) > + ;; either links to unexistent files or circular links > + (and (not (and truename (file-exists-p truename))) > + (search-forward-regexp ".+-> ?.+" end t)))) > + '(dired-move-to-filename) Does this mean file-exists-p will be called on every file in the directory? From unknown Sat Jun 14 21:30:55 2025 X-Loop: help-debbugs@gnu.org Subject: bug#39145: 28.0.50; dired: Show broken/circular links in different font Resent-From: Tino Calancha Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 24 Aug 2020 17:54:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 39145 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Juri Linkov Cc: 39145@debbugs.gnu.org Received: via spool by 39145-submit@debbugs.gnu.org id=B39145.159829158527735 (code B ref 39145); Mon, 24 Aug 2020 17:54:01 +0000 Received: (at 39145) by debbugs.gnu.org; 24 Aug 2020 17:53:05 +0000 Received: from localhost ([127.0.0.1]:59134 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kAGeW-0007DH-Lo for submit@debbugs.gnu.org; Mon, 24 Aug 2020 13:53:04 -0400 Received: from mail-wm1-f46.google.com ([209.85.128.46]:51944) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kAGeU-0007Ck-HX for 39145@debbugs.gnu.org; Mon, 24 Aug 2020 13:53:03 -0400 Received: by mail-wm1-f46.google.com with SMTP id s20so4329361wmj.1 for <39145@debbugs.gnu.org>; Mon, 24 Aug 2020 10:53:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=mqQbWVv3tI+1Brl1hrRsLbjU0dfB2LSS3nNkuHlA3nU=; b=T2BEUXIAC5wd5F5qCqZra/ylVCjUqpoCk34u7NFzJz9S34B4Ij5GZ0JE6i+Y4zIGQp uy49mMT+J2kgGdGcj3v9EpiXk2cSiQN/YWjq34PmzYIJ5ZK6syGLtxMGYJEzWJz7yWnG uLa5Xi5y4r+yO1GHjqgy5ByPXdqBU2fnSntSLLU2AuTMweXTFWfBBOTqEfHqr+Afw3CL SU03IqBmQFbbvx018qe3xgsfEPf3GggvnSlXCxSzBbql3vHFwxKvUguCu/v6Tgl+FYvC O3dO1C6yS/rmWR/4sEo9848fXrkmwPUILy3cBvZ/NDnh/sF+xsnyfjzyv+WAxFVyez4N Ipug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=mqQbWVv3tI+1Brl1hrRsLbjU0dfB2LSS3nNkuHlA3nU=; b=Q2GbcpqkKvCTBugXvKUGdy9ojZV9t2NYVaP2I9r33LMi7wR75KmMo+bWL+HfcQDXKK 31aznOIvsS1D/25W4XYcLFfAnIlMX/OF3PacZ85e1G5Or20VOFw2sYfFtf1nIwLP4tFI 06S2ZTW45CRsIxUywARvzUHPAnVwZFdtaKk2X9Nf5CaC/zcNO0q1mFhoNxONXf44tcxn 9EAWmbtt8uuvlzDkm98QbUG/TyNnGPAP5oATkDrO2nq4z3+bnD6dgVsF/hEMKxg9RY1b 7jgiKAGh3jk462DCwKiPRjoMsxFhSsqf5O82mkgMMY2+Z6Suyem8RIxTysNsOwDBIEEa GXnw== X-Gm-Message-State: AOAM532vh1XxOe41wAbSYskfhUkaVBZTOlUBy8/1u5azU2BGzhFn396O duGdjRD46H5npIhLyA4OveUhtMqIwFw= X-Google-Smtp-Source: ABdhPJxY3905IMtbYguAvCX6+mc83WJRvK5MqdEsBAyLfHUHOAADq0H6K1qoiY+f2qGliYDlvuyQJQ== X-Received: by 2002:a1c:3285:: with SMTP id y127mr417793wmy.104.1598291572359; Mon, 24 Aug 2020 10:52:52 -0700 (PDT) Received: from localhost.example.com (64.red-83-58-61.dynamicip.rima-tde.net. [83.58.61.64]) by smtp.gmail.com with ESMTPSA id m125sm517278wme.35.2020.08.24.10.52.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Aug 2020 10:52:51 -0700 (PDT) From: Tino Calancha References: <87d0bk1lat.fsf@calancha-pc.dy.bbexcite.jp> <87tv4wxsci.fsf@mail.linkov.net> Date: Mon, 24 Aug 2020 19:52:50 +0200 In-Reply-To: <87tv4wxsci.fsf@mail.linkov.net> (Juri Linkov's message of "Thu, 16 Jan 2020 01:13:32 +0200") Message-ID: <875z98orrh.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) 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 (-) Juri Linkov writes: >> @@ -538,6 +549,18 @@ dired-font-lock-keywords >> (list dired-re-dir >> '(".+" (dired-move-to-filename) nil (0 dired-directory-face))) >> ;; >> + ;; Broken Symbolic link. >> + (list dired-re-sym >> + (list (lambda (end) >> + (let* ((file (dired-file-name-at-point)) >> + (truename (ignore-errors (file-truename file)))) >> + ;; either links to unexistent files or circular links >> + (and (not (and truename (file-exists-p truename))) >> + (search-forward-regexp ".+-> ?.+" end t)))) >> + '(dired-move-to-filename) > > Does this mean file-exists-p will be called on every file in the directory? No it doesn't. It will called only on symbolic links w/ a truename in such a dir. From unknown Sat Jun 14 21:30:55 2025 X-Loop: help-debbugs@gnu.org Subject: bug#39145: 28.0.50; dired: Show broken/circular links in different font Resent-From: Tino Calancha Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 24 Aug 2020 18:06:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 39145 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Glenn Morris Cc: uyennhi.qm@gmail.com, 39145@debbugs.gnu.org Received: via spool by 39145-submit@debbugs.gnu.org id=B39145.159829235528972 (code B ref 39145); Mon, 24 Aug 2020 18:06:02 +0000 Received: (at 39145) by debbugs.gnu.org; 24 Aug 2020 18:05:55 +0000 Received: from localhost ([127.0.0.1]:59151 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kAGqx-0007XA-7s for submit@debbugs.gnu.org; Mon, 24 Aug 2020 14:05:55 -0400 Received: from mail-wr1-f66.google.com ([209.85.221.66]:43457) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kAGqv-0007Wy-GD for 39145@debbugs.gnu.org; Mon, 24 Aug 2020 14:05:54 -0400 Received: by mail-wr1-f66.google.com with SMTP id a15so9763395wrh.10 for <39145@debbugs.gnu.org>; Mon, 24 Aug 2020 11:05:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=3V8wqq6vElrjuxlVOrRuxwFSpoz/CXESEaeQgDA0Kb8=; b=uTmYmJpbxjoz4BOPhn05H3oGKv+lHtCMlXiGElcGGFZV7d+Tz1UMX0QoXiMvWuFeJ+ 07J4iTBgX6g3E03Gii0ZPbYFEXyCdRc8oMcVieY+NEAZ96kJfv12FOw/M8KsZqZoGt76 8sPECn5DH6oQzDlM/n4Z1X8K0cTR4uppGcOZy2R4sS2tK2fGlvag/Fla80wTA5OSFZcw V3HtB3OwPouewLCAW/vzqXtI8D3CPWgkSnpRNTm0uLjDK4XMX4Z9MzzUnpQr4WxFxXc3 x5XU6hdlKLYM/qM+AOmPAiVvI5xljTW1TGBBSYmCACJBBCzq1mHGAG3yv2Kgr8RbMLBz zNDQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=3V8wqq6vElrjuxlVOrRuxwFSpoz/CXESEaeQgDA0Kb8=; b=pq/S1pb6ES/XjJf6aP2E7HZkC2J7Ub9FCzjMgtRqeb+nmGtC9HQOSvn12YruPBM2Sv 1DzylXVZlMbo3yqVF+cWmYwXEo9+fqF7ggG9nSIJdX8te1OcZyzcHO81DAbfRhmVMxfE nJPX0fY983Ux9o1KyO4LOAhXqfkxtH62KCaViRXWX0p7izJVueJlOue4cKAsO6YMWc9W wbDepl42h0/evMJqOd2bwJ6Sno5gxoJe6/1SWP8jLipN3dSGyaIwcasmAeSrbpohMO4P csCphh4/ymV0/N7u7v+QzCwQU5ZThG6ntgZzrCjym/CUaZQJY4/wY008G/Qm3PWKU5qK AwiA== X-Gm-Message-State: AOAM5318iC38/93OF3h0V6LePdBh4qmOOyRre47sNNyBFEQGnEYLoc6E gcATgbZ+Bw3tTvXPjJhdIcc= X-Google-Smtp-Source: ABdhPJwM0Apw/UezP/GzaSNHrZFWx3AkHBsMLdffMEm3N/x00Z25ZPBOLfK/wB38WJc3lelfKbfr5Q== X-Received: by 2002:adf:f289:: with SMTP id k9mr7042956wro.203.1598292347589; Mon, 24 Aug 2020 11:05:47 -0700 (PDT) Received: from localhost.example.com (64.red-83-58-61.dynamicip.rima-tde.net. [83.58.61.64]) by smtp.gmail.com with ESMTPSA id u63sm653599wmg.4.2020.08.24.11.05.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Aug 2020 11:05:46 -0700 (PDT) From: Tino Calancha References: <87d0bk1lat.fsf@calancha-pc.dy.bbexcite.jp> Date: Mon, 24 Aug 2020 20:05:45 +0200 In-Reply-To: (Glenn Morris's message of "Wed, 15 Jan 2020 17:28:47 -0500") Message-ID: <87364bq5qe.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) 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 (-) Glenn Morris writes: > Tino Calancha wrote: > >> +(defface dired-broken-symlink >> + '((((class color)) >> + :foreground "yellow1" :background "red1" :weight bold) >> + (t :weight bold :slant italic :underline t)) >> + "Face used for broken symbolic links." >> + :group 'dired-faces >> + :version "28.1") >> + >> +(defvar dired-broken-symlink-face 'dired-broken-symlink >> + "Face name used for broken symbolic links.") > > Why have a variable at all, why not just customize the face? > (If it's just for consistency with existing dired stuff, consider > breaking that consistency.) It was for the consistency. OK, I have dropped the variable. Thank you! I've been using this feature with joy since January. Today I have updated the patch to match what my terminals (gnome terminal and xterm) do: instead of using the new font in the whole link line as I did before, that is foo -> bar now I only use dired-broken-symlink at 'foo' and 'bar' keeping '->' with dired-symlink. --8<-----------------------------cut here---------------start------------->8--- commit d250625b8f79a3b9273de6640f4840b5c8e54fe8 Author: Tino Calancha Date: Mon Aug 24 19:44:29 2020 +0200 dired: Show broken/circular links w/ different face * lisp/dired.el (dired-broken-symlink): New face. (dired-font-lock-keywords) Use the new face for broken/circular links. * etc/NEWS (Changes in Specialized Modes and Packages in Emacs 28.1): Announce this change. * test/lisp/dired-tests.el (dired-test-dired-broken-symlink-face): Add a test. diff --git a/etc/NEWS b/etc/NEWS index a65852fcd0..53124b4253 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -235,6 +235,9 @@ time zones will use a form like "+0100" instead of "CET". ** Dired ++++ +*** Dired shows in a different color broken or circular links. + +++ *** New user option 'dired-maybe-use-globstar'. If set, enables globstar (recursive globbing) in shells that support diff --git a/lisp/dired.el b/lisp/dired.el index 94d3befda8..05f6bb0a68 100644 --- a/lisp/dired.el +++ b/lisp/dired.el @@ -534,6 +534,14 @@ dired-symlink (defvar dired-symlink-face 'dired-symlink "Face name used for symbolic links.") +(defface dired-broken-symlink + '((((class color)) + :foreground "yellow1" :background "red1" :weight bold) + (t :weight bold :slant italic :underline t)) + "Face used for broken symbolic links." + :group 'dired-faces + :version "28.1") + (defface dired-special '((t (:inherit font-lock-variable-name-face))) "Face used for sockets, pipes, block devices and char devices." @@ -597,6 +605,20 @@ dired-font-lock-keywords (list dired-re-dir '(".+" (dired-move-to-filename) nil (0 dired-directory-face))) ;; + ;; Broken Symbolic link. + (list dired-re-sym + (list (lambda (end) + (let* ((file (dired-file-name-at-point)) + (truename (ignore-errors (file-truename file)))) + ;; either not existent target or circular link + (and (not (and truename (file-exists-p truename))) + (search-forward-regexp "\\(.+\\) \\(->\\) ?\\(.+\\)" end t)))) + '(dired-move-to-filename) + nil + '(1 'dired-broken-symlink) + '(2 dired-symlink-face) + '(3 'dired-broken-symlink))) + ;; ;; Symbolic link to a directory. (list dired-re-sym (list (lambda (end) diff --git a/test/lisp/dired-tests.el b/test/lisp/dired-tests.el index 5c6649cba4..47f8809727 100644 --- a/test/lisp/dired-tests.el +++ b/test/lisp/dired-tests.el @@ -440,6 +440,31 @@ dired-test-bug27940 (should (= 6 (length (dired-get-marked-files)))) ; All empty dirs but zeta-empty-dir deleted. (advice-remove 'read-answer 'dired-test-bug27940-advice)))) +(ert-deftest dired-test-dired-broken-symlink-face () + "Test Dired fontifies correctly broken/circular links." + (let* ((dir (make-temp-file "test-symlink" 'dir)) + (file (make-temp-file (expand-file-name "test-file" dir))) + (circular-link (expand-file-name "circular-link" dir)) + (broken-link (expand-file-name "unexistent" dir)) + (ok-link (expand-file-name file "ok-link"))) + (unwind-protect + (with-current-buffer (dired dir) + (make-symbolic-link circular-link "circular-link") + (make-symbolic-link file "ok-link") + (make-symbolic-link broken-link "broken-link") + (dired-revert) + (sit-for 1) + ;; A circular link + (dired-goto-file circular-link) + (should (eq 'dired-broken-symlink (get-text-property (point) 'face))) + ;; A broken link + (dired-goto-file broken-link) + (should (eq 'dired-broken-symlink (get-text-property (point) 'face))) + ;; A valid link + (dired-goto-file ok-link) + (should-not (eq 'dired-broken-symlink (get-text-property (point) 'face)))) + (delete-directory dir 'recursive)))) + (provide 'dired-tests) ;; dired-tests.el ends here --8<-----------------------------cut here---------------end--------------->8--- In GNU Emacs 28.0.50 (build 14, x86_64-pc-linux-gnu, X toolkit, cairo version 1.16.0, Xaw scroll bars) of 2020-08-24 built on localhost.example.com Repository revision: 88795c52ff13203dda5940ed5defc26ce2c20e5e Repository branch: master Windowing system distributor 'The X.Org Foundation', version 11.0.12008000 System Description: openSUSE Tumbleweed From unknown Sat Jun 14 21:30:55 2025 X-Loop: help-debbugs@gnu.org Subject: bug#39145: 28.0.50; dired: Show broken/circular links in different font Resent-From: Tino Calancha Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 25 Aug 2020 16:35:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 39145 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 39145@debbugs.gnu.org Cc: rgm@gnu.org, stefan@marxist.se, uyennhi.qm@gmail.com, larsi@gnus.org, jidanni@jidanni.org, eliz@gnu.org Received: via spool by 39145-submit@debbugs.gnu.org id=B39145.15983732584053 (code B ref 39145); Tue, 25 Aug 2020 16:35:01 +0000 Received: (at 39145) by debbugs.gnu.org; 25 Aug 2020 16:34:18 +0000 Received: from localhost ([127.0.0.1]:35808 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kAbtq-00013J-2E for submit@debbugs.gnu.org; Tue, 25 Aug 2020 12:34:18 -0400 Received: from mail-wr1-f42.google.com ([209.85.221.42]:34676) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kAbto-000135-2q for 39145@debbugs.gnu.org; Tue, 25 Aug 2020 12:34:16 -0400 Received: by mail-wr1-f42.google.com with SMTP id f7so13433962wrw.1 for <39145@debbugs.gnu.org>; Tue, 25 Aug 2020 09:34:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=9qWVsV6L4m5bt/XTuTYgTn9P8Fowg0AmHAAQ5S6cYJA=; b=pwSKuS0mSJEC3sYkUmzNPOBcpB/BT4Q87YB4jov0EoRfcBiDI7H5+j3AvlZkGpKxN/ tRhDK6qHKWZyug7MeTVG9oGtrma+LJuv+qs1jEmO/MUIEdLF/jLqB8cd7T0IgwTJwowG Ld1VSbl1LvSgVJ+8XGb5TGF5lbKFJBiwopvJyVNWEf+2IQnnepEkbRkNBZkxEOu+uiC1 TxzwQ0rLDF6I5eND0eKkp15k0KCKZx4UgnokwPI+BpeH0QpcN6u5bMj+u+Ee5seGuWxK VZ/z9dbZOLXwMwvQ9WljRpak/yfsllIAYVA65OfeiXo0Ra2byfSc5wdw5WUHZUJ40Aq8 NDAg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=9qWVsV6L4m5bt/XTuTYgTn9P8Fowg0AmHAAQ5S6cYJA=; b=MTGPChXWAj0Clv0c7e338atNFZ3uOSydmEWxicNqJQ7ki0DFOQJ18UyCYdJPq8CZcV B7te/Dw1+JfzXdcIqu9mFIJFq9u9ojADCcDCaICVI1dq7MShw+W/dbP69iCMDvDoJP28 4O9TNOiK23PGa6H5jjokR7FusqIu26TIaUykVME+8yoHFf20tSmb7axvXCkfUkGQi6um qW9wq7BHmQY7UoYI+T4tUGGfaPV/W21NsqfXar+Wu3Cxwz/YgIIN+tpwk0MPTdb7OGd6 i5YkHW/syUypV/aHYBf/1MVdLUWugM+fH4VFnQAw0Q38grhFASiO/ARSljVPNfGX6KCA prlg== X-Gm-Message-State: AOAM533OJeGIMDUp4HS00+FtOxpSK54Rh5HAju6GXjEYySfJSskhm6Wc D0RvGuHXOUXmXhddMJA+K7g= X-Google-Smtp-Source: ABdhPJxnKC1+G41gUkdGJYsACuLrkvC2DQaoSkB0tSr+USuTQWc/9McPBDP/zzRIvUwHbTshAMwvAQ== X-Received: by 2002:a5d:4984:: with SMTP id r4mr1790470wrq.87.1598373250159; Tue, 25 Aug 2020 09:34:10 -0700 (PDT) Received: from localhost.example.com (64.red-83-58-61.dynamicip.rima-tde.net. [83.58.61.64]) by smtp.gmail.com with ESMTPSA id z203sm7440359wmc.31.2020.08.25.09.34.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 Aug 2020 09:34:09 -0700 (PDT) From: Tino Calancha References: <87d0bk1lat.fsf@calancha-pc.dy.bbexcite.jp> <87364bq5qe.fsf@gmail.com> Date: Tue, 25 Aug 2020 18:34:08 +0200 In-Reply-To: <87364bq5qe.fsf@gmail.com> (Tino Calancha's message of "Mon, 24 Aug 2020 20:05:45 +0200") Message-ID: <871rjusn0f.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) 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 (-) Tino Calancha writes: > Today I have updated the patch to match what bash does > now I only use dired-broken-symlink at 'foo' and 'bar' keeping '->' with > dired-symlink. > > commit d250625b8f79a3b9273de6640f4840b5c8e54fe8 > Author: Tino Calancha > Date: Mon Aug 24 19:44:29 2020 +0200 > > dired: Show broken/circular links w/ different face > > * lisp/dired.el (dired-broken-symlink): New face. > (dired-font-lock-keywords) Use the new face for broken/circular links. > > * etc/NEWS (Changes in Specialized Modes and Packages in Emacs 28.1): > Announce this change. > > * test/lisp/dired-tests.el (dired-test-dired-broken-symlink-face): > Add a test. Would be more emacsy to add an user option to enable/disable the feature? Something like: (defcustom dired-alert-on-broken-links t "If non-nil, display broken and circular links with `dired-broken-symlink'." :type 'boolean :group 'dired :version "28.1") There is still something else that worries me. If I have a broken link, and I create the missing target with `dired-create-directory' or `dired-create-empty-file', then I need to manually call `revert-buffer' to get the link face updated. Same if teh target do exist and I decide to delete it with `dired-do-delete'. Note, this is not the case if you modify the target with wdired, because wdired revert the buffer after applying the changes. A solution would be to call `dired-revert' at functions like `dired-internal-do-deletions', `dired-create-empty-file' or `dired-create-directory'. That call could be optional in case we add a user option to control this feature. From unknown Sat Jun 14 21:30:55 2025 X-Loop: help-debbugs@gnu.org Subject: bug#39145: 28.0.50; dired: Show broken/circular links in different font Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 25 Aug 2020 16:53:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 39145 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Tino Calancha Cc: rgm@gnu.org, stefan@marxist.se, jidanni@jidanni.org, 39145@debbugs.gnu.org, larsi@gnus.org, uyennhi.qm@gmail.com Received: via spool by 39145-submit@debbugs.gnu.org id=B39145.15983743455780 (code B ref 39145); Tue, 25 Aug 2020 16:53:01 +0000 Received: (at 39145) by debbugs.gnu.org; 25 Aug 2020 16:52:25 +0000 Received: from localhost ([127.0.0.1]:35840 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kAcBN-0001VA-21 for submit@debbugs.gnu.org; Tue, 25 Aug 2020 12:52:25 -0400 Received: from eggs.gnu.org ([209.51.188.92]:47902) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kAcBK-0001Ux-OL for 39145@debbugs.gnu.org; Tue, 25 Aug 2020 12:52:23 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:41887) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kAcBE-0003Uw-IJ; Tue, 25 Aug 2020 12:52:16 -0400 Received: from [176.228.60.248] (port=2872 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kAcBD-0001zQ-Fm; Tue, 25 Aug 2020 12:52:15 -0400 Date: Tue, 25 Aug 2020 19:51:59 +0300 Message-Id: <83o8my4qj4.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: <871rjusn0f.fsf@gmail.com> (message from Tino Calancha on Tue, 25 Aug 2020 18:34:08 +0200) References: <87d0bk1lat.fsf@calancha-pc.dy.bbexcite.jp> <87364bq5qe.fsf@gmail.com> <871rjusn0f.fsf@gmail.com> 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 (---) > From: Tino Calancha > Cc: uyennhi.qm@gmail.com, rgm@gnu.org, eliz@gnu.org, jidanni@jidanni.org, > larsi@gnus.org, stefan@marxist.se > Date: Tue, 25 Aug 2020 18:34:08 +0200 > > There is still something else that worries me. > > If I have a broken link, and I create the missing target with > `dired-create-directory' or `dired-create-empty-file', then > I need to manually call `revert-buffer' to get the link face updated. > > Same if teh target do exist and I decide to delete it with > `dired-do-delete'. Even if you have auto-revert-mode turned on in that Dired buffer? From unknown Sat Jun 14 21:30:55 2025 X-Loop: help-debbugs@gnu.org Subject: bug#39145: 28.0.50; dired: Show broken/circular links in different font Resent-From: Tino Calancha Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 25 Aug 2020 17:06:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 39145 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: rgm@gnu.org, Tino Calancha , stefan@marxist.se, jidanni@jidanni.org, 39145@debbugs.gnu.org, larsi@gnus.org, uyennhi.qm@gmail.com Received: via spool by 39145-submit@debbugs.gnu.org id=B39145.15983751227043 (code B ref 39145); Tue, 25 Aug 2020 17:06:02 +0000 Received: (at 39145) by debbugs.gnu.org; 25 Aug 2020 17:05:22 +0000 Received: from localhost ([127.0.0.1]:35846 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kAcNu-0001pX-8H for submit@debbugs.gnu.org; Tue, 25 Aug 2020 13:05:22 -0400 Received: from mail-wr1-f47.google.com ([209.85.221.47]:45972) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kAcNr-0001pE-G9 for 39145@debbugs.gnu.org; Tue, 25 Aug 2020 13:05:20 -0400 Received: by mail-wr1-f47.google.com with SMTP id h15so6759269wrt.12 for <39145@debbugs.gnu.org>; Tue, 25 Aug 2020 10:05:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:date:to:cc:subject:in-reply-to:message-id:references :user-agent:mime-version; bh=RdIGK1Ikx1SBleMAF5P8qOqXPsVbaA27gpID9gfP16I=; b=bY4M+HWyH7UOA24UpGVC/WIBK/MZiTClkqyKR5HkI4BOgb377uT1QfRq556iTvM11a 3G1/Xeohianrj6IbwXUqOiwWXy0g1ojJxl3Gg7nJOFa99V8bCxWYrBYeBY629/fs/aO4 MUb+/Re7t+X5EIi0kYEZLtZyigA2F+iOraI5bpG1KlgswnTWq3izfVCW5wcicRPgucTR ym3l/aEnEYT7ymbbQ1XroO8+neq3XyLAg/o7M7ahJrTv8CQxsTktuSaJjdEjU0YpXizF Yjbn1+TbuNIZtFINTdUZM0yY447lX7H5JQhjBojHli6EEh0sUv/9Uj0/jkPe/DAWEQUB AdYg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:date:to:cc:subject:in-reply-to:message-id :references:user-agent:mime-version; bh=RdIGK1Ikx1SBleMAF5P8qOqXPsVbaA27gpID9gfP16I=; b=OZIwYRd/mhb33F8bFos5SpAI/O8vLE5ZXs/StpuXdGjtxqZJGED5VPE+VC+IWKbT+T hnILi0EQddGaSpgy9n9akhsTZSIgZAiuvC6QTvwPq8uJxTUpsb3NnATWzkqHB1uT8JKv i5Y2TRqu2vgVSvsiyjXnctA/8iv5zT9B9hzvaMFuaYk4mkDhoAL1Ty0LyGiIAhQ1dsGF ioDZdiS6DRub2+T5bv77nix8HCwG1qiD+WQmdwYkttX82dcvD03YEc+yghF5xs8jM05n WUA/DQm5Uo5BFY+q1wu+JpxpZ3mBXBVCM0FYAEIwTUc/dUEk7BUIHKX8Q3crs13MfTQz +O1w== X-Gm-Message-State: AOAM532Ej3hum7Tp7jkCyGOtk8QyHA+4MBPC0AFg3h0yAkoTlcc9IMc4 yJCKFAZtbBuRZiCPErCW+xE= X-Google-Smtp-Source: ABdhPJyOE1IaBIGqgvef6VlFVLgPJe/VV1Cs980xA2GeKQ/MUisuIfknjSW6LRlphdcgNQnucRgurg== X-Received: by 2002:adf:e8ca:: with SMTP id k10mr11438596wrn.110.1598375113642; Tue, 25 Aug 2020 10:05:13 -0700 (PDT) Received: from [192.168.1.52] (64.red-83-58-61.dynamicip.rima-tde.net. [83.58.61.64]) by smtp.gmail.com with ESMTPSA id m6sm2889172wrw.20.2020.08.25.10.05.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 Aug 2020 10:05:12 -0700 (PDT) From: Tino Calancha X-Google-Original-From: Tino Calancha Date: Tue, 25 Aug 2020 19:05:11 +0200 (CEST) X-X-Sender: calancha@localhost.example.com In-Reply-To: <83o8my4qj4.fsf@gnu.org> Message-ID: References: <87d0bk1lat.fsf@calancha-pc.dy.bbexcite.jp> <87364bq5qe.fsf@gmail.com> <871rjusn0f.fsf@gmail.com> <83o8my4qj4.fsf@gnu.org> User-Agent: Alpine 2.22 (LSU 394 2020-01-19) MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset=US-ASCII X-Spam-Score: 0.0 (/) 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 (-) On Tue, 25 Aug 2020, Eli Zaretskii wrote: >> From: Tino Calancha >> Cc: uyennhi.qm@gmail.com, rgm@gnu.org, eliz@gnu.org, jidanni@jidanni.org, >> larsi@gnus.org, stefan@marxist.se >> Date: Tue, 25 Aug 2020 18:34:08 +0200 >> >> There is still something else that worries me. >> >> If I have a broken link, and I create the missing target with >> `dired-create-directory' or `dired-create-empty-file', then >> I need to manually call `revert-buffer' to get the link face updated. >> >> Same if teh target do exist and I decide to delete it with >> `dired-do-delete'. > > Even if you have auto-revert-mode turned on in that Dired buffer? I have tried now with: dired-auto-revert-mode equals t dired-auto-rever-mode equals 'dired-directory-changed-p I still need to push `g' key to get the link face updated. I bet that would be the first bug report for this feature. From unknown Sat Jun 14 21:30:55 2025 X-Loop: help-debbugs@gnu.org Subject: bug#39145: 28.0.50; dired: Show broken/circular links in different font Resent-From: Tino Calancha Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 25 Aug 2020 17:19:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 39145 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: rgm@gnu.org, stefan@marxist.se, jidanni@jidanni.org, 39145@debbugs.gnu.org, larsi@gnus.org, uyennhi.qm@gmail.com Received: via spool by 39145-submit@debbugs.gnu.org id=B39145.15983758958303 (code B ref 39145); Tue, 25 Aug 2020 17:19:02 +0000 Received: (at 39145) by debbugs.gnu.org; 25 Aug 2020 17:18:15 +0000 Received: from localhost ([127.0.0.1]:35862 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kAcaN-00029r-Dm for submit@debbugs.gnu.org; Tue, 25 Aug 2020 13:18:15 -0400 Received: from mail-wr1-f45.google.com ([209.85.221.45]:43542) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kAcaM-00029f-EZ for 39145@debbugs.gnu.org; Tue, 25 Aug 2020 13:18:14 -0400 Received: by mail-wr1-f45.google.com with SMTP id 2so2384754wrj.10 for <39145@debbugs.gnu.org>; Tue, 25 Aug 2020 10:18:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=+j/NSpFt5cwntBKu4MBkxyVT6um1XryFeEbgwcP/1tU=; b=cTGVgenXDHkN/3xuU5aueI1BO4ty4TOjZLzxDN80PqmCYdtlCnlwMDb2M3DmrJK4GM gKvms9emW75GroMD5VY+bHAJs6uT6thKGXxKw5pvhcnklWmDq7aGggnDCl2ozRR08Kam yBufOBWQpa2Knw2gh4Zo1qV7sLY9pHluPc4gsrgpOyzYXLFjlEonhsqOjZVOmGn67UL0 j05RniiMsPciNvcHFc5Rq9xhWNNMOc9+i1Y0oUKGhI7+v4kL8zK26glvZjkqaafHVIxi NDkx5FvuCZKIcXMhPCLW5+iwob4B8BBWrKktjvV8hHge4moG278BIwtczryj2/TkHJBO K6IQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=+j/NSpFt5cwntBKu4MBkxyVT6um1XryFeEbgwcP/1tU=; b=LLEm4/cneWFkXZtbGshEX37CkMb/6EqAMGu8NC5PVost+ul34VPcCROqt/uCMJgZ8Y /u+MjKbs54Km/Kzl1o2vr0D/3y2+C22cIX6KgP0nTp9zcQITWThbcGlFCxfnfVNvjc6v YS8eoiBhRc5sBqrZHmVA9NqmfqiQoNdinBqLbAZsy5iqcdU9M84mzIIj9kWqM9KmPPO1 9G+v60Uho747uTq3Pq/cLutayrishWA+HWhj2Sgmcm6cWukDZMe2jTlwT+78yoH20rrK lUH1xobCk6lzAaHZWxzVPrWvoRymy6LqxgzcLtU7biDB3Gyi7p1rXTcmpIdq1gOv4nu1 7DJw== X-Gm-Message-State: AOAM530p+5FgaWDTkAoekxZUTUeTkh78k26HN8iQyobhir84bcc4eHIf h5QSKwoutSvY60IPofqP9fk= X-Google-Smtp-Source: ABdhPJzrvOzKt2CysuvZpN+Qfq17x0pqCRbACs99UWLPKwMyuvC23AEPuEhGBfhIuD5mtWR6N3WWDw== X-Received: by 2002:a5d:60c2:: with SMTP id x2mr12432797wrt.73.1598375888603; Tue, 25 Aug 2020 10:18:08 -0700 (PDT) Received: from localhost.example.com (64.red-83-58-61.dynamicip.rima-tde.net. [83.58.61.64]) by smtp.gmail.com with ESMTPSA id k184sm6971600wme.1.2020.08.25.10.18.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 Aug 2020 10:18:07 -0700 (PDT) From: Tino Calancha References: <87d0bk1lat.fsf@calancha-pc.dy.bbexcite.jp> <87364bq5qe.fsf@gmail.com> <871rjusn0f.fsf@gmail.com> <83o8my4qj4.fsf@gnu.org> Date: Tue, 25 Aug 2020 19:18:06 +0200 In-Reply-To: (Tino Calancha's message of "Tue, 25 Aug 2020 19:05:11 +0200 (CEST)") Message-ID: <87y2m2r6ep.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) 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 (-) Tino Calancha writes: > On Tue, 25 Aug 2020, Eli Zaretskii wrote: > >> Even if you have auto-revert-mode turned on in that Dired buffer? > I have tried now with: > > dired-auto-revert-mode equals t > dired-auto-rever-mode equals 'dired-directory-changed-p > > I still need to push `g' key to get the link face updated. Sorry, I tried `dired-auto-revert-mode' not what you said. You are right, w/ auto-revert-mode ON it matches my expectations: the link face is updated after changes in the link target. I am still wondering if the feature should update the face also when auto-rever-mode is OFF. I like the behavior that I observe with wdired: If I change the link target with wdired, then the face is updated. Nice. Wish the same with other dired commands changing the link target. From unknown Sat Jun 14 21:30:55 2025 X-Loop: help-debbugs@gnu.org Subject: bug#39145: 28.0.50; dired: Show broken/circular links in different font Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 25 Aug 2020 18:24:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 39145 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Tino Calancha Cc: rgm@gnu.org, stefan@marxist.se, jidanni@jidanni.org, 39145@debbugs.gnu.org, larsi@gnus.org, uyennhi.qm@gmail.com Received: via spool by 39145-submit@debbugs.gnu.org id=B39145.159837978815039 (code B ref 39145); Tue, 25 Aug 2020 18:24:01 +0000 Received: (at 39145) by debbugs.gnu.org; 25 Aug 2020 18:23:08 +0000 Received: from localhost ([127.0.0.1]:36051 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kAdbA-0003uV-Jq for submit@debbugs.gnu.org; Tue, 25 Aug 2020 14:23:08 -0400 Received: from eggs.gnu.org ([209.51.188.92]:43086) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kAdb8-0003to-6M for 39145@debbugs.gnu.org; Tue, 25 Aug 2020 14:23:06 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:43556) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kAdb2-0006xQ-83; Tue, 25 Aug 2020 14:23:00 -0400 Received: from [176.228.60.248] (port=4420 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kAdb1-0003pP-3F; Tue, 25 Aug 2020 14:22:59 -0400 Date: Tue, 25 Aug 2020 21:22:43 +0300 Message-Id: <83mu2i4mbw.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: <87y2m2r6ep.fsf@gmail.com> (message from Tino Calancha on Tue, 25 Aug 2020 19:18:06 +0200) References: <87d0bk1lat.fsf@calancha-pc.dy.bbexcite.jp> <87364bq5qe.fsf@gmail.com> <871rjusn0f.fsf@gmail.com> <83o8my4qj4.fsf@gnu.org> <87y2m2r6ep.fsf@gmail.com> 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 (---) > From: Tino Calancha > Cc: rgm@gnu.org, stefan@marxist.se, jidanni@jidanni.org, > 39145@debbugs.gnu.org, larsi@gnus.org, uyennhi.qm@gmail.com > Date: Tue, 25 Aug 2020 19:18:06 +0200 > > You are right, w/ auto-revert-mode ON it matches my expectations: the > link face is updated after changes in the link target. That's the expected behavior. > I am still wondering if the feature should update the face also when > auto-rever-mode is OFF. I like the behavior that I observe with wdired: Dired is not Wdired. With Dired, the buffer is in general not updated unless you revert it (which happens automatically if you have auto-revert-mode on). So I think there's no bug here. From unknown Sat Jun 14 21:30:55 2025 X-Loop: help-debbugs@gnu.org Subject: bug#39145: 28.0.50; dired: Show broken/circular links in different font Resent-From: Tino Calancha Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 27 Aug 2020 08:31:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 39145 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: rgm@gnu.org, stefan@marxist.se, jidanni@jidanni.org, 39145@debbugs.gnu.org, larsi@gnus.org, uyennhi.qm@gmail.com Received: via spool by 39145-submit@debbugs.gnu.org id=B39145.159851702825741 (code B ref 39145); Thu, 27 Aug 2020 08:31:02 +0000 Received: (at 39145) by debbugs.gnu.org; 27 Aug 2020 08:30:28 +0000 Received: from localhost ([127.0.0.1]:41568 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kBDIh-0006gn-Pa for submit@debbugs.gnu.org; Thu, 27 Aug 2020 04:30:28 -0400 Received: from mail-wr1-f52.google.com ([209.85.221.52]:39280) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kBDIf-0006Zs-Qe for 39145@debbugs.gnu.org; Thu, 27 Aug 2020 04:30:26 -0400 Received: by mail-wr1-f52.google.com with SMTP id a5so4486234wrm.6 for <39145@debbugs.gnu.org>; Thu, 27 Aug 2020 01:30:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=EQrPb7DJIZzqJD2S+rX1z+Ak3VZNGB+uAgMEWM2IvTA=; b=a29olY/o9s1ktfRuzq6nCDqLZgwuIyb7LK5YJx1FlIad652s+OVbXhfMDvGe8/UpVp OdvhrJteIi8Ov7NpKAH8m3fQszrisK8X7aDvTUDpOKFBXfg1niFyo2D4HHCh+4gTb8Jo zvNFhSsLZ/GFlirmI51JGkOOm3EBN9FxcHXHDYtmbZSh3v7A029doNtYQ1y/nKNThop+ Fq3R6Xf0tWXxqV6smCHxiRfG4VrR3CjscCwvVFRgBhPTrbUxa6G+GgW7l7iUKYo6vDgZ 93cbb765WNXkVGIdGN8g0jXfjuY0xW1wAOZBYbTDOelH4U/foJgBGY1sE91Aa6mVU3YE F1yQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=EQrPb7DJIZzqJD2S+rX1z+Ak3VZNGB+uAgMEWM2IvTA=; b=LGhAXb4nu1JaKwIIoGkXgdIXSLgmPDWbuv098pDKxG3ngyjISMvbtG0YtYkR+NJKlh CiNcCSJIG7dDesN1hc2FLKM8z4At+UYn8b75Hyq2W7NMgHs759IcOvTPn/k7Vw/pRBwI M1cIn9jocK2KRZB0Z3PiXlO/Y1oRa7riAQ0EEPBSBawcidFCa7Z1sam08p+5k+jPLHhu uqVqtF7j8u7GMzCZLvpB1XFP2H0g0X5PYTWdnw5MYTOePxStx9sxw+pJNTdhjlq8Dbxz ZeQh79jPrqbYitPT8JKWLjmvZmcJ6uB33UYnTuK8GamKh5GgzBNt6I47rqXtvPYU2wyj LbIg== X-Gm-Message-State: AOAM532AM5MQVZZ/jWAi739VWfFW1h17xIei4/L0G64PU/1iZnMCPADc 88nrjZGdTaX5OtV5IB5VfoU= X-Google-Smtp-Source: ABdhPJxsRWb2Npi7jkD6W6HPZIcC0tG5zLuqFpUM4PctJM38Qhy9NKXjiR2n7tAc289n+n1IHeR9Sw== X-Received: by 2002:adf:dd0e:: with SMTP id a14mr3019005wrm.151.1598517020031; Thu, 27 Aug 2020 01:30:20 -0700 (PDT) Received: from localhost.example.com (64.red-83-58-61.dynamicip.rima-tde.net. [83.58.61.64]) by smtp.gmail.com with ESMTPSA id n4sm4084572wrv.8.2020.08.27.01.30.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 27 Aug 2020 01:30:19 -0700 (PDT) From: Tino Calancha References: <87d0bk1lat.fsf@calancha-pc.dy.bbexcite.jp> <87364bq5qe.fsf@gmail.com> <871rjusn0f.fsf@gmail.com> <83o8my4qj4.fsf@gnu.org> <87y2m2r6ep.fsf@gmail.com> <83mu2i4mbw.fsf@gnu.org> Date: Thu, 27 Aug 2020 10:30:18 +0200 In-Reply-To: <83mu2i4mbw.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 25 Aug 2020 21:22:43 +0300") Message-ID: <87v9h4qyn9.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) 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 (-) Eli Zaretskii writes: >> I am still wondering if the feature should update the face also when >> auto-rever-mode is OFF. I like the behavior that I observe with wdired: > > Dired is not Wdired. With Dired, the buffer is in general not updated > unless you revert it (which happens automatically if you have > auto-revert-mode on). Thank you for the feedback. I only have one doubt remaining: 1. Should I add a variable to disable/enable this feature (enable by default) 2. Or just use the patch from this thread, i.e, unconditionaly add the feature without variable What do you prefer? From unknown Sat Jun 14 21:30:55 2025 X-Loop: help-debbugs@gnu.org Subject: bug#39145: 28.0.50; dired: Show broken/circular links in different font Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 27 Aug 2020 09:04:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 39145 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Tino Calancha Cc: rgm@gnu.org, stefan@marxist.se, jidanni@jidanni.org, 39145@debbugs.gnu.org, larsi@gnus.org, uyennhi.qm@gmail.com Received: via spool by 39145-submit@debbugs.gnu.org id=B39145.15985190103160 (code B ref 39145); Thu, 27 Aug 2020 09:04:01 +0000 Received: (at 39145) by debbugs.gnu.org; 27 Aug 2020 09:03:30 +0000 Received: from localhost ([127.0.0.1]:41591 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kBDof-0000ou-OD for submit@debbugs.gnu.org; Thu, 27 Aug 2020 05:03:29 -0400 Received: from eggs.gnu.org ([209.51.188.92]:42294) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kBDoc-0000oc-A6 for 39145@debbugs.gnu.org; Thu, 27 Aug 2020 05:03:28 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:48915) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kBDoW-0000fF-SV; Thu, 27 Aug 2020 05:03:20 -0400 Received: from [176.228.60.248] (port=4547 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kBDoT-00040h-H1; Thu, 27 Aug 2020 05:03:18 -0400 Date: Thu, 27 Aug 2020 12:03:04 +0300 Message-Id: <831rjs31h3.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: <87v9h4qyn9.fsf@gmail.com> (message from Tino Calancha on Thu, 27 Aug 2020 10:30:18 +0200) References: <87d0bk1lat.fsf@calancha-pc.dy.bbexcite.jp> <87364bq5qe.fsf@gmail.com> <871rjusn0f.fsf@gmail.com> <83o8my4qj4.fsf@gnu.org> <87y2m2r6ep.fsf@gmail.com> <83mu2i4mbw.fsf@gnu.org> <87v9h4qyn9.fsf@gmail.com> 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 (---) > From: Tino Calancha > Cc: rgm@gnu.org, stefan@marxist.se, jidanni@jidanni.org, > 39145@debbugs.gnu.org, larsi@gnus.org, uyennhi.qm@gmail.com > Date: Thu, 27 Aug 2020 10:30:18 +0200 > > I only have one doubt remaining: > > 1. Should I add a variable to disable/enable this feature > (enable by default) > > 2. Or just use the patch from this thread, i.e, unconditionaly add the feature > without variable > > What do you prefer? You mean, whether the special face should be conditional? I don't see any reason for that. And anyway, if we make this on by default, disabling that is as easy as customizing the new face, so an extra option is not justified. Thanks. From unknown Sat Jun 14 21:30:55 2025 X-Loop: help-debbugs@gnu.org Subject: bug#39145: 28.0.50; dired: Show broken/circular links in different font Resent-From: Stefan Kangas Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 27 Aug 2020 09:38:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 39145 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Tino Calancha , Glenn Morris Cc: uyennhi.qm@gmail.com, 39145@debbugs.gnu.org Received: via spool by 39145-submit@debbugs.gnu.org id=B39145.159852102914726 (code B ref 39145); Thu, 27 Aug 2020 09:38:02 +0000 Received: (at 39145) by debbugs.gnu.org; 27 Aug 2020 09:37:09 +0000 Received: from localhost ([127.0.0.1]:41629 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kBELF-0003pS-HZ for submit@debbugs.gnu.org; Thu, 27 Aug 2020 05:37:09 -0400 Received: from mail-yb1-f175.google.com ([209.85.219.175]:44927) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kBELE-0003ow-6A for 39145@debbugs.gnu.org; Thu, 27 Aug 2020 05:37:08 -0400 Received: by mail-yb1-f175.google.com with SMTP id i10so2595838ybt.11 for <39145@debbugs.gnu.org>; Thu, 27 Aug 2020 02:37:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:in-reply-to:references:mime-version:date:message-id:subject:to :cc; bh=tmzXctcxjSG3wAdmVh+SUXE4BRRk/d0zcBCg4H6eZlA=; b=Tpe4rRGKYy1qxCiFyj+87tHkls+RYsgS/aQwU3uojBAlWr7B6q77ig7YoEaWcp6/w1 t4QKAVnl9Y2A4d3WhQQTJOAHq4jtXZMcf6isTtkCRSyn77jkRWJGg8hMSVkVLVJXveVI XmItQrGAdEZKpc3mcHM22VDZ1yUka7eDMekF6xzLD3lOJq5wX8I9VXWE5WajX4lXCh14 iS6iHFOuWYPFgcFqwRah6u3YI166Dr5lggDKJfrk7b/cy0QkPcTMmnLofwaDBs3v3xd5 /aRX06xFnV6PXiRubBv/V6fKRGt/XJhqd2HIczXujj4JKlWjyCdQPihJio/tRH9UIeyA IX6Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:in-reply-to:references:mime-version:date :message-id:subject:to:cc; bh=tmzXctcxjSG3wAdmVh+SUXE4BRRk/d0zcBCg4H6eZlA=; b=VTEqTh51feDWbtajqXBOUwQYGCOdzhGTiZIisQ0v0QSN742balnntvW44gSxAhaigY bd/3emB8aIsdymtmOA2YjRx5lVTcTTj9wb4wKs1oIL6jXphLzG6iTs5nczWZ6v/bxMXM Sa6I0+aS8q8RyzeOEeg00aboQxB5XQXFJb65+IUZaUYikj3Y4YYFEcB6cZ9h09nXdZu9 IiThdXTJK3Zm163KP4KnI9Fe5p5toV/cm6dDm/xQbjHxWbPgQkt1/k0tY7xvyA8eC7d6 c22bSfDiptNJk8nixEhAOt4qNcBEMkm5znNmv7EN1PJ83dAhuxFO3qqVEwjMqpoUaGtK U6og== X-Gm-Message-State: AOAM530Kg2xRb6biXGLIvP1LwSU3P8ZV1+gS/yhVHn+OA0pw7mf4WfRL zyJKQj+y1NzoQ9W3QXelnbGWQm38P8qKL/iwkc0= X-Google-Smtp-Source: ABdhPJwXHycp7xUSM+7r/DIeU+jC9rQEAh2ZWurgm1fkWownLjCldLHZvMcbZsc82cyZ4F6kbIYtbgJguMSTG9lYwio= X-Received: by 2002:a25:4ed7:: with SMTP id c206mr28738033ybb.129.1598521022764; Thu, 27 Aug 2020 02:37:02 -0700 (PDT) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Thu, 27 Aug 2020 02:37:02 -0700 From: Stefan Kangas In-Reply-To: <87364bq5qe.fsf@gmail.com> References: <87d0bk1lat.fsf@calancha-pc.dy.bbexcite.jp> <87364bq5qe.fsf@gmail.com> MIME-Version: 1.0 Date: Thu, 27 Aug 2020 02:37:02 -0700 Message-ID: Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.0 (/) 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 (-) Tino Calancha writes: > +(defface dired-broken-symlink > + '((((class color)) > + :foreground "yellow1" :background "red1" :weight bold) > + (t :weight bold :slant italic :underline t)) > + "Face used for broken symbolic links." > + :group 'dired-faces > + :version "28.1") This feature sounds useful. Bonus points if you could also add reasonable defaults for this face to the various themes shipped with Emacs. Just a humble request, feel free to ignore. From unknown Sat Jun 14 21:30:55 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Tino Calancha Subject: bug#39145: closed (Re: bug#39145: 28.0.50; dired: Show broken/circular links in different font) Message-ID: References: <878se0pfzd.fsf@calancha-pc.dy.bbexcite.jp> <87d0bk1lat.fsf@calancha-pc.dy.bbexcite.jp> X-Gnu-PR-Message: they-closed 39145 X-Gnu-PR-Package: emacs Reply-To: 39145@debbugs.gnu.org Date: Thu, 27 Aug 2020 09:59:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1598522342-16731-1" This is a multi-part message in MIME format... ------------=_1598522342-16731-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #39145: 28.0.50; dired: Show broken/circular links in different font which was filed against the emacs package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 39145@debbugs.gnu.org. --=20 39145: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D39145 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1598522342-16731-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 39145-done) by debbugs.gnu.org; 27 Aug 2020 09:58:56 +0000 Received: from localhost ([127.0.0.1]:41653 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kBEgK-0004LU-3O for submit@debbugs.gnu.org; Thu, 27 Aug 2020 05:58:56 -0400 Received: from mail-wm1-f47.google.com ([209.85.128.47]:39103) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kBEgI-0004LB-EZ for 39145-done@debbugs.gnu.org; Thu, 27 Aug 2020 05:58:54 -0400 Received: by mail-wm1-f47.google.com with SMTP id b79so3964960wmb.4 for <39145-done@debbugs.gnu.org>; Thu, 27 Aug 2020 02:58:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:references:date:in-reply-to:message-id:user-agent :mime-version; bh=v7283aLJm/j7QQ63TPLTZc1YxZ6LbRlKmG05O0wH2xE=; b=qMfRe4EyM20HMlj/HTT4qSOJhbM8I4tjTeqOg1BESGtVXH08lVFCmkDUP4OIAYvTa1 7dK8FVB01LbdqW7vpDAgOzdHtodCiPo8rO5nJVVAwPRuIDP7YI6M0eD5bhti46LwhKth e7hb0MZhVxMdxwyw2jou4CiYMt3F04P0yp0HfU1g8eG1LSxT60YxVVgl5eUwHQvWD5Dv 53MsxgZ0Mut321MUzdISZhjaolBuu/M4QfJOOpgrugEuONCdxKC/w4Mkmkl88+9M/5ZX wCSXPjIczuCXQbnV+MsZyvW6IgB+W7lvKiUwp8KwUcQj7msAirvkS4sJEFcAnQNN4AIs s6UA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=v7283aLJm/j7QQ63TPLTZc1YxZ6LbRlKmG05O0wH2xE=; b=dUY5TjoS/A+obJsh3j+GUtgm0C66T1Wwu1qan6BaS58/nZdX1wwJEFPivUVVRGEU6n HyYDyHQTudKQ/kN2qQLUKrH0V2ujKeTwjnXWPIaSvLao0KyHryA8EAbF9MTfmnROWqar bICwS9tDKB5drV6//GMqcJpS3E47HLhv/JojZ9/wZJ4pufLWCKvxCpnOO8mvBcsfI1Gs Tt97htQcO1JG5Ngu0gDy0YJtUbmuIEjT/Ru+LDvQaaHzp2PQ1WSA+LEmEl3/EyUSS4Av 76i1LXEk5/sSEbIGnxrl60cm6TwYCK5niKvCsDLC5YCWb6x5DifEGVrtEszOOBjSr7/1 xNOA== X-Gm-Message-State: AOAM533p0uqOpolA2ShaDEB5h0r5mqEOWh5z3DCKlVWDT4ph6oPJBrVu reoYUiqzLpPO+QMdnyxPPO6EG69ZL3Jupw== X-Google-Smtp-Source: ABdhPJzj0FpJkVLsGxJEADQ8uZxPT5Iz4etuZkI+es+gFHP99VQhL0JGaFKBsHJ3NorPkgSWNXM3lA== X-Received: by 2002:a05:600c:20a:: with SMTP id 10mr11185982wmi.160.1598522328140; Thu, 27 Aug 2020 02:58:48 -0700 (PDT) Received: from calancha-pc.dy.bbexcite.jp (64.red-83-58-61.dynamicip.rima-tde.net. [83.58.61.64]) by smtp.gmail.com with ESMTPSA id n24sm3937833wmi.36.2020.08.27.02.58.47 for <39145-done@debbugs.gnu.org> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 27 Aug 2020 02:58:47 -0700 (PDT) From: Tino Calancha To: 39145-done@debbugs.gnu.org Subject: Re: bug#39145: 28.0.50; dired: Show broken/circular links in different font References: <87d0bk1lat.fsf@calancha-pc.dy.bbexcite.jp> <87364bq5qe.fsf@gmail.com> Date: Thu, 27 Aug 2020 11:58:46 +0200 In-Reply-To: (Stefan Kangas's message of "Thu, 27 Aug 2020 02:37:02 -0700") Message-ID: <878se0pfzd.fsf@calancha-pc.dy.bbexcite.jp> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 39145-done 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 (-) Stefan Kangas writes: > Tino Calancha writes: > >> +(defface dired-broken-symlink >> + '((((class color)) >> + :foreground "yellow1" :background "red1" :weight bold) >> + (t :weight bold :slant italic :underline t)) >> + "Face used for broken symbolic links." >> + :group 'dired-faces >> + :version "28.1") > > Bonus points if you could also add reasonable defaults for this face to > the various themes shipped with Emacs. Thank you. I wish, but I am fraid I am a quite colorblind person; I am glad if someone here can find a better color choice. Pushed into master branch as commit 'dired: Show broken/circular links w/ different face' (bdc1f193470633adcd860db4b05a9fe951bd375b) ------------=_1598522342-16731-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 15 Jan 2020 21:07:00 +0000 Received: from localhost ([127.0.0.1]:35848 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1irpsR-00040T-Q2 for submit@debbugs.gnu.org; Wed, 15 Jan 2020 16:07:00 -0500 Received: from lists.gnu.org ([209.51.188.17]:35996) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1irpsP-00040L-EK for submit@debbugs.gnu.org; Wed, 15 Jan 2020 16:06:58 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:50097) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1irpsO-00063N-17 for bug-gnu-emacs@gnu.org; Wed, 15 Jan 2020 16:06:57 -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, URIBL_BLOCKED autolearn=disabled version=3.3.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1irpsM-0008Cs-KR for bug-gnu-emacs@gnu.org; Wed, 15 Jan 2020 16:06:55 -0500 Received: from mail-wr1-x432.google.com ([2a00:1450:4864:20::432]:36569) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1irpsM-0008C1-Dh for bug-gnu-emacs@gnu.org; Wed, 15 Jan 2020 16:06:54 -0500 Received: by mail-wr1-x432.google.com with SMTP id z3so17126718wru.3 for ; Wed, 15 Jan 2020 13:06:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:mime-version; bh=Hb816k+bUd2NjQQh4dG4EUHk5s2yX5T3IiuANFElaCE=; b=DgScTmLtwxCBrZyJK88GmqtceYsT9C/KFRDuxUvFkxmFoBV40QXK8Mdna/Gn4QQuHT I0wOCrdPqeDosWw2smYyt3wIsfjMZFZ8OTYFF3o3aKkz3j/Z9Xa/0c9PY0YBRc3PoVfU ezeM59Sci3kzmBd+8HHHJbgbVmUqfw9sriMcPIIzSsrVUxGFd1zKatXHaJumZIGO5GDd DKDk0TD2LAEOtuUbeauN87GSp5/9IURta6iqTB65eIUO4xUPw1eVsIAGJuy1fhemCAJn 4xwn1dY2X7VpKnDl/ByRE9tybfAia8yFyNqhXBoTvMuag+tjbmr5HPQVxnmozHrWNkZK Yqxw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version; bh=Hb816k+bUd2NjQQh4dG4EUHk5s2yX5T3IiuANFElaCE=; b=ZxYXk7J25ZzvmhVJBtJFCe4kRKb0ZxVZt6ZQ24pIzUyxfKEthgPB7G8jDKhMehSlJ7 TNM+OMGmCpuxyoemB4/isVz0GQ6a+2DYqCxGV5KNsamWKfSLfqW+HVRpvifEcCjeuoOl 5oMGILTQMUqYcOp6ukwv9SYUkLFZutOqPnzbp4zvJ0rqh1OutqLMz/pLZNuV6PDpZpzF 13WVO9Dju9qH85S+BRQdkMDyXGkleglRxiG6fvkiPzTGG3bag7VOkgB3l77jxLiGm3mO Ydux6WL7IeqEG/p1yUHfpcwfyp/PSUYf6G2rFc8380/unJn2/rT1xKwtC83tMw4ilKyN m/Ow== X-Gm-Message-State: APjAAAVMxWzzKthq49nvd/YEhvA8ZEWYbR0nMyLpWXnUKSbV1/ohnv4p FaremOHu/anxEN49Dxm9COdjr8c5 X-Google-Smtp-Source: APXvYqzS0PASCrH2TkHbS3MjpXXpYc+agE2StYMDF6otFn/GcaEsFrtvdEiWXWKCUbB0PPAyfNLleQ== X-Received: by 2002:a5d:4805:: with SMTP id l5mr32424372wrq.3.1579122412428; Wed, 15 Jan 2020 13:06:52 -0800 (PST) Received: from calancha-pc.dy.bbexcite.jp ([31.7.242.222]) by smtp.gmail.com with ESMTPSA id u18sm25799500wrt.26.2020.01.15.13.06.51 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Jan 2020 13:06:51 -0800 (PST) From: Tino Calancha To: bug-gnu-emacs@gnu.org Subject: 28.0.50; dired: Show broken/circular links in different font Date: Wed, 15 Jan 2020 22:06:50 +0100 Message-ID: <87d0bk1lat.fsf@calancha-pc.dy.bbexcite.jp> MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::432 X-Spam-Score: 0.7 (/) 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 (--) X-Debbugs-Cc: Drew Adams Severity: wishlist Showing a broken/circular link w/ a special font might help users to promptly identify a possible issue. --8<-----------------------------cut here---------------start------------->8--- commit ecc6180be1afd795b5a998c7cbeb92dd1286a54b Author: Tino Calancha Date: Wed Jan 15 21:51:17 2020 +0100 dired: Show broken/circular links w/ different font * lisp/dired.el (dired-broken-symlink): New face. (dired-broken-symlink-face): Add variable for the new face. (dired-font-lock-keywords) Use the new face for broken/circular links. * etc/NEWS (Changes in Specialized Modes and Packages in Emacs 28.1): Announce this change. * test/lisp/dired-tests.el (dired-test-dired-broken-symlink-face): Add test. diff --git a/etc/NEWS b/etc/NEWS index 0e43c321d8..c3b183acf1 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -44,6 +44,9 @@ It was declared obsolete in Emacs 27.1. * Changes in Specialized Modes and Packages in Emacs 28.1 ++++ +** Dired shows in a different color broken or circular links. + * New Modes and Packages in Emacs 28.1 diff --git a/lisp/dired.el b/lisp/dired.el index 689ad1fbfa..56edae4e1d 100644 --- a/lisp/dired.el +++ b/lisp/dired.el @@ -475,6 +475,17 @@ dired-symlink (defvar dired-symlink-face 'dired-symlink "Face name used for symbolic links.") +(defface dired-broken-symlink + '((((class color)) + :foreground "yellow1" :background "red1" :weight bold) + (t :weight bold :slant italic :underline t)) + "Face used for broken symbolic links." + :group 'dired-faces + :version "28.1") + +(defvar dired-broken-symlink-face 'dired-broken-symlink + "Face name used for broken symbolic links.") + (defface dired-special '((t (:inherit font-lock-variable-name-face))) "Face used for sockets, pipes, block devices and char devices." @@ -538,6 +549,18 @@ dired-font-lock-keywords (list dired-re-dir '(".+" (dired-move-to-filename) nil (0 dired-directory-face))) ;; + ;; Broken Symbolic link. + (list dired-re-sym + (list (lambda (end) + (let* ((file (dired-file-name-at-point)) + (truename (ignore-errors (file-truename file)))) + ;; either links to unexistent files or circular links + (and (not (and truename (file-exists-p truename))) + (search-forward-regexp ".+-> ?.+" end t)))) + '(dired-move-to-filename) + nil + '(0 dired-broken-symlink-face))) + ;; ;; Symbolic link to a directory. (list dired-re-sym (list (lambda (end) diff --git a/test/lisp/dired-tests.el b/test/lisp/dired-tests.el index 5c6649cba4..47f8809727 100644 --- a/test/lisp/dired-tests.el +++ b/test/lisp/dired-tests.el @@ -440,6 +440,31 @@ dired-test-with-temp-dirs (should (= 6 (length (dired-get-marked-files)))) ; All empty dirs but zeta-empty-dir deleted. (advice-remove 'read-answer 'dired-test-bug27940-advice)))) +(ert-deftest dired-test-dired-broken-symlink-face () + "Test Dired fontifies correctly broken/circular links." + (let* ((dir (make-temp-file "test-symlink" 'dir)) + (file (make-temp-file (expand-file-name "test-file" dir))) + (circular-link (expand-file-name "circular-link" dir)) + (broken-link (expand-file-name "unexistent" dir)) + (ok-link (expand-file-name file "ok-link"))) + (unwind-protect + (with-current-buffer (dired dir) + (make-symbolic-link circular-link "circular-link") + (make-symbolic-link file "ok-link") + (make-symbolic-link broken-link "broken-link") + (dired-revert) + (sit-for 1) + ;; A circular link + (dired-goto-file circular-link) + (should (eq 'dired-broken-symlink (get-text-property (point) 'face))) + ;; A broken link + (dired-goto-file broken-link) + (should (eq 'dired-broken-symlink (get-text-property (point) 'face))) + ;; A valid link + (dired-goto-file ok-link) + (should-not (eq 'dired-broken-symlink (get-text-property (point) 'face)))) + (delete-directory dir 'recursive)))) + (provide 'dired-tests) ;; dired-tests.el ends here --8<-----------------------------cut here---------------end--------------->8--- In GNU Emacs 28.0.50 (build 7, x86_64-pc-linux-gnu, GTK+ Version 3.24.5, cairo version 1.16.0) of 2020-01-15 built on calancha-pc.dy.bbexcite.jp Repository revision: 576dfc8aa260957f4d0dc0c68cdcb8232a536f42 Repository branch: master Windowing system distributor 'The X.Org Foundation', version 11.0.12004000 System Description: Debian GNU/Linux 10 (buster) ------------=_1598522342-16731-1--