From: Samuel Loury <konubinix@gmail.com>
To: org-mode list <emacs-orgmode@gnu.org>
Subject: [PATCH] Make `org-tags-view' stop setting globally `org--matcher-tags-todo-only'
Date: Thu, 19 Jan 2017 08:49:42 +0100 [thread overview]
Message-ID: <87k29rzdyh.fsf@gmail.com> (raw)
[-- Attachment #1.1: Type: text/plain, Size: 745 bytes --]
Dear all,
I would like to propose a patch for `org-tags-view' to make it stop
setting globally `org--matcher-tags-todo-only'
Setting `org--matcher-tags-todo-only' has side effects on other
commands. For instance, the following clock table changes its behavior
whether `org--matcher-tags-todo-only' is nil or '(4)
--8<---------------cut here---------------start------------->8---
#+BEGIN: clocktable :tags "-perso" :fileskip0 :stepskip0 :link t :maxlevel 5 :emphasize t :link t :block today-1 :scope agenda :inherit-props t
--8<---------------cut here---------------end--------------->8---
I did not have time to investigate why the behavior of the clock table
is impacted by `org--matcher-tags-todo-only'. I quickly feel lost in
this code.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: 0001-Make-org-tags-view-stop-setting-globally-org-matcher.patch --]
[-- Type: text/x-diff, Size: 1182 bytes --]
From c5c763a9aca8cfd8a707b0d7e814bc37f5eeafa1 Mon Sep 17 00:00:00 2001
From: Samuel Loury <konubinixweb@gmail.com>
Date: Thu, 19 Jan 2017 08:39:50 +0100
Subject: [PATCH] Make `org-tags-view' stop setting globally
`org--matcher-tags-todo-only'
`org--matcher-tags-todo-only' is used at several places in the
code.
The first call of `org-tags-view' that changes its value, like C-u
M-x org-tags-view has the side effect of making all other commands
that don't set this value explicitely rely on this value.
* lisp/org-agenda.el (org-tags-view): Add the declaration of
`org--matcher-tags-todo-only' in the let form
---
lisp/org-agenda.el | 1 +
1 file changed, 1 insertion(+)
diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
index 737e1841f..ac4bde389 100644
--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el
@@ -4681,6 +4681,7 @@ The prefix arg TODO-ONLY limits the search to TODO entries."
org-tags-match-list-sublevels)
(completion-ignore-case t)
rtn rtnall files file pos matcher
+ org--matcher-tags-todo-only
buffer)
(when (and (stringp match) (not (string-match "\\S-" match)))
(setq match nil))
--
2.11.0
[-- Attachment #1.3: Type: text/plain, Size: 106 bytes --]
--
Konubinix
GPG Key : 7439106A
Fingerprint: 5993 BE7A DA65 E2D9 06CE 5C36 75D2 3CED 7439 106A
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]
next reply other threads:[~2017-01-19 7:49 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-19 7:49 Samuel Loury [this message]
2017-05-30 17:00 ` [PATCH] Make `org-tags-view' stop setting globally `org--matcher-tags-todo-only' Nicolas Goaziou
2017-06-13 19:28 ` agenda tags-todo (was Re: [PATCH] Make `org-tags-view' stop setting globally `org--matcher-tags-todo-only') Christian Lynbech
2017-06-13 21:32 ` Nicolas Goaziou
2017-06-14 6:30 ` Christian Lynbech
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87k29rzdyh.fsf@gmail.com \
--to=konubinix@gmail.com \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).