emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/telephone-line a8cb383957 168/195: 2 new segments: show ju


From: ELPA Syncer
Subject: [nongnu] elpa/telephone-line a8cb383957 168/195: 2 new segments: show just the file's name & show path AND file name
Date: Wed, 5 Jan 2022 02:59:52 -0500 (EST)

branch: elpa/telephone-line
commit a8cb3839570557b49f487316f5a59b9aa0e4486b
Author: Mike Panitz <mike.panitz@gmail.com>
Commit: Mike Panitz <mike.panitz@gmail.com>

    2 new segments: show just the file's name & show path AND file name
---
 telephone-line-segments.el | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/telephone-line-segments.el b/telephone-line-segments.el
index 4afff11f39..a88a8101c0 100644
--- a/telephone-line-segments.el
+++ b/telephone-line-segments.el
@@ -95,6 +95,17 @@ Adapted from doom-modeline."
 (telephone-line-defsegment* telephone-line-buffer-name-segment ()
   (telephone-line-raw (buffer-name)))
 
+;; For a file like /a/b/c/file.txt, this should display
+;; file.txt
+(telephone-line-defsegment telephone-line-buffer-name-segment ()
+  mode-line-buffer-identification
+  )
+
+;; For a file like /a/b/c/file.txt, this should display
+;; /a/b/c/file.txt
+(telephone-line-defsegment telephone-line-file-name-segment ()
+  buffer-file-name)
+
 (telephone-line-defsegment* telephone-line-buffer-modified-segment ()
     (if (buffer-modified-p)
         (telephone-line-raw "!")



reply via email to

[Prev in Thread] Current Thread [Next in Thread]