Re: [O] Bug: bug for org-compile-file on Windows
Hello, Mirko Vukovicwrites: > I was not able to preview latex fragments using > org-toggle-latex-fragment (C-c C-x C-l) > > I traced the problem to the (shell-command ...) in org-compile-file > during the dvipng step. > > The problem was in the formatting of the destination file (the -o switch). > It consists > of the directory and filename. Both were enclosed in double quotes, so > that when concatenated the string looked like this: > \"path\"\"filename\".extension Thanks. However, this issue was fixed a few days ago. The fix should be available in today's Org ELPA, or in the yet to be released Org 9.0.2. Regards, -- Nicolas Goaziou
Re: [O] Multiple underscores crash org latex export; other exporters survive
Hello, Scott Randbywrites: > It seems odd to me that Org would see multiple subscripts as being > really one subscript. It doesn't. LaTeX does. Org clearly translates a_b_c as two consecutive subscript components. Then LaTeX visually merges them. > I realize that Org is not a front-end to LaTeX. But the standards of > other output formats are not the standards of LaTeX. Different output > formats have different purposes. In this case, one could view Org as > forcing text mode on the user when math mode is appropriate. Who knows what mode is appropriate? Certainly not Org. >> In Org, if you want to enter math mode, you need to explicitly request >> it, e.g., with: >> >> a_{$1 + 1$} > > If this was true, then a_b would be exported to a\_b instead of > a\(_\text{b}\). Of course note, a\_b is not even a subscript. a\(_\text{b}\) is a robust way to get "textual" subscript, which is the default for Org. > Math mode is entered any time \(...\) is used, and in the a_b case, > the user did not explicitly request it. AFAIK, there is no way in LaTeX to get subscript without entering, temporarily in this case, in math mode. Anyway, per \text{}, "b" is not really in math mode, as you noticed. Regards, -- Nicolas Goaziou
Re: [O] Multiple underscores crash org latex export; other exporters survive
On 12/10/2016 07:05 PM, Nicolas Goaziou wrote: > Hello, > > Scott Randbywrites: > >> First, a_b_c and a_bc give nearly identical results when processed >> except that the spacing between letters in the subscript coming from >> a_b_c is wider than that in the subscript coming from a_bc. The spacing >> issue can be seen more clearly by comparing the processed versions of >> a_b_c_d and a_bcd. The wider spacing looks funny when compared to >> surrounding text. >> >> Second, I've been considering the issue of what the primary meaning of >> a_b_c should be when it is used in a file. Since underscores are used in >> LaTeX to designate subscripts in mathematical expressions, it is clear >> to me that a_b_c should mean a_(b_c) instead of a_(bc). Similarly, a^b^c >> should mean a^(b^c) instead of a^(bc). I really can't think of any case >> when I would type in a_b_c in order to get a_(bc). > > I chose this translation because > > 1. It was the easiest to implement; > 2. It is the closest to what Org (unlike to LaTeX) really sees; It seems odd to me that Org would see multiple subscripts as being really one subscript. And the spacing in the subscript when a_b_c is exported and processed is still bad. > 3. It doesn't matter since it is a pathological case. I agree. > >> Finally, I question the use of text style instead of math style when >> a_b, a^b, or similar expressions are exported to LaTeX. TeX was designed >> to produce beautiful typeset mathematics, and the math style is an >> essential part of that beauty. Math style is also the expected way of >> presenting mathematical expressions in all of the professional journals >> that I read and use. New users may not be aware of professional >> standards, but we could help them be aware by translating a_b_c as >> \(a_{b_{c}}\) exactly. Similarly a^b^c would be translated as >> \(a^{b^{c}}\) exactly. > > I strongly disagree. > > Org is not a front-end to LaTeX. LaTeX is but one of its export output > formats. In most of the others, sup/superscript doesn't force math mode > on the user. I realize that Org is not a front-end to LaTeX. But the standards of other output formats are not the standards of LaTeX. Different output formats have different purposes. In this case, one could view Org as forcing text mode on the user when math mode is appropriate. > > In Org, if you want to enter math mode, you need to explicitly request > it, e.g., with: > > a_{$1 + 1$} If this was true, then a_b would be exported to a\_b instead of a\(_\text{b}\). Math mode is entered any time \(...\) is used, and in the a_b case, the user did not explicitly request it. Scott Randby
[O] Bug: bug for org-compile-file on Windows
To: emacs-orgmode@gnu.org Subject: Bug: bug for org-compile-file on Windows [9.0.1 (release_9.0.1-8-g25a97f.dirty @ c:/Users/977315/.emacs.d/elisp/org/)] From: Mirko Vukovic--text follows this line-- Remember to cover the basics, that is, what you expected to happen and what in fact did happen. You don't know how to make a good report? See http://orgmode.org/manual/Feedback.html#Feedback Your bug report will be posted to the Org mailing list. I was not able to preview latex fragments using org-toggle-latex-fragment (C-c C-x C-l) I traced the problem to the (shell-command ...) in org-compile-file during the dvipng step. The problem was in the formatting of the destination file (the -o switch). It consists of the directory and filename. Both were enclosed in double quotes, so that when concatenated the string looked like this: \"path\"\"filename\".extension By trial and error in the scratch buffer I was able to confirm that removing the double \" fixed the problem. A quick and dirty fix was to post-process the string to remove the duplicate quoted double quote like so: (shell-command (replace-regexp-in-string "\"\"" "" (format-spec command spec)) log-buf) An elisp wizard will undoubdetly be able to create a more robust solution. Emacs : GNU Emacs 24.5.1 (i686-pc-mingw32) of 2015-04-11 on LEG570 Package: Org mode version 9.0.1 (release_9.0.1-8-g25a97f.dirty @ c:/Users/977315/.emacs.d/elisp/org/) current state: == (setq org-latex-format-headline-function 'org-latex-format-headline-default-function org-pretty-entities t org-html-format-inlinetask-function 'org-html-format-inlinetask-default-function org-agenda-skip-scheduled-if-done t org-tab-first-hook '(org-babel-hide-result-toggle-maybe org-babel-header-arg-expand) org-link-parameters '(("rmail" :follow org-rmail-open :store org-rmail-store-link) ("mhe" :follow org-mhe-open :store org-mhe-store-link) ("irc" :follow org-irc-visit :store org-irc-store-link) ("info" :follow org-info-open :export org-info-export :store org-info-store-link) ("gnus" :follow org-gnus-open :store org-gnus-store-link) ("docview" :follow org-docview-open :export org-docview-export :store org-docview-store-link) ("bibtex" :follow org-bibtex-open :store org-bibtex-store-link) ("bbdb" :follow org-bbdb-open :export org-bbdb-export :complete org-bbdb-complete-link :store org-bbdb-store-link) ("w3m" :store org-w3m-store-link) ("id" :follow org-id-open) ...) org-archive-hook '(org-attach-archive-delete-maybe) org-id-method 'org org-refile-targets '(...) org-preview-latex-process-alist '((dvipng :programs ("latex" "dvipng") :description "dvi > png" :message "you need to install the programs: latex and dvipng." :image-input-type "dvi" :image-output-type ...) (dvisvgm :programs ("latex" "dvisvgm") :description "dvi > svg" :post-clean (quote (\.tex \.aux)) :message "you need to install the programs: latex and dvisvgm." :use-xcolor ...) (imagemagick :programs ("latex" "convert") :description "pdf > png" :message "you need to install the programs: latex and imagemagick." :use-xcolor t :image-input-type ...) ) org-modules '(org-habit org-w3m org-bbdb org-bibtex org-docview org-gnus org-info org-irc org-mhe org-rmail) org-cycle-hook '(org-inlinetask-hide-tasks org-cycle-hide-archived-subtrees org-cycle-hide-drawers org-cycle-show-empty-lines org-optimize-window-after-visibility-change) org-agenda-custom-commands '(("1" "Q1" tags-todo "+important+urgent") ("2" "Q2" tags-todo "+important-urgent") ("3" "Q3" tags-todo "-important+urgent") ("4" "Q3" tags-todo "-important-urgent")) org-agenda-before-write-hook '(org-agenda-add-entry-text) org-speed-command-hook '(org-speed-command-default-hook org-babel-speed-command-hook) org-ascii-format-inlinetask-function 'org-ascii-format-inlinetask-default org-blocker-hook '(org-block-todo-from-children-or-siblings-or-parent org-depend-block-todo) org-babel-pre-tangle-hook '(save-buffer) org-return-follows-link t org-occur-hook '(org-first-headline-recenter) org-font-lock-hook '(org-inlinetask-fontify) org-link-file-path-type 'relative org-trigger-hook '(org-depend-trigger-todo) org-html-format-headline-function 'org-html-format-headline-default-function org-structure-template-alist '(("b" "#+BEGIN_BEAMER\n\n#+END_BEAMER" "") ("s" "#+BEGIN_SRC ?\n\n#+END_SRC" "\n\n") ("e" "#+BEGIN_EXAMPLE\n?\n#+END_EXAMPLE" "\n?\n") ("q" "#+BEGIN_QUOTE\n?\n#+END_QUOTE" "\n?\n") ("v" "#+BEGIN_VERSE\n?\n#+END_VERSE" "\n?\n") ("V" "#+BEGIN_VERBATIM\n?\n#+END_VERBATIM" "\n?\n") ("c" "#+BEGIN_CENTER\n?\n#+END_CENTER" "\n?\n") ("l" "#+BEGIN_LaTeX\n?\n#+END_LaTeX" "\n?\n") ("L" "#+LaTeX: " "?") ("h" "#+BEGIN_HTML\n?\n#+END_HTML" "\n?\n") ...) org-tag-persistent-alist '(("important" . 105) ("urgent" . 117)) org-log-done 'note
Re: [O] Bug: Can't not export source block [9.0.1 (9.0.1-elpa @ /Users/user/.emacs.d/elpa/org-20161118/)]
Thanks for you reply. Reinstalling does not help until I follow http://emacs.stackexchange.com/questions/28441/org-mode-9-unable-to-eval-code-blocks , remove all *.elc in the org directory and byte-compile all again. Best regards, Ivan On Mon, Dec 12, 2016 at 5:34 AM, Nicolas Goaziouwrote: > Hello, > > Jiajian Huang writes: > > > After update to org 9.0, the source code block can't no longer be > exported > > and > > org alerts an error. > > > > The minimal config I use is > > > > (package-initialize) > > > > (setq debug-on-error t > > debug-on-signal nil > > debug-on-quit nil) > > > > (require 'org) > > > > where the org is installed by elpa. > > > > The test.org file contains > > > > #+BEGIN_SRC latex :results drawer :exports results > > \begin{eqnarray} > > a + b = c \label{eq1} > > \end{eqnarray} > > #+END_SRC > > > > ONLY. Running C-c C-e l l gives error > > > > Debugger entered--Lisp error: (wrong-type-argument stringp nil) > > I cannot reproduce it. I suspected an installation that went wrong. You > could try to remove Org completely and install it again. > > Regards, > > -- > Nicolas Goaziou >
Re: [O] org-depend: dependencies between TODO entries in different files
Carsten Dominik writes: > Hi, > > I can take a look at that. Unless Nicolas already is working on it, of > course. > > [...] Is anyone besides Karl using it regularly? I don't want to > break anything by changing it. Hi Carsten, I started to use it a few months ago, and I am using it more and more when I have to gather a bunch of existing actions and give a follow-up for such a subset. Or when I need to refer to a subaction not directly related, before I can go further in a broader project. As Karl, I do split dependencies across files, so this would be a nice improvement. I considered to give a try for making a change, but I know only very basic ELisp, and I lack of time to experiment, so I lived with it. I would be greatful if you would do it for us :) And thank you Karl for asking ! > Maybe it would, in fact, be better to first look in the local file and > then try org-id-find. > > Carsten I like that idea. Thank you for taking care of it (and for creating Org ^^), Kind Regards, Christophe > On Thu, Aug 25, 2016 at 5:11 PM, Karl Voitwrote: > >> * Nicolas Goaziou wrote: >> > Hello, >> >> Hello Nicolas, >> >> > Karl Voit writes: >> > >> >> Function org-depend-block-todo uses org-find-entry-with-id (from >> >> org.el) which is using org-find-property which starts with >> >> (goto-char (point-min)) not jumping to any other org-mode buffer. >> >> >> >> Is there a reason behind this design choice? >> > >> > What design choice? >> >> ... that org-depend is using the current document only. >> >> > 1. That `org-find-property' only searches in the current document? >> > >> > 2. That `org-depend-block-todo' uses `org-find-entry-with-id' instead of >> >e.g., `org-id-find'? >> > >> > Property API assumes properties are local to the document. When you >> > search for property "FOO", it means "FOO" in the current buffer, not >> > "FOO" is some other random Org file somewhere in your hard-disk. >> >> Ah, good to know. >> >> Is there a document, where someone is able to learn those >> "meta-patterns" like "Property API assumes properties are local to >> the document"? >> >> > ID property is special for that matter. >> >> Clearly, when you take a look at "id:example-id". >> >> > Whenever Org sets such a property, it updates a location database >> > (which means ID properties shouldn't be changed "manually"). >> >> Being curious: since I only set IDs manually (by typing them into >> the PROPERTIES drawer by myself), do I have to take care of >> "updating some database"? >> >> > So, ID property can efficiently be used to refer to remote >> > documents. >> >> ... which I find ultimately useful to get a "personal wiki". >> >> > As a consequence, it may be useful to use `org-id-find' and >> > fall-back to `org-find-property' in `org-depend-block-todo'. >> > >> >> Who is the current maintainer of org-depend.el? Carsten ist >> >> listed as author in the header. >> > >> > I guess nobody. Do you want to take care of it? >> >> Trust me: with my very limited knowledge of Elisp and Org-mode >> internals, you do not want to see a commit from my side that is >> something other than a typo fix or documentation. ;-) >> >> Can you do us the favour? >> >> Thanks for your insight! >> >> -- >> mail|git|SVN|photos|postings|SMS|phonecalls|RSS|CSV|XML to Org-mode: >>> get Memacs from https://github.com/novoid/Memacs < >> >> https://github.com/novoid/extract_pdf_annotations_to_orgmode + more on >> github >> >> >> -- ---> mailto:r3vli...@citadels.eu Once it's perfectly aimed, the flying arrow goes straight to its target. Thus, don't worry when things go right. There will be enough time to worry about if they go wrong. Then, it's time to fire a new arrow towards another direction. Don't sink. Adapt yourself ! The archer has to shoot accurately and quickly. [Words of Erenthar, the bowman ranger] <---
Re: [O] Bug: Can't not export source block [9.0.1 (9.0.1-elpa @ /Users/user/.emacs.d/elpa/org-20161118/)]
Hello, Jiajian Huangwrites: > After update to org 9.0, the source code block can't no longer be exported > and > org alerts an error. > > The minimal config I use is > > (package-initialize) > > (setq debug-on-error t > debug-on-signal nil > debug-on-quit nil) > > (require 'org) > > where the org is installed by elpa. > > The test.org file contains > > #+BEGIN_SRC latex :results drawer :exports results > \begin{eqnarray} > a + b = c \label{eq1} > \end{eqnarray} > #+END_SRC > > ONLY. Running C-c C-e l l gives error > > Debugger entered--Lisp error: (wrong-type-argument stringp nil) I cannot reproduce it. I suspected an installation that went wrong. You could try to remove Org completely and install it again. Regards, -- Nicolas Goaziou
Re: [O] buffer local org-src-preserve-indentation not respected
Dear Nicolas, Nicolas Goaziouwrites: > Fixed (hopefully) this time. Thank you for the feedback. It's working wonderfully now - thank you very much. David
[O] Bug: Can't not export source block [9.0.1 (9.0.1-elpa @ /Users/user/.emacs.d/elpa/org-20161118/)]
Remember to cover the basics, that is, what you expected to happen and what in fact did happen. You don't know how to make a good report? See http://orgmode.org/manual/Feedback.html#Feedback Your bug report will be posted to the Org mailing list. After update to org 9.0, the source code block can't no longer be exported and org alerts an error. The minimal config I use is (package-initialize) (setq debug-on-error t debug-on-signal nil debug-on-quit nil) (require 'org) where the org is installed by elpa. The test.org file contains #+BEGIN_SRC latex :results drawer :exports results \begin{eqnarray} a + b = c \label{eq1} \end{eqnarray} #+END_SRC ONLY. Running C-c C-e l l gives error Debugger entered--Lisp error: (wrong-type-argument stringp nil) org-babel-exp-src-block() org-babel-exp-process-buffer() org-export-as(latex nil nil nil (:output-file "./test.tex")) org-export-to-file(latex "./test.tex" nil nil nil nil nil) org-latex-export-to-latex(nil nil nil nil) org-export-dispatch(nil) funcall-interactively(org-export-dispatch nil) call-interactively(org-export-dispatch nil nil) command-execute(org-export-dispatch) Emacs : GNU Emacs 25.1.1 (x86_64-apple-darwin16.1.0, Carbon Version 157 AppKit 1504.6) of 2016-11-02 Package: Org mode version 9.0.1 (9.0.1-elpa @ /Users/Yomisuko/.emacs.d/elpa/org-20161118/) current state: == (setq org-tab-first-hook '(org-babel-hide-result-toggle-maybe org-babel-header-arg-expand) org-speed-command-hook '(org-speed-command-default-hook org-babel-speed-command-hook) org-occur-hook '(org-first-headline-recenter) org-metaup-hook '(org-babel-load-in-session-maybe) org-html-format-drawer-function #[514 "\207" [] 3 "\n\n(fn NAME CONTENTS)"] org-latex-format-inlinetask-function 'org-latex-format-inlinetask-default-function org-confirm-shell-link-function 'yes-or-no-p org-ascii-format-inlinetask-function 'org-ascii-format-inlinetask-default org-latex-format-headline-function 'org-latex-format-headline-default-function org-after-todo-state-change-hook '(org-clock-out-if-current) org-latex-format-drawer-function #[514 "\207" [] 3 "\n\n(fn _ CONTENTS)"] org-odt-format-headline-function 'org-odt-format-headline-default-function org-src-mode-hook '(org-src-babel-configure-edit-buffer org-src-mode-configure-edit-buffer) org-agenda-before-write-hook '(org-agenda-add-entry-text) org-babel-pre-tangle-hook '(save-buffer) org-mode-hook '(#[0 "\300\301\302\303\304$\207" [add-hook change-major-mode-hook org-show-block-all append local] 5] #[0 "\300\301\302\303\304$\207" [add-hook change-major-mode-hook org-babel-show-result-all append local] 5] org-babel-result-hide-spec org-babel-hide-all-hashes) org-archive-hook '(org-attach-archive-delete-maybe) org-ascii-format-drawer-function #[771 " \207" [] 4 "\n\n(fn NAME CONTENTS WIDTH)"] org-odt-format-inlinetask-function 'org-odt-format-inlinetask-default-function org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-drawers org-cycle-show-empty-lines org-optimize-window-after-visibility-change) org-confirm-elisp-link-function 'yes-or-no-p org-metadown-hook '(org-babel-pop-to-session-maybe) org-odt-format-drawer-function #[514 "\207" [] 3 "\n\n(fn NAME CONTENTS)"] org-html-format-headline-function 'org-html-format-headline-default-function org-link-parameters '(("id" :follow org-id-open) ("rmail" :follow org-rmail-open :store org-rmail-store-link) ("mhe" :follow org-mhe-open :store org-mhe-store-link) ("irc" :follow org-irc-visit :store org-irc-store-link) ("info" :follow org-info-open :export org-info-export :store org-info-store-link) ("gnus" :follow org-gnus-open :store org-gnus-store-link) ("docview" :follow org-docview-open :export org-docview-export :store org-docview-store-link) ("bibtex" :follow org-bibtex-open :store org-bibtex-store-link) ("bbdb" :follow org-bbdb-open :export org-bbdb-export :complete org-bbdb-complete-link :store org-bbdb-store-link) ("w3m" :store org-w3m-store-link) ("file+sys") ("file+emacs") ("doi" :follow org--open-doi-link) ("elisp" :follow org--open-elisp-link) ("file" :complete org-file-complete-link) ("ftp" :follow (lambda (path) (browse-url (concat "ftp:" path ("help" :follow org--open-help-link) ("http" :follow (lambda (path) (browse-url (concat "http:" path ("https" :follow (lambda (path) (browse-url (concat "https:" path ("mailto" :follow (lambda (path) (browse-url (concat "mailto:; path ("message" :follow (lambda (path) (browse-url (concat "message:" path ("news" :follow (lambda (path) (browse-url (concat "news:; path ("shell" :follow org--open-shell-link)) org-html-format-inlinetask-function 'org-html-format-inlinetask-default-function org-clock-out-hook
Re: [O] setting a custom flag for src blocks
Huh. This is pretty cool, Charles. But I think it will be a little hard for me to implement for lectures, since I really need to quickly write up slides in the half-hour before class... So, instead, I rewrote org-reveal-src-block to do the work for me. I've just written a blog post -- for some reason my posts are no longer showing up on Planet Emacsen (maybe b/c I have soem non-Emas stuff o nthat blog now), but the blog is here: http://matt.hackinghistory.ca/2016/12/11/org-mode-run-code-live-in-a-reveal-slideshow-with-klipse/ I would really love to get feedback on this solution, or any other ones. Thanks as always to all readers and commentators! On Sun, Dec 11, 2016 at 12:19 AM, Charles C. Berrywrote: > On Sat, 10 Dec 2016, Matt Price wrote: > > On Sat, Dec 10, 2016 at 12:19 AM, Matt Price wrote: >> >> >>> >>> On Fri, Dec 9, 2016 at 12:19 PM, Eric S Fraga wrote: >>> >>> On Friday, 9 Dec 2016 at 16:42, Matt Price wrote: > I think I am getting closer, actually (details soon, when I have a > fully working solution)). > > [deleted] > > I *think* that I'm looking for an export filter. From what I can see, it >> has access to all the information that the initial export function does. >> > > It does not. :-( > > When `org-babel-exp-process-buffer' runs (under `org-export-as'), all the > header info is dropped. > > There might be a way to backtrack from the copy buffer to the original and > remap the src blocks, but it seems like the wrong way to go. It would be a > lot of work, I think. > > More below ... > > So now I'm wondering what the easiest way is to set a simple flag for a src >> block, and make that flag available to the export filter. For instance, >> if >> I want a particular block to be renderd in klipse on export, could I >> specify somehow: >> >> #+HEADER: klipsify t >> #+BEGIN_SRC: javascript >> console.log("success"); >> #+END_SRC >> >> or alternatively in a subtree: >> >> * Lots of Examples >> :PROPERTIES: >> #+PROPERTY: header-args:javascript :klipsify t >> :END: >> >> #+BEGIN_SRC: javascript >> console.log("success"); >> #+END_SRC >> >> > I think the better way to go is to do all the formatting in babel. That > is, make a babel src block handle the formatting for you and subvert the > normal mechanisms. > > To do this, write a src block that is given the name of another src > block, that grabs the body (and if you really need it the header > info), formats it as you need, and inserts it in final form wrapped > in an `export html' block. > > So if you had a src block named `codeA' and one named `klipsify' which > has the code needed to render the output you desire depending on the > value of > > : :var src-blk-name="my-codes" > > then a > > #+CALL:klipsify("codeA") > > line will put the output in the exported document. > > Something like this: > > #+NAME: codeA > #+BEGIN_SRC: javascript :eval never-export :exports none > console.log("success"); > #+END_SRC > > #+NAME: klipsify > #+header: :var src-blk-name="my-code" :exports none > #+header: :results raw :wrap export html > #+BEGIN_SRC emacs-lisp > (save-excursion > (org-babel-goto-named-src-block > src-block-name) > (let ((body-code >(org-babel-expand-src-block))) > (klipsify-my-code body-code))) > #+END_SRC > > Obviously, you need to defun `klipsify-my-code' or whatever. > > > All the code blocks would need to be named and have these headers: > > : :eval never-export :exports none > > or maybe > > : :exports results > > You would use the latter, if you want the results of evaluating the code > to appear in the exported document. Put the #+CALL line just before the > code block and then the code will appear first and the results next. > > HTH, > > Chuck >