From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?iso-8859-1?Q?Gustav_Wikstr=F6m?= Subject: Re: org-agenda-filter-by-tag-refine defaults to exclude Date: Thu, 28 Jan 2016 08:27:19 +0000 Message-ID: References: <29B5D2C5-E59B-4E8D-9669-67F24C0B7C60@gmx.de> <87a8obl3r7.fsf@kyleam.com> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:58480) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aOi8u-0002az-DR for emacs-orgmode@gnu.org; Thu, 28 Jan 2016 03:41:29 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aOi8r-0007YW-6K for emacs-orgmode@gnu.org; Thu, 28 Jan 2016 03:41:28 -0500 Received: from mail-am1on0137.outbound.protection.outlook.com ([157.56.112.137]:6176 helo=emea01-am1-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aOi8q-0007YK-TE for emacs-orgmode@gnu.org; Thu, 28 Jan 2016 03:41:25 -0500 In-Reply-To: <87a8obl3r7.fsf@kyleam.com> Content-Language: en-US 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-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Kyle Meyer , Viktor Rosenfeld Cc: "emacs-orgmode@gnu.org" Hi Kyle, Viktor and the group, I'd say it's a naming-problem. What, really, is the purpose of the function= ? Because applying the proposed change essentially makes the function ident= ical to the function it calls. Right? And that function is still available = for the user, so a "refinement" can be done without the org-agenda-filter-b= y-tag-refine (bound to backslash (\) ) function. As of now, using the funct= ion to exclude tags in the agenda provides a direct access to that function= ality, instead of calling org-agenda-filter-by-tag (bound to slash (/) ) pl= us pushing the minus key (-) to switch from filter to exclude. If you want to make any change, I'd suggest to instead change the name of o= rg-agenda-filter-by-tag-refine to org-agenda-filter-by-tag-exclude and to l= eave the code within the function as is (well.. maybe change 'refine to 'ex= clude with the same argument as to the function name change). Best Regards Gustav -----Original Message----- From: Kyle Meyer [mailto:kyle@kyleam.com]=20 Sent: Tuesday, January 12, 2016 07:19 To: Viktor Rosenfeld Cc: emacs-orgmode@gnu.org; Gustav Wikstr=F6m Subject: Re: org-agenda-filter-by-tag-refine defaults to exclude Hi Viktor, Viktor Rosenfeld writes: > Hi, > > I noticed that org-agenda-filter-by-tag-refine started to exclude=20 > selected tags by default recently because the 'refine in the call to=20 > org-agenda-filter-by-tag is interpreted as an exclude flag. This seems to have been introduced by 6c6ae99 (org-agenda: Filtering in the= agenda on grouptags, 2015-01-24). > The attached patch fixes this. > > However, it seems that the function is superfluous because=20 > org-agenda-filter-by-tag can filter on multiple tags as well if called=20 > multiple times (that used not to be the case earlier). So maybe it=20 > should be deprecated and removed? I agree. Gustav, does that make sense given your changes in 6c6ae99? > diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el index=20 > d91b64d..21928de 100644 > --- a/lisp/org-agenda.el > +++ b/lisp/org-agenda.el > @@ -7580,7 +7580,7 @@ to switch between filtering and excluding." > (defun org-agenda-filter-by-tag-refine (arg &optional char) > "Refine the current filter. See `org-agenda-filter-by-tag'." > (interactive "P") > - (org-agenda-filter-by-tag arg char 'refine)) > + (org-agenda-filter-by-tag arg char)) > (defun org-agenda-filter-make-matcher (filter type &optional expand) > "Create the form that tests a line for agenda filter. Optional -- Kyle