From mboxrd@z Thu Jan 1 00:00:00 1970 From: stardiviner Subject: recently header argument :file does not respect :dir anymore Date: Wed, 09 Jan 2019 09:46:12 +0800 Message-ID: <87d0p68uxn.fsf@gmail.com> Reply-To: numbchild@gmail.com Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([209.51.188.92]:40245) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gh2uk-0004jh-Pv for emacs-orgmode@gnu.org; Tue, 08 Jan 2019 20:44:15 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gh2uj-000610-VF for emacs-orgmode@gnu.org; Tue, 08 Jan 2019 20:44:14 -0500 Received: from [61.175.244.13] (port=28792 helo=dark.localdomain) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gh2uj-0005xm-KS for emacs-orgmode@gnu.org; Tue, 08 Jan 2019 20:44:13 -0500 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" To: org-mode 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