emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Kyle Meyer <kyle@kyleam.com>
To: Matt Huszagh <huszaghmatt@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: incorrect documentation for file-desc header argument?
Date: Wed, 29 Jul 2020 01:03:30 -0400	[thread overview]
Message-ID: <87ime6ap5p.fsf@kyleam.com> (raw)
In-Reply-To: <87lfj3c51a.fsf@gmail.com>

Matt Huszagh writes:

> The org info documentation states
>
>      The ‘file-desc’ header argument defines the description (see *note
>      Link Format::) for the link.  If ‘file-desc’ has no value, Org uses
>      the generated file name for both the “link” and “description” parts
>      of the link.
>
> However, if I evaluate the
>
> #+BEGIN_SRC asymptote :results value file :file circle.pdf :output-dir img/
>   size(2cm);
>   draw(unitcircle);
> #+END_SRC
>
> I get
>
> #+RESULTS:
> [[file:img/circle.pdf]]
>
> I believe the documentation (and this is corroborated by the discussion
> of the original patch
> (https://lists.gnu.org/archive/html/emacs-orgmode/2012-04/msg00022.html)),
> that the intended result is
>
> #+RESULTS:
> [[file:img/circle.pdf][file:img/circle.pdf]]
>
> Is my assessment correct? Can anyone else confirm this bug?

Yeah, that looks to be the intended result of that thread.  That
thread's patch was applied with a58a4f0ad (new source block header
argument :filelinkdescr, 2012-03-27).  However, shortly after, that
treatment was intentionally changed (670c7f31c, 2012-03-31):

    simplified implementation of :file-desc header argument
  
    This will no longer insert the value of the :file header argument as
    the description if the description is left blank (as this changes
    the meaning of the :file header argument).
  
    The desc handling logic is moved to the `org-babel-result-to-file'
    function.

So, I'd say this is a documentation bug.


  parent reply	other threads:[~2020-07-29  5:04 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-29  4:35 incorrect documentation for file-desc header argument? Matt Huszagh
2020-07-29  4:50 ` Matt Huszagh
2020-07-29  5:03 ` Kyle Meyer [this message]
2020-07-29  7:41   ` Eric S Fraga
2020-07-30  1:19   ` Matt Huszagh
2020-07-30  2:29     ` Kyle Meyer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87ime6ap5p.fsf@kyleam.com \
    --to=kyle@kyleam.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=huszaghmatt@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).