Re: [O] "COMMENT" keyword not properly documented in the manual

2017-01-09 Thread Alain . Cochard
Hi, and thanks for the feedback.

Nicolas Goaziou writes on Mon  9 Jan 2017 00:51:

 > > Unaware that "COMMENT" was a specific org string,

[...]

 > > I had used it at the beginning of a headline, resulting in biased tag
 > > and string searches ('C-c a m' or 'C-c a s'). (I was unlucky: the
 > > color of the headline was the same as the COMMENT's, so I did not
 > > notice anything strange.) I think I finally understood, and found
 > > about the org-agenda-skip-comment-trees variable, but...

[...]

 > > So it seems to me that something about "COMMENT" should be said at
 > > some place(s) in the "Agenda views" section.

 > Considering COMMENT is primarily export related, one option would
 > be to make `org-agenda-skip-comment-trees' to nil as a default. In
 > this case, it might not even be necessary to document this variable
 > in the manual.
 > 
 > WDYT?

I was initially tempted to suggest that nil would indeed be a better
default for this variable, but in this related post
https://lists.gnu.org/archive/html/emacs-orgmode/2013-05/msg00287.html
Samuel Wales says that

  "It defaults to `t' which I think is a good default."

Considering the time that you experts spend on endless discussions
about what the default value of some variable should be, I'd rather
remain agnostic on this one.  But unless the use of this variable is
obsolete, I feel it has to be documented -- could be as discreet as
one sentence in a footnote.  Otherwise, with a nil default, even
people using the export features would have difficulties to know about
it.

(More generally, what would be the harm of having some appendix with a
list of all customizable variables?  Seems to me it could help
beginners to learn Org; sure, there is 'C-h v org-', but it's not
exactly the same for me.)

a.

-- 
EOST (École et Observatoire des Sciences de la Terre) 
IPG (Institut de Physique du Globe) | alain.coch...@unistra.fr
5 rue René Descartes   [bureau 106] | Phone: +33 (0)3 68 85 50 44 
F-67084 Strasbourg Cedex, France| Fax:   +33 (0)3 68 85 01 25 


[O] Latex export error: There's no line here to end, with an image with a caption

2017-01-09 Thread Takeshi Teshima

Hi all,

A happy new year!

I have a problem with org-export-to-latex.

# What happens

## [1]

When I try to export an org-mode file **that contains a figure with a  
caption** with `#+OPTIONS: \n:t`, (See minimal example files)


to a pdf via latex-export, the exported latex file doesn't compile and I  
get the following error:


```

LaTeX Error: There's no line here to end.

```

in the `*Org PDF LaTeX Output*` buffer. Thus this is an error from the  
command line.


## [2]

So I go to the line of the .tex file that's specified in the error, and  
the line always says:


``` latex

\end{figure}\\

```


## [3]

If I remove the double backslashes by hand, and compile the generated  
.tex file from the command line, it produces a pdf correctly.



# My environment

I've checked this with:

[1] Org-mode version 8.3.6 (8.3.6-7-g4d7d52-elpa @ ~~~)

[2] Org-mode version 8.2.10 (release_8.2.10 @ ~~~)

[3] Org-mode version 9.0.3 (9.0.3-elpa @ ~~~)

, but the same errors occur.

(I normally use version 8. I know this is an old version. However, v9  
has another problem with #+TITLE: lines. See  
https://github.com/syl20bnr/spacemacs/issues/3246 for more details)



# Reproducing the error

## Files

Attached, please find the files for a minimum example.

- test.org

- test-2017-01-06-17-05-09.jpeg


## Procedure to reproduce:

1. Place the files in the same directory

2. $ emacs -q test.org

3. M-x org-latex-export-to-pdf

(Or instead of 2., your own emacs config will do)


# What I already found

- The caption is necessary to reproduce the error.

- The problem occurs with a single image.

- If I remove the double backslashes by hand, and compile the generated  
.tex file, it compiles correctly.


- The problem doesn't occur with `#+OPTIONS: \n:nil` (which is kind of  
trivial)



# Reference

A relevant thread can be found here:

https://lists.gnu.org/archive/html/emacs-orgmode/2016-09/msg2.html

but I couldn't find a solution there.


Anyone has any ideas? Any idea to bypass this problem may be a lifesaver  
for me.


#+OPTIONS: \n:t

#+CAPTION: test
[[./test-2017-01-06-17-05-09.jpeg]]


[O] org-collector not working

2017-01-09 Thread Malte Deiseroth
Hello

The org-collector seems to be broken. I followed the instructions on:
http://orgmode.org/worg/org-contrib/org-collector.html

Instead of:
#+BEGIN: propview :id "december" :conds ((string= spendtype "food"))
:cols (ITEM amount)
| "ITEM"   | "amount" |
|--+--|
| "Grocery Store [2008-12-01 Mon]" |56.77 |
| "Restaurant [2008-12-08 Mon]"|30.67 |
|--+--|
|  |  |
#+END:

