>>>>> Bastien Guerry <[EMAIL PROTECTED]> writes:

> A first attempt fetching planner pages that link to the current gnus
> article at point:

> (defun my-planner-find-gnus-message ()
>   "Find the current message in planner pages."
>   (interactive)
>   (let ((id (regexp-opt (list (planner-gnus-get-message-id)))))
>     (dired planner-directory)
>     (dired-mark-files-containing-regexp id))
>   (dired-next-marked-file))

> ... fetching the current bibtex entry at point in planner pages:
    
> (defun my-planner-find-bibtex-entry ()
>   "Find the bibtex entry at point in planner pages."
>   (interactive)
>   (let ((id (regexp-opt (list (planner-bibtex-annotation-new)))))
>     (dired planner-directory)
>     (dired-mark-files-containing-regexp id))
>   (dired-next-marked-file))

I think that there should be a single general function: 

- It would take a project or list of projects as an argument, so that
  one can search projects other than the planner one.

- It would derive the annotation from context, so there would be no
  need for a separate function for each kind of annotation.

- And it would only search for the url of the annotation, since the
  description as supplied by the annotation function may have been
  subsequently edited.

Oh, I see.  The idea is to have a dired buffer with all matching files
marked.  I was imagining that a page of links would be displayed in a
buffer, perhaps with some context: rather like M-x grep but with muse
links. 

>> It could be slow searching through lots of pages. For speed you
>> could, of course, save to a separate index file an alist mapping
>> annotations to a list of pages. And have the index updated whenever
>> a planner page is saved. Then you would only actually have to search
>> through buffers modified since the last save.

> The two functions above are pretty ugly - especially because they use
> dired. We should have this functionnality from within planner, no?

> I think it would be nice to have something like the gnus *registry* -
> or the dynamically updated "index" you're mentionning.

Indeed, one could actually hoover up lots of information about pages into a
database that way.

But let us not pre-empt what the original author may have already come
up with.

-- 
Jim Ottaway


_______________________________________________
emacs-wiki-discuss mailing list
emacs-wiki-discuss@nongnu.org
http://lists.nongnu.org/mailman/listinfo/emacs-wiki-discuss

Reply via email to