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.
This commit is contained in:
Feng Shu 2019-03-21 12:49:42 +08:00 committed by Nicolas Goaziou
parent 07d0c9edbc
commit 967f6c0dd0
2 changed files with 14 additions and 2 deletions

View File

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

View File

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