From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andreas Leha Subject: Re: [PATCH] link descriptions in :file results of src blocks Date: Sun, 01 Apr 2012 20:34:13 +0200 Message-ID: <87mx6vxpwa.fsf@med.uni-goettingen.de> References: <87haxa4e2z.fsf@med.uni-goettingen.de> <87pqbsu9qt.fsf@gmx.com> <87vclky211.fsf@med.uni-goettingen.de> <87pqbswq6f.fsf@gmx.com> <87r4w7yit7.fsf@med.uni-goettingen.de> <87hax3wrjq.fsf@gmx.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([208.118.235.92]:56765) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SEPcC-0002ys-9u for emacs-orgmode@gnu.org; Sun, 01 Apr 2012 14:35:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SEPcA-0006NR-8f for emacs-orgmode@gnu.org; Sun, 01 Apr 2012 14:34:59 -0400 Received: from plane.gmane.org ([80.91.229.3]:38983) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SEPcA-0006MO-1s for emacs-orgmode@gnu.org; Sun, 01 Apr 2012 14:34:58 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1SEPc7-0005tn-1h for emacs-orgmode@gnu.org; Sun, 01 Apr 2012 20:34:55 +0200 Received: from vpn-2110.gwdg.de ([134.76.2.110]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 01 Apr 2012 20:34:55 +0200 Received: from andreas.leha by vpn-2110.gwdg.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 01 Apr 2012 20:34:55 +0200 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: emacs-orgmode@gnu.org Eric Schulte writes: > Andreas Leha writes: > >> Eric Schulte writes: >> >>> [...] >>>>> I would like to apply this patch, however I have some questions about >>>>> the use of the :file argument and the result itself to fill in the >>>>> description if the :filelinkdescr header argument is left blank. Also, >>>>> I would suggest that :file-desc is a better name for this header >>>>> argument. >>>> >>>> Hi Eric, >>>> >>>> thanks for considering this patch. Feel free to change the term to >>>> anything more appropriate. >>>> >>>>> >>>>> In my opinion using the :file argument as a description changes (or at >>>>> least adds to) the meaning of the :file header argument. Is there a >>>>> significant benefit to this behavior? If not I'd prefer that an empty >>>>> :file-desc header argument have no effect. >>>> >>>> My original use case was indeed making a code block to >>>> produce [[file.pdf][file.pdf]] instead of [[file.pdf]] (see >>>> http://permalink.gmane.org/gmane.emacs.orgmode/53941). So, if you >>>> remove the possibility to specify an empty :file-desc, for me that would >>>> mean to give the file name twice, as in >>>> : #+begin_src R :results graphics :file test2.png :file-desc test2.png >>>> which would be avoidable with my proposed behaviour. >>>> >>>> I could live with that, though I'd still prefer not to have to type more >>>> than necessary... >>>> >>> >>> Makes sense, I've just pushed up a solution which builds on your initial >>> patch by >>> >>> 1. changing :filelinkdescr to :file-desc >>> >>> 2. when an empty :file-desc header argument is specified it's value is >>> set to the value of the file path resulting in >>> [[file.pdf][file.pdf]] >>> >>> 3. adding documentation and a test case >>> >>> Please let me know if this misses any part of your intended use case. >>> >>> Thanks for the contribution! >> >> Hi Eric, >> >> I seem not to be able to see that push. My git log contains only >> ,---- >> | 8d43aa2 test the new file-desc header argument >> | 670c7f3 simplified implementation of :file-desc header argument >> | 1193844 documentation for the new file-desc header argument >> | 59800b2 change name of filelinkdescr to file-desc >> | a58a4f0 new source block header argument :filelinkdescr >> `---- >> and indeed, the functionality you describe in 2. seems not to be >> available. What did I miss? >> > > Hi Andreas, > > The commit implementing the behavior described in (2) is 670c7f3. > Please take a look at the test-ob/file-desc-header-argument test case. > If it is passing on your system (as it is on mine) then the behavior > described in (2) is in fact implemented. > > Best, > Hi Eric, I tested with a wrong version of org-mode. It works in fact as expected. Thanks for your work on this one and sorry for the fake alarm. Regards, Andreas