emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Sebastian Boehm <sebastian@sometimesfood.org>
To: emacs-orgmode@gnu.org
Subject: [PATCH] org.el: Respect user-defined reftex-cite-format
Date: Fri, 16 Sep 2016 10:22:12 +0200	[thread overview]
Message-ID: <CAH4qiVdPB4u-_yDkXvYUPU701=JRFhVay2sXRgLvfPgXyR-tFw@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 480 bytes --]

Hi Org mode team,

I would like to propose changing org-reftex-citation to respect
pre-existing bindings for reftex-cite-format.

This change would make org-reftex-citation easier to use in situations
where "\cite{$BIBTEX_KEY}" is not the appropriate citation format.

Please let me know if I should make any changes to the attached patch
to meet your criteria for inclusion. (It would be great if you could
CC me on replies, since I am not on the mailing list.)

Best,
Sebastian

[-- Attachment #2: 0001-org.el-Respect-user-defined-reftex-cite-format.patch --]
[-- Type: application/octet-stream, Size: 971 bytes --]

From ecdd9bacd64322a03fd6fb19d1ed211380845c2d Mon Sep 17 00:00:00 2001
From: Sebastian Boehm <sebastian@sometimesfood.org>
Date: Thu, 15 Sep 2016 21:23:21 +0200
Subject: [PATCH] org.el: Respect user-defined reftex-cite-format

* lisp/org.el (org-reftex-citation): Respect user-defined reftex
  citation formats.
---
 lisp/org.el | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/lisp/org.el b/lisp/org.el
index a3b3b01..f14594c 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -23713,7 +23713,9 @@ Export of such citations to both LaTeX and HTML is handled by the contributed
 package ox-bibtex by Taru Karttunen."
   (interactive)
   (let ((reftex-docstruct-symbol 'org--rds)
-	(reftex-cite-format "\\cite{%l}")
+	(reftex-cite-format (if (boundp 'reftex-cite-format)
+                                reftex-cite-format
+                              "\\cite{%l}"))
 	org--rds bib)
     (org-with-wide-buffer
      (let ((case-fold-search t)
-- 
2.9.2


             reply	other threads:[~2016-09-16  8:22 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-16  8:22 Sebastian Boehm [this message]
2016-09-17  8:30 ` [PATCH] org.el: Respect user-defined reftex-cite-format Nicolas Goaziou
2016-09-17  9:01   ` Sebastian Boehm

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='CAH4qiVdPB4u-_yDkXvYUPU701=JRFhVay2sXRgLvfPgXyR-tFw@mail.gmail.com' \
    --to=sebastian@sometimesfood.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 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).