From: stardiviner <numbchild@gmail.com>
To: org-mode <emacs-orgmode@gnu.org>
Subject: recently header argument :file does not respect :dir anymore
Date: Wed, 09 Jan 2019 09:46:12 +0800 [thread overview]
Message-ID: <87d0p68uxn.fsf@gmail.com> (raw)
For example, like this source block:
#+begin_src sh :mkdirp yes :results file link :dir "data/code" :file "awesome-cl-software/README.md" :async
if [ -d awesome-cl-software ]; then
cd awesome-cl-software ; git pull
else
git clone --recursive https://github.com/azzamsa/awesome-cl-software.git awesome-cl-software
fi
#+end_src
It will report no directory or file "awesome-cl-software/README.md".
A few days ago, it works. But now, I have to specify dir in ~:file~ too, like this:
#+begin_src sh :mkdirp yes :results file link :dir "data/code" :file "data/code/awesome-cl-software/README.md" :async
if [ -d awesome-cl-software ]; then
cd awesome-cl-software ; git pull
else
git clone --recursive https://github.com/azzamsa/awesome-cl-software.git awesome-cl-software
fi
#+end_src
#+RESULTS[<2019-01-09 09:20:17> 1cce5f5d251b5bf7b32b1db410185ee6b9a80fde]:
[[file:data/code/awesome-cl-software/README.md]]
I checked out recently Git commits, but have not found any commits
related to ~:dir~. Only found one change on ~:file~ and ~:file-ext~
related with ~:results file~. I checked, it's hasn't changed ~:dir~
neither.
And also, I hope ~:tangle~ can respect ~:dir~ header argument too.
Like this example:
#+begin_src clojure :dir "data/code/clj-crawler-demo" :tangle "src/clj_crawler_demo/core.clj"
(ns clj-crawler-demo.core
(:require [clj-http.client :as http])
(:require [net.cgrand.enlive-html :as html]))
(html/select
(-> (http/get "https://www.baidu.com")
:body
html/html-snippet)
[:div])
#+end_src
Why need this? If ~:tangle~ respect ~:dir~, it will don't need the complete path to
tangled file. And when the source block has other header argument need dir like
~:file~, this will make ~:tangle~ and other related header arguments shorter.
WDYT?
--
[ stardiviner ]
I try to make every word tell the meaning what I want to express.
Blog: https://stardiviner.github.io/
IRC(freenode): stardiviner, Matrix: stardiviner
GPG: F09F650D7D674819892591401B5DF1C95AE89AC3
next reply other threads:[~2019-01-09 1:44 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-09 1:46 stardiviner [this message]
2019-01-16 7:58 ` [SOLVED] Re: recently header argument :file does not respect :dir anymore stardiviner
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=87d0p68uxn.fsf@gmail.com \
--to=numbchild@gmail.com \
--cc=emacs-orgmode@gnu.org \
/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).