* lisp/org-bibtex.el (org-bibtex-type-property-name): Configurable
property name for bibtex entry types.
(org-bibtex-headline): Use new configurable property name.
(org-bibtex-check): Use new configurable property name.
(org-bibtex-create): Use new configurable property name.
(org-bibtex-write): Use new configurable property name.
Also remove blank lines before the ";;; org*el ends here" declarations.
Having a "Version" header forced us to update every file when releasing a
new version of Org; it also forced us to update every file when merging Org
with Emacs trunk, thus cluttering the diffs between the previously merged
version and the new one with useless information.
Glenn Morris suggested this in emacs-devel:
http://lists.gnu.org/archive/html/emacs-devel/2011-08/msg00322.html
* lisp/org-bibtex.el (org-babel-trim): Declare this function to the
compiler.
(org-bibtex-get): Trimming whitespace off of bibtex fields read from
properties.
* org-bibtex.el (org-bibtex-headline): Don't use equalp at run-time,
compare downcased strings.
Compiler complains about using `equalp' because other than for example
`concatenate' it is not declared 'inline.
Cf. [[info:cl#Declarations]] about the 'inline declaration
...
`inline'
The `inline' DECL-SPEC lists one or more functions whose bodies
should be expanded "in-line" into calling functions whenever the
compiler is able to arrange for it. For example, the Common Lisp
function `cadr' is declared `inline' by this package so that the
form `(cadr X)' will expand directly into `(car (cdr X))' when it
is called in user functions, for a savings of one (relatively
expensive) function call.
The following declarations are all equivalent. Note that the
`defsubst' form is a convenient way to define a function and
declare it inline all at once.
(declaim (inline foo bar))
(eval-when (compile load eval) (proclaim '(inline foo bar)))
(defsubst foo (...) ...) ; instead of defun
*Please note:* this declaration remains in effect after the
containing source file is done. It is correct to use it to
request that a function you have defined should be inlined, but it
is impolite to use it to request inlining of an external function.
In Common Lisp, it is possible to use `(declare (inline ...))'
before a particular call to a function to cause just that call to
be inlined; the current byte compilers provide no way to implement
this, so `(declare (inline ...))' is currently ignored by this
package.
...
Thus other than `concatenate' `equalp' is stored as a function call at
run-time.
* lisp/org-bibtex.el: (org-bibtex-search): New function.
(org-bibtex-export-to-kill-ring): New function. Export to kill ring.
(org-bibtex-create-in-current-entry): New function
(org-bibtex-create): Make it easier to add bib fields to an
existing headline
(org-bibtex-export-arbitrary-fields)
(org-bibtex-treat-headline-as-title): Fix typos
(org-bibtex-fleshout): Don't upcase optional field; remove ":" from
type completion
This patch implements several helper functions: exporting to kill
ring, searching only for entries with bib fields, and creating bib
fields in an existing headline. It makes the UI of org-bibtex-fleshout
more consistent.
* lisp/org-bibtex.el (org-bibtex-treat-headline-as-title): New
defcustom.
(org-bibtex-headline): Only use headline text (not TODO or other
metadata) to generate title field and auto key.
(org-bibtex-fleshout): Allow user to choose whether to treat
headline as title.
* lisp/org-bibtex.el (org-bibtex-tags): New variable
(org-bibtex-tags-are-keywords): New variable
(org-bibtex-no-export-tags): New variable
(org-bibtex-headline): Export tags as comma-separated bibtex keywords
(org-bibtex-read): Import bibtex keywords field as tags
Bibtex users often rely on the keywords field to tag their entries.
With biblatex, the keywords field can be used to organize and filter
bibliographic entries. This patch adds an option to import keywords as
org-mode tags, and to export tags as bibtex keywords.
It also adds an option to add user-defined tags to newly created bib
headlines.
Thanks to Tom Dye for suggesting this functionality
* lisp/org-bibtex.el (org-bibtex-create): Adding prefix argument which
will result in prompting for optional fields.
* lisp/org-bibtex.el (org-bibtex-headline): Renamed flet function
`get' which was causing compile problems.
(org-bibtex-fleshout): Renamed flet function `get' which was causing
compile problems.
(org-bibtex-write): Renamed flet function `get' which was causing
compile problems.
Patch by Matt Lundin adding two new customization options
* lisp/org-bibtex.el (org-bibtex-export-arbitrary-fields): New option.
(org-bibtex-key-property): New option.
(org-bibtex-put): Make use of new `org-bibtex-key-property' variable.
(org-bibtex-headline): Make use of new
`org-bibtex-export-arbitrary-fields' and `org-bibtex-key-property'
variables.
(org-bibtex-autokey): Make use of new `org-bibtex-key-property'
variable.
(org-bibtex-fleshout): Make use of new `org-bibtex-key-property'
variable.
(org-bibtex-write): Make use of new `org-bibtex-key-property'
variable.
* lisp/org-bibtex.el: Updating Copyright dates, author information,
commentary and history notes.
(org-bibtex-types): List of bibtex types with descriptions and
required and optional fields.
(org-bibtex-fields): List of bibtex fields with descriptions.
(*org-bibtex-entries*): Special variable to hold parsed bibtex
entries.
(org-bibtex-autogen-keys): Custom variable controlling whether
bibtex keys are automatically generated
(org-bibtex-prefix): Custom variable allowing use of optional prefix
for bibtex properties in Org-mode headlines.
(org-bibtex-get): Helper function for accessing bibtex elements of a
property list.
(org-bibtex-put): Helper function for inserting bibtex element into
a property list.
(org-bibtex-headline): Return a bibtex entry of the given headline
as a string.
(org-bibtex-ask): Prompt the user to fill in the value of a bibtex
field.
(org-bibtex-autokey): Generate a bibtex key for the current
headline.
(org-bibtex-fleshout): Fill in missing bibtex properties of the
current headline.
(org-bibtex): Export the current Org-mode buffer to a bibtex buffer.
(org-bibtex-check): Check that all bibtex properties are present in
the current headline.
(org-bibtex-check-all): Check all headlines in the current buffer.
(org-bibtex-create): Create a new bibtex headline at the current
level.
(org-bibtex-read): Read the current bibtex entry from a bibtex file.
(org-bibtex-write): Write the most recently read bibtex entry into
an Org-mode file.