From mboxrd@z Thu Jan 1 00:00:00 1970 From: Aaron Ecay Subject: Re: New patches WAS Re: [PATCH] inline src block results can be removed Date: Fri, 16 Jan 2015 22:22:03 -0500 Message-ID: <874mrqjdlw.fsf@gmail.com> References: <87egt81acy.fsf@gmail.com> <8761ejq9ek.fsf@nicolasgoaziou.fr> <87sihltt3v.fsf@selenimh.mobile.lan> <87zjbqrapy.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:33454) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YCJxh-0002XJ-FQ for emacs-orgmode@gnu.org; Fri, 16 Jan 2015 22:22:10 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YCJxe-0006rP-3h for emacs-orgmode@gnu.org; Fri, 16 Jan 2015 22:22:09 -0500 Received: from mail-qg0-x22c.google.com ([2607:f8b0:400d:c04::22c]:58633) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YCJxd-0006rL-VW for emacs-orgmode@gnu.org; Fri, 16 Jan 2015 22:22:06 -0500 Received: by mail-qg0-f44.google.com with SMTP id l89so10358423qgf.3 for ; Fri, 16 Jan 2015 19:22:05 -0800 (PST) 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: "Charles C. Berry" , Nicolas Goaziou Cc: mcg , Andreas Leha , emacs-orgmode@gnu.org, Ista Zahn Hi Chuck, Thanks for the patches. I agree with Nicolas about the issue of multi-line results for inline blocks. I think he already raised any comments I would have made about the code. Additional comments about broader issues: 2015ko urtarrilak 12an, "Charles C. Berry"-ek idatzi zuen: > (defun org-babel-insert-result > (result &optional result-params info hash indent lang) > "Insert RESULT into the current buffer. It=E2=80=99s not strictly speaking relevant to your patch, but it would be = good to put a couple sentences about the :wrap header arg in this docstring. I think it could go at the end, and read something like =E2=80=9CSpecifying a= :wrap header argument will wrap the result in a #+begin_/#+end_ block or (for inline source blocks) an export snippet whose type is determined by the value of the argument (with a default of "results"). The specification of :wrap overrides the :result values described above.=E2=80=9D [...] > drawer -- results are added directly to the Org-mode file as with > - \"raw\", but are wrapped in a RESULTS drawer, allowing > - them to later be replaced or removed automatically. > + \"raw\", but are wrapped in a RESULTS drawer or results > + macro, allowing them to later be replaced or removed > + automatically. > I think it=E2=80=99s worth changing the name of this option, now that it no longer creates a drawer in all cases. Perhaps raw-wrap could be used. (Of course, drawer would be retained as a backwards compatibility alias, preferably with a comment in the code describing when and why it was deprecated.) This would also require changes to the manual. [...] > (funcall wrap (concat "#+BEGIN_" name) > - (concat "#+END_" (car (org-split-string name)))))) > + (concat "#+END_" (car (org-split-string name))) > + nil nil (concat "{{{results(@@" name ":") "@@)}}}"))) I think it would be more flexible to allow :wrap to change the name of the macro which is used, rather than to insert an export snippet. If a custom export snippet is desired, this could be specified via the custom macro name =E2=80=93 but the macro could also supply other special formatti= ng. (This suggestion would impact the wording of the docstring addition suggested above.) WDYT? Especially the first two of these suggestions are things I (or anyone) could implement in further patches, if you=E2=80=99d rather not take them o= n at present. Thanks, =20 --=20 Aaron Ecay