all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Gustav Wikström" <gustav@whil.se>
To: Kyle Meyer <kyle@kyleam.com>, Viktor Rosenfeld <v.rosenfeld@gmx.de>
Cc: "emacs-orgmode@gnu.org" <emacs-orgmode@gnu.org>
Subject: Re: org-agenda-filter-by-tag-refine defaults to exclude
Date: Thu, 28 Jan 2016 08:27:19 +0000	[thread overview]
Message-ID: <DB5PR02MB119170059AB8DECA3150440ADADA0@DB5PR02MB1191.eurprd02.prod.outlook.com> (raw)
In-Reply-To: <87a8obl3r7.fsf@kyleam.com>

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 identical 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-by-tag-refine (bound to backslash (\) ) function. As of now, using the function to exclude tags in the agenda provides a direct access to that functionality, instead of calling org-agenda-filter-by-tag (bound to slash (/) ) plus 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 org-agenda-filter-by-tag-refine to org-agenda-filter-by-tag-exclude and to leave the code within the function as is (well.. maybe change 'refine to 'exclude with the same argument as to the function name change).

Best Regards
Gustav

-----Original Message-----
From: Kyle Meyer [mailto:kyle@kyleam.com] 
Sent: Tuesday, January 12, 2016 07:19
To: Viktor Rosenfeld <v.rosenfeld@gmx.de>
Cc: emacs-orgmode@gnu.org; Gustav Wikström <gustav@whil.se>
Subject: Re: org-agenda-filter-by-tag-refine defaults to exclude

Hi Viktor,

Viktor Rosenfeld <v.rosenfeld@gmx.de> writes:

> Hi,
>
> I noticed that org-agenda-filter-by-tag-refine started to exclude 
> selected tags by default recently because the 'refine in the call to 
> 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 
> org-agenda-filter-by-tag can filter on multiple tags as well if called 
> multiple times (that used not to be the case earlier).  So maybe it 
> 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 
> 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

  reply	other threads:[~2016-01-28  8:41 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-05  7:42 org-agenda-filter-by-tag-refine defaults to exclude Viktor Rosenfeld
2016-01-12  6:18 ` Kyle Meyer
2016-01-28  8:27   ` Gustav Wikström [this message]
2016-01-29 23:07     ` Viktor Rosenfeld
2016-01-31 18:50       ` Gustav Wikström
2016-01-30  0:57     ` Kyle Meyer

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=DB5PR02MB119170059AB8DECA3150440ADADA0@DB5PR02MB1191.eurprd02.prod.outlook.com \
    --to=gustav@whil.se \
    --cc=emacs-orgmode@gnu.org \
    --cc=kyle@kyleam.com \
    --cc=v.rosenfeld@gmx.de \
    /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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.