From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Schulte Subject: Re: [PATCH] link descriptions in :file results of src blocks Date: Sat, 31 Mar 2012 15:01:12 -0400 Message-ID: <87pqbswq6f.fsf@gmx.com> References: <87haxa4e2z.fsf@med.uni-goettingen.de> <87pqbsu9qt.fsf@gmx.com> <87vclky211.fsf@med.uni-goettingen.de> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([208.118.235.92]:35924) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SE5QM-00070N-60 for emacs-orgmode@gnu.org; Sat, 31 Mar 2012 17:01:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SE5QK-0002aT-4J for emacs-orgmode@gnu.org; Sat, 31 Mar 2012 17:01:25 -0400 Received: from mailout-us.gmx.com ([74.208.5.67]:43091) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1SE5QJ-0002aK-Ui for emacs-orgmode@gnu.org; Sat, 31 Mar 2012 17:01:24 -0400 In-Reply-To: <87vclky211.fsf@med.uni-goettingen.de> (Andreas Leha's message of "Sat, 31 Mar 2012 21:59:54 +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: Andreas Leha Cc: emacs-orgmode@gnu.org [...] >> 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! -- Eric Schulte http://cs.unm.edu/~eschulte/