I get:

#+BEGIN: propview :id "december" :conds ((string= spendtype "food"))
:cols (ITEM amount)
| ITEM | amount |
|--+|
|--+|
|  ||
#+END:

and instead of:

#+BEGIN: propview :cols (ITEM (+ 400 amount)) :scope tree :match "example"
|
"ITEM" 
| "(+ 400 amount)" |
|-+--|
| "December Spending  
:example:" |0 |
| "Week
One" 
|0 |
| "Grocery Store [2008-12-01
Mon]"|   456.77 |
| "Athletic club [2008-12-02
Tue]"|475.0 |
| "Week Two
"
|0 |
| "Restaurant [2008-12-08
Mon]"   |   430.67 |
|-+--|
|   
 
|  |
#+END:


I get:

#+BEGIN: propview :cols (ITEM (+ 400 amount)) :scope tree :match "example"
| ITEM | (+ 400 amount) |
|--+|
| "** December Spending"   |  0 |
| "*** Week One"   |  0 |
| " Grocery Store [2008-12-01 Mo]" |  0 |
| " Athletic club [2008-12-02 Di]" |  0 |
| "*** Week Two"   |  0 |
| " Restaurant [2008-12-08 Mo]"|  0 |
|--+|
|  ||
#+END:

Basically all the columns/properties are always 0. I tried also with
other properties, but nothing worked.
I have nothing in the *Messages* or *Warnigns* buffer to post here.
I might be doing something wrong. Its the first time using org-collector
for me.
I'm using emacs 25.1.1. I believe org-mode and org-collector are shipped
by default with this.
Any help would be appreciated.

Cheers Malte






[O] Error when =(stata . t)= added to =org-babel-do-load-languages= in an attempt to evaluate Stata code in org-mode

2017-01-09 Thread Daniel Guinea
Hello,

I have built the latest Emacs 26.0.50.1 on a Debian OS 8 (Jessie) that
uses Linux version 3.14.5. Then I installed org-mode version 9.0.3. I
want to use the proprietary data analysis and statistical software
Stata version 14. I have checked that it runs alright within Emacs
thanks to ESS by typing  =M-x stata=.

However, I also want to evaluate Stata code in org-mode documents. For that
I have
downloaded the script =ob-stata.el= by Ista Zahn and I have saved it
together with the other =ob-sth.el= files in
=~/.emacs.d/elpa/org-20161224=. Moreover, I have edited the entry:

