emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "Eric Schulte" <schulte.eric@gmail.com>
To: "Thomas S. Dye" <tsd@tsdye.com>
Cc: Org Mode <emacs-orgmode@gnu.org>
Subject: Re: [ANN] org-bibtex.el --- convert between Org headings and bibtex entries
Date: Wed, 20 Apr 2011 13:00:34 -0600	[thread overview]
Message-ID: <87vcy81xtv.fsf@gmail.com> (raw)
In-Reply-To: 027A8D96-05AB-452C-87D3-85D90D24AFB1@tsdye.com

Hi Tom,

"Thomas S. Dye" <tsd@tsdye.com> writes:

> Hi Eric,
>
> This could be very useful and a significant enhancement to Org-mode
> for note taking.  With it, library time can be spent almost entirely
> within Org-mode, capturing bibliographic information and taking
> reading notes.  It feels like the right level of functionality--
> lightweight and easy to use, with lots of prompting material.
>

Thanks, I hope so.

>
> I created an entry with org-bibtex-create and then another with org-
> bibtex-read/write.  When I ran org-bibtex, only the second entry was
> exported.  Also, the org-bibtex-read/write process mangled the bibtex
> entry a bit, so the resulting .bib file wasn't useful.  Note the
> addition of {} around the publisher and year, and the truncation of
> multi-line entries.
>

I /believe/ I have fixed this issue.  I am now using pre-existing bibtex
functions for reading in entries, and for cleaning up entries written by
org-bibtex.

>
> Can I suggest some changes?
>
> 1) In our multi-user environment, where several authors are
> contributing to a master bibtex file, we depend on the key generating
> algorithm of bibtex-mode to help weed out duplicate entries.   This
> isn't 100% effective, but it catches lots of duplicates and saves us
> time.  Would it be possible to lift this mechanism and use it in org- 
> bibtex to generate the CUSTOM_ID?
>

I've added a new variable `org-bibtex-autogen-keys' which when set to t
will result in auto-generated keys being used instead of prompting the
user to input such keys.

>
> 2) It might be better to use the (generated) key as the Org headline,
> instead of the title.  Titles can be longer than I find comfortable
> for an Org-mode headline, whereas keys are usually about the right
> length.
>

Hmm, I would tend to disagree here, but I think it may be a matter of
taste.  Note that if you include a TITLE property in a headline then it
will be used instead of the contents of the headline, leaving you free
to put whatever information you want into the headline.  I've just
updated the headline creation so that it will create such a title
property as well as using the title as the headline, leaving you free to
subsequently change the headline.

>
> 3) org-bibtex-cite seems like a natural next step, especially if it
> offers a list of keys in the Org-mode buffer.
>

Meaning a function to allow tab-completion on keys...  I could see this
being useful but I would imagine that the bib entries would generally
not live in the same buffer as the Org-mode text... rather I'd think
some sort of global registry would be preferable.

Thanks for the suggestions, bug reports, and examples!

Please do let me know if any of these issues remain -- Eric

