unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#39145: 28.0.50; dired: Show broken/circular links in different font
@ 2020-01-15 21:06 Tino Calancha
  2020-01-15 22:28 ` Glenn Morris
  2020-01-15 23:13 ` Juri Linkov
  0 siblings, 2 replies; 14+ messages in thread
From: Tino Calancha @ 2020-01-15 21:06 UTC (permalink / raw)
  To: 39145

X-Debbugs-Cc: Drew Adams <drew.adams@oracle.com>
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 <tino.calancha@gmail.com>
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.
 \f
 * Changes in Specialized Modes and Packages in Emacs 28.1
 
++++
+** Dired shows in a different color broken or circular links.
+
 \f
 * 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)





^ permalink raw reply related	[flat|nested] 14+ messages in thread

* bug#39145: 28.0.50; dired: Show broken/circular links in different font
  2020-01-15 21:06 bug#39145: 28.0.50; dired: Show broken/circular links in different font Tino Calancha
@ 2020-01-15 22:28 ` Glenn Morris
  2020-08-24 18:05   ` Tino Calancha
  2020-01-15 23:13 ` Juri Linkov
  1 sibling, 1 reply; 14+ messages in thread
From: Glenn Morris @ 2020-01-15 22:28 UTC (permalink / raw)
  To: Tino Calancha; +Cc: 39145

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.)





^ permalink raw reply	[flat|nested] 14+ messages in thread

* bug#39145: 28.0.50; dired: Show broken/circular links in different font
  2020-01-15 21:06 bug#39145: 28.0.50; dired: Show broken/circular links in different font Tino Calancha
  2020-01-15 22:28 ` Glenn Morris
@ 2020-01-15 23:13 ` Juri Linkov
  2020-08-24 17:52   ` Tino Calancha
  1 sibling, 1 reply; 14+ messages in thread
From: Juri Linkov @ 2020-01-15 23:13 UTC (permalink / raw)
  To: Tino Calancha; +Cc: 39145

> @@ -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?





^ permalink raw reply	[flat|nested] 14+ messages in thread

* bug#39145: 28.0.50; dired: Show broken/circular links in different font
  2020-01-15 23:13 ` Juri Linkov
@ 2020-08-24 17:52   ` Tino Calancha
  0 siblings, 0 replies; 14+ messages in thread
From: Tino Calancha @ 2020-08-24 17:52 UTC (permalink / raw)
  To: Juri Linkov; +Cc: 39145

Juri Linkov <juri@linkov.net> 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.







^ permalink raw reply	[flat|nested] 14+ messages in thread

* bug#39145: 28.0.50; dired: Show broken/circular links in different font
  2020-01-15 22:28 ` Glenn Morris
@ 2020-08-24 18:05   ` Tino Calancha
  2020-08-25 16:34     ` Tino Calancha
  2020-08-27  9:37     ` Stefan Kangas
  0 siblings, 2 replies; 14+ messages in thread
From: Tino Calancha @ 2020-08-24 18:05 UTC (permalink / raw)
  To: Glenn Morris; +Cc: uyennhi.qm, 39145

Glenn Morris <rgm@gnu.org> 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 <ccalancha@suse.com>
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





^ permalink raw reply related	[flat|nested] 14+ messages in thread

* bug#39145: 28.0.50; dired: Show broken/circular links in different font
  2020-08-24 18:05   ` Tino Calancha
@ 2020-08-25 16:34     ` Tino Calancha
  2020-08-25 16:51       ` Eli Zaretskii
  2020-08-27  9:37     ` Stefan Kangas
  1 sibling, 1 reply; 14+ messages in thread
From: Tino Calancha @ 2020-08-25 16:34 UTC (permalink / raw)
  To: 39145; +Cc: rgm, stefan, uyennhi.qm, larsi, jidanni

Tino Calancha <tino.calancha@gmail.com> 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 <ccalancha@suse.com>
> 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.





^ permalink raw reply	[flat|nested] 14+ messages in thread

* bug#39145: 28.0.50; dired: Show broken/circular links in different font
  2020-08-25 16:34     ` Tino Calancha
@ 2020-08-25 16:51       ` Eli Zaretskii
  2020-08-25 17:05         ` Tino Calancha
  0 siblings, 1 reply; 14+ messages in thread
From: Eli Zaretskii @ 2020-08-25 16:51 UTC (permalink / raw)
  To: Tino Calancha; +Cc: rgm, stefan, jidanni, 39145, larsi, uyennhi.qm

> From: Tino Calancha <tino.calancha@gmail.com>
> 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?





^ permalink raw reply	[flat|nested] 14+ messages in thread

* bug#39145: 28.0.50; dired: Show broken/circular links in different font
  2020-08-25 16:51       ` Eli Zaretskii
@ 2020-08-25 17:05         ` Tino Calancha
  2020-08-25 17:18           ` Tino Calancha
  0 siblings, 1 reply; 14+ messages in thread
