From mboxrd@z Thu Jan 1 00:00:00 1970 From: John Kitchin Subject: Re: org-ref code Date: Thu, 1 May 2014 08:47:01 -0400 Message-ID: References: <878uql7r7p.fsf@ucl.ac.uk> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=047d7b5dbcc2b85b9504f8560fd9 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:37271) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WfqOG-0008Jk-Ga for emacs-orgmode@gnu.org; Thu, 01 May 2014 08:47:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WfqOF-0001IS-1C for emacs-orgmode@gnu.org; Thu, 01 May 2014 08:47:04 -0400 Received: from mail-pa0-x234.google.com ([2607:f8b0:400e:c03::234]:45105) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WfqOE-0001IO-Lt for emacs-orgmode@gnu.org; Thu, 01 May 2014 08:47:02 -0400 Received: by mail-pa0-f52.google.com with SMTP id kx10so3588180pab.25 for ; Thu, 01 May 2014 05:47:01 -0700 (PDT) In-Reply-To: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: John Kitchin , "emacs-orgmode@gnu.org" --047d7b5dbcc2b85b9504f8560fd9 Content-Type: text/plain; charset=UTF-8 sorry, premature send! On Thu, May 1, 2014 at 8:36 AM, John Kitchin wrote: > Thanks for the feedback. I moved the key-bindings for f10-12 out of > org-ref. > > > On Thu, May 1, 2014 at 6:01 AM, Eric S Fraga wrote: > >> John, >> >> I've been playing with the package although, so far, only for >> citations. A few points: >> >> 1. Do you have any support for choosing the type of citation entry >> (i.e. \cite versus \autocite versus ...) when inserting a >> citation in the text? >> > > Not at the moment. There are a few ways I can see doing this. With the > existing code, you can do M-x reftex-citation, select the format you want > and select the references. We could easily enough define additional formats > for other citation types. I found this way of inserting citations annoying, > because 99.99% of the time I want a simple cite link, and pressing C-c ] > return regexp marking return was too much for me (I cite a lot). I also > found this method was not flexible, in the sense that it was not easy to > add citations to an existing citation. That is why there is an ?a option to > append citations in the code. > an alternative would be to use a prefix command that gave you an option to change the cite format, similar to the minibuffer menu for cite links. I have not written much prefix code before, but I will try that out. > > >> >> 2. You define org-link-types. Unfortunately, this overwrites my own >> definitions, especially for "cite". I wonder whether this type >> of customisation belongs in org-ref itself. This is similar to >> my earlier comment about key bindings, I guess. >> > In the end, the link definitions can be as short as this: #+BEGIN_SRC emacs-lisp :tangle org-ref.el (org-add-link-type "cite" 'org-ref-cite-onclick-minibuffer-menu 'org-ref-cite-link-format) #+END_SRC I wrote this for my research group to use, and eventually the links have to be defined somewhere. I am not sure what the best place would be. It is an interesting issue of reproducibility though. Two people with different link definitions would get different results. >> 3. I sometimes use biblatex instead of bibtex. As a result, I do not >> use \bibliography and use \addbibresource instead. I have >> defined my bibliography files in org-ref-default-bibliography but >> this is only picked up on initialisation. It is difficult to >> update this for a document in progress (I had to locally set >> reftex-default-bibliography manually). >> > It should be easy enough to make an addbibresource link that does the same thing as the bibliography link. And maybe to modify the find-bibliography code to check for that too. I have never used biblatex though, so I dont have any experience with it. > >> 4. The customisation interface for org-ref-default-bibliography should be >> list aware... >> > I think I fixed this. > >> Otherwise, seems to working just fine. >> >> Thanks, >> eric >> >> -- >> : Eric S Fraga (0xFFFCF67D), Emacs 24.4.50.2, Org >> release_8.2.6-923-g233c11 >> > > --047d7b5dbcc2b85b9504f8560fd9 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
sorry, premature send!

<= br>
On Thu, May 1, 2014 at 8:36 AM, John Kitchin = <jkitchin@andrew.cmu.edu> wrote:
Thanks f= or the feedback. I moved the key-bindings for f10-12 out of org-ref.


On Thu, May 1, 2014 at 6= :01 AM, Eric S Fraga <e.fraga@ucl.ac.uk> wrote:
John,

I've been playing with the package although, so far, only for
citations. =C2=A0A few points:

1. Do you have any support for choosing the type of citation entry
=C2=A0 =C2=A0 =C2=A0(i.e. \cite versus \autocite versus ...) when inserting= a
=C2=A0 =C2=A0 =C2=A0citation in the text?

Not at the moment. There are a few ways I can see doing this. With= the existing code, you can do M-x reftex-citation, select the format you w= ant and select the references. We could easily enough define additional for= mats for other citation types. I found this way of inserting citations anno= ying, because 99.99% of the time I want a simple cite link, and pressing=C2= =A0 C-c ] return regexp marking return was too much for me (I cite a lot). = I also found this method was not flexible, in the sense that it was not eas= y to add citations to an existing citation. That is why there is an ?a opti= on to append citations in the code.

an alternative wou= ld be to use a prefix command that gave you an option to change the cite fo= rmat, similar to the minibuffer menu for cite links. I have not written muc= h prefix code before, but I will try that out.

=C2=A0
=C2=A0

2. You define org-link-types. =C2=A0Unfortunately, this overwrites my own =C2=A0 =C2=A0 =C2=A0definitions, especially for "cite". =C2=A0I w= onder whether this type
=C2=A0 =C2=A0 =C2=A0of customisation belongs in org-ref itself. =C2=A0This = is similar to
=C2=A0 =C2=A0 =C2=A0my earlier comment about key bindings, I guess.

In the en= d, the link definitions can be as short as this:

#+BEGIN_SRC emacs-l= isp :tangle org-ref.el
(org-add-link-type
=C2=A0"cite"
=C2=A0'org-ref-cite-onc= lick-minibuffer-menu
=C2=A0'org-ref-cite-link-format)
#+END_SRC
I wrote this for my research group to use, and eventually = the links have to be defined somewhere. I am not sure what the best place w= ould be. It is an interesting issue of reproducibility though. Two people w= ith different link definitions would get different results.


3. I sometimes use biblatex instead of bibtex. =C2=A0As a result, I do not<= br> =C2=A0 =C2=A0 =C2=A0use \bibliography and use \addbibresource instead. =C2= =A0I have
=C2=A0 =C2=A0 =C2=A0defined my bibliography files in org-ref-default-biblio= graphy but
=C2=A0 =C2=A0 =C2=A0this is only picked up on initialisation. =C2=A0It is d= ifficult to
=C2=A0 =C2=A0 =C2=A0update this for a document in progress (I had to locall= y set
=C2=A0 =C2=A0 =C2=A0reftex-default-bibliography manually).
=

It should be easy = enough to make an addbibresource link that does the same thing as the bibli= ography link. And maybe to modify the find-bibliography code to check for t= hat too. I have never used biblatex though, so I dont have any experience w= ith it.
=C2=A0

4. The customisation interface for org-ref-default-bibliography should be =C2=A0 =C2=A0 =C2=A0list aware...
<= /blockquote>

I think I fixed this.
=C2=A0

Otherwise, seems to working just fine.

Thanks,
eric

--
: Eric S Fraga (0xFFFCF67D), Emacs 24.4.50.2, Org release_8.2.6-923-g233c11=


--047d7b5dbcc2b85b9504f8560fd9--