emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[O] [PATCH] add "link" :results type for Babel


From: stardiviner
Subject: [O] [PATCH] add "link" :results type for Babel
Date: Tue, 10 Apr 2018 18:07:47 +0800
User-agent: mu4e 1.0; emacs 27.0.50

This patch try to support following way:

#+begin_src sh :results link :file "/tmp/test.txt"
echo "hello" > /tmp/test.txt
echo "test"
#+end_src

#+RESULTS:
[[file:/tmp/test.txt]]

Because:

- ~org-babel-execute-src-block~
  - ~(org-babel-get-src-block-info)~
    - (let* ((info .. (apply #'org-babel-merge-params ...))))
      - ~org-babel-merge-params~
        - [ ] *because* code ~(`(,(or :file :file-ext) . ,value) ...)~
          lines logic in function ~org-babel-get-src-block-info~, it
          merge "file" ~:results~, so override params plist :results
          value ~link~.
        - [ ] So I put ~link~ and ~graphics~ "~:results~" type into a
          separate group in constant
          ~org-babel-common-header-args-w-values~.

If anybody has better way, please improve my code.

Attachment: 0001-ob-core.el-add-results-link-type-result-for-babel.patch
Description: Text Data

The second patch is to add testing and document for merged graphics
implementation.

Attachment: 0002-ob-core.el-support-graphics-results-type.patch
Description: Text Data

--
[ stardiviner ] don't need to convince with trends.
       Blog: https://stardiviner.github.io/
       IRC(freenode): stardiviner
       GPG: F09F650D7D674819892591401B5DF1C95AE89AC3

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]