(defcustom org-babel-stata-command inferior-STA-program-name
  "Name of command to use for executing stata code."
  :group 'org-babel
  :version "24.1"
  :package-version '(Org . "8.3")
  :type 'string)

to reflect my current version of Org, so this piece of code currently
stands as follows in my version of  =ob-stata.el=:

(defcustom org-babel-stata-command inferior-STA-program-name
  "Name of command to use for executing stata code."
  :group 'org-babel
  :version "24.1"
  :package-version '(Org . "9.0.3")
  :type 'string)


However, if I add =(stata . t)= to =org-babel-do-load-languages= as follows:

(org-babel-do-load-languages
   'org-babel-load-languages
  '((emacs-lisp . t)
(sh . t)
(R . t)
(perl . t)
(ruby . t)
(python . t)
(js . t)
(haskell . t)
(stata . t)
(shell . t)))

I get the following message when I restart emacs:

#  Beginning of debugger message ###

Debugger entered--Lisp error: (void-variable inferior-STA-program-name)
  eval(inferior-STA-program-name)
  custom-initialize-reset(org-babel-stata-command inferior-STA-program-name)
  custom-declare-variable(org-babel-stata-command inferior-STA-program-name
"Name of command to use for executing stata code." :group org-babel
:version "24.1" :package-version (Org . "9.0.3") :type string)
  eval-buffer(# nil
"/home/dgm/.emacs.d/elpa/org-20161224/ob-stata.el" nil t)  ; Reading at
buffer position 2975

load-with-code-conversion("/home/dgm/.emacs.d/elpa/org-20161224/ob-stata.el"
"/home/dgm/.emacs.d/elpa/org-20161224/ob-stata.el" nil t)
  require(ob-stata)
  (if active (require (intern (concat "ob-" lang))) (funcall (quote
fmakunbound) (intern (concat "org-babel-execute:" lang))) (funcall (quote
fmakunbound) (intern (concat "org-babel-expand-body:" lang
  (let ((active (cdr pair)) (lang (symbol-name (car pair (if active
(require (intern (concat "ob-" lang))) (funcall (quote fmakunbound) (intern
(concat "org-babel-execute:" lang))) (funcall (quote fmakunbound) (intern
(concat "org-babel-expand-body:" lang)
  (let ((pair (car --dolist-tail--))) (let ((active (cdr pair)) (lang
(symbol-name (car pair (if active (require (intern (concat "ob-"
lang))) (funcall (quote fmakunbound) (intern (concat "org-babel-execute:"
lang))) (funcall (quote fmakunbound) (intern (concat
"org-babel-expand-body:" lang) (setq --dolist-tail-- (cdr
--dolist-tail--)))
  (while --dolist-tail-- (let ((pair (car --dolist-tail--))) (let ((active
(cdr pair)) (lang (symbol-name (car pair (if active (require (intern
(concat "ob-" lang))) (funcall (quote fmakunbound) (intern (concat
"org-babel-execute:" lang))) (funcall (quote fmakunbound) (intern (concat
"org-babel-expand-body:" lang) (setq --dolist-tail-- (cdr
--dolist-tail--
  (let ((--dolist-tail-- org-babel-load-languages)) (while --dolist-tail--
(let ((pair (car --dolist-tail--))) (let ((active (cdr pair)) (lang
(symbol-name (car pair (if active (require (intern (concat "ob-"
lang))) (funcall (quote fmakunbound) (intern (concat "org-babel-execute:"
lang))) (funcall (quote fmakunbound) (intern (concat
"org-babel-expand-body:" lang) (setq --dolist-tail-- (cdr
--dolist-tail--)
  org-babel-do-load-languages(org-babel-load-languages ((emacs-lisp . t)
(sh . t) (R . t) (perl . t) (ruby . t) (python . t) (js . t) (haskell . t)
(stata . t) (shell . t)))
  eval-buffer(# nil
"/home/dgm/.emacs.d/starter-kit-org.el" nil t)  ; Reading at buffer
position 2047
  load-with-code-conversion("/home/dgm/.emacs.d/starter-kit-org.el"
"/home/dgm/.emacs.d/starter-kit-org.el" nil nil)
  load("/home/dgm/.emacs.d/starter-kit-org.el" nil nil t)
  load-file("/home/dgm/.emacs.d/starter-kit-org.el")
  (progn (load-file exported-file) "Loaded")
  (if compile (progn (byte-compile-file exported-file (quote load))
"Compiled and loaded") (progn (load-file exported-file) "Loaded"))
  (message "%s %s" (if compile (progn (byte-compile-file exported-file
(quote load)) "Compiled and loaded") (progn (load-file exported-file)
"Loaded")) exported-file)
  (let* ((age (function (lambda (file) (float-time (time-subtract
(current-time) (nth 5 ...)) (base-name (file-name-sans-extension file))
(exported-file (concat base-name ".el"))) (if (and (file-exists-p
exported-file) (> (funcall age file) (funcall age exported-file))) nil
(setq exported-file (car (last (org-babel-tangle-file file 

[O] Can a code block be evaluated in multiple sessions

2017-01-09 Thread Jack Li
Hi,

Can anyone tell me if a code block can be evaluated in multiple sessions?
In this toy example I provide, function "f1" is defined in the first block,
 and I want to use "f1" in both the second block (session a)  and the third
block (session b).

#+BEGIN_SRC R
  f1 <- function(x,y,z) x+y+z
#+END_SRC

#+BEGIN_SRC R :session a
f1(1,2,3)
#+END_SRC

#+BEGIN_SRC R  :session b
f1(2,4,6)
#+END_SRC

PS: the three blocks should be in one .org file, and, when exporting,
"session a" and "session b" will be run simultaneously and independently.

Thanks,
Jack


Re: [O] REPEAT_TO_STATE file-wide property is not working

2017-01-09 Thread Young-whan
Can you show me

M-x emacs-version
M-x org-version

Please?


On Mon, Jan 9, 2017 at 2:48 PM, Nicolas Goaziou 
wrote:

> Hello,
>
> Young-whan  writes:
>
> > Yes, I did and in case, I've relaunched emacs, reload the buffer, etc.
> > Nothing is working.
>
> Maybe you have a mixed installation. I cannot reproduce your problem
> here, with the following buffer
>
>   #+property: repeat_to_state repeat
>   #+TODO: TODO(t/!) REPEAT(r/!) | DONE(d)
>
>   * REPEAT Task
>   SCHEDULED: <2017-01-01 Wed +1d>
>
> Regards,
>
> --
> Nicolas Goaziou
>


Re: [O] publishing subtrees

2017-01-09 Thread Joon Ro
> thank you, Joon, that is extremely helpful.  Do you have a publishing setup in
> which you use this function? It looks like it would have to be rewritten
> somewhat to accept the parameters (plist filename pub-dir); I am either too
> tired or twoo stupid (or both! ) figure it out quickly, so if you have it done
> already I would be very grateful to see it.


Unfortunately I don't have publishing setup. I usually export one subtree at a 
time manually and create a separate file, as I tend to tweak each class' 
contents before actual lecture day.


Best,

Joon



Re: [O] publishing subtrees

2017-01-09 Thread Matt Price
On Sun, Jan 8, 2017 at 9:48 PM, Joon Ro  wrote:

> > In my course repositories, I have all my lecture notes in one file, and
> all my assignments in another.  So they have the form
> >
> > * Lecture 1
> > ** Slide 1
> > ** Slide 2
> > * Lecture 2 ...
> >
> > * Assignment 1
> > ** Description
> > ** Rubric
> > * Assignment 2...
> >
> > I'd like to have publishing functions that, say, export all first-level
> headings to html with ox-reveal, and uploads those to a location on the
> web. Or, alternatively, export them all to org in a remote location ,where
> they can be viewed on github or using jeyll or something.
> >
> > Is anyone doing something like this already? Is it possible using hte
> built-in publishing functions?
>
> I do pretty much the same thing for my course contents. I think the
> following is relevant to what you want:
>
> http://emacs.stackexchange.com/questions/2259/how-to-
> export-top-level-headings-of-org-mode-buffer-to-separate-files
>
> 
> elisp - How to export top-level headings of org-mode ...
> 
> emacs.stackexchange.com
> How can each top-level heading of an org-mode buffer be exported to a
> separate file named after the value of the corresponding CUSTOM_ID +
> (sanitized) title?
>
>
> Best Regards,
> Joon
>
> thank you, Joon, that is extremely helpful.  Do you have a publishing
setup in which you use this function? It looks like it would have to be
rewritten somewhat to accept the parameters (plist filename pub-dir); I am
either too tired or twoo stupid (or both! ) figure it out quickly, so if
you have it done already I would be very grateful to see it.

Thank you!
Matt


Re: [O] HTML export for math markup

2017-01-09 Thread Lawrence Bottorff
org-html-with-latex is t and org-export-with-latex is also t. I don't have
a org-html-format-latex, or at least nothing comes up with C-h
v org-html-format-latex. Also, how does edebug work as you, Nick, described?

On Mon, Jan 9, 2017 at 7:13 PM, Lawrence Bottorff  wrote:

> This is the entirety of my header section. I'm sure there are redundancies
> etc. But again, the clean vanilla of Emacs 25.1.1 and org-mode 9.0.2 is
> defaulting to producing png's.
>
> #+TITLE: \zwnj^{147}Pm SAGA
> #+AUTHOR: 147Pm
> #+EMAIL: borg...@sdf.org
> # date ... will set (change) each time (if remembered)
> #+DATE: <2015-05-09 Sat 07:53>
> #+FILETAGS: :CompleteReWrite:
> #+LANGUAGE:  en
> #+INFOJS_OPT: view:showall ltoc:t mouse:underline path:
> http://orgmode.org/org-info.js
> #+HTML_HEAD:  type="text/css">
> #+EXPORT_SELECT_TAGS: export
> #+EXPORT_EXCLUDE_TAGS: noexport
> #+OPTIONS: H:10 num:4 toc:nil \n:nil @:t ::t |:t _:{} *:t ^:{} prop:t
> #+OPTIONS: prop:t
> #+OPTIONS: tex:imagemagick
> #+LATEX_CLASS: article
> #+LATEX_CLASS_OPTIONS: [american]
> # Setup tikz package for both LaTeX and HTML export:
> #+LATEX_HEADER: \usepackage{tikz}
> #+LaTeX_HEADER: \usepackage{pgfplots}
> #+LaTeX_HEADER: \usepackage{sansmath}
> #+HTML_MATHJAX: align: left indent: 5em tagside: left font: Neo-Euler
> #+PROPERTY: header-args:latex+ :packages '(("" "tikz"))
> #
> #+PROPERTY: header-args:latex+ :imagemagick (by-backend (latex nil) (t
> "yes"))
> #+PROPERTY: header-args:latex+ :exports results :fit yes
> #
> #+STARTUP: showall
> #+STARTUP: align
> #+STARTUP: indent
> #+STARTUP: entitiespretty
> #+STARTUP: logdrawer
>
> On Mon, Jan 9, 2017 at 5:34 PM, Thierry Banel 
> wrote:
>
>> Le 09/01/2017 16:28, Lawrence Bottorff a écrit :
>>
>> I've got an org file with Latex math markup, e.g. $x_2/y^3$. When I
>> export this to HTML, it produces png files for each markup and puts them in
>> a subfolder ltximg. Is there any way to skip this translating to pictures
>> and just use MathJax directly. I've seen this
>> , but my
>> setup seems to be defaulted to png picture production, not direct MathJax
>> rendering via "http://cdn.mathjax.org/mathjax/latest/MathJax.js?config
>> =TeX-AMS_HTML. I understand that what's happening is this
>> , but
>> that's not MathJax. What am I doing (thinking) wrong?
>>
>> LB
>>
>>
>> I use
>> #+HTML_MATHJAX: align: left etc...
>> Works well.
>>
>> Then you can control appearance through CSS. For instance:
>> .MathJax_Display {
>> color: #080;
>> margin: 0;
>> }
>>
>> Have fun
>>
>>
>


Re: [O] HTML export for math markup

2017-01-09 Thread Lawrence Bottorff
This is the entirety of my header section. I'm sure there are redundancies
etc. But again, the clean vanilla of Emacs 25.1.1 and org-mode 9.0.2 is
defaulting to producing png's.

#+TITLE: \zwnj^{147}Pm SAGA
#+AUTHOR: 147Pm
#+EMAIL: borg...@sdf.org
# date ... will set (change) each time (if remembered)
#+DATE: <2015-05-09 Sat 07:53>
#+FILETAGS: :CompleteReWrite:
#+LANGUAGE:  en
#+INFOJS_OPT: view:showall ltoc:t mouse:underline path:
http://orgmode.org/org-info.js
#+HTML_HEAD: 
#+EXPORT_SELECT_TAGS: export
#+EXPORT_EXCLUDE_TAGS: noexport
#+OPTIONS: H:10 num:4 toc:nil \n:nil @:t ::t |:t _:{} *:t ^:{} prop:t
#+OPTIONS: prop:t
#+OPTIONS: tex:imagemagick
#+LATEX_CLASS: article
#+LATEX_CLASS_OPTIONS: [american]
# Setup tikz package for both LaTeX and HTML export:
#+LATEX_HEADER: \usepackage{tikz}
#+LaTeX_HEADER: \usepackage{pgfplots}
#+LaTeX_HEADER: \usepackage{sansmath}
#+HTML_MATHJAX: align: left indent: 5em tagside: left font: Neo-Euler
#+PROPERTY: header-args:latex+ :packages '(("" "tikz"))
#
#+PROPERTY: header-args:latex+ :imagemagick (by-backend (latex nil) (t
"yes"))
#+PROPERTY: header-args:latex+ :exports results :fit yes
#
#+STARTUP: showall
#+STARTUP: align
#+STARTUP: indent
#+STARTUP: entitiespretty
#+STARTUP: logdrawer

On Mon, Jan 9, 2017 at 5:34 PM, Thierry Banel  wrote:

> Le 09/01/2017 16:28, Lawrence Bottorff a écrit :
>
> I've got an org file with Latex math markup, e.g. $x_2/y^3$. When I export
> this to HTML, it produces png files for each markup and puts them in a
> subfolder ltximg. Is there any way to skip this translating to pictures and
> just use MathJax directly. I've seen this
> , but my
> setup seems to be defaulted to png picture production, not direct MathJax
> rendering via "http://cdn.mathjax.org/mathjax/latest/MathJax.js?
> config=TeX-AMS_HTML. I understand that what's happening is this
> , but
> that's not MathJax. What am I doing (thinking) wrong?
>
> LB
>
>
> I use
> #+HTML_MATHJAX: align: left etc...
> Works well.
>
> Then you can control appearance through CSS. For instance:
> .MathJax_Display {
> color: #080;
> margin: 0;
> }
>
> Have fun
>
>


[O] [feature request] more informative error message when calling an undefined src block

2017-01-09 Thread Eric S Fraga
Hello all,

I have been trying to track down a nil link on export [1].  I have been
bisecting a long document.  As part of this, I commented out a src block
used elsewhere in the document.  The error trace [abridged] I get upon
export is:

Debugger entered--Lisp error: (wrong-type-argument consp nil)
  org-babel-exp-code(nil lob)
  org-babel-exp-do-export(nil lob)
  org-babel-exp-process-buffer()
  org-export-as(latex nil nil nil (:output-file "t.tex"))
  
which was luckily just enough for me to figure out what I had done but I
think it could be more informative?  E.g. it would be nice if it said
which code it tried to invoke?

Thanks,
eric

Footnotes: 
[1]  related problem: "Unable to resolve link: nil" is not very
informative either and it's driving me crazy!  I've not yet tracked down
what the problem is but it has something to do with using my own labels
for tables.  More later when I figure it out.

-- 
: Eric S Fraga (0xFFFCF67D), Emacs 26.0.50.1, Org release_9.0.3-189-ge46676


signature.asc
Description: PGP signature


Re: [O] HTML export for math markup

2017-01-09 Thread Nick Dokos
Lawrence Bottorff  writes:

> The default behavior with a plain vanilla installation is, indeed, to use png 
> files and create the
> ltximg subdirectory. It's not a huge problem, but I'd prefer it not doing 
> that; instead, using MathJax.
> Anyone know how to switch this behavior?

No, the default with a plain vanilla install is MathJax. In your minimal init 
environment,
what is the value of org-html-with-latex? What about org-export-with-latex? 
Both of these
should be t by default.

If they are, I would edebug org-html-format-latex, run the export and,
when it stops at org-html-format-latex, look at its arguments: the
second argument is the processing-type and it *should* be mathjax.

>
> On Mon, Jan 9, 2017 at 12:30 PM, Nick Dokos  wrote:
>
> Lawrence Bottorff  writes:
>
> > I've got an org file with Latex math markup, e.g. $x_2/y^3$. When I 
> export this to HTML, it
> produces png
> > files for each markup and puts them in a subfolder ltximg. Is there any 
> way to skip this
> translating to
> > pictures and just use MathJax directly. I've seen this, but my setup 
> seems to be defaulted to png
> > picture production, not direct MathJax rendering via 
> "http://cdn.mathjax.org/mathjax/latest/
> MathJax.js?
> > config=TeX-AMS_HTML. I understand that what's happening is this, but 
> that's not MathJax. What am I
> doing
> > (thinking) wrong?
> >
>
> Have you tried exporting with a minimal init file and none of your 
> customizations?
>
> --
> Nick
>

-- 
Nick




Re: [O] REPEAT_TO_STATE file-wide property is not working

2017-01-09 Thread Nicolas Goaziou
Hello,

Young-whan  writes:

> Yes, I did and in case, I've relaunched emacs, reload the buffer, etc.
> Nothing is working.

Maybe you have a mixed installation. I cannot reproduce your problem
here, with the following buffer

  #+property: repeat_to_state repeat
  #+TODO: TODO(t/!) REPEAT(r/!) | DONE(d)

  * REPEAT Task
  SCHEDULED: <2017-01-01 Wed +1d>

Regards,

-- 
Nicolas Goaziou



[O] callback function on async export?

2017-01-09 Thread John Kitchin
Is there some way to get a call back function, or trigger a function
when the async export completes?

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



Re: [O] HTML export for math markup

2017-01-09 Thread Thierry Banel

  
  
Le 09/01/2017 16:28, Lawrence Bottorff
  a écrit :


  I've got an org file with Latex math markup, e.g.
$x_2/y^3$. When I export this to HTML, it produces png files for
each markup and puts them in a subfolder ltximg. Is there any
way to skip this translating to pictures and just use MathJax
directly. I've seen this,
but my setup seems to be defaulted to png picture production,
not direct MathJax rendering via "http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML.
I understand that what's happening is this,
but that's not MathJax. What am I doing (thinking) wrong?


LB
  


I use
#+HTML_MATHJAX: align: left etc...
Works well.

Then you can control appearance through CSS. For instance:
.MathJax_Display {
    color: #080;
    margin: 0;
}

Have fun

  




Re: [O] spee-up table refresh

2017-01-09 Thread Thierry Banel
Le 09/01/2017 00:24, Nicolas Goaziou a écrit :

> Note that recalculating a table is inherently quadratic.

Well, on the test-case your change made recalculation linear (which is
good):

|  rows | seconds |
|---+-|
|  1000 | 1.5 |
| 1 |  13 |
| 2 |  25 |
| 3 |  37 |

>
>> Here is a test case.
>>
>> 1- First create a 1000 row table:
>>
>> #+BEGIN_SRC elisp :results none
>>   (goto-char (point-max))
>>   (let ((i 1000))
>> (while (> i 0)
>>   (insert (format "| %4s | |\n" i))
>>   (setq i (1- i
>>   (insert "#+TBLFM: $2=$1*10\n")
>> #+END_SRC
>>
>> 2- Then, with point in the table, type C-u C-c *
> I limited calls to `org-element-at-point'. It should be much faster now.
> Thank you.
>

And you did so through an impressively light change: swapping two lines
with a test on `suppress-analysis'.

Thanks and regards.
Thierry




Re: [O] excluding whole trees on export when subtrees have "select" tags present

2017-01-09 Thread Eric S Fraga
On Monday,  9 Jan 2017 at 15:46, John Kitchin wrote:
> Based on the docstrings for org-export-select-tags and
> org-export-exclude-tags, this looks expected.
>
> It does not look possible to exclude a heading and include a subheading
> under it. It is possible to include a heading and exclude some
> subheadings though you need a wanted tag in the parent, and notwanted
> tags in the subtrees, and to declare the exclude tags.

I think I was unclear.  My confusion is that a tree (rooted at a top
level headline) that I do not want exported is nevertheless exported if
a subtree within that tree has a "selected" tag.  I would have thought
the higher level heading would take precedence.

> I am surprised you can use comment like this. It looks to me like
> commenting a tree makes all the subtrees in it not export too.

Yes, it is.  Again, I obviously didn't explain myself well.  I have
resorted to commenting out whole trees (rooted at headlines) to avoid
them being exported because a sub-tree has the selected tag.

In any case, I have found a workaround by inverting my tag usage.

thanks,
eric

-- 
: Eric S Fraga (0xFFFCF67D), Emacs 26.0.50.1, Org release_9.0.3-189-ge46676


signature.asc
Description: PGP signature


Re: [O] REPEAT_TO_STATE file-wide property is not working

2017-01-09 Thread Young-whan
Yes, I did and in case, I've relaunched emacs, reload the buffer, etc.
Nothing is working.

On Mon, Jan 9, 2017 at 9:30 AM, Nicolas Goaziou 
wrote:

> Hello,
>
> Young-whan  writes:
>
> > I've tried "org-use-property-inheritance", but the property
> > of REPEAT_TO_STATE in the file scoping does not work at all.
> >
> > I wonder if it is a bug in the org-mode or there is another step I have
> to
> > enable
>
> Did you refresh set-up (C-c C-c on #+property keyword)?
>
>
> Regards,
>
> --
> Nicolas Goaziou
>


Re: [O] HTML export for math markup

2017-01-09 Thread Lawrence Bottorff
The default behavior with a plain vanilla installation is, indeed, to use
png files and create the ltximg subdirectory. It's not a huge problem, but
I'd prefer it not doing that; instead, using MathJax. Anyone know how to
switch this behavior?

On Mon, Jan 9, 2017 at 12:30 PM, Nick Dokos  wrote:

> Lawrence Bottorff  writes:
>
> > I've got an org file with Latex math markup, e.g. $x_2/y^3$. When I
> export this to HTML, it produces png
> > files for each markup and puts them in a subfolder ltximg. Is there any
> way to skip this translating to
> > pictures and just use MathJax directly. I've seen this, but my setup
> seems to be defaulted to png
> > picture production, not direct MathJax rendering via "
> http://cdn.mathjax.org/mathjax/latest/MathJax.js?
> > config=TeX-AMS_HTML. I understand that what's happening is this, but
> that's not MathJax. What am I doing
> > (thinking) wrong?
> >
>
> Have you tried exporting with a minimal init file and none of your
> customizations?
>
> --
> Nick
>
>
>


Re: [O] HTML export for math markup

2017-01-09 Thread Nicolas Goaziou
Hello,

Lawrence Bottorff  writes:

> I've got an org file with Latex math markup, e.g. $x_2/y^3$. When I export
> this to HTML, it produces png files for each markup and puts them in a
> subfolder ltximg. Is there any way to skip this translating to pictures and
> just use MathJax directly. I've seen this
> , but my
> setup seems to be defaulted to png picture production, not direct MathJax
> rendering via "
> http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML. I
> understand that what's happening is this
> , but that's
> not MathJax. What am I doing (thinking) wrong?

MathJax should be the default behaviour. See `org-html-with-latex'.

Regards,

-- 
Nicolas Goaziou



Re: [O] REPEAT_TO_STATE file-wide property is not working

2017-01-09 Thread Nicolas Goaziou
Hello,

Young-whan  writes:

> I've tried "org-use-property-inheritance", but the property
> of REPEAT_TO_STATE in the file scoping does not work at all.
>
> I wonder if it is a bug in the org-mode or there is another step I have to
> enable

Did you refresh set-up (C-c C-c on #+property keyword)?


Regards,

-- 
Nicolas Goaziou



Re: [O] HTML export for math markup

2017-01-09 Thread Nick Dokos
Lawrence Bottorff  writes:

> I've got an org file with Latex math markup, e.g. $x_2/y^3$. When I export 
> this to HTML, it produces png
> files for each markup and puts them in a subfolder ltximg. Is there any way 
> to skip this translating to
> pictures and just use MathJax directly. I've seen this, but my setup seems to 
> be defaulted to png
> picture production, not direct MathJax rendering via 
> "http://cdn.mathjax.org/mathjax/latest/MathJax.js?
> config=TeX-AMS_HTML. I understand that what's happening is this, but that's 
> not MathJax. What am I doing
> (thinking) wrong?
>

Have you tried exporting with a minimal init file and none of your 
customizations?

-- 
Nick




Re: [O] excluding whole trees on export when subtrees have "select" tags present

2017-01-09 Thread John Kitchin
Based on the docstrings for org-export-select-tags and
org-export-exclude-tags, this looks expected.

It does not look possible to exclude a heading and include a subheading
under it. It is possible to include a heading and exclude some
subheadings though you need a wanted tag in the parent, and notwanted
tags in the subtrees, and to declare the exclude tags.

#+EXCLUDE_TAGS: notwanted

I am surprised you can use comment like this. It looks to me like
commenting a tree makes all the subtrees in it not export too.

I could see somehow an org-export-before-processing-hook function that
deletes headlines and content you do not want, but it will mess with the
outline, e.g. if you delete "* headline" but leave "** subhead".
I thought I would be able to comment headlines with a hook function like
this, but I could not get it to work. Maybe it is a local problem though.


Eric S Fraga writes:

> Hello all,
>
> In this very minimal example,
>
> #+begin_src org
>   ,#+select_tags: wanted
>   ,* headline   :notwanted:
>   some text
>   ,** subhead :wanted:
>   more text
> #+end_src
>
> exporting exports the whole tree under /headline/.  I can see why but it
> is arguably the wrong thing to do.  If /notwanted/ hasn't been selected,
> I would have assumed that all the contents under that headline would be
> ignored during export.
>
> My problem is that I want to export a document where certain headlines
> (but not all) are included *and* within these, some subheadlines are
> also included but not all.  I would be specifying one or two tags for
> selection depending on the specific export case.
>
> I can achieve what I want by commenting and uncommenting headlines but
> this is very clumsy and error-prone for my use case.
>
> I guess I simply want to confirm that the above noted behaviour is
> indeed what is expected from org.  If so, I will find a work-around.
>
> Thanks,
> eric


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



[O] HTML export for math markup

2017-01-09 Thread Lawrence Bottorff
I've got an org file with Latex math markup, e.g. $x_2/y^3$. When I export
this to HTML, it produces png files for each markup and puts them in a
subfolder ltximg. Is there any way to skip this translating to pictures and
just use MathJax directly. I've seen this
, but my
setup seems to be defaulted to png picture production, not direct MathJax
rendering via "
http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML. I
understand that what's happening is this
, but that's
not MathJax. What am I doing (thinking) wrong?

LB


Re: [O] Org mode clockview links failing with spaces

2017-01-09 Thread Shawn Way
A pop up window appears asking the question:

No match - Create this as a new heading?

Shawn Way, PE


-Original Message-
From: Nicolas Goaziou [mailto:m...@nicolasgoaziou.fr] 
Sent: Saturday, January 07, 2017 9:00 AM
To: Shawn Way 
Cc: emacs-orgmode@gnu.org
Subject: Re: Org mode clockview links failing with spaces

Hello,

Shawn Way  writes:

> I have an org file with a clocktable located at the head of the file.
> The clocktable is able to pull together a great table, however, the 
> links on the table do not work, if they have spaces in them.

Why do you mean by "do not work". I reproduced your example and can follow the 
links (i.e., with C-c C-o).

Regards,

--
Nicolas Goaziou



Re: [O] [patch] adding :prologue and :epilogue parameters for Maxima src blocks

2017-01-09 Thread Eric S Fraga
On Sunday,  8 Jan 2017 at 23:39, Nicolas Goaziou wrote:
> Applied. Thank you.

Thanks.

-- 
: Eric S Fraga (0xFFFCF67D), Emacs 26.0.50.1, Org release_9.0.2-104-gf5b7de


signature.asc
Description: PGP signature


[O] excluding whole trees on export when subtrees have "select" tags present

2017-01-09 Thread Eric S Fraga
Hello all,

In this very minimal example,

#+begin_src org
  ,#+select_tags: wanted
  ,* headline   :notwanted:
  some text
  ,** subhead :wanted:
  more text
#+end_src

exporting exports the whole tree under /headline/.  I can see why but it
is arguably the wrong thing to do.  If /notwanted/ hasn't been selected,
I would have assumed that all the contents under that headline would be
ignored during export.

My problem is that I want to export a document where certain headlines
(but not all) are included *and* within these, some subheadlines are
also included but not all.  I would be specifying one or two tags for
selection depending on the specific export case.

I can achieve what I want by commenting and uncommenting headlines but
this is very clumsy and error-prone for my use case.

I guess I simply want to confirm that the above noted behaviour is
indeed what is expected from org.  If so, I will find a work-around.

Thanks,
eric

-- 
Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D)


signature.asc
Description: PGP signature


Re: [O] [PATCH] ox-koma-letter.el: Add support for fromurl variable

2017-01-09 Thread Rasmus
Hi Grant,

Thanks for the patch.

Grant Rettke  writes:

> I want to use the fromurl variable in KOMA so I copied how the phone
> variable works.
>
> The next change that I want to make is to include the description for
> the fromurl like this:
>
> \setkomavar{fromurl}[description]{content}
>
> I haven't figured out how to do that yet.

At the moment there's no direct support for [description] for any
variables in KOMA letters generated through Org.  What is the use-case
here?

The default description is "Url" and it does not have a corresponding
"symbolicname".

In general, descriptors are used in headers or footers which would
typically be set up in a separate LCO file, I’d guess.  E.g.

  \ifkomavarempty{fromurl}{}{\usekomavar*{fromurl}\usekomavar{fromurl}}

> Maybe the simplest thing is to let the user define it as a list with
> url and description like this:

This should be done for all komavars if it was to be added IMO.

Thanks,
Rasmus

-- 
Hooray!