From: Tino Calancha @ 2020-08-25 17:05 UTC (permalink / raw)
  To: Eli Zaretskii
  Cc: rgm, Tino Calancha, stefan, jidanni, 39145, larsi, uyennhi.qm



On Tue, 25 Aug 2020, Eli Zaretskii wrote:

>> From: Tino Calancha <tino.calancha@gmail.com>
>> 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.






^ permalink raw reply	[flat|nested] 14+ messages in thread

* bug#39145: 28.0.50; dired: Show broken/circular links in different font
  2020-08-25 17:05         ` Tino Calancha
@ 2020-08-25 17:18           ` Tino Calancha
  2020-08-25 18:22             ` Eli Zaretskii
  0 siblings, 1 reply; 14+ messages in thread
From: Tino Calancha @ 2020-08-25 17:18 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: rgm, stefan, jidanni, 39145, larsi, uyennhi.qm

Tino Calancha <tino.calancha@gmail.com> 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.






^ permalink raw reply	[flat|nested] 14+ messages in thread

* bug#39145: 28.0.50; dired: Show broken/circular links in different font
  2020-08-25 17:18           ` Tino Calancha
@ 2020-08-25 18:22             ` Eli Zaretskii
  2020-08-27  8:30               ` Tino Calancha
  0 siblings, 1 reply; 14+ messages in thread
From: Eli Zaretskii @ 2020-08-25 18:22 UTC (permalink / raw)
  To: Tino Calancha; +Cc: rgm, stefan, jidanni, 39145, larsi, uyennhi.qm

> From: Tino Calancha <tino.calancha@gmail.com>
> 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.





^ permalink raw reply	[flat|nested] 14+ messages in thread

* bug#39145: 28.0.50; dired: Show broken/circular links in different font
  2020-08-25 18:22             ` Eli Zaretskii
@ 2020-08-27  8:30               ` Tino Calancha
  2020-08-27  9:03                 ` Eli Zaretskii
  0 siblings, 1 reply; 14+ messages in thread
From: Tino Calancha @ 2020-08-27  8:30 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: rgm, stefan, jidanni, 39145, larsi, uyennhi.qm

Eli Zaretskii <eliz@gnu.org> 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?





^ permalink raw reply	[flat|nested] 14+ messages in thread

* bug#39145: 28.0.50; dired: Show broken/circular links in different font
  2020-08-27  8:30               ` Tino Calancha
@ 2020-08-27  9:03                 ` Eli Zaretskii
  0 siblings, 0 replies; 14+ messages in thread
From: Eli Zaretskii @ 2020-08-27  9:03 UTC (permalink / raw)
  To: Tino Calancha; +Cc: rgm, stefan, jidanni, 39145, larsi, uyennhi.qm

> From: Tino Calancha <tino.calancha@gmail.com>
> 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.





^ permalink raw reply	[flat|nested] 14+ messages in thread

* bug#39145: 28.0.50; dired: Show broken/circular links in different font
  2020-08-24 18:05   ` Tino Calancha
  2020-08-25 16:34     ` Tino Calancha
@ 2020-08-27  9:37     ` Stefan Kangas
  2020-08-27  9:58       ` Tino Calancha
  1 sibling, 1 reply; 14+ messages in thread
From: Stefan Kangas @ 2020-08-27  9:37 UTC (permalink / raw)
  To: Tino Calancha, Glenn Morris; +Cc: uyennhi.qm, 39145

Tino Calancha <tino.calancha@gmail.com> 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.





^ permalink raw reply	[flat|nested] 14+ messages in thread

* bug#39145: 28.0.50; dired: Show broken/circular links in different font
  2020-08-27  9:37     ` Stefan Kangas
@ 2020-08-27  9:58       ` Tino Calancha
  0 siblings, 0 replies; 14+ messages in thread
From: Tino Calancha @ 2020-08-27  9:58 UTC (permalink / raw)
  To: 39145-done

Stefan Kangas <stefankangas@gmail.com> writes:

> Tino Calancha <tino.calancha@gmail.com> 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)






^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2020-08-27  9:58 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-15 21:06 bug#39145: 28.0.50; dired: Show broken/circular links in different font Tino Calancha
2020-01-15 22:28 ` Glenn Morris
2020-08-24 18:05   ` Tino Calancha
2020-08-25 16:34     ` Tino Calancha
2020-08-25 16:51       ` Eli Zaretskii
2020-08-25 17:05         ` Tino Calancha
2020-08-25 17:18           ` Tino Calancha
2020-08-25 18:22             ` Eli Zaretskii
2020-08-27  8:30               ` Tino Calancha
2020-08-27  9:03                 ` Eli Zaretskii
2020-08-27  9:37     ` Stefan Kangas
2020-08-27  9:58       ` Tino Calancha
2020-01-15 23:13 ` Juri Linkov
2020-08-24 17:52   ` Tino Calancha

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).