From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Dokos Subject: Re: Hyphens for tags, todo keywords, and properties Date: Sun, 05 Feb 2012 15:36:46 -0500 Message-ID: <10376.1328474206@alphaville> References: <7691.1328425759@alphaville> <8739apcpz1.fsf@norang.ca> Reply-To: nicholas.dokos@hp.com Return-path: Received: from eggs.gnu.org ([140.186.70.92]:44021) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ru8pa-00039U-4W for emacs-orgmode@gnu.org; Sun, 05 Feb 2012 15:37:02 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ru8pY-0000Gs-Qe for emacs-orgmode@gnu.org; Sun, 05 Feb 2012 15:37:02 -0500 Received: from g1t0026.austin.hp.com ([15.216.28.33]:40450) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ru8pY-0000G0-GW for emacs-orgmode@gnu.org; Sun, 05 Feb 2012 15:37:00 -0500 In-Reply-To: Message from Samuel Wales of "Sun, 05 Feb 2012 09:23:39 MST." 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: Samuel Wales Cc: Bernt Hansen , nicholas.dokos@hp.com, emacs-orgmode@gnu.org Samuel Wales wrote: > On 2012-02-05, Bernt Hansen wrote: > > Nick Dokos writes: > >> I suspect that this is going to be difficult, if not impossible. > >> In particular, tags and properties search uses - as a metacharacter, > >> so having it appear as part of a tag or property would probably > >> break things there. > > > > How is tag filtering where you remove a tag with '-TAG' going to > > distinguish between a tag with a - and tag you want to remove? > > > > (tags-todo "-WAITING-CANCELLED/!NEXT" > > > > is that one tag to remove - WAITING-CANCELLED or is it two (-WAITING and > > -CANCELLED)? > > With \\- in the middle, it should be one. > [NB: gut feeling, unsupported by actual evidence.] The trouble is that org in general does not have an escaping mechanism (something that causes problems in various places). I'm willing to bet that there is no such escaping mechanism i tags/properties searching e.g. To add an escaping mechanism would require, at the very least, some (probably substantial) number of regexps to be rewritten in order to deal with escapes, with all the collateral damage that that would entail: at this point, that's probably a cure that's worse than the disease. It might be that ngz's parser might have an escape mechanism already built-in (my guess is that it probably does not however) or it might be possible to graft one in without doing too much violence to it. But I'd guess that trying to do something like this on the existing code base would be ... difficult. Nick