emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Faster version of org-find-olp


From: Eric Abrahamsen
Subject: Re: Faster version of org-find-olp
Date: Mon, 10 Feb 2020 10:32:05 -0800
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Bastien <address@hidden> writes:

> Hi Eric,
>
> Eric Abrahamsen <address@hidden> writes:
>
>> I ended up writing a function on top of that that does find-or-create,
>> so you can go to a certain outline path, creating and inserting
>> (optionally in sorted order) the missing segments as you go. It was
>> fairly difficult to get right, so perhaps it will be of use to someone,
>> or appropriate for Worg or even Org proper:
>>
>> https://github.com/girzel/timesheet.el/blob/master/timesheet.el#L250
>
> thanks for this - don't hesitate to reference it somewhere on Worg if
> you think that's useful.
>
> If you think this should go to Org's core, please make a patch and
> tell what's the difference with your patch and how to test it to make
> sure we really understand the issue at stake.  I don't have any issue
> with the current implementation of `org-find-olp' so I cannot really
> know.

It isn't a replacement for `org-find-olp'! It's just built on top of it.
`org-find-olp' signals an error if the full path isn't found. My
function looks for that error and creates the missing segments of the
path. If `org-find-olp' is the equivalent of "cd" in the shell, this
function is like "mkdir -p", plus the "cd" afterwards. It's nice for
programmatically creating outline structures (ie can be used to create
date trees and the like).

I guess I think worg is sufficient -- it's a nice utility, but perhaps
not necessary for core.

Eric



reply via email to

[Prev in Thread] Current Thread [Next in Thread]