From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jay Dresser Subject: Re: Is it possible to embed tag search as a link? Date: Wed, 24 Jun 2015 02:34:47 -0700 Message-ID: <87fv5hbjw0.fsf@jaydresser.us> References: <86oak6byit.fsf@example.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:35769) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z7h58-0006jT-Ax for emacs-orgmode@gnu.org; Wed, 24 Jun 2015 05:34:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z7h53-0001k2-LM for emacs-orgmode@gnu.org; Wed, 24 Jun 2015 05:34:58 -0400 Received: from mout.perfora.net ([74.208.4.194]:60024) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z7h53-0001jo-Ft for emacs-orgmode@gnu.org; Wed, 24 Jun 2015 05:34:53 -0400 In-reply-to: <86oak6byit.fsf@example.com> 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: Sebastien Vauban Cc: emacs-orgmode@gnu.org Sebastien Vauban writes: > Jay Dresser writes: >>> Piotr Isajew yahoo.com> writes: >>>> what I'm looking for is a link format that, when C-c C-o'ed, >>>> opens agenda "match query" view for custom query which arguments >>>> are specified in the link. I.e.: >>>> >>>> org-search://+work-boss-TODO="DONE" >>>> >>>> I am aware of org-protocol which can be used to develop a custom >>>> handler for something like this. I would just like to check if >>>> there exists any working solution before I start working on my >>>> own. >> >> Jay Dresser jaydresser.us> writes: >> >> I just happened to run across this which seems to better match your >> original question, to do it as a new link type: >> http://endlessparentheses.com/use-org-mode-links-for-absolutely-anything.html >> >> so you could have [[org-search:+work-boss-TODO="DONE"]] > > When I click on such a link, I have the "error": > > --8<---------------cut here---------------start------------->8--- > No match - create this as a new heading? (y or n) > --8<---------------cut here---------------end--------------->8--- > > Best regards, > Seb Did you add the elisp from the article into your .emacs? Although the article described using "tag" as the link type I displayed "org-search" since that's what the OP wanted. To get the desired effect add this to .emacs: (org-add-link-type "org-search" 'endless/follow-tag-link) (defun endless/follow-tag-link (tag) "Display a list of TODO headlines with tag TAG. With prefix argument, also display headlines without a TODO keyword." (org-tags-view (null current-prefix-arg) tag)) I for one will be using this trick a lot! -- Jay Dresser