From: Matt Lundin <mdl@imapmail.org>
To: Org Mode <emacs-orgmode@gnu.org>
Subject: [PATCH 2/2] Allow user to choose whether to treat headline as title
Date: Fri, 29 Apr 2011 21:15:12 -0400 [thread overview]
Message-ID: <87mxj8ilgl.fsf@fastmail.fm> (raw)
* lisp/org-bibtex.el (org-bibtex-treat-headline-as-title): New
variable
(org-bibtex-fleshout): Query for title depending on value of
org-bibtex-treat-headline-as-title
---
Some users might want to modify the headings of their bibtex entries,
adding authors, etc. In this case, the heading should not be assumed to
be the title.
lisp/org-bibtex.el | 12 +++++++++++-
1 files changed, 11 insertions(+), 1 deletions(-)
diff --git a/lisp/org-bibtex.el b/lisp/org-bibtex.el
index fcb25ca..b3d151c 100644
--- a/lisp/org-bibtex.el
+++ b/lisp/org-bibtex.el
@@ -223,6 +223,14 @@ For example setting to 'BIB_' would allow interoperability with fireforg."
:group 'org-bibtex
:type 'string)
+(defcustom org-bibtex-treat-headline-as-title t
+ "Treat headline text as title if title property is absent.
+If an entry is missing a title property, use the headline text as
+the property. If this value is t, `org-bibtex-check` will ignore
+a missing title field."
+ :group 'org-bibtex
+ :type 'string)
+
(defcustom org-bibtex-export-arbitrary-fields nil
"When converting to bibtex allow fields not defined in `org-bibtex-fields'.
This only has effect if org-bibtex-prefix is defined, so as to
@@ -329,7 +337,9 @@ With optional argument OPTIONAL, also prompt for optional fields."
(keyword (name) (intern (concat ":" (downcase name))))
(name (keyword) (upcase (substring (symbol-name keyword) 1))))
(dolist (field (append
- (remove :title (val :required (val type org-bibtex-types)))
+ (if org-bibtex-treat-headline-as-title
+ (remove :title (val :required (val type org-bibtex-types)))
+ (val :required (val type org-bibtex-types)))
(when optional (val :optional (val type org-bibtex-types)))))
(when (consp field) ; or'd pair of fields e.g., (:editor :author)
(let ((present (first (remove nil
--
1.7.5
reply other threads:[~2011-04-30 1:20 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87mxj8ilgl.fsf@fastmail.fm \
--to=mdl@imapmail.org \
--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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.