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:46:19 -0500 Message-ID: References: <20190808191313.GW23122@protected.rcdrun.com> <20190808203051.GP23122@protected.rcdrun.com> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000760697058fa12714" Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:34454) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hvpJ2-0003O6-Ja for emacs-orgmode@gnu.org; Thu, 08 Aug 2019 16:46:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hvpJ1-0002SB-Ch for emacs-orgmode@gnu.org; Thu, 08 Aug 2019 16:46:40 -0400 Received: from mail-ot1-x32b.google.com ([2607:f8b0:4864:20::32b]:33397) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hvpJ1-0002Rx-6x for emacs-orgmode@gnu.org; Thu, 08 Aug 2019 16:46:39 -0400 Received: by mail-ot1-x32b.google.com with SMTP id q20so123988906otl.0 for ; Thu, 08 Aug 2019 13:46:39 -0700 (PDT) In-Reply-To: <20190808203051.GP23122@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 --000000000000760697058fa12714 Content-Type: text/plain; charset="UTF-8" Hi Jean Louis, Thank you for your time and advice - I am trying to spend time learning Elisp and more of the underpinnings in org-mode - so your advice was very helpful. In fact, I found that org-scan-tags is called by org-map-entries - org-map-entries can specify a SCOPE of 'agenda (not the same as the 'agenda that's provided to org-scan tags). So, I got the code down to a one-liner! ;; This searches all agenda-files and returns a bunch of ;; stuff that I can re-use in Helm (org-map-entries 'agenda "bkm" 'agenda) As an aside: When I run this in org-babel, it gives me a table with two cells: | foo: Foo.org :bkm: | inbox: Formatting Strings :bkm:emacs: | Why doesn't this table have two *rows* instead of two *cells*? If anyone knows the fix for this, I'd appreciate it. It probably has something to do with the type of data that's returned by the function, but I'll look into it later. Thanks, --Nate Thanks for your help, --Nate On Thu, Aug 8, 2019 at 3:30 PM Jean Louis wrote: > * Nathan Neff [2019-08-08 22:24]: > > I removed the staff from the beginning of the function call, and changed > > staff to bar I also removed the (or (and)) conditions :-) > > > > Now, I need to see how to make this function search all agenda files - it > > seems > > to work only on the headlines in Foo.org > > I am glad that it works somehow for you. > > I would not like that type of abuse on myself... > > I would just do this: > > M-x helm-occur > > :staff > > and it would be enough. > --000000000000760697058fa12714 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi Jean Louis,

<= div>Thank you for your time and advice - I am trying to spend time
learning Elisp and more of the underpinnings in org-mode - so your
<= div>advice was very helpful.

In fact, I found that= org-scan-tags is called by org-map-entries -
org-map-entries can= specify a SCOPE of 'agenda (not the same
as the 'agenda = that's provided to org-scan tags).

So, I = got the code down to a one-liner!

;; This searches= all agenda-files and returns a bunch of
;; stuff that I can re-u= se in Helm
(org-map-entries 'agenda "bkm" '= agenda)

As an aside:
When I run thi= s in org-babel, it gives me a table with two cells:
| foo: = =C2=A0 =C2=A0 =C2=A0 =C2=A0Foo.org =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 :bkm: | inbox: =C2=A0 =C2=A0 =C2=A0Formatting Strings =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0:bkm:emacs: |=

Why doesn't this table have two *rows* in= stead of two *cells*?
If anyone knows the fix for this, I'd a= ppreciate it.=C2=A0 It probably has something to do with the type
of data that's returned by the function, but I'll look into it lat= er.

Thanks,
--Nate



Thanks for your help,
--Nat= e





On T= hu, Aug 8, 2019 at 3:30 PM Jean Louis <bugs@gnu.support> wrote:
* Nathan Neff <nathan.neff@gmail.c= om> [2019-08-08 22:24]:
> I removed the staff from the beginning of the function call, and chang= ed
> staff to bar=C2=A0 I also removed the (or (and)) conditions :-)
>
> Now, I need to see how to make this function search all agenda files -= it
> seems
> to work only on the headlines in Foo.org

I am glad that it works somehow for you.

I would not like that type of abuse on myself...

I would just do this:

M-x helm-occur

:staff

and it would be enough.
--000000000000760697058fa12714--