From mboxrd@z Thu Jan 1 00:00:00 1970 From: Samuel Loury Subject: [PATCH] Make `org-tags-view' stop setting globally `org--matcher-tags-todo-only' Date: Thu, 19 Jan 2017 08:49:42 +0100 Message-ID: <87k29rzdyh.fsf@gmail.com> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:47088) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cU7Ti-0007Cq-O7 for emacs-orgmode@gnu.org; Thu, 19 Jan 2017 02:49:51 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cU7Te-0007XP-Q8 for emacs-orgmode@gnu.org; Thu, 19 Jan 2017 02:49:50 -0500 Received: from mail-wm0-x22d.google.com ([2a00:1450:400c:c09::22d]:37583) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cU7Te-0007X7-In for emacs-orgmode@gnu.org; Thu, 19 Jan 2017 02:49:46 -0500 Received: by mail-wm0-x22d.google.com with SMTP id c206so64187407wme.0 for ; Wed, 18 Jan 2017 23:49:46 -0800 (PST) Received: from localhost (162.48.7.109.rev.sfr.net. [109.7.48.162]) by smtp.gmail.com with ESMTPSA id l74sm10952670wmg.2.2017.01.18.23.49.44 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 18 Jan 2017 23:49:44 -0800 (PST) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: org-mode list --==-=-= Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Content-Type: text/plain 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. --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=0001-Make-org-tags-view-stop-setting-globally-org-matcher.patch Content-Transfer-Encoding: quoted-printable From=20c5c763a9aca8cfd8a707b0d7e814bc37f5eeafa1 Mon Sep 17 00:00:00 2001 From: Samuel Loury 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 =2D-- 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 =2D-- a/lisp/org-agenda.el +++ b/lisp/org-agenda.el @@ -4681,6 +4681,7 @@ The prefix arg TODO-ONLY limits the search to TODO en= tries." 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)) =2D-=20 2.11.0 --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable =2D-=20 Konubinix GPG Key : 7439106A Fingerprint: 5993 BE7A DA65 E2D9 06CE 5C36 75D2 3CED 7439 106A --=-=-=-- --==-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEWZO+etpl4tkGzlw2ddI87XQ5EGoFAliAb5YACgkQddI87XQ5 EGrQHgf+NJBfjNJDRdUb2WZrjJ6PtCoGoCx6u4awPt5nbqKPWYWFDiAFA6Qj4jYT xRQq0iLB/LxJ4xeg2eFyFE0obx3kWXeId4iF+WY5vC7kLzOo/v/0lz7PWX+Rhp2t d+LSsghjnKNEcMLRWrvBFpfL5dGc/JWEzOLDmQwephHWIefGLAvmThVooiwdzW+r FTyg/0qgQrH2m/iIwA2RMQe578bnf/bYaCaXZx92mRT17A+6fP1huotcsJtDvFad Y5XhegFMWkIcs2tB3aAVmO+a/4cpKMOh17SpN3Z7OKEwaKypdBAHHep2W+bt+hIj yGJCbCS8wXJbcZqdXwDZ1z1K1HuSQw== =HW4d -----END PGP SIGNATURE----- --==-=-=--