emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Links to BibTeX data files
@ 2006-04-20 21:08 David Chadd
  2006-04-27  8:28 ` Carsten Dominik
  0 siblings, 1 reply; 2+ messages in thread
From: David Chadd @ 2006-04-20 21:08 UTC (permalink / raw)
  To: emacs-orgmode

This was mentioned recently --- the links to .bib files really don't
work very well (for me, anyway...).  If I want to link to the
following entry in the .bib file:

@Book{wright:sociophilological,
  author =    {Wright, Roger},
  title =        {A Sociophilological Study of Late Latin},
  publisher =    {Brepols},
  year =         2002,
  address =   {Turnhout},
  number =    5,
  series =    {Utrecht Studies in Medieval Literacy},
}

assuming point is in the top line I will get this link:

[[file:~/path/to/file.bib::Book%20wright%20sociophilological]]

This doesn't find the entry.  The situation is worse if point is in
other lines of the entry ('year 2002' is not likely to be very
helpful!).  Nor is the use of the line-number if (like me) you keep
your .bib files sorted.

I have patched org-store-link so that, if a file is in bibtex-mode and
I am somewhere between the outer enclosing braces of an entry, then it
is the corresponding BibTeX key which is used (so, with the current
example, that would mean '...bib::wright:sociophililogical').  This
does what I want, which is to enable me to make notes on reading and
references in my org file.  Of course, the author of the wonderful
RefTeX will make a much better job of this than my Horrible Hack, and
probably include some other goodies too ;-)

David
-- 
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Professor David Chadd
Faculty of Arts & Humanities,
University of East Anglia, Norwich NR4 7TJ, UK
d [dot] chadd [at] uea [dot] ac [dot] uk
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Links to BibTeX data files
  2006-04-20 21:08 Links to BibTeX data files David Chadd
@ 2006-04-27  8:28 ` Carsten Dominik
  0 siblings, 0 replies; 2+ messages in thread
From: Carsten Dominik @ 2006-04-27  8:28 UTC (permalink / raw)
  To: d.chadd; +Cc: emacs-orgmode


On Apr 20, 2006, at 23:08, David Chadd wrote:

> This was mentioned recently --- the links to .bib files really don't
> work very well (for me, anyway...).  If I want to link to the
> following entry in the .bib file:
>
> @Book{wright:sociophilological,
>
> assuming point is in the top line I will get this link:
>
> [[file:~/path/to/file.bib::Book%20wright%20sociophilological]]
>
> This doesn't find the entry.

This was a bug in the function executing the search, which is fixed in 
4.27.  This does now work out if the box, so you can use the standard 
links if the line is in the "@entrytype{key," line.  However, you are 
right that it is much better to always link to the key even if the 
cursor is not in the line.

> Of course, the author of the wonderful
> RefTeX will make a much better job of this than my Horrible Hack, and
> probably include some other goodies too ;-)

Appealing to my vanity as a strategy to get me to work?  It works :-)

In org.el 4.27, C-c l does link to the correct key no matter where the 
cursor is.  It also creates a nice descriptive text for the article, 
using author names, year and the first few title words.

For this stuff to work smoothly, BibTeX files should be preselected to 
be visited by Emacs and not another application when visited through an 
org-mode link.  This is so by default now, but if you have customized 
the variable `org-file-apps', you are overruling this change.

- Carsten

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2006-04-27  8:28 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-04-20 21:08 Links to BibTeX data files David Chadd
2006-04-27  8:28 ` Carsten Dominik

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).