* Refile cache expire
@ 2011-02-27 7:34 Tom
2011-02-27 7:57 ` Tom
2011-03-06 0:26 ` Bastien
0 siblings, 2 replies; 9+ messages in thread
From: Tom @ 2011-02-27 7:34 UTC (permalink / raw)
To: emacs-orgmode
Caching of refile targets is great, however, I usually have my
computer and emacs running for several days (I use hibernation),
so sometimes I need to clear the cache manually to have it rebuilt.
How about adding an option to set an expiration time for the refile
cache after which it is cleared automatically and rebuilt again?
For example, I could set the cache to expire after and hour (or a day,
etc.) and then it would be cleared and rebuilt automatically, but only
when the computer is idle for, say, 5 seconds. This way one could have
a pretty up-to-date refile cache all the time and the rebuilding
would happen when emacs is idle, so the use wouldn't even have to
notice the updating process.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Refile cache expire
2011-02-27 7:34 Refile cache expire Tom
@ 2011-02-27 7:57 ` Tom
2011-02-27 19:55 ` Samuel Wales
2011-03-06 0:26 ` Bastien
1 sibling, 1 reply; 9+ messages in thread
From: Tom @ 2011-02-27 7:57 UTC (permalink / raw)
To: emacs-orgmode
Tom <adatgyujto <at> gmail.com> writes:
> when the computer is idle for, say, 5 seconds.
I meant 5 minutes, of course.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Re: Refile cache expire
2011-02-27 7:57 ` Tom
@ 2011-02-27 19:55 ` Samuel Wales
2011-02-27 20:09 ` Tom
0 siblings, 1 reply; 9+ messages in thread
From: Samuel Wales @ 2011-02-27 19:55 UTC (permalink / raw)
To: Tom; +Cc: emacs-orgmode
I'd find automatic regeneration useful.
Another way:
********* [#A] make failed refile reload the cache automatically
You usually want the existing choices for selecting a
headline. You don't need to regenerate those. Just the
target locations.
So ideally you would just immediately select it, and if hte
target location is bad, it will regenerate for you and
refile to the correct location for you.
Samuel
--
The Kafka Pandemic:
http://thekafkapandemic.blogspot.com/2010/12/welcome-to-kafka-pandemic-two-forces_9182.html
I support the Whittemore-Peterson Institute (WPI)
===
I want to see the original (pre-hold) Lo et al. 2010 NIH/FDA/Harvard MLV paper.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Refile cache expire
2011-02-27 19:55 ` Samuel Wales
@ 2011-02-27 20:09 ` Tom
2011-02-27 20:14 ` Samuel Wales
0 siblings, 1 reply; 9+ messages in thread
From: Tom @ 2011-02-27 20:09 UTC (permalink / raw)
To: emacs-orgmode
Samuel Wales <samologist <at> gmail.com> writes:
>
> I'd find automatic regeneration useful.
>
> Another way:
>
> ********* [#A] make failed refile reload the cache automatically
> You usually want the existing choices for selecting a
> headline. You don't need to regenerate those. Just the
> target locations.
>
This wouldn't work in my case, because actual refiling is not
what I'm interested in. I use the GOTO interface of refile
to jump to to any heading in my org system, so the main point
for me is having an up-to-date cache of all existing headings,
so I can jump to them easily with completion.
And because I create new headings all the time, it's important
to have a fairly up-to-date cache.
(BTW, for those who doesn't use refile for goto I recommend
checking it out, because it's an awesome way to traverse your
org empire.)
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Re: Refile cache expire
2011-02-27 20:09 ` Tom
@ 2011-02-27 20:14 ` Samuel Wales
2011-02-27 20:15 ` Samuel Wales
0 siblings, 1 reply; 9+ messages in thread
From: Samuel Wales @ 2011-02-27 20:14 UTC (permalink / raw)
To: Tom; +Cc: emacs-orgmode
I think my suggestion works for refile goto.
However, if you add headlines all the time, you will need your
suggestion with ido.
--
The Kafka Pandemic:
http://thekafkapandemic.blogspot.com/2010/12/welcome-to-kafka-pandemic-two-forces_9182.html
I support the Whittemore-Peterson Institute (WPI)
===
I want to see the original (pre-hold) Lo et al. 2010 NIH/FDA/Harvard MLV paper.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Re: Refile cache expire
2011-02-27 20:14 ` Samuel Wales
@ 2011-02-27 20:15 ` Samuel Wales
2011-02-27 20:28 ` Sébastien Vauban
0 siblings, 1 reply; 9+ messages in thread
From: Samuel Wales @ 2011-02-27 20:15 UTC (permalink / raw)
To: Tom; +Cc: emacs-orgmode
(And yes, refile goto is superb.)
--
The Kafka Pandemic:
http://thekafkapandemic.blogspot.com/2010/12/welcome-to-kafka-pandemic-two-forces_9182.html
I support the Whittemore-Peterson Institute (WPI)
===
I want to see the original (pre-hold) Lo et al. 2010 NIH/FDA/Harvard MLV paper.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Refile cache expire
2011-02-27 20:15 ` Samuel Wales
@ 2011-02-27 20:28 ` Sébastien Vauban
2011-02-27 21:47 ` Samuel Wales
0 siblings, 1 reply; 9+ messages in thread
From: Sébastien Vauban @ 2011-02-27 20:28 UTC (permalink / raw)
To: emacs-orgmode-mXXj517/zsQ
Hi Samuel,
Samuel Wales wrote:
> (And yes, refile goto is superb.)
Just FYI, remember it can be accessed by `C-u C-u C-c C-w' (not written in the
description of `org-refile-goto-last-stored' -- maybe because it's using
another way to do the jump than the `16' argument, that is, in this case, it
makes use of `bookmark-jump'... so maybe there are tiny subtle differences?).
Best regards,
Seb
--
Sébastien Vauban
_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode-mXXj517/zsQ@public.gmane.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Refile cache expire
2011-02-27 7:34 Refile cache expire Tom
2011-02-27 7:57 ` Tom
@ 2011-03-06 0:26 ` Bastien
1 sibling, 0 replies; 9+ messages in thread
From: Bastien @ 2011-03-06 0:26 UTC (permalink / raw)
To: Tom; +Cc: emacs-orgmode
Hi Tom,
Tom <adatgyujto@gmail.com> writes:
> How about adding an option to set an expiration time for the refile
> cache after which it is cleared automatically and rebuilt again?
How about using something like this in your .emacs.el:
#+begin_src emacs-lisp
(setq org-refile-rebuild-cache
(run-with-idle-timer 600 t
(lambda ()
(org-refile-cache-clear)
(org-refile-get-targets))))
#+end_src
Then you can cancel it with
#+begin_src emacs-lisp
(cancel-timer org-refile-rebuild-cache)
#+end_src
HTH,
--
Bastien
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2011-03-06 0:27 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-27 7:34 Refile cache expire Tom
2011-02-27 7:57 ` Tom
2011-02-27 19:55 ` Samuel Wales
2011-02-27 20:09 ` Tom
2011-02-27 20:14 ` Samuel Wales
2011-02-27 20:15 ` Samuel Wales
2011-02-27 20:28 ` Sébastien Vauban
2011-02-27 21:47 ` Samuel Wales
2011-03-06 0:26 ` Bastien
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).