Re: [O] [PATCH] support insert link without write result to :file link
Hello, stardiviner writes: > I added this patch to handle posted question case. > > This will improve Org-mode links with org-babel resulta lot. Make > Org-mode can insert link as user want at many places. > > Hope can be merged. Thank you. However, before thinking about merging it, it requires documentation and tests. You also need to update `org-babel-common-header-args-w-values'. Also, there are still failing tests from the last change to :results behaviour in master, if you ever have time to look into it. Regards, -- Nicolas Goaziou
Re: [O] [PATCH v2 0/3] org-sbe fixes
Hello, Vladimir Panteleev writes: > On 2018-03-26 21:42, Nicolas Goaziou wrote: >> I'm talking about call_foo() syntax. I see no fundamental difference >> between (org-sbe-v2 "func" ...) and call_func(...). > > Sorry, how do you invoke call_func from lisp, or a table formula? I'm not sure there is a real use-case for the first case. Remember you can chain source blocks. The second is the reason why I'm suggesting to move org-sbe-vs to "org-table.el". Regards, -- Nicolas Goaziou
Re: [O] let org-git-link.el suport Magit related buffers
Hi! stardiviner writes: > I hope can combine Org-mode links with Magit through `org-git-link.el`. > [...] > Is there anyone want to or can implement this? There is https://github.com/magit/orgit Cheers, Daniel
Re: [O] [OT] nobody (none)
Hi, Roger Mason writes: > Hello, > > An off topic problem. I'm asking here because I noticed this problem > first in this list, but it has spread. > > I read e-mail using gnus (v5.13) in emacs (25.3.1) on FreeBSD (10.3). > Some months ago I noticed some messages in this list displaying with > sender 'nobody' and subject '(none)' in gnus. As the months have passed > the number of such messages has increased many-fold and spread to other > lists. On opening the offending e-mail it is usual that the message has > both sender and subject fields with plausible contents. Often, but not > exclusively, the 'nobody' messages originate from gmail accounts. > > I have not changed any settings at my end so I assume some commonly used > component of the chain of email applications has changed settings and > that I need to respond to that change. But where? and what? > > Any hints on where to look would be most helpful. > > Again, sorry for the OT message. I use Gnus 5.13 and Emacs 25.1.1 with Debian 9.4 and I haven't noticed this problem. Have you set gnus-summary-line-format to anything unusual? Cheers, Loris -- This signature is currently under construction.
[O] let org-git-link.el suport Magit related buffers
Magit now is the most used tools in Emacs now. I hope can combine Org-mode links with Magit through `org-git-link.el`. Current `org-git-link` only support local git file.But it definitely support Magit, like Magit status buffer, Magit log buffer, Magit diff (revision) buffer. When user is in magit-status/magit-log/magit-revision buffer, get the object under point through Magit API, then construct the org-git-link link URI to store into Org-mode. Is there anyone want to or can implement this?
Re: [O] preview embedded latex fragments error with my settings
it sounds like you should run something like this at the commandline: latex /tmp/orgtexhClnu9.tex and see if any errors come up. Maybe some package is missing. John --- Professor John Kitchin Doherty Hall A207F Department of Chemical Engineering Carnegie Mellon University Pittsburgh, PA 15213 412-268-7803 @johnkitchin http://kitchingroup.cheme.cmu.edu On Mon, Mar 26, 2018 at 5:57 PM, stardiviner wrote: > I have divsvgm program on my arch linux system. And "/tmp/orgtexhClnu9.dvi" > does not exist, it is not produced. Only "/tmp/orgtexhClnu9.tex" and "/tmp > /orgtexhClnu9.log" two file. > > On 03/27/2018 12:20 AM, Nicolas Goaziou wrote: > > Hello, > > stardiviner writes: > > > I have following settings to make org-mode export to PDF works better, > like export with src block syntax highlighting with "minted", and > support Chinese export with latex package "ctex" and specify default > font etc all stuffs. > > I used to disabled org-mode startup preview latex fragments. Today > I use [C-c C-x C-l] to preview latex fragments, it raised error (I > shorten the error stack manuallyfor easy to read): > > Do you have dvisvgm program on your system? Does the file > "/tmp/orgtexhCLnu9.dvi" exist? > > Regards, > > > >
[O] [PATCH] ob-clojure and ob-clojure-literate support :ns header argument [V1]
This should be this finalize version patch. The whole discussion is here: https://github.com/clojure-emacs/clojure-mode/pull/465 After test many case (all passed): ```org #+begin_src clojure :results pp ;; (def greeting "hi there!") *ns* #+end_src #+RESULTS[<2018-03-26 14:43:51> 2d1907bb790168e9429b9b07b4409d08ac8ca274]: : #namespace[user] Test internal ns in body. # TODO: this has a weird behavior, the result changes, sometimes is #'kk.test/he, second time will be #'user/he - [X] confirmed org-babel-expand-body:clojure is fine - [X] check org-babel-execute:clojure #+begin_src clojure :results pp (ns kk.test) (def he "hi") #+end_src #+RESULTS[<2018-03-26 12:52:06> fb9ad1efe68a43d880e53205f1326c000d1522d3]: : #'kk.test/he Deeper testing: #+begin_src emacs-lisp :results pp (nrepl-sync-request:eval "(clojure.pprint/pprint (do (ns user)\n (ns kk.test)\n (def he 2)))" (cider-current-connection) "user" ) #+end_src #+RESULTS[<2018-03-26 19:26:24> 36ac1cb6a3df8b20edb0bf11c1247399bc041390]: : (dict "status" : ("done" "state") : "id" "362" "out" "#'user/he\n" "session" "5ba759a7-a80a-4b02-a934-a0d7686ee211" "ns" "kk.test" "value" "nil" "changed-namespaces" : (dict) : "repl-type" "clj") #+begin_src clojure :results value :ns kk2 (def he "hi") *ns* #+end_src #+RESULTS[<2018-03-26 13:43:22> 0bfbd971f26d1f097d19dc0e3230decc31cc9e6e]: : nil#'kk2/he#namespace[kk2] What about another src block without ~:ns~ specified after previous specified src block? #+begin_src clojure :results value (def he "hi") *ns* #+end_src #+RESULTS[<2018-03-26 12:53:27> 6c547cacff4e65305cc9f855117ca43ffd9d2eab]: : nil#'user/he#namespace[user] More complex example: #+begin_src clojure :results output :var he="hi" :ns kk ;; (def he "hi") (prn he) (prn *ns*) #+end_src #+RESULTS: : "hi" : #namespace[kk] ``` On 03/26/2018 12:38 PM, stardiviner wrote: Previous `ob-clojure.el` patch implement method is not good enough. Here is a better implementation. Sorry for this over posting. On 03/26/2018 09:59 AM, stardiviner wrote: - support :ns header (as discussed at here https://github.com/clojure-emacs/clojure-mode/pull/465#discussion_r158009538) - supoort inject CIDER outside of project - support :varinitialization when :session initialization prepare. On 03/22/2018 01:49 AM, stardiviner wrote: Two patches One is to support ob-clojure.el future coming header argument :ns. The second is to support jack-in CIDER outside of Clojure project by default. Not no need to ob-clojure project to be created anymore. >From bc575705704ebff7f7630cd35ff936844c89f66a Mon Sep 17 00:00:00 2001 From: stardiviner Date: Thu, 22 Mar 2018 01:21:22 +0800 Subject: [PATCH 1/4] * ob-clojure-literate.el: CIDER jack-in outside of project by default. --- contrib/lisp/ob-clojure-literate.el | 50 ++--- 1 file changed, 30 insertions(+), 20 deletions(-) diff --git a/contrib/lisp/ob-clojure-literate.el b/contrib/lisp/ob-clojure-literate.el index a7ab1894d..8d419b0b4 100644 --- a/contrib/lisp/ob-clojure-literate.el +++ b/contrib/lisp/ob-clojure-literate.el @@ -35,8 +35,10 @@ Don't auto jack in by default for not rude." :type 'boolean :group 'ob-clojure-literate) -(defcustom ob-clojure-literate-project-location (concat user-emacs-directory "Org-mode/") - "The location for `ob-clojure-literate' scaffold project." +(defcustom ob-clojure-literate-project-location nil + "The location for `ob-clojure-literate' scaffold project. +If it is nil, then `cider-jack-in' will jack-in outside of Clojure project. +If it is a directory, `ob-clojure-literate' will try to create Clojure project automatically." :type 'string :group 'ob-clojure-literate) @@ -45,7 +47,7 @@ Don't auto jack in by default for not rude." (defvar ob-clojure-literate-session-ns nil) (defvar ob-clojure-literate-cider-connections nil) -(defcustom ob-clojure-literate-default-session "*cider-repl ob-clojure*" +(defcustom ob-clojure-literate-default-session "*cider-repl localhost*" "The default session name for `ob-clojure-literate'." :type 'string :group 'ob-clojure-literate) @@ -104,23 +106,31 @@ Don't auto jack in by default for not rude." (defun ob-clojure-literate-auto-jackin () "Auto setup ob-clojure-literate scaffold and jack-in Clojure project." (interactive) - (unless (file-directory-p (expand-file-name ob-clojure-literate-project-location)) -(make-directory ob-clojure-literate-project-location t) -(let ((default-directory ob-clojure-literate-project-location)) - (shell-command "lein new ob-clojure"))) - (unless (or - (and (cider-connected-p) -(if (not (null ob-clojure-literate-session)) -(seq-contains cider-connections (get-buffer ob-clojure-literate-session - cider-connections - (not (null ob-clojure-literate-session))) -;; return back to original file. -(if (not (and (= (length (ob-
[O] [PATCH] support insert link without write result to :file link
I added this patch to handle posted question case. This will improve Org-mode links with org-babel resulta lot. Make Org-mode can insert link as user want at many places. Hope can be merged. On 03/27/2018 02:06 AM, Michael Welle wrote: Hello, stardiviner writes: I tried the following example: ``` #+begin_src shell :mkdir yes :dir "data/tmp" :results file :file "crackzor_1.0.c.gz" wget -c "http://ben.akrin.com/crackzor/crackzor_1.0.c.gz"; #+end_src #+RESULTS: [[file:data/tmp/crackzor_1.0.c.gz]] ``` But the files is empty, I check out Org-mode document about `:file` header argument, seems org-babel will write result to `:file` specified file. I wander how I can handle upper case correctly? (don't write result to file, just insert a link to downloaded file as a result) well, your above example would work, at least to a certain point, if you let wget write its output to stdout: #+begin_src sh :mkdir yes :dir "/tmp" :results file :file "crackzor_1.0.c.gz" wget -c "http://ben.akrin.com/crackzor/crackzor_1.0.c.gz"; -O- #+end_src But I don't now know how to get the encoding right (I think that's the problem). The zip file contains rubbish. What I would do instead is something like this: #+begin_src sh :mkdir yes :dir "/tmp" :results raw :var fn="crackzor_1.0.c.gz" /usr/bin/wget -c "http://ben.akrin.com/crackzor/${fn}"; echo "[[file:/tmp/${fn}]]" #+end_src Regards hmw >From 6e6f04016525ece12610833d731e8a92d4473ee2 Mon Sep 17 00:00:00 2001 From: stardiviner Date: Tue, 27 Mar 2018 10:50:03 +0800 Subject: [PATCH] * ob-core.el (org-babel-execute-src-block) support :results link. --- etc/ORG-NEWS| 9 + lisp/ob-core.el | 11 +++ 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/etc/ORG-NEWS b/etc/ORG-NEWS index d479b982c..e2a02d0a2 100644 --- a/etc/ORG-NEWS +++ b/etc/ORG-NEWS @@ -113,6 +113,15 @@ now sort according to the localeâs collation rules instead of by code-point. ** New features +*** add ~:results link~ support for org-babel +This will support only insert file link without writing result to file. +Like this case: +#+begin_src shell :dir "data/tmp" :results link :file "crackzor_1.0.c.gz" +wget -c "http://ben.akrin.com/crackzor/crackzor_1.0.c.gz"; +#+end_src + +#+RESULTS: +[[file:data/tmp/crackzor_1.0.c.gz]] *** Add ~:session~ support of ob-js for js-comint #+begin_src js :session "*Javascript REPL*" console.log("stardiviner") diff --git a/lisp/ob-core.el b/lisp/ob-core.el index e33168278..a0e5663ec 100644 --- a/lisp/ob-core.el +++ b/lisp/ob-core.el @@ -707,10 +707,13 @@ block." ;; If non-empty result and :file then write to :file. (when file (let ((graphics? - (member "graphics" (cdr (assq :result-params params) - ;; Handle :results graphics :file case. Don't - ;; write result to file if result is graphics. - (when (and result (not graphics?)) + (member "graphics" (cdr (assq :result-params params + (file-link? + (member "link" (cdr (assq :result-params params) + ;; If :results are special types like `link', `graphics' etc. + ;; don't write result to :file. literately only + ;; insert link to :file. + (when (and result (not graphics?) (not file-link?)) (with-temp-file file (insert (org-babel-format-result result (cdr (assq :sep params))) -- 2.16.3
Re: [O] [PATCH v2 0/3] org-sbe fixes
Hello, Nicolas Goaziou writes: > Alan Schmitt writes: > >> On 2018-03-25 23:06, Nicolas Goaziou writes: >> >>> I have reverted your changes from maint. >> >> Should there be a new release? This change is present in 9.1.8. > > I /think/ I released Org 9.1.9, but I usually goof it up, so I'm Cc'ing > Bastien. Yes, something went wrong in the release process, I just released 9.1.9 manually. All best, -- Bastien
Re: [O] preview embedded latex fragments error with my settings
I have divsvgm program on my arch linuxsystem. And "/tmp/orgtexhClnu9.dvi" does not exist, it is not produced. Only "/tmp/orgtexhClnu9.tex" and "/tmp/orgtexhClnu9.log" two file. On 03/27/2018 12:20 AM, Nicolas Goaziou wrote: Hello, stardiviner writes: I have following settings to make org-mode export to PDF works better, like export with src block syntax highlighting with "minted", and support Chinese export with latex package "ctex" and specify default font etc all stuffs. I used to disabled org-mode startup preview latex fragments. Today I use [C-c C-x C-l] to preview latex fragments, it raised error (I shorten the error stack manuallyfor easy to read): Do you have dvisvgm program on your system? Does the file "/tmp/orgtexhCLnu9.dvi" exist? Regards,
[O] Changing Modes and Headline Closing
Hello, I'm editing a large document, mostly text, that is intended for a website -- thus html is interspersed throughout, though not enough to justify editing the document as a dedicated .html file. I only use html-mode if I have to edit a list with 6-7 uls / ols nested in, mainly to keep track of the position of each li. This is fine, but when I switch back to org-mode everything collapses back to the top-level headline. My workaround is to kill-buffer and re-open rather than M-x org-mode out of html-mode. Is there a way to switch back to org-mode via M-x org-mode while preserving the state of the open / closed headlines? Thanks, John
Re: [O] [PATCH v2 0/3] org-sbe fixes
On 2018-03-26 21:42, Nicolas Goaziou wrote: I'm talking about call_foo() syntax. I see no fundamental difference between (org-sbe-v2 "func" ...) and call_func(...). Sorry, how do you invoke call_func from lisp, or a table formula? -- Best regards, Vladimir
Re: [O] Temporary delay like --2d does not work correctly.
Hello, h...@protonmail.com writes: > Hi, > > With the latest release, --2d not work correctly. > Use the test case in > http://lists.gnu.org/archive/html/emacs-orgmode/2013-02/msg00554.html > > * TODO 1a > SCHEDULED: <2018-02-24 Sat +1m --2d> > * TODO 2a > SCHEDULED: <2018-03-24 Sat +1m --2d> > * TODO 1b > SCHEDULED: <2018-02-25 Sun +1m --2d> > * TODO 2b > SCHEDULED: <2018-03-25 Sun +1m --2d> > * TODO 1c > SCHEDULED: <2018-02-26 Mon +1m --2d> > * TODO 2c > SCHEDULED: <2018-03-26 Mon +1m --2d> > > In the agenda of today ([2018-03-26 Mon]) shows 1a 2a 1b 2b 1c, > but 1a 2a 1b 1c are expected. > > Please help fix it. Fixed. Thank you. Regards, -- Nicolas Goaziou
Re: [O] [PATCH v2 0/3] org-sbe fixes
Vladimir Panteleev writes: > By inline Babel calls, do you mean as described in > https://orgmode.org/manual/Evaluating-code-blocks.html ? I see there > "org-babel-execute-src-block", but it seems to attempt to infer the > src block to execute rather than letting the caller specify one. I'm talking about call_foo() syntax. I see no fundamental difference between (org-sbe-v2 "func" ...) and call_func(...).
Re: [O] [PATCH v2 0/3] org-sbe fixes
Hello, Alan Schmitt writes: > On 2018-03-25 23:06, Nicolas Goaziou writes: > >> I have reverted your changes from maint. > > Should there be a new release? This change is present in 9.1.8. I /think/ I released Org 9.1.9, but I usually goof it up, so I'm Cc'ing Bastien. Regards, -- Nicolas Goaziou0x80A93738
Re: [O] [PATCH v2 0/3] org-sbe fixes
On 2018-03-26 20:16, Nicolas Goaziou wrote: Hello, Vladimir Panteleev writes: What about org-sbe is specific to tables? I'm thinking that the generic replacement could be used elsewhere, e.g.: (with-current-buffer some-org-mode-buffer (org-sbe-v2 "func" ...args...)) The generic replacement of table cells, right. Otherwise you have inline Babel calls. Sorry, I'm not following. By "generic replacement" I meant a replacement (new function that will replace the current org-sbe) that is generic (not restricted to being used in table formulas by design). I think you seem to have interpreted to mean substitution of table cell references. This is actually not pertaining org-sbe or its replacement, because it is not done in org-sbe, but by code invoking it. By inline Babel calls, do you mean as described in https://orgmode.org/manual/Evaluating-code-blocks.html ? I see there "org-babel-execute-src-block", but it seems to attempt to infer the src block to execute rather than letting the caller specify one. So, as far as I can see, org-sbe's successor doesn't need to have anything specific to tables, or have I missed something? -- Best regards, Vladimir
Re: [O] [OT] nobody (none)
This would appear to be gnus specific. I use mu4e and have not noticed anything along these lines. Suggest a gnus specific list might be the go. Tim Roger Mason writes: > Hello, > > An off topic problem. I'm asking here because I noticed this problem > first in this list, but it has spread. > > I read e-mail using gnus (v5.13) in emacs (25.3.1) on FreeBSD (10.3). > Some months ago I noticed some messages in this list displaying with > sender 'nobody' and subject '(none)' in gnus. As the months have passed > the number of such messages has increased many-fold and spread to other > lists. On opening the offending e-mail it is usual that the message has > both sender and subject fields with plausible contents. Often, but not > exclusively, the 'nobody' messages originate from gmail accounts. > > I have not changed any settings at my end so I assume some commonly used > component of the chain of email applications has changed settings and > that I need to respond to that change. But where? and what? > > Any hints on where to look would be most helpful. > > Again, sorry for the OT message. > > Roger -- Tim Cross
Re: [O] [PATCH v2 0/3] org-sbe fixes
Hello, Vladimir Panteleev writes: > Hi, > > On 2018-03-25 21:06, Nicolas Goaziou wrote: >> I agree "org-sbe" should be rewritten. However, it is specific to tables >> because it is meant to be used in a TBLFM line. Its replacement could >> live in "org-table.el", though. > > What about org-sbe is specific to tables? > > I'm thinking that the generic replacement could be used elsewhere, e.g.: > > (with-current-buffer some-org-mode-buffer > (org-sbe-v2 "func" ...args...)) The generic replacement of table cells, right. Otherwise you have inline Babel calls. Regards, -- Nicolas Goaziou0x80A93738
[O] [OT] nobody (none)
Hello, An off topic problem. I'm asking here because I noticed this problem first in this list, but it has spread. I read e-mail using gnus (v5.13) in emacs (25.3.1) on FreeBSD (10.3). Some months ago I noticed some messages in this list displaying with sender 'nobody' and subject '(none)' in gnus. As the months have passed the number of such messages has increased many-fold and spread to other lists. On opening the offending e-mail it is usual that the message has both sender and subject fields with plausible contents. Often, but not exclusively, the 'nobody' messages originate from gmail accounts. I have not changed any settings at my end so I assume some commonly used component of the chain of email applications has changed settings and that I need to respond to that change. But where? and what? Any hints on where to look would be most helpful. Again, sorry for the OT message. Roger
Re: [O] How to let ob-shell to download file and get result as a link to file?
Hello, stardiviner writes: > I tried the following example: > > ``` > > #+begin_src shell :mkdir yes :dir "data/tmp" :results file :file > "crackzor_1.0.c.gz" > wget -c "http://ben.akrin.com/crackzor/crackzor_1.0.c.gz"; > #+end_src > > #+RESULTS: > [[file:data/tmp/crackzor_1.0.c.gz]] > ``` > > But the files is empty, I check out Org-mode document about `:file` > header argument, seems org-babel will write result to `:file` specified > file. I wander how I can handle upper case correctly? (don't write > result to file, just insert a link to downloaded file as a result) well, your above example would work, at least to a certain point, if you let wget write its output to stdout: #+begin_src sh :mkdir yes :dir "/tmp" :results file :file "crackzor_1.0.c.gz" wget -c "http://ben.akrin.com/crackzor/crackzor_1.0.c.gz"; -O- #+end_src But I don't now know how to get the encoding right (I think that's the problem). The zip file contains rubbish. What I would do instead is something like this: #+begin_src sh :mkdir yes :dir "/tmp" :results raw :var fn="crackzor_1.0.c.gz" /usr/bin/wget -c "http://ben.akrin.com/crackzor/${fn}"; echo "[[file:/tmp/${fn}]]" #+end_src Regards hmw
Re: [O] preview embedded latex fragments error with my settings
Hello, stardiviner writes: > I have following settings to make org-mode export to PDF works better, > like export with src block syntax highlighting with "minted", and > support Chinese export with latex package "ctex" and specify default > font etc all stuffs. > > I used to disabled org-mode startup preview latex fragments. Today > I use [C-c C-x C-l] to preview latex fragments, it raised error (I > shorten the error stack manuallyfor easy to read): Do you have dvisvgm program on your system? Does the file "/tmp/orgtexhCLnu9.dvi" exist? Regards, -- Nicolas Goaziou
Re: [O] #+bind options ignored during async export
Hello, Julien Cubizolles writes: > The options specified by #+ keywords are set during asynchronous export > whereas those specified by the #+BIND: method aren't. In the following > example, org-latex-image-default-width is set to .25\linewidth only in > synchronous export whereas the author is set regardless of the type of > export. > > #+AUTHOR: myself > #+BIND: org-latex-image-default-width ".25\\linewidth" > > * 1st heading > [[file:some_picture.png]] > > I think both the #+KEYWORD: and #+BIND: should have the same behaviour > whereas one is using async export or not. I don't think it is related. Maybe `org-export-allow-bind-keywords' is nil in your async configuration. Regards, -- Nicolas Goaziou
[O] preview embedded latex fragments error with my settings
I have following settings to make org-mode export to PDF works better, like export with src block syntax highlighting with "minted", and support Chinese export with latex package "ctex" and specify default font etc all stuffs. I used to disabled org-mode startup preview latex fragments. Today I use [C-c C-x C-l] to preview latex fragments, it raised error (I shorten the error stack manuallyfor easy to read): ``` Debugger entered--Lisp error: (error "File \"/tmp/orgtexhCLnu9.dvi\" wasn’t produced. Please adjust ‘dvisvgm’ part of ‘org-preview-latex-process-alist’.") signal(error ("File \"/tmp/orgtexhCLnu9.dvi\" wasn’t produced. Please adjust ‘dvisvgm’ part of ‘org-preview-latex-process-alist’.")) error("File \"/tmp/orgtexhCLnu9.dvi\" wasn't produced. Please adjust `dvisvgm' part of `org-preview-latex-process-alist'.") (if (org-file-newer-than-p output time) nil (error (format "File %S wasn't produced%s" output err-msg))) (let* ((base-name (file-name-base source)) (full-name (file-truename source)) (out-dir (or (file-name-directory source) "./")) (output (expand-file-name (concat base-name "." ext) out-dir)) (time (current-time)) (err-msg (if (stringp err-msg) (concat ". " err-msg) ""))) (let ((wconfig (current-window-configuration))) (unwind-protect (progn (cond ((functionp process) (funcall process (shell-quote-argument source))) ((consp process) (let ((log-buf (and log-buf (get-buffer-create log-buf))) (spec (append spec (list (cons 98 (shell-quote-argument base-name)) (cons 102 (shell-quote-argument source)) (cons 70 (shell-quote-argument full-name)) (cons 111 (shell-quote-argument out-dir)) (cons 79 (shell-quote-argument output)) (let ((--dolist-tail-- process)) (while --dolist-tail-- (let ((command (car --dolist-tail--))) (shell-command (format-spec command spec) log-buf) (setq --dolist-tail-- (cdr --dolist-tail--) (if log-buf (progn (save-current-buffer (set-buffer log-buf) (compilation-mode)) (t (error "No valid command to process %S%s" source err-msg (set-window-configuration wconfig))) (if (org-file-newer-than-p output time) nil (error (format "File %S wasn't produced%s" output err-msg))) output) org-compile-file("/tmp/orgtexhCLnu9.tex" ("latex -interaction nonstopmode -output-directory %o %f") "dvi" "Please adjust `dvisvgm' part of `org-preview-latex-process-alist'." #Output*>) (let* ((err-msg (format "Please adjust `%s' part of `org-preview-latex-process-alist'." processing-type)) .. (let ((--dolist-tail-- post-clean)) (while --dolist-tail-- (let ((e (car --dolist-tail--))) (if (file-exists-p (concat texfilebase e)) (progn (delete-file (concat texfilebase e (setq --dolist-tail-- (cdr --dolist-tail--) image-output-file)) org-create-formula-image("$\\LaTeX$" "/home/stardiviner/Org/Projects/Programming Projects/ltximg/org-ltximg_033e468d0c9a55db5895a459bfaa279c4e322eb9.svg" (:foreground default :background default :scale 2.0 :html-foreground "Black" :html-background "Transparent" :html-scale 2.5 :matchers ("begin" "$1" "$" "$$" "\\(" "\\[")) forbuffer dvisvgm) (if (file-exists-p movefile) nil (org-create-formula-image value movefile options forbuffer processing-type)) (let* ((processing-info (cdr (assq processing-type org-preview-latex-process-alist))) (face (face-at-point)) (fg (let ((color (plist-get org-format-latex-options :foreground))) (if (and forbuffer (eq color 'auto)) (face-attribute face :foreground nil 'default) color))). (delete-region beg end) (insert (org-format-latex-as-mathml value block-type prefix dir))) (t (error "Unknown conversion process %s for LaTeX fragments" processing-type))) (let ((block-type (eq type 'latex-environment)) (value (org-element-property :value context)) (beg (org-element-property :begin context)) (end (save-excursion (goto-char (org-element-property :end context))..(goto-char beg) (delete-region beg end) (insert (org-format-latex-as-mathml value block-type prefix dir))) (t (error "Unknown conversion process %s for LaTeX fragments" processing-type (progn (let ((block-type (eq type 'latex-environment)) (value (org-element-property :value context)).. (setq cnt (1+ cnt)) (if msg (progn (message msg cnt))) (goto-char beg) (delete-region beg end) (insert (org-format-latex-as-mathml value block-type prefix dir))) (t (error "Unknown conversion process %s for LaTeX fragments" processing-type) (if (memq type '(latex-environment latex-fragment)) (progn (let ((block-type (eq type 'latex-environment)) (value (org-element-property :value context)) (beg (org-element-property :begin context)). (t (error "Unknown conversion process %s for LaTeX fragments" processing-type)) (let* ((context (org-element-context)) (type (org-element-type context))) (if (memq type '(latex-environment latex-fragment)) (progn (let ((block-type (eq type 'latex-environment)).. (setq cnt (1+ cnt)) (if msg (progn (message msg cnt))) (goto-char be
[O] How to let ob-shell to download file and get result as a link to file?
I tried the following example: ``` #+begin_src shell :mkdir yes :dir "data/tmp" :results file :file "crackzor_1.0.c.gz" wget -c "http://ben.akrin.com/crackzor/crackzor_1.0.c.gz"; #+end_src #+RESULTS: [[file:data/tmp/crackzor_1.0.c.gz]] ``` But the files is empty, I check out Org-mode document about `:file` header argument, seems org-babel will write result to `:file` specified file. I wander how I can handle upper case correctly? (don't write result to file, just insert a link to downloaded file as a result)
[O] preview embedded latex fragments error with my settings
I have following settings to make org-mode export to PDF works better, like export with src block syntax highlighting with "minted", and support Chinese export with latex package "ctex" and specify default font etc all stuffs. I used to disabled org-mode startup preview latex fragments. Today I use [C-c C-x C-l] to preview latex fragments, it raised error (I shorten the very long error stack): ``` Debugger entered--Lisp error: (error "File \"/tmp/orgtexhCLnu9.dvi\" wasn’t produced. Please adjust ‘dvisvgm’ part of ‘org-preview-latex-process-alist’.") signal(error ("File \"/tmp/orgtexhCLnu9.dvi\" wasn’t produced. Please adjust ‘dvisvgm’ part of ‘org-preview-latex-process-alist’.")) error("File \"/tmp/orgtexhCLnu9.dvi\" wasn't produced. Please adjust `dvisvgm' part of `org-preview-latex-process-alist'.") (if (org-file-newer-than-p output time) nil (error (format "File %S wasn't produced%s" output err-msg))) (let* ((base-name (file-name-base source)) (full-name (file-truename source)) (out-dir (or (file-name-directory source) "./")) (output (expand-file-name (concat base-name "." ext) out-dir)) (time (current-time)) (err-msg (if (stringp err-msg) (concat ". " err-msg) ""))) (let ((wconfig (current-window-configuration))) (unwind-protect (progn (cond ((functionp process) (funcall process (shell-quote-argument source))) ((consp process) (let ((log-buf (and log-buf (get-buffer-create log-buf))) (spec (append spec (list (cons 98 (shell-quote-argument base-name)) (cons 102 (shell-quote-argument source)) (cons 70 (shell-quote-argument full-name)) (cons 111 (shell-quote-argument out-dir)) (cons 79 (shell-quote-argument output)) (let ((--dolist-tail-- process)) (while --dolist-tail-- (let ((command (car --dolist-tail--))) (shell-command (format-spec command spec) log-buf) (setq --dolist-tail-- (cdr --dolist-tail--) (if log-buf (progn (save-current-buffer (set-buffer log-buf) (compilation-mode)) (t (error "No valid command to process %S%s" source err-msg (set-window-configuration wconfig))) (if (org-file-newer-than-p output time) nil (error (format "File %S wasn't produced%s" output err-msg))) output) org-compile-file("/tmp/orgtexhCLnu9.tex" ("latex -interaction nonstopmode -output-directory %o %f") "dvi" "Please adjust `dvisvgm' part of `org-preview-latex-process-alist'." #Output*>) (let* ((err-msg (format "Please adjust `%s' part of `org-preview-latex-process-alist'." processing-type)) (progn (delete-file (concat texfilebase e (setq --dolist-tail-- (cdr --dolist-tail--) image-output-file) (let* ((processing-type (or processing-type org-preview-latex-default-process)) (processing-info (setq --dolist-tail-- (cdr --dolist-tail--) image-output-file)) org-create-formula-image("$\\LaTeX$" "/home/stardiviner/Org/Projects/Programming Projects/ltximg/org-ltximg_033e468d0c9a55db5895a459bfaa279c4e322eb9.svg" (:foreground default :background default :scale 2.0 :html-foreground "Black" :html-background "Transparent" :html-scale 2.5 :matchers ("begin" "$1" "$" "$$" "\\(" "\\[")) forbuffer dvisvgm) (if (file-exists-p movefile) nil (org-create-formula-image value movefile options forbuffer processing-type)) (let* ((processing-info (cdr (assq processing-type org-preview-latex-process-alist)))... (goto-char beg) (delete-region beg end) (insert (org-format-latex-as-mathml value block-type prefix dir))) (t (error "Unknown conversion process %s for LaTeX fragments" processing-type))) (let ((block-type (eq type 'latex-environment)) (value (org-element-property :value context)). (setq cnt (1+ cnt)) (if msg (progn (message msg cnt))) (goto-char beg) (delete-region beg end) (insert (org-format-latex-as-mathml value block-type prefix dir))) (t (error "Unknown conversion process %s for LaTeX fragments" processing-type (progn (let ((block-type (eq type 'latex-environment)) (value (org-element-property :value context)) ... (insert (org-format-latex-as-mathml value block-type prefix dir))) (t (error "Unknown conversion process %s for LaTeX fragments" processing-type) (if (memq type '(latex-environment latex-fragment)) (progn (let ((block-type (eq type 'latex-environment)) (value (org-element-property :value context)) (beg (org-element-property :begin context)) (end (save-excursion (goto-char (org-element-property :end context)) (skip-chars-backward " \15\11\n") (point (cond ((eq processing-type 'mathjax) (goto-char beg) (delete-region beg end) (insert (org-format-latex-as-mathml value block-type prefix dir))) (t (error "Unknown conversion process %s for LaTeX fragments" processing-type)) (let* ((context (org-element-context)) (type (org-element-type context))) (if (memq type '(latex-environment latex-fragment)) (progn (let ((block-type (eq type 'latex-environment)) (value (org-element-property :value context)) (beg (org-element-property :begin context)) ((eq processing-type 'math
[O] #+bind options ignored during async export
The options specified by #+ keywords are set during asynchronous export whereas those specified by the #+BIND: method aren't. In the following example, org-latex-image-default-width is set to .25\linewidth only in synchronous export whereas the author is set regardless of the type of export. --8<---cut here---start->8--- #+AUTHOR: myself #+BIND: org-latex-image-default-width ".25\\linewidth" * 1st heading [[file:some_picture.png]] --8<---cut here---end--->8--- I think both the #+KEYWORD: and #+BIND: should have the same behaviour whereas one is using async export or not. Julien.
Re: [O] [PATCH] contrib: ob-sclang: Fix compilation issue.
After dive into scel source code, I use cmake build fix. This seems an old problem. Now fixed. On 03/26/2018 07:38 PM, stardiviner wrote: You `(require 'sclang)` cause error on `(require 'sclang-vars)` failed. Because there is no file `sclang-vars.el`. Only file `sclang-vars.el.in` for built-time defaults. When user load sclang from source code of `scel`. This will cause error. Really don't understand why you have to `(require 'sclang)` instead of `(require 'sclang-interp)`? Can you tell me why? On 03/25/2018 07:27 AM, Maxim Cournoyer wrote: Hello! The attached patch fixes a byte compilation issue in ob-sclang.el. Thank you! Maxim
Re: [O] [PATCH] contrib: ob-sclang: Fix compilation issue.
You `(require 'sclang)` cause error on `(require 'sclang-vars)` failed. Because there is no file `sclang-vars.el`. Only file `sclang-vars.el.in` for built-time defaults. When user load sclang from source code of `scel`. This will cause error. Really don't understand why you have to `(require 'sclang)` instead of `(require 'sclang-interp)`? Can you tell me why? On 03/25/2018 07:27 AM, Maxim Cournoyer wrote: Hello! The attached patch fixes a byte compilation issue in ob-sclang.el. Thank you! Maxim
Re: [O] How to escape # character in #+begin_src bash block for html export?
Hello, Nick Dokos writes: [...] > Michael Welle writes: > If you are trying to produce documentation and want to show commands > that the user should type then you probably need an example block: > > #+begin_example > # date > #+end_example another idea: How about using shell code blocks for root commands as well and attaching a CSS class to the block and colour the background? Regards hmw
Re: [O] org-latex-image-default-width ignored
Eric S Fraga writes: > On Sunday, 25 Mar 2018 at 09:52, Julien Cubizolles wrote: >> Found the cause of the problem, my default configuration exports in >> async mode, so this variable should be set in >> org-export-async-init.el. >> >> Is there a way to have a variable set during export to avoid setting it >> for all exports? > > I've never used the async export so I am not sure but maybe check out > the #+bind: directive? I tried --8<---cut here---start->8--- #+BIND: org-latex-image-default-width ".3\\linewidth" --8<---cut here---end--->8--- with no success in async mode, but it works in synchronous mode. I guess I'll avoid async mode for now on, or use a set of different org-export-async-init.el files for different files. Nevertheless I think it would make sense to have a way to set some variables during async export. According to the Org Manual: --8<---cut here---start->8--- Emacs variables can become buffer-local during export by using the BIND keyword. Its syntax is ‘#+BIND: variable value’. This is particularly useful for in-buffer settings that cannot be changed using keywords. --8<---cut here---end--->8--- But the options set using #+ keywords are used during async export while those set using #+BIND are ignored. A "+BIND-ASYNC would come in handy. Julien.
Re: [O] [PATCH v2 0/3] org-sbe fixes
On 2018-03-25 23:06, Nicolas Goaziou writes: > I have reverted your changes from maint. Should there be a new release? This change is present in 9.1.8. Best, Alan -- OpenPGP Key ID : 040D0A3B4ED2E5C7 Monthly Athmospheric CO₂, Mauna Loa Obs. 2018-02: 408.35, 2017-02: 406.42 signature.asc Description: PGP signature