emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Carsten Dominik <dominik@science.uva.nl>
To: "François Lagarde" <firstname.lastname@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: remember handling.
Date: Mon, 23 Apr 2007 21:14:45 +0200	[thread overview]
Message-ID: <cebfc04a37528bbbf7996990e5b0a596@science.uva.nl> (raw)
In-Reply-To: <87fy7jck2h.fsf@is003308.saclay.cea.fr>

I guess an `org-occur' sparse tree searching for the file name
in a link might do the trick, like the following command
(untested).

(defun my-links-to-this-file ()
   "Find links to the current file in ~/org/notes.org."
   (interactive)
   (let ((file (file-name-nondirectory (buffer-file-name))))
     (find-file-other-window "~/org/notes.org")
     (org-occur (concat "\\[\\[file:.*?"
                        (regexp-quote file)
                        ".*?\\]\\]"))))

(define-key global-map [(f11)] 'my-links-to-this-file)

This only looks for the file name and does not pay attention to the
directory, so if you have several files with the same name, this
will have to become more complicated.  Also, I am using explicitly
the file ~/org/notes.org as the place to look for links, this
you have to modify as well.  Really just a proof of concept,
But maybe something to start from?

- Carsten

On Apr 2, 2007, at 9:27, François Lagarde wrote:

> I really enjoy using org for a lot of things.
>
> I also use remember, which provides me an easy way to create quick 
> notes,
> especially when i am working on a file.
>
> My question is, if (and how) would be possible to find quickly (I mean
> with a keyboard shortcut) all the notes belonging to the current 
> buffer.
>
> Thanks,
>
> -- 
> François Lagarde
>



--
Carsten Dominik
Sterrenkundig Instituut "Anton Pannekoek"
Universiteit van Amsterdam
Kruislaan 403
NL-1098SJ Amsterdam
phone: +31 20 525 7477

      reply	other threads:[~2007-04-23 19:20 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-04-02  7:27 remember handling François Lagarde
2007-04-23 19:14 ` Carsten Dominik [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cebfc04a37528bbbf7996990e5b0a596@science.uva.nl \
    --to=dominik@science.uva.nl \
    --cc=emacs-orgmode@gnu.org \
    --cc=firstname.lastname@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).