emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [PATCH] org.el: Respect user-defined reftex-cite-format
@ 2016-09-16  8:22 Sebastian Boehm
  2016-09-17  8:30 ` Nicolas Goaziou
  0 siblings, 1 reply; 3+ messages in thread
From: Sebastian Boehm @ 2016-09-16  8:22 UTC (permalink / raw)
  To: emacs-orgmode

[-- 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


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] org.el: Respect user-defined reftex-cite-format
  2016-09-16  8:22 [PATCH] org.el: Respect user-defined reftex-cite-format Sebastian Boehm
@ 2016-09-17  8:30 ` Nicolas Goaziou
  2016-09-17  9:01   ` Sebastian Boehm
  0 siblings, 1 reply; 3+ messages in thread
From: Nicolas Goaziou @ 2016-09-17  8:30 UTC (permalink / raw)
  To: Sebastian Boehm; +Cc: emacs-orgmode

Hello,

Sebastian Boehm <sebastian@sometimesfood.org> writes:

> 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.

Thank you.

I applied a slightly different patch. Could you confirm that it meets
your expectations?


Regards,

-- 
Nicolas Goaziou

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] org.el: Respect user-defined reftex-cite-format
  2016-09-17  8:30 ` Nicolas Goaziou
@ 2016-09-17  9:01   ` Sebastian Boehm
  0 siblings, 0 replies; 3+ messages in thread
From: Sebastian Boehm @ 2016-09-17  9:01 UTC (permalink / raw)
  To: emacs-orgmode

Hi Nicolas,

On 17 September 2016 at 10:30, Nicolas Goaziou <mail@nicolasgoaziou.fr> wrote:
> I applied a slightly different patch. Could you confirm that it meets
> your expectations?

thank you. Your patch is much nicer than mine and works just great.

Thanks!
Sebastian

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-09-17  9:01 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-16  8:22 [PATCH] org.el: Respect user-defined reftex-cite-format Sebastian Boehm
2016-09-17  8:30 ` Nicolas Goaziou
2016-09-17  9:01   ` Sebastian Boehm

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).