From: "I.S." <inquisitive.scientist@gmail.com>
To: emacs-orgmode@gnu.org
Subject: confusion with file search with org-links
Date: Thu, 11 Nov 2010 10:58:34 -0500 [thread overview]
Message-ID: <4CDC12AA.6080104@gmail.com> (raw)
Dear Experts,
I am a little confused about how file links are supposed to work in orgmode.
I have a link like [[file:/tmp/bug.bib::a bug][blah]] linking to a
BiBTeX file but when I try to follow it via C-c C-o it just goes to the
top of the file. Interestingly, when I open the file and set it to be in
text mode and then follow the link, org puts me to the proper place in
the file.
I suspect that org-mode is getting confused with the file search feature
when it opens a BiBTeX file.
Why do I care? I'd like to be able to use a function like the one below
to link to bib items:
(defun store-bibtex-link ()
"Make link to a bibtex entry.
Calling this function inside a BiBTeX entry will create a link to that
entry and store it so you can extract it via C-c C-l. This is useful
for making links to BiBTeX items from your org files.
"
(interactive)
(let* ((title (bibtex-autokey-get-field "title"))
(myfile (buffer-file-name))
(mylink (format "file:%s::%s" myfile title))
)
(setq org-stored-links (cons (list mylink title) org-stored-links))
(message "Stored: %s" (or title mylink))
))
An example of the bug.bib illustrating the problem is shown below
% start bug.bib
% foo
% bar
@article{me98,
title={a bug},
author={me},
journal={it},
year=1998,
}
%blah
--
Thanks,
-I.S.
next reply other threads:[~2010-11-11 15:58 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-11 15:58 I.S. [this message]
2010-11-11 16:09 ` confusion with file search with org-links Carsten Dominik
2010-11-15 18:07 ` I.S.
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=4CDC12AA.6080104@gmail.com \
--to=inquisitive.scientist@gmail.com \
--cc=emacs-orgmode@gnu.org \
/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).