From mboxrd@z Thu Jan 1 00:00:00 1970 From: John Kitchin Subject: Re: Citations, continued Date: Mon, 02 Feb 2015 14:38:48 -0500 Message-ID: References: <87vbjmn6wy.fsf@berkeley.edu> <8761blm6n8.fsf@berkeley.edu> Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:54000) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YIMps-0002Xk-GP for emacs-orgmode@gnu.org; Mon, 02 Feb 2015 14:39:06 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YIMpm-0005g2-Ds for emacs-orgmode@gnu.org; Mon, 02 Feb 2015 14:39:04 -0500 Received: from smtp.andrew.cmu.edu ([128.2.105.202]:39112) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YIMpm-0005fx-9N for emacs-orgmode@gnu.org; Mon, 02 Feb 2015 14:38:58 -0500 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: "Thomas S. Dye" Cc: Richard Lawrence , "emacs-orgmode@gnu.org" , John Kitchin You can color your own links like this: (highlight-regexp "cite:\\([a-zA-Z0-9]*[-_:]*\\)*" 'dired-warning) (highlight-regexp "citenum:\\([a-zA-Z0-9]*[-_:]*\\)*" 'dired-marked) The regexps are not as robust as what org uses, the plain link on my system looks like: "\\<\\(Autocite[*s]?\\|Cite\\(?:a\\(?:l[pt]\\|uthor\\*?\\)\\|[pst]\\)?\\|Gl= s\\(?:pl\\)?\\|Notecite\\|P\\(?:arencites?\\|notecite\\)\\|ResearcherID\\|S= martcites?\\|Textcites?\\|a\\(?:dd\\(?:bibresource\\|ressbook\\)\\|ns\\|ssi= gnment\\|ttachfile\\|utocite[*s]?\\)\\|b\\(?:bdb\\|ib\\(?:entry\\|liography= \\(?:style\\)?\\|tex\\)\\)\\|cite\\(?:a\\(?:l\\(?:[pt]\\*\\|[pt]\\)\\|uthor= \\*?\\)\\|date\\*?\\|num\\|p\\*\\|t\\(?:\\*\\|ext\\|itle\\*?\\)\\|url\\|yea= r\\*?\\|[*pst]\\)?\\|do\\(?:cview\\|i\\)\\|e\\(?:l\\(?:feed\\|isp\\)\\|qref= \\|xercise\\)\\|f\\(?:ile\\(?:\\+\\(?:\\(?:emac\\|sy\\)s\\)\\)?\\|notecite\= \|oot\\(?:cite\\(?:s\\|texts?\\)?\\|fullcite\\)\\|tp\\|u\\(?:llcite\\|nc\\)= \\)\\|g\\(?:ls\\(?:pl\\)?\\|nus\\|oogle\\)\\|https?\\|i\\(?:d\\|n\\(?:dex\\= |fo\\)\\|rc\\)\\|l\\(?:abel\\|ist-of-\\(?:\\(?:figur\\|tabl\\)es\\)\\)\\|m\= \(?:a\\(?:c-outlook\\|ilto\\)\\|c\\|essage\\|he\\|od\\|sx\\|u4e\\)\\|n\\(?:= ameref\\|ew\\(?:glossaryentry\\|s\\)\\|ihmsid\\|o\\(?:bibliography\\|\\(?:t= e\\)?cite\\)\\)\\|orcid\\|p\\(?:a\\(?:geref\\|rencite[*s]?\\)\\|m\\(?:c?id\= \)\\|notecite\\|rint\\(?:bibliography\\|index\\)\\|ydoc\\)\\|r\\(?:ef\\|mai= l\\)\\|s\\(?:hell\\|kim\\|link\\|martcites?\\|olution\\|upercites?\\)\\|t\\= (?:extcites?\\|q-index\\)\\|x-together-item\\):\\([^ \n()<>]+\\(?:([[:word:]0-9_]+)\\|\\([^[:punct:] \n]\\|/\\)\\)\\)" But, if you put that in init files, then your links will be colored the way you want them. Thomas S. Dye writes: > Hi John, > > John Kitchin writes: > >>> Now, I agree with you that Org mode links are not ideal for citations. >>> Parsing the description is humbug and error-prone, and the descriptions >>> look ungainly in the Org mode document. I never remember to click >>> citation links in the "right" place! There is much room for improvement >>> here. >> >> I am not sure how much better it could get. What did you have in mind? I >> could imagine for a cite link with several citations the click action >> could give you an ido-completing/helm selection buffer and you choose >> what you want to do from there. In org-ref the click action is user >> definable, so you can get what you want. > > I didn't mean to imply any criticism of org-ref, which I haven't used. > I've been using my own home-grown solution for several years now, have > grown used to its limitations, and of course now have all those legacy > documents to support ... > > It would be nice to have the link syntax extended or generalized to > indicate pre- and post-note text, so my home-grown system would use > links compatible with org-ref, say. I really like the direction Richard > is heading for this reason. If the distinctions needed for citations > were recognized in the Org mode core, then citation links used by > different systems might be compatible with one another. > > More control over how links are displayed would be nice (perhaps let the > user pass in a function?). When I first worked on setting up citations, > I thought it would be great to color citation links differently from > other links, and I still kind of like that idea. Also, in my setup, I > don't want to see the full link because the bibtex keys are long and the > full links really break up the flow of the text. Among other things, > this means I can't be sure just looking at the buffer in its typical > state what kind of link I'm using (footcite, parencite, textcite, etc.). > A little indicator of some kind would be really nice here, but I haven't > found an easy way to display one. > > I'm glad you like Samuel's idea about extensible syntax for links. I > don't know if it is practical or not, but it was one of those ideas that > seemed right on when I first read it. > > All the best, > Tom -- 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