From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nathan Neff Subject: Re: Configure Helm Source from org-tags-view Date: Thu, 8 Aug 2019 15:03:50 -0500 Message-ID: References: <20190808191313.GW23122@protected.rcdrun.com> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000902e44058fa08fef" Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:56393) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hvodx-00083N-VZ for emacs-orgmode@gnu.org; Thu, 08 Aug 2019 16:04:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hvodw-0001rG-M4 for emacs-orgmode@gnu.org; Thu, 08 Aug 2019 16:04:13 -0400 Received: from mail-ot1-x332.google.com ([2607:f8b0:4864:20::332]:45876) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hvodw-0001q7-Dw for emacs-orgmode@gnu.org; Thu, 08 Aug 2019 16:04:12 -0400 Received: by mail-ot1-x332.google.com with SMTP id x21so30349480otq.12 for ; Thu, 08 Aug 2019 13:04:12 -0700 (PDT) In-Reply-To: <20190808191313.GW23122@protected.rcdrun.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" To: Jean Louis Cc: emacs-orgmode --000000000000902e44058fa08fef Content-Type: text/plain; charset="UTF-8" Hi Jean, Thank you - however, I can't get this function to return anything. org-scan-tags accepts an action, a matcher and a todo-only. Code: (org-scan-tags 'agenda ;; Action '(staff lambda (todo tags-list level) ;; Matcher (progn (setq org-cached-props nil) (or (and (member staff tags-list))))) ;; End Matcher org--matcher-tags-todo-only) ;; Todo-only * To my knowledge, the 'agenda is the action, and the list starting with `(staff ) is the matcher. * Why does the tag I'm searching for ("staff") appear as the first "atom" in the "matcher" parameter? Why isn't it just a lambda? * I don't quite understand what the "or" and "and" are doing. It seems like I don't need either of them. My org-agenda-files contains files and I have a headline with the tag "staff" - no quotes, and the function's not returning anything. Thanks, --Nate On Thu, Aug 8, 2019 at 2:13 PM Jean Louis wrote: > * Nathan Neff [2019-08-08 18:50]: > > Hello all, > > > > Has anyone created a Helm source from the results of org-agenda? > > > > Specifically org-tags-view I think would be a cool Helm source to > > configure where the headings that have certain tags could be displayed > > by Helm. > > > > I looked @ the code for org-tags-view and it's fairly straight > > forward - however, I think that the function itself is tightly > > coupled between finding the results and displaying the results. In > > other words, there's no easy function that I see which would provide > > headings that match a tags search that I could use as a Helm source. > > If tag is 'staff, this below will give structure out: > > (org-scan-tags 'agenda '(staff lambda (todo tags-list level) (progn > (setq org-cached-props nil) (or (and (member staff tags-list))))) > org--matcher-tags-todo-only) > > Now `org-scan-tags` could be inspected if it constructs some lists, > alist, that are somewhat nicer than such output. > > But that output can be converted to HELM completion. > > Jean > --000000000000902e44058fa08fef Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi Jean,

Thank you - however= , I can't get this function to return anything.

org-scan-tags accepts an action, a matcher and a todo-only.
Code:

(org-scan-tags 'agenda = ;; Action
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= '(staff lambda (todo tags-list level)=C2=A0 ;; Matcher
= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (progn
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0 (setq org-cached-props nil)
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (or (and (member staff tags-list))))) ;; End= Matcher
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 org--matcher-tags-todo-only) ;; Todo-only

* To= my knowledge, the 'agenda is the action, and the list starting with
`(staff <snip>) is the matcher.=C2=A0
* Why do= es the tag I'm searching for ("staff") appear as the first &q= uot;atom" in the
"matcher" parameter?=C2=A0 W= hy isn't it just a lambda?
* I don't quite understand= what the "or" and "and" are doing.=C2=A0 It seems like=
I don't need either of them.

My org-agen= da-files contains files and I have a headline with the tag "staff"= ;
- no quotes, and the function's not returning anything.

Thanks,
--Nate


On Thu, Aug 8, 2019 at 2:13 PM Jean Louis <bugs@gnu.support> w= rote:
* Nathan N= eff <nathan.n= eff@gmail.com> [2019-08-08 18:50]:
> Hello all,
>
> Has anyone created a Helm source from the results of org-agenda?
>
> Specifically org-tags-view I think would be a cool Helm source to
> configure where the headings that have certain tags could be displayed=
> by Helm.
>
> I looked @ the code for org-tags-view and it's fairly straight
> forward - however, I think that the function itself is tightly
> coupled between finding the results and displaying the results.=C2=A0 = In
> other words, there's no easy function that I see which would provi= de
> headings that match a tags search that I could use as a Helm source.
If tag is 'staff, this below will give structure out:

(org-scan-tags 'agenda '(staff lambda (todo tags-list level) (progn=
(setq org-cached-props nil) (or (and (member staff tags-list)))))
org--matcher-tags-todo-only)

Now `org-scan-tags` could be inspected if it constructs some lists,
alist, that are somewhat nicer than such output.

But that output can be converted to HELM completion.

Jean
--000000000000902e44058fa08fef--