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

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

[nongnu] elpa/telephone-line 17901f3911 170/195: Merge pull request #96


From: ELPA Syncer
Subject: [nongnu] elpa/telephone-line 17901f3911 170/195: Merge pull request #96 from MikeTheGreat/filename_segments
Date: Wed, 5 Jan 2022 02:59:53 -0500 (EST)

branch: elpa/telephone-line
commit 17901f39119702cb6754ae6907549c7b795fe747
Merge: 74068cd04a 1025d435af
Author: Daniel Bordak <dbordak@fastmail.fm>
Commit: GitHub <noreply@github.com>

    Merge pull request #96 from MikeTheGreat/filename_segments
    
    2 new segments: show just the file's name & show path AND file name
---
 telephone-line-segments.el | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/telephone-line-segments.el b/telephone-line-segments.el
index 4afff11f39..c283b82ef9 100644
--- a/telephone-line-segments.el
+++ b/telephone-line-segments.el
@@ -92,8 +92,16 @@ Adapted from doom-modeline."
 (telephone-line-defsegment* telephone-line-minions-mode-segment ()
   (telephone-line-raw minions-mode-line-modes t))
 
-(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-absolute-path-segment ()
+  buffer-file-name)
 
 (telephone-line-defsegment* telephone-line-buffer-modified-segment ()
     (if (buffer-modified-p)



reply via email to

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