From: John Kitchin <jkitchin@andrew.cmu.edu>
To: John Kitchin <jkitchin@andrew.cmu.edu>,
"emacs-orgmode@gnu.org" <emacs-orgmode@gnu.org>
Subject: Re: org-ref code
Date: Sun, 11 May 2014 14:48:40 -0400 [thread overview]
Message-ID: <CAJ51EToS2H8qMEKhfkr4oxbcU2AdRVxWeMQbbcKo-cDa+SeEQA@mail.gmail.com> (raw)
In-Reply-To: <87lhu9ofqa.fsf@ucl.ac.uk>
[-- Attachment #1: Type: text/plain, Size: 3982 bytes --]
On Sat, May 10, 2014 at 10:44 AM, Eric S Fraga <e.fraga@ucl.ac.uk> wrote:
> On Thursday, 1 May 2014 at 13:07, John Kitchin wrote:
> > I implemented some of this partially. I made it so you can specify the
> > default cite link in a user variable, with a default of cite. When you
> type
> > C-c ], this format will automatically be used. If you want to choose
> > another format, type C-u C-c ] which will prompt you for a type, and then
>
> Hi John,
>
> I am having problems with org-ref and am obviously missing something
> trivial. I downloaded the latest version yesterday (Friday). You don't
> say, in the above, what function you actually bound to C-c ] but I bound
> org-ref-insert-cite-link and that doesn't seem to work:
>
C-c ] should be bound by default to org-ref-insert-cite-link. It is defined
in a hook function in line 104 of org-ref.org.
I made a custom variable to store the key-binding, but I realized it
probably doesn't help, since the binding
>
> 1. C-u on it does not give me a choice of citation method
>
If you type C-u M-x org-ref-insert-cite-link
do you get a choice?
I just tried this on a fresh pull and it does work for me. I am not sure
why this wouldn't work for you. Do you tangle the .el file from the .org
file? I have this code somewhere else to build it when needed:
(if (or
(not (file-exists-p "org-ref.el"))
(< (float-time (nth 5 (file-attributes "org-ref.el")))
(float-time (nth 5 (file-attributes "org-ref.org")))))
(progn
(org-babel-tangle-file (expand-file-name "org-ref.org"
starter-kit-dir))
(load-file (expand-file-name "org-ref.el" starter-kit-dir)))
(require 'org-ref))
That retangles the org file if the org-file is newer than the el file.
> 2. the link inserted "looks" like a link (it's blue) but there are
> actually no [[...]] characters surrounding it.
>
There are no [[...]]. The links work fine without them for me. Are they
necessary for some reason? I can add them, but since they do not do
anything but disappear in this case, I leave them out. That is actually
not totally true, if you write your link as [[cite:key][page 23]] the page
23 gets formatted in latex as \cite[page23]{key}.
>
> What am I missing? Am I expected to type the [[]] or use C-c C-l?
>
> I don't think you need the [[]], and you do not have to use C-c C-l. The
only thing that C-c C-l offers is autocompletion on bibtex keys for the
cite link (I have not figured out a way to avoid a lot of cut and paste
code for the other types, and I rarely use this feature, but I am leaving
it in so I do not forget how I did it ;). I guess C-c C-l might help
entering the description too.
> I would like to C-u C-c ], choose autocite and my refs and have your
> code insert [[autocite:blah-2001,joe-2010,moe-2014]] into my org
> buffer. I know I can change the default citation link type through
> org-ref-default-citation-link but I want the C-u functionality.
>
You should be able to do all those things. The C-u functionality works
independently of the default type, and it should let you get something
other than the default.
>
> Finally, looking at the code, it would appear that appending new
> citations will only work for "cite:" links as the "cite:" is hard-coded
> into the code?
>
This is correct in the version you have. The current workaround is to use
C-u C-c ], and select the "A" format, which will output a leading comma and
your selections. I have pushed a fix for this, that adds a requirement of
dash.el and checks of the link is in a list of cite types defined in
org-ref. Thanks for making me think of a solution to that!
> thanks again,
> eric
>
> PS - I'm a fellow Chemical Engineer but unfortunately have not yet had
> the opportunity to cite any of your papers but look forward to doing so
> sometime soon using org-ref ;-)
>
That would be great! I hope the comments above help!
> --
> : Eric S Fraga (0xFFFCF67D), Emacs 24.4.50.2, Org release_8.2.6-923-g233c11
>
[-- Attachment #2: Type: text/html, Size: 6098 bytes --]
next prev parent reply other threads:[~2014-05-11 18:48 UTC|newest]
Thread overview: 53+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-30 20:59 org-ref code John Kitchin
2014-05-01 6:23 ` Eric S Fraga
2014-05-01 10:01 ` Eric S Fraga
2014-05-01 12:21 ` Seb Frank
2014-05-01 14:08 ` Eric S Fraga
2014-05-01 12:36 ` John Kitchin
2014-05-01 12:47 ` John Kitchin
2014-05-01 13:30 ` Eric S Fraga
2014-05-01 17:07 ` John Kitchin
2014-05-10 14:44 ` Eric S Fraga
2014-05-11 18:48 ` John Kitchin [this message]
2014-05-12 8:12 ` Andreas Reuleaux
2014-05-13 2:37 ` John Kitchin
2014-05-12 13:36 ` Eric S Fraga
2014-05-12 17:20 ` Andreas Reuleaux
2014-05-12 17:26 ` John Kitchin
2014-05-13 0:03 ` Andreas Reuleaux
2014-05-13 11:00 ` Eric S Fraga
2014-05-13 18:51 ` John Kitchin
2014-05-13 20:01 ` Eric S Fraga
2014-05-13 20:11 ` Eric S Fraga
2014-05-14 0:28 ` John Kitchin
2014-05-14 18:17 ` Eric S Fraga
2014-05-14 19:03 ` Andreas Reuleaux
2014-05-14 19:48 ` Sharon Kimble
2014-05-14 20:08 ` Andreas Reuleaux
2014-05-14 22:14 ` Eric S Fraga
2014-05-14 20:35 ` John Kitchin
2014-05-15 6:58 ` Eric S Fraga
2014-05-15 8:17 ` Eric S Fraga
2014-05-15 13:05 ` John Kitchin
2014-05-15 13:14 ` Eric S Fraga
2014-05-15 13:30 ` Eric S Fraga
2014-05-15 14:19 ` John Kitchin
2014-05-15 14:31 ` Eric S Fraga
2014-05-15 15:03 ` Eric S Fraga
2014-05-15 13:15 ` John Kitchin
2014-05-14 3:58 ` Andreas Reuleaux
2014-05-14 13:17 ` John Kitchin
2014-05-13 23:33 ` Andreas Reuleaux
2014-05-14 0:38 ` John Kitchin
2014-05-14 3:39 ` Andreas Reuleaux
2014-05-14 13:14 ` John Kitchin
2014-05-14 17:39 ` Andreas Reuleaux
2014-05-18 17:16 ` org-ref for biblatex Andreas Reuleaux
2014-05-18 21:40 ` John Kitchin
2014-05-18 22:38 ` Andreas Reuleaux
2014-05-19 11:38 ` John Kitchin
2014-05-19 12:15 ` Andreas Reuleaux
2014-05-19 17:34 ` Andreas Reuleaux
2014-05-08 8:31 ` org-ref code Vikas Rawal
2014-05-08 13:53 ` John Kitchin
2014-05-15 10:09 ` Bastien
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=CAJ51EToS2H8qMEKhfkr4oxbcU2AdRVxWeMQbbcKo-cDa+SeEQA@mail.gmail.com \
--to=jkitchin@andrew.cmu.edu \
--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.