Browse Source

org-agenda: Add org-agenda-breadcrumbs-separator

* lisp/org-agenda.el (org-agenda-breadcrumbs-separator): New variable.
(org-agenda-format-item): Use org-agenda-breadcrumbs-separator
* etc/ORG-NEWS (New variable: ~org-agenda-breadcrumbs-separator~): New variable.
Feng Shu 1 month ago
parent
commit
967f6c0dd0
2 changed files with 14 additions and 2 deletions
  1. 5 0
      etc/ORG-NEWS
  2. 9 2
      lisp/org-agenda.el

+ 5 - 0
etc/ORG-NEWS

@@ -241,6 +241,11 @@ The ~:mkdirp~ header argument used to only work for ~:tangle~ tangle
 files. Now ~:mkdirp~ works for ~:dir~ too. This is more convenient for
 specify default directory and with ~:file~ header argument.
 
+*** New variable: ~org-agenda-breadcrumbs-separator~
+If breadcrumbs are showed in org-agenda with the help of "%b" format
+in ~org-agenda-prefix-format~, user can customize breadcrumbs's
+separator using ~org-agenda-breadcrumbs-separator~.
+
 * Version 9.2
 ** Incompatible changes
 *** Removal of OrgStruct mode mode and radio lists

+ 9 - 2
lisp/org-agenda.el

@@ -1708,6 +1708,13 @@ Custom commands can set this variable in the options section."
   :version "26.1"
   :package-version '(Org . "9.1"))
 
+(defcustom org-agenda-breadcrumbs-separator "->"
+  "The separator of breadcrumbs in agenda lines."
+  :group 'org-agenda-line-format
+  :package-version '(Org . "9.3")
+  :type 'string
+  :safe #'stringp)
+
 (defvar org-prefix-format-compiled nil
   "The compiled prefix format and associated variables.
 This is a list where first element is a list of variable bindings, and second
@@ -6556,8 +6563,8 @@ Any match of REMOVE-RE will be removed from TXT."
 	  (setq breadcrumbs (org-with-point-at (org-get-at-bol 'org-marker)
 			      (let ((s (org-format-outline-path (org-get-outline-path)
 								(1- (frame-width))
-								nil "->")))
-				(if (eq "" s) "" (concat s "->"))))))
+								nil org-agenda-breadcrumbs-separator)))
+				(if (eq "" s) "" (concat s org-agenda-breadcrumbs-separator))))))
 	(setq time (cond (s2 (concat
 			      (org-agenda-time-of-day-to-ampm-maybe s1)
 			      "-" (org-agenda-time-of-day-to-ampm-maybe s2)