>
> Here are the details of my test run:
>
> Existing bibtex entry:
>
> @Book{tuggle94:_cultur_resour_naval_air_station_barber_point,
>   author =    {H. David Tuggle and M. J. Tomonari-Tuggle and
>                   D. Colt Denfeld},
>   title =        {Cultural Resources of Naval Air Station, Barbers
>                   Point: Summary, Assessment, and Inventory Research
>                   Design: Task 1b: Archaeological Research Services
>                   for the Proposed Cleanup, Disposal, and Reuse of
>                   Naval Air Station, Barbers Point, O`ahu, Hawai`i},
>   publisher =    iarii,
>   year =         1994,
>   series =    {Prepared for Belt Collins Hawaii},
>   address =   {Honolulu},
>   month =     {December}}
>
> Org-mode tree:
>
>
> * Schulte bibtex
>
> ** A journal title
>    :PROPERTIES:
>    :type:     article
>    :AUTHOR:   A. N. Author
>    :JOURNAL:  Journal of Statistical Software
>    :YEAR:     1998
>    :CUSTOM_ID: author_10:article
>    :END:
>
> ** {Cultural Resources of Naval Air Station, Barbers
>    :PROPERTIES:
>    :TYPE:     book
>    :CUSTOM_ID: tuggle94:_cultur_resour_naval_air_station_barber_point
>    :MONTH:    December}
>    :ADDRESS:  Honolulu
>    :SERIES:   Prepared for Belt Collins Hawaii
>    :YEAR:     1994
>    :PUBLISHER: iarii
>    :AUTHOR:   {H. David Tuggle and M. J. Tomonari-Tuggle and
>    :END:
>
> Org-bibtex output:
>
> @book{tuggle94:_cultur_resour_naval_air_station_barber_point,
>   author={{H. David Tuggle and M. J. Tomonari-Tuggle and},
>   title={{Cultural Resources of Naval Air Station, Barbers},
>   publisher={iarii},
>   year={1994},
>   series={Prepared for Belt Collins Hawaii},
>   address={Honolulu},
>   month={December}}
> }
>
> hth,
> Tom
>
> On Apr 19, 2011, at 1:52 PM, Eric Schulte wrote:
>
>> Hi,
>>
>> In an attempt to organize my reading notes, I've written the following
>> tool which allows both for exporting Org-mode headlines with bibtex
>> meta-data to bibtex entries, and for reading existing bibtex entries
>> into Org-mode headings.
>>
>> One nice feature of these functions is the ability to check that all
>> required fields are present in a given headline based on the bibtex
>> type
>> (e.g., :article, :inproceedings), and prompt for missing fields.
>>
>> See the top of the elisp file for more usage information.
>> https://github.com/eschulte/org-bibtex/blob/master/org-bibtex.el
>>
>> Cheers -- Eric
>>
>> -- 
>> Eric Schulte
>> http://cs.unm.edu/~eschulte/
>>
>
>

-- 
Eric Schulte
http://cs.unm.edu/~eschulte/

  parent reply	other threads:[~2011-04-20 20:18 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-19 23:52 [ANN] org-bibtex.el --- convert between Org headings and bibtex entries Eric Schulte
2011-04-20  1:01 ` Jeff Horn
2011-04-20  1:13   ` Eric Schulte
2011-04-20  7:54 ` Thomas S. Dye
2011-04-20 13:25   ` Matt Lundin
2011-04-20 14:29     ` Matt Lundin
2011-04-20 19:59     ` Eric Schulte
2011-04-20 19:00   ` Eric Schulte [this message]
2011-04-21 16:36     ` Thomas S. Dye
2011-04-21 21:06       ` Eric Schulte
2011-04-23 16:23         ` Thomas S. Dye
2011-04-23 22:59           ` Alan E. Davis
2011-04-24  0:40             ` Matt Lundin
2011-04-24 14:21               ` Eric Schulte
2011-04-24 16:53                 ` Christian Moe
2011-04-25 13:19                   ` Matt Lundin
2011-04-25 13:34                     ` Eric Schulte
2011-04-25 15:15                 ` Matt Lundin
2011-04-27 22:16                   ` Eric Schulte
2011-04-24  0:52             ` Eric Schulte
2011-04-24  4:49               ` Alan E. Davis
2011-04-24 14:29                 ` Eric Schulte
2011-04-24 20:40                   ` Alan E. Davis
2011-04-25 13:31                     ` Eric Schulte
2011-04-20  9:26 ` Christian Moe
2011-04-20 20:15   ` Eric Schulte
2011-04-20 12:10 ` Matt Lundin
2011-04-20 20:16   ` Eric Schulte
2011-04-22 14:05   ` [PATCH] " Eric Schulte
2011-04-22 15:45     ` Matt Lundin
2011-04-23  0:03       ` Matt Lundin
2011-04-23 14:07         ` Eric Schulte
2011-04-23 22:46           ` Matt Lundin

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=87vcy81xtv.fsf@gmail.com \
    --to=schulte.eric@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=tsd@tsdye.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).