From a4375e81c00210b4178384b75106ff2a8f0b752e Mon Sep 17 00:00:00 2001 From: Marco Wahl Date: Thu, 10 Sep 2015 13:41:21 +0200 Subject: [PATCH 1/3] org-agenda,org.texi: Fix doc about category filter * lisp/org-agenda.el (org-agenda-filter-by-category): Documentation of the effect of the prefix argument. * doc/org.texi (Filtering/limiting agenda items): Documentation about the effect of the prefix argument when filtering by category. --- doc/org.texi | 7 ++++--- lisp/org-agenda.el | 7 +++++-- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/doc/org.texi b/doc/org.texi index 33839fd0d..74c7ccbb0 100644 --- a/doc/org.texi +++ b/doc/org.texi @@ -8616,9 +8616,10 @@ selected. @vindex org-agenda-category-filter-preset Filter the current agenda view with respect to the category of the item at -point. Pressing @code{<} another time will remove this filter. You can add -a filter preset through the option @code{org-agenda-category-filter-preset} -(see below.) +point. Pressing @code{<} another time will remove this filter. When called +with a prefix argument exclude the category of the item at point from the +agenda. You can add a filter preset through the option +@code{org-agenda-category-filter-preset} (see below.) @orgcmd{^,org-agenda-filter-by-top-headline} Filter the current agenda view and only display the siblings and the parent diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el index 0d5623539..eff14eeba 100644 --- a/lisp/org-agenda.el +++ b/lisp/org-agenda.el @@ -7352,8 +7352,11 @@ in the agenda." (defvar org-agenda-filtered-by-category nil) (defun org-agenda-filter-by-category (strip) - "Keep only those lines in the agenda buffer that have a specific category. -The category is that of the current line." + "Filter lines in the agenda buffer that have a specific category. +The category is that of the current line. +Without prefix argument, keep only the lines of that category. +With a prefix argument, exclude the lines of that category. +" (interactive "P") (if (and org-agenda-filtered-by-category org-agenda-category-filter) From 0b71022c8cc51f3887cff5a1ec241ac258e9779c Mon Sep 17 00:00:00 2001 From: Marco Wahl Date: Thu, 10 Sep 2015 13:54:28 +0200 Subject: [PATCH 2/3] org-agenda: simplify one expression (refactoring) * lisp/org-agenda.el (org-agenda-filter-by-category): replace '(and cat)' with the equivalent 'cat'. --- lisp/org-agenda.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el index eff14eeba..b02b2f7c0 100644 --- a/lisp/org-agenda.el +++ b/lisp/org-agenda.el @@ -7366,7 +7366,7 @@ With a prefix argument, exclude the lines of that category. ((and cat strip) (org-agenda-filter-apply (push (concat "-" cat) org-agenda-category-filter) 'category)) - ((and cat) + (cat (org-agenda-filter-apply (setq org-agenda-category-filter (list (concat "+" cat))) 'category)) From bde1ebc20ae5c3633d2f405117f7ee67566b5a5f Mon Sep 17 00:00:00 2001 From: Nicolas Goaziou Date: Thu, 10 Sep 2015 14:21:49 +0200 Subject: [PATCH 3/3] ox-koma-letter: Allow to disable place locally * contrib/lisp/ox-koma-letter.el (koma-letter): (org-koma-letter--build-settings): Allow to disable place locally. Whenever OPTION keyword contains a "place" item or PLACE keyword is used in the buffer, set KOMA option place after LCO inclusion. Reported-by: Alan Schmitt --- contrib/lisp/ox-koma-letter.el | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/contrib/lisp/ox-koma-letter.el b/contrib/lisp/ox-koma-letter.el index 8ba380c83..e6fed3b6a 100644 --- a/contrib/lisp/ox-koma-letter.el +++ b/contrib/lisp/ox-koma-letter.el @@ -435,7 +435,8 @@ e.g. \"title-subject:t\"." (:inbuffer-with-backaddress nil "backaddress" 'koma-letter:empty) (:inbuffer-with-email nil "email" 'koma-letter:empty) (:inbuffer-with-foldmarks nil "foldmarks" 'koma-letter:empty) - (:inbuffer-with-phone nil "phone" 'koma-letter:empty)) + (:inbuffer-with-phone nil "phone" 'koma-letter:empty) + (:inbuffer-with-place nil "place" 'koma-letter:empty)) :translate-alist '((export-block . org-koma-letter-export-block) (export-snippet . org-koma-letter-export-snippet) (headline . org-koma-letter-headline) @@ -734,9 +735,13 @@ a communication channel." (format "\\KOMAoption{backaddress}{%s}\n" (if (plist-get info :with-backaddress) "true" "false"))) ;; Place. - (and (funcall check-scope 'place) - (format "\\setkomavar{place}{%s}\n" - (if (plist-get info :with-place) (plist-get info :place) ""))) + (let ((with-place-set (funcall check-scope 'with-place)) + (place-set (funcall check-scope 'place))) + (and (or (and with-place-set place-set) + (and (eq scope 'buffer) (or with-place-set place-set))) + (format "\\setkomavar{place}{%s}\n" + (if (plist-get info :with-place) (plist-get info :place) + "")))) ;; Folding marks. (and (funcall check-scope 'with-foldmarks) (let ((foldmarks (plist-get info :with-foldmarks)))