Simplify modeline buffer roam relabelling

Hopefully more robust too
This commit is contained in:
TEC 2020-12-09 15:31:20 +08:00
parent 2a8c5ae9ba
commit bd65ff20f4
1 changed files with 2 additions and 2 deletions

View File

@ -4210,7 +4210,7 @@ Hence, we need to do a bit of overriding.
All those numbers! It's messy. Let's adjust this in a similar way that I have in
the[[*Window title][Window title]].
#+begin_src emacs-lisp
(defadvice! doom-modeline--reformat-roam (orig-fun)
(defadvice! doom-modeline--buffer-file-name-roam-aware-a ()
:around #'doom-modeline-buffer-file-name
(message "Reformat?")
(message (buffer-file-name))
@ -4218,7 +4218,7 @@ the[[*Window title][Window title]].
(replace-regexp-in-string
"\\(?:^\\|.*/\\)\\([0-9]\\{4\\}\\)\\([0-9]\\{2\\}\\)\\([0-9]\\{2\\}\\)[0-9]*-"
"🢔(\\1-\\2-\\3) "
(funcall orig-fun))
(subst-char-in-string ?_ ? buffer-file-name))
(funcall orig-fun)))
#+end_src
**** Nicer generated heading IDs