emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [PATCH] org-agenda: Add org-agenda-breadcrumbs-separator
@ 2019-03-21  4:54 tumashu
  2019-03-21  9:16 ` Marco Wahl
  2019-03-21 13:49 ` Nicolas Goaziou
  0 siblings, 2 replies; 5+ messages in thread
From: tumashu @ 2019-03-21  4:54 UTC (permalink / raw)
  To: emacs-orgmode


[-- Attachment #1.1: Type: text/plain, Size: 1 bytes --]



[-- Attachment #1.2: Type: text/html, Size: 86 bytes --]

[-- Attachment #2: 0001-org-agenda-Add-org-agenda-breadcrumbs-separator.patch --]
[-- Type: application/octet-stream, Size: 1614 bytes --]

From 7b94df17217c116c882e8a080f686b626c82f45e Mon Sep 17 00:00:00 2001
From: Feng Shu <tumashu@163.com>
Date: Thu, 21 Mar 2019 12:49:42 +0800
Subject: [PATCH] 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
---
 lisp/org-agenda.el | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
index baf9c8dc6..eba8bced9 100644
--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el
@@ -1708,6 +1708,11 @@ 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
+  :type 'string)
+
 (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 +6561,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)
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] org-agenda: Add org-agenda-breadcrumbs-separator
  2019-03-21  4:54 [PATCH] org-agenda: Add org-agenda-breadcrumbs-separator tumashu
@ 2019-03-21  9:16 ` Marco Wahl
  2019-03-21 13:49 ` Nicolas Goaziou
  1 sibling, 0 replies; 5+ messages in thread
From: Marco Wahl @ 2019-03-21  9:16 UTC (permalink / raw)
  To: emacs-orgmode

tumashu <tumashu@163.com> writes:

> * lisp/org-agenda.el (org-agenda-breadcrumbs-separator): New variable.
> (org-agenda-format-item): Use org-agenda-breadcrumbs-separator

+1

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] org-agenda: Add org-agenda-breadcrumbs-separator
  2019-03-21  4:54 [PATCH] org-agenda: Add org-agenda-breadcrumbs-separator tumashu
  2019-03-21  9:16 ` Marco Wahl
@ 2019-03-21 13:49 ` Nicolas Goaziou
  2019-03-21 14:43   ` tumashu
  1 sibling, 1 reply; 5+ messages in thread
From: Nicolas Goaziou @ 2019-03-21 13:49 UTC (permalink / raw)
  To: tumashu; +Cc: emacs-orgmode

Hello,

tumashu <tumashu@163.com> writes:

> From 7b94df17217c116c882e8a080f686b626c82f45e Mon Sep 17 00:00:00 2001
> From: Feng Shu <tumashu@163.com>
> Date: Thu, 21 Mar 2019 12:49:42 +0800
> Subject: [PATCH] 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

LGTM! Thank you.

Could you provide also provide an entry in ORG-NEWS (in Miscellaneous)
and send it again?

Regards,

-- 
Nicolas Goaziou

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] org-agenda: Add org-agenda-breadcrumbs-separator
  2019-03-21 13:49 ` Nicolas Goaziou
@ 2019-03-21 14:43   ` tumashu
  2019-03-21 20:48     ` Nicolas Goaziou
  0 siblings, 1 reply; 5+ messages in thread
From: tumashu @ 2019-03-21 14:43 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: emacs-orgmode


[-- Attachment #1.1: Type: text/plain, Size: 662 bytes --]





Added info to ORG-NEW


At 2019-03-21 21:49:14, "Nicolas Goaziou" <mail@nicolasgoaziou.fr> wrote:
>Hello,
>
>tumashu <tumashu@163.com> writes:
>
>> From 7b94df17217c116c882e8a080f686b626c82f45e Mon Sep 17 00:00:00 2001
>> From: Feng Shu <tumashu@163.com>
>> Date: Thu, 21 Mar 2019 12:49:42 +0800
>> Subject: [PATCH] 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
>
>LGTM! Thank you.
>
>Could you provide also provide an entry in ORG-NEWS (in Miscellaneous)
>and send it again?
>
>Regards,
>
>-- 
>Nicolas Goaziou

[-- Attachment #1.2: Type: text/html, Size: 953 bytes --]

[-- Attachment #2: 0001-org-agenda-Add-org-agenda-breadcrumbs-separator.patch --]
[-- Type: application/octet-stream, Size: 2401 bytes --]

From a39803b7056bb7ccbd9796cfbabf11997020870a Mon Sep 17 00:00:00 2001
From: Feng Shu <tumashu@163.com>
Date: Thu, 21 Mar 2019 12:49:42 +0800
Subject: [PATCH] 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.
---
 etc/ORG-NEWS       | 5 +++++
 lisp/org-agenda.el | 9 +++++++--
 2 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/etc/ORG-NEWS b/etc/ORG-NEWS
index a3f0d26fc..518a6faa6 100644
--- a/etc/ORG-NEWS
+++ b/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
diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
index baf9c8dc6..eba8bced9 100644
--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el
@@ -1708,6 +1708,11 @@ 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
+  :type 'string)
+
 (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 +6561,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)
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] org-agenda: Add org-agenda-breadcrumbs-separator
  2019-03-21 14:43   ` tumashu
@ 2019-03-21 20:48     ` Nicolas Goaziou
  0 siblings, 0 replies; 5+ messages in thread
From: Nicolas Goaziou @ 2019-03-21 20:48 UTC (permalink / raw)
  To: tumashu; +Cc: emacs-orgmode

Hello,

tumashu  <tumashu@163.com> writes:

> +(defcustom org-agenda-breadcrumbs-separator "->"
> +  "The separator of breadcrumbs in agenda lines."
> +  :group 'org-agenda-line-format
> +  :type 'string)

I added :package-version and :safe keywords and applied the patch.

Thank you.

Regards,

-- 
Nicolas Goaziou

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2019-03-21 20:53 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-03-21  4:54 [PATCH] org-agenda: Add org-agenda-breadcrumbs-separator tumashu
2019-03-21  9:16 ` Marco Wahl
2019-03-21 13:49 ` Nicolas Goaziou
2019-03-21 14:43   ` tumashu
2019-03-21 20:48     ` Nicolas Goaziou

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).