[...] >> 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/