all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* recently header argument :file does not respect :dir anymore
@ 2019-01-09  1:46 stardiviner
  2019-01-16  7:58 ` [SOLVED] " stardiviner
  0 siblings, 1 reply; 2+ messages in thread
From: stardiviner @ 2019-01-09  1:46 UTC (permalink / raw)
  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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [SOLVED] Re: recently header argument :file does not respect :dir anymore
  2019-01-09  1:46 recently header argument :file does not respect :dir anymore stardiviner
@ 2019-01-16  7:58 ` stardiviner
  0 siblings, 0 replies; 2+ messages in thread
From: stardiviner @ 2019-01-16  7:58 UTC (permalink / raw)
  To: org-mode


This is solved, I found this problem is on package "ob-async" can't
handled the :dir correctly. And it's fixed in latest ob-async now.

-- 
[ 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
      

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-01-16  7:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-01-09  1:46 recently header argument :file does not respect :dir anymore stardiviner
2019-01-16  7:58 ` [SOLVED] " stardiviner

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.