I think I have just fixed it. The offending command was trying to get an org-element in the special edit buffer which wasn't in org-mode. Its not clear why it worked in some codes and not others though! John ----------------------------------- Professor John Kitchin Doherty Hall A207F Department of Chemical Engineering Carnegie Mellon University Pittsburgh, PA 15213 412-268-7803 @johnkitchin http://kitchingroup.cheme.cmu.edu On Tue, May 9, 2017 at 7:01 AM, John Kitchin wrote: > > On Tue, May 9, 2017 at 6:51 AM, Nicolas Goaziou > wrote: > >> org-store-link-functions > > > That is a function in org-ref. I will check it out this morning. Thanks > for the pointer to the root of the issue! > > > John > > ----------------------------------- > Professor John Kitchin > Doherty Hall A207F > Department of Chemical Engineering > Carnegie Mellon University > Pittsburgh, PA 15213 > 412-268-7803 <(412)%20268-7803> > @johnkitchin > http://kitchingroup.cheme.cmu.edu > >