emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [PATCH 1/2] respect startgroup/endgroup delimiters with description in org-tag-alist
@ 2009-11-05  9:57 Stephan Schmitt
  2009-11-05  9:57 ` [PATCH 2/2] set variables org-timer-timer[123] correctly Stephan Schmitt
  2009-11-05 15:12 ` [PATCH 1/2] respect startgroup/endgroup delimiters with description in org-tag-alist Carsten Dominik
  0 siblings, 2 replies; 4+ messages in thread
From: Stephan Schmitt @ 2009-11-05  9:57 UTC (permalink / raw)
  To: emacs-orgmode

org-agenda-filter-by-tag and org-get-current-options didn't account for
radio group delimiters in org-tag-alist where a description is attached
as second item of the list:

((:startgroup "context")
 ("Work" . 87)
 ("Home" . 72)
 ("Errand" . 69)
 (:endgroup)
 (:newline)
 (:startgroup "communication")
 ("Mail" . 77)
 ("Call" . 67)
 (:endgroup)
 (:newline)
 ...)
---
 lisp/org-agenda.el |    5 ++++-
 lisp/org-exp.el    |    5 +++--
 2 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
index 5e0f4fd..6e90f6f 100644
--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el
@@ -5094,7 +5094,10 @@ to switch to narrowing."
   (interactive "P")
   (let* ((alist org-tag-alist-for-agenda)
 	 (tag-chars (mapconcat
-		     (lambda (x) (if (cdr x) (char-to-string (cdr x)) ""))
+		     (lambda (x) (if (and (not (symbolp (car x)))
+					  (cdr x))
+				     (char-to-string (cdr x))
+				   ""))
 		     alist ""))
 	 (efforts (org-split-string
 		   (or (cdr (assoc (concat org-effort-property "_ALL")
diff --git a/lisp/org-exp.el b/lisp/org-exp.el
index a71f081..cef29b7 100644
--- a/lisp/org-exp.el
+++ b/lisp/org-exp.el
@@ -2750,8 +2750,9 @@ Does include HTML export options as well as TODO and CATEGORY stuff."
 	 ((not org-log-done) "nologdone"))
    (or (mapconcat (lambda (x)
 		    (cond
-		     ((equal '(:startgroup) x) "{")
-		     ((equal '(:endgroup) x) "}")
+		     ((equal :startgroup (car x)) "{")
+		     ((equal :endgroup (car x)) "}")
+		     ((equal :newline (car x)) "")
 		     ((cdr x) (format "%s(%c)" (car x) (cdr x)))
 		     (t (car x))))
 		  (or org-tag-alist (org-get-buffer-tags)) " ") "")
-- 
1.6.4.4

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

* [PATCH 2/2] set variables org-timer-timer[123] correctly
  2009-11-05  9:57 [PATCH 1/2] respect startgroup/endgroup delimiters with description in org-tag-alist Stephan Schmitt
@ 2009-11-05  9:57 ` Stephan Schmitt
  2009-11-05 15:12   ` Carsten Dominik
  2009-11-05 15:12 ` [PATCH 1/2] respect startgroup/endgroup delimiters with description in org-tag-alist Carsten Dominik
  1 sibling, 1 reply; 4+ messages in thread
From: Stephan Schmitt @ 2009-11-05  9:57 UTC (permalink / raw)
  To: emacs-orgmode

before these variables were set to nil, and consequently
org-timer-last-timer as well.
---
 lisp/org-timer.el |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/lisp/org-timer.el b/lisp/org-timer.el
index 8a59c74..660312a 100644
--- a/lisp/org-timer.el
+++ b/lisp/org-timer.el
@@ -312,12 +312,12 @@ VALUE can be `on', `off', or `pause'."
 		(t (error "Not in an Org buffer"))))
 	   timer-set)
       (mapcar (lambda(timer)
-		(if (not (or (eval timer) timer-set))
-		    (setq timer-set t
-			  timer
-			  (run-with-timer
-			   secs nil 'org-notify (format "%s: time out" hl) t)
-			  org-timer-last-timer timer)))
+		(when (not (or (eval timer) timer-set))
+		  (setq timer-set t)
+		  (setq org-timer-last-timer
+			(run-with-timer
+			secs nil 'org-notify (format "%s: time out" hl) t))
+		  (set timer org-timer-last-timer)))
 	      '(org-timer-timer1
 		org-timer-timer2
 		org-timer-timer3)))))
-- 
1.6.4.4

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

* Re: [PATCH 1/2] respect startgroup/endgroup delimiters with description in org-tag-alist
  2009-11-05  9:57 [PATCH 1/2] respect startgroup/endgroup delimiters with description in org-tag-alist Stephan Schmitt
  2009-11-05  9:57 ` [PATCH 2/2] set variables org-timer-timer[123] correctly Stephan Schmitt
@ 2009-11-05 15:12 ` Carsten Dominik
  1 sibling, 0 replies; 4+ messages in thread
From: Carsten Dominik @ 2009-11-05 15:12 UTC (permalink / raw)
  To: Stephan Schmitt; +Cc: emacs-orgmode

Applied, thanks.

- Carsten

On Nov 5, 2009, at 10:57 AM, Stephan Schmitt wrote:

> org-agenda-filter-by-tag and org-get-current-options didn't account  
> for
> radio group delimiters in org-tag-alist where a description is  
> attached
> as second item of the list:
>
> ((:startgroup "context")
> ("Work" . 87)
> ("Home" . 72)
> ("Errand" . 69)
> (:endgroup)
> (:newline)
> (:startgroup "communication")
> ("Mail" . 77)
> ("Call" . 67)
> (:endgroup)
> (:newline)
> ...)
> ---
> lisp/org-agenda.el |    5 ++++-
> lisp/org-exp.el    |    5 +++--
> 2 files changed, 7 insertions(+), 3 deletions(-)
>
> diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
> index 5e0f4fd..6e90f6f 100644
> --- a/lisp/org-agenda.el
> +++ b/lisp/org-agenda.el
> @@ -5094,7 +5094,10 @@ to switch to narrowing."
>   (interactive "P")
>   (let* ((alist org-tag-alist-for-agenda)
> 	 (tag-chars (mapconcat
> -		     (lambda (x) (if (cdr x) (char-to-string (cdr x)) ""))
> +		     (lambda (x) (if (and (not (symbolp (car x)))
> +					  (cdr x))
> +				     (char-to-string (cdr x))
> +				   ""))
> 		     alist ""))
> 	 (efforts (org-split-string
> 		   (or (cdr (assoc (concat org-effort-property "_ALL")
> diff --git a/lisp/org-exp.el b/lisp/org-exp.el
> index a71f081..cef29b7 100644
> --- a/lisp/org-exp.el
> +++ b/lisp/org-exp.el
> @@ -2750,8 +2750,9 @@ Does include HTML export options as well as  
> TODO and CATEGORY stuff."
> 	 ((not org-log-done) "nologdone"))
>    (or (mapconcat (lambda (x)
> 		    (cond
> -		     ((equal '(:startgroup) x) "{")
> -		     ((equal '(:endgroup) x) "}")
> +		     ((equal :startgroup (car x)) "{")
> +		     ((equal :endgroup (car x)) "}")
> +		     ((equal :newline (car x)) "")
> 		     ((cdr x) (format "%s(%c)" (car x) (cdr x)))
> 		     (t (car x))))
> 		  (or org-tag-alist (org-get-buffer-tags)) " ") "")
> -- 
> 1.6.4.4
>
>
>
> _______________________________________________
> Emacs-orgmode mailing list
> Remember: use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode

- Carsten

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

* Re: [PATCH 2/2] set variables org-timer-timer[123] correctly
  2009-11-05  9:57 ` [PATCH 2/2] set variables org-timer-timer[123] correctly Stephan Schmitt
@ 2009-11-05 15:12   ` Carsten Dominik
  0 siblings, 0 replies; 4+ messages in thread
From: Carsten Dominik @ 2009-11-05 15:12 UTC (permalink / raw)
  To: Stephan Schmitt; +Cc: emacs-orgmode

Applied, thanks.

- Carsten

On Nov 5, 2009, at 10:57 AM, Stephan Schmitt wrote:

> before these variables were set to nil, and consequently
> org-timer-last-timer as well.
> ---
> lisp/org-timer.el |   12 ++++++------
> 1 files changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/lisp/org-timer.el b/lisp/org-timer.el
> index 8a59c74..660312a 100644
> --- a/lisp/org-timer.el
> +++ b/lisp/org-timer.el
> @@ -312,12 +312,12 @@ VALUE can be `on', `off', or `pause'."
> 		(t (error "Not in an Org buffer"))))
> 	   timer-set)
>       (mapcar (lambda(timer)
> -		(if (not (or (eval timer) timer-set))
> -		    (setq timer-set t
> -			  timer
> -			  (run-with-timer
> -			   secs nil 'org-notify (format "%s: time out" hl) t)
> -			  org-timer-last-timer timer)))
> +		(when (not (or (eval timer) timer-set))
> +		  (setq timer-set t)
> +		  (setq org-timer-last-timer
> +			(run-with-timer
> +			secs nil 'org-notify (format "%s: time out" hl) t))
> +		  (set timer org-timer-last-timer)))
> 	      '(org-timer-timer1
> 		org-timer-timer2
> 		org-timer-timer3)))))
> -- 
> 1.6.4.4
>
>
>
> _______________________________________________
> Emacs-orgmode mailing list
> Remember: use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode

- Carsten

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

end of thread, other threads:[~2009-11-05 15:12 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-11-05  9:57 [PATCH 1/2] respect startgroup/endgroup delimiters with description in org-tag-alist Stephan Schmitt
2009-11-05  9:57 ` [PATCH 2/2] set variables org-timer-timer[123] correctly Stephan Schmitt
2009-11-05 15:12   ` Carsten Dominik
2009-11-05 15:12 ` [PATCH 1/2] respect startgroup/endgroup delimiters with description in org-tag-alist Carsten Dominik

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