mirror of
https://git.savannah.gnu.org/git/emacs/org-mode.git
synced 2024-11-25 07:27:57 +00:00
org-bibtex-headline-format-function: Factor out lambda default value
* lisp/ol-bibtex.el (org-bibtex-headline-format-default): New function to be used as the default value of `org-bibtex-headline-format-function'. (org-bibtex-headline-format-function): Update the default value. Link: https://orgmode.org/list/87edl71tyu.fsf@localhost
This commit is contained in:
parent
39de4a1848
commit
ac0042184e
@ -266,7 +266,7 @@ a missing title field."
|
||||
:type 'boolean)
|
||||
|
||||
(defcustom org-bibtex-headline-format-function
|
||||
(lambda (entry) (cdr (assq :title entry)))
|
||||
#'org-bibtex-headline-format-default
|
||||
"Function returning the headline text for `org-bibtex-write'.
|
||||
It should take a single argument, the bibtex entry (an alist as
|
||||
returned by `org-bibtex-read'). The default value simply returns
|
||||
@ -636,6 +636,10 @@ With prefix argument OPTIONAL also prompt for optional fields."
|
||||
With prefix argument OPTIONAL also prompt for optional fields."
|
||||
(interactive) (org-map-entries (lambda () (org-bibtex-check optional))))
|
||||
|
||||
(defun org-bibtex-headline-format-default (entry)
|
||||
"Return headline text according to ENTRY title."
|
||||
(cdr (assq :title entry)))
|
||||
|
||||
(defun org-bibtex-create (&optional arg nonew)
|
||||
"Create a new entry at the given level.
|
||||
With a prefix arg, query for optional fields as well.
|
||||
|
Loading…
Reference in New Issue
Block a user