Re: [O] HTML export for math markup

2017-01-10 Thread Eric S Fraga
On Tuesday, 10 Jan 2017 at 00:13, 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.

[...]

> #+OPTIONS: tex:imagemagick

Maybe this is the problem?

-- 
: 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-10 Thread Nicolas Goaziou
Hello,

Young-whan  writes:

> Can you show me
>
> M-x emacs-version
> M-x org-version

GNU Emacs 25.1.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.20.9) of
2016-12-10

Org mode version 9.0.3 (release_9.0.3-189-ge46676)

I suggest using a bare configuration and try again. 

Regards,

-- 
Nicolas Goaziou



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

2017-01-10 Thread Nicolas Goaziou
Hello,

Eric S Fraga  writes:

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

Could you provide an ECM?

Regards,

-- 
Nicolas Goaziou



Re: [O] HTML export for math markup

2017-01-10 Thread Lawrence Bottorff
Yes, I tested all my header lines and found that was the 'offender." It got
there on someone's suggestion it was needed for proper TikZ. Or was it
bibtex? Or does a ton of pngs come if you choose Latex preview? No time for
further investigation. Confusion will be my epitaph. . . .

On Tue, Jan 10, 2017 at 3:21 AM, Eric S Fraga  wrote:

> On Tuesday, 10 Jan 2017 at 00:13, 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.
>
> [...]
>
> > #+OPTIONS: tex:imagemagick
>
> Maybe this is the problem?
>
> --
> : Eric S Fraga (0xFFFCF67D), Emacs 26.0.50.1, Org release_9.0.3-189-ge46676
>


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

2017-01-10 Thread John Kitchin
This does not sound right to me.

This org file:

#+BEGIN_SRC org
,#+select_tags: wanted
,#+exclude_tags: notwanted

,* headline:notwanted:
  some text

,** subhead 1
,** subhead2  :wanted:
  more text
#+END_SRC

should not have any thing to export.

In contrast:

#+BEGIN_SRC org
,#+select_tags: wanted
,#+exclude_tags: notwanted
,* headline:wanted:
  some text

,** subhead 1
,** subhead2  
:notwanted:
  more text

#+END_SRC

will export headline and subhead1.

At least, that is what I see.

Eric S Fraga writes:

> 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


-- 
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] org-capture exists with "Capture abort: (wrong type argument...)"

2017-01-10 Thread Simao
I am trying to run `org-capture` to capture a journal entry but
`org-capture` always aborts with the following trace:

Debugger entered--Lisp error: (error "Capture abort:
(wrong-type-argument stringp nil)")
  signal(error ("Capture abort: (wrong-type-argument stringp nil)"))
  error("Capture abort: %s" (wrong-type-argument stringp nil))
  org-capture(nil)
  funcall-interactively(org-capture nil)
  call-interactively(org-capture nil nil)
  command-execute(org-capture)

Is there a problem with my settings? I am using the template suggested
in the manual.

Thanks,
Simao


Emacs  : GNU Emacs 25.1.1 (x86_64-unknown-linux-gnu, GTK+ Version
3.22.5)
 of 2016-12-23
Package: Org-mode version 8.2.10 (release_8.2.10 @
/usr/share/emacs/25.1/lisp/org/)

current state:
==
(setq
 org-tab-first-hook '(org-hide-block-toggle-maybe
 org-src-native-tab-command-maybe
  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-confirm-shell-link-function 'yes-or-no-p
 org-capture-templates '(("j" "Journal" entry (file+datetree
 "~/Sync/journal.org.txt")
  "* %?\nEntered on %U\n  %i\n  %a")
 )
 org-startup-indented t
 org-after-todo-state-change-hook '(org-clock-out-if-current)
 org-from-is-user-regexp nil
 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 '(er/add-org-mode-expansions
 #[nil "\300\301\302\303\304$\207"
   [org-add-hook change-major-mode-hook
   org-show-block-all append local] 5]
 #[nil "\300\301\302\303\304$\207"
   [org-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-ctrl-c-ctrl-c-hook '(org-babel-hash-at-point
 org-babel-execute-safely-maybe)
 org-cycle-hook '(org-cycle-hide-archived-subtrees
 org-cycle-hide-drawers
  org-cycle-hide-inline-tasks org-cycle-show-empty-lines
  org-optimize-window-after-visibility-change)
 org-todo-keywords '((sequence "TODO" "DOING" "|" "DONE"))
 org-confirm-elisp-link-function 'yes-or-no-p
 org-metadown-hook '(org-babel-pop-to-session-maybe)
 org-log-into-drawer t
 org-clock-out-hook '(org-clock-remove-empty-clock-drawer)
 )



[O] org-map-entries with 'region-start-level in a buffer with header text

2017-01-10 Thread Matt Price
In a buffer with text before the first heading, I get an error using
org-map-entries in this function:

(defun org-export-all (backend)
  "Export all subtrees that are *not* tagged with :noexport: to
separate files.

Note that subtrees must have the :EXPORT_FILE_NAME: property set
to a unique value for this to work properly."
  (interactive "sEnter backend: ")
  (let ((fn (cond ((equal backend "html") 'org-html-export-to-html)
  ((equal backend "latex") 'org-latex-export-to-latex)
  ((equal backend "pdf") 'org-latex-export-to-pdf
(save-excursion
  (set-mark (point-min))
  (goto-char (point-max))
  (org-map-entries (lambda () (funcall fn nil t)) "-noexport"
'region-start-level

The error is :
Debugger entered--Lisp error: (error "Before first headline at
position 1 in buffer test.org<2>")

Is there a better way to map over first-level heading,
or alternatively, a better way to set the mark? I tried setting mark to :


 (goto-char (point-min)) (re-search-forward "
\\\*"))

but that gave strange results, with the wrong trees
being sent to individual files.

Thank you!

matt


[O] strange results with org-map-entries

2017-01-10 Thread Matt Price
On Tue, Jan 10, 2017 at 9:47 AM, Matt Price  wrote:

>
> In a buffer with text before the first heading, I get an error using
> org-map-entries in this function:
>
> (defun org-export-all (backend)
>   "Export all subtrees that are *not* tagged with :noexport: to
> separate files.
>
> Note that subtrees must have the :EXPORT_FILE_NAME: property set
> to a unique value for this to work properly."
>   (interactive "sEnter backend: ")
>   (let ((fn (cond ((equal backend "html") 'org-html-export-to-html)
>   ((equal backend "latex") 'org-latex-export-to-latex)
>   ((equal backend "pdf") 'org-latex-export-to-pdf
> (save-excursion
>   (set-mark (point-min))
>   (goto-char (point-max))
>   (org-map-entries (lambda () (funcall fn nil t)) "-noexport" 
> 'region-start-level
>
> The error is :
> Debugger entered--Lisp error: (error "Before first headline at position 1 in 
> buffer test.org<2>")
>
> Is there a better way to map over first-level heading,
> or alternatively, a better way to set the mark? I tried setting mark to :
>
>
>  (goto-char (point-min)) (re-search-forward "
> \\\*"))
>
> but that gave strange results, with the wrong trees
> being sent to individual files.
>
> I think I misrepresented the problem in my initial email.

With a test file test-export.org:

---
Pre-heading text

* Heading 1
:PROPERTIES:
:EXPORT_FILE_NAME: 01-heading-1
:END:
text of heading 1

* Heading 2
:PROPERTIES:
:EXPORT_FILE_NAME: 02-heading-2
:END:

text of heading 2
---

running eval-expression

(org-map-entries (lambda () (funcall 'org-org-export-to-org nil t))
"-noexport" nil)

gives the expected result (2 line breaks added for ease of reading):

-
$ cat 01-heading-1.org 02-heading-2.org

# Created 2017-01-10 Tue 12:51
#+TITLE: Heading 1
#+AUTHOR: Matt Price
text of heading 1

# Created 2017-01-10 Tue 12:51
#+TITLE: Heading 2
#+AUTHOR: Matt Price
text of heading 2
---

However, running

#+BEGIN_SRC emacs-lisp
(set-mark (point-min))
(goto-char (point-max))
(org-map-entries (lambda () (funcall 'org-org-export-to-org nil t))
"-noexport" 'region-start-level)
#+END_SRC

gives the error:

Debugger entered--Lisp error: (error "Before first headline at position 1
in buffer export.org<2>")


If I delete the text before the first heading, the command runs without
error but produces the following output:


$ cat 01-heading-1.org 02-heading-2.org

# Created 2017-01-10 Tue 12:57
#+TITLE: Heading 1
#+AUTHOR: Matt Price
text of heading 1

# Created 2017-01-10 Tue 12:57
#+TITLE: Heading 1
#+AUTHOR: Matt Price
* Heading 1
text of heading 1
-

If I make additional headings, en every case the content of the resultant
files will be replaced by the contents of the first file.

What's going on here? Can anyone else reproduce this? I'm seeing it on org
9.0.3 up to date as of today, emacs git from 2017-01-04.


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

2017-01-10 Thread Samuel Wales
that was bastien :)

On 1/10/17, alain.coch...@unistra.fr  wrote:
> Samuel Wales says that

-- 
The Kafka Pandemic: http://thekafkapandemic.blogspot.com

The disease DOES progress.  MANY people have died from it.  And
ANYBODY can get it.

Denmark: free Karina Hansen NOW.
  UPDATE 2016-10: home, but not fully free



[O] Bug? org-agenda-to-appt returns `Args out of range: 1, 1`

2017-01-10 Thread Xebar Saram
Hi

just reporting what seems like a bug after last org update
when i run the command

`org-agenda-to-appt `

it returns

`Args out of range: 1, 1`

can anyone confirm?

best

Z


[O] %( in capture template

2017-01-10 Thread Samuel Wales
i have "%(my-function \"%:link\" \"%:description\" \"%i\")" in a
capture template, which now does not run the function but treats it as
text.  i get that this is for security.  what do i do?

-- 
The Kafka Pandemic: http://thekafkapandemic.blogspot.com

The disease DOES progress.  MANY people have died from it.  And
ANYBODY can get it.

Denmark: free Karina Hansen NOW.
  UPDATE 2016-10: home, but not fully free



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

2017-01-10 Thread Matt Price
On Sun, Jan 8, 2017 at 6:51 PM, Nicolas Goaziou 
wrote:

> Hello,
>
> alain.coch...@unistra.fr writes:
>
> > Unaware that "COMMENT" was a specific org string,
>
> It is special only at the beginning of a headline (but past TODO keyword
> and priority cookie, if any).
>
> > 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'll just say that once I learned about COMMENT -- from the list, not from
the manual -- I started using it pretty extensively.  Also, the Github
org-->html renderer hides COMMENT trees by default.  For these reasons, I
think the current default is sensible.  But yeah, it should be
documented.


Re: [O] %( in capture template

2017-01-10 Thread Nick Dokos
Samuel Wales  writes:

> i have "%(my-function \"%:link\" \"%:description\" \"%i\")" in a
> capture template, which now does not run the function but treats it as
> text.  i get that this is for security.  what do i do?

IIUC, if the function call is part of the template that is inserted as a
result of the capture, the function should still be executed: I see
calls to `org-capture-expand-embedded-elisp' still in
`org-capture'. Can you post the full entry?

-- 
Nick




[O] Beamer framebreak

2017-01-10 Thread edgar

Hello,

I am new to org-mode, because it seems impressive, and I think that it 
will make my life much simpler. Thank you!


For the following, I am attaching example org, pdf and tex files (the 
last two generated by org-mode > export beamer PDF).


First, why does slide 3/4 contain two main headlines fit into a single 
slide?


Second, how do I force a new slide so that the "Figures" block is not 
cut-off on slide 4/4?


Third, how do I get the contents of "Description of the project" (slide 
3/4) into a block (like Concepts in slide 4/4).


I looked around and could not find my answers. Your support is much 
appreciated. Thanks.



Edgar

-

ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the 
NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!  
15GB disk! No bandwidth quotas!
Commercial and Bulk Mail Options!  



Re: [O] strange results with org-map-entries

2017-01-10 Thread Nicolas Goaziou
Hello,

Matt Price  writes:

> What's going on here? Can anyone else reproduce this? I'm seeing it on org
> 9.0.3 up to date as of today, emacs git from 2017-01-04.

You mark a region then jump around the buffer with `org-map-entries'. At
some point the region contains no headline, but you request a subtree
export, hence the error.

Regards,

-- 
Nicolas Goaziou



Re: [O] %( in capture template

2017-01-10 Thread Nicolas Goaziou
Hello,

Samuel Wales  writes:

> i have "%(my-function \"%:link\" \"%:description\" \"%i\")" in a
> capture template, which now does not run the function but treats it as
> text.

It should. Do you have an ECM?

Regards,

-- 
Nicolas Goaziou



Re: [O] %( in capture template

2017-01-10 Thread Samuel Wales
On 1/10/17, Nick Dokos  wrote:
> IIUC, if the function call is part of the template that is inserted as a
> result of the capture, the function should still be executed: I see
> calls to `org-capture-expand-embedded-elisp' still in
> `org-capture'. Can you post the full entry?

here are the entries:

("p" "Protocol p" entry
  (file+headline "/home/org/executive--a.org" "xyzzy-remember")
  "%(alpha-org-protocol-string \"%:link\" \"%:description\"
\"%i\")" :prepend t :immediate-finish t :jump-to-captured t)
 ("L" "Protocol L" entry
  (file+headline "/home/org/executive--a.org" "xyzzy-remember")
  "%(alpha-org-protocol-string \"%:link\" \"%:description\"
\"%i\")" :prepend t :immediate-finish t :jump-to-captured t)

background: this is part of my years-long effort to try to
get protocol to work from firefox.  i never got org-protocol to work
reliably in org 8, despite trying probably at least 4 separate sets of
instructions.

-- 
The Kafka Pandemic: http://thekafkapandemic.blogspot.com

The disease DOES progress.  MANY people have died from it.  And
ANYBODY can get it.

Denmark: free Karina Hansen NOW.
  UPDATE 2016-10: home, but not fully free



Re: [O] strange results with org-map-entries

2017-01-10 Thread Matt Price
On Tue, Jan 10, 2017 at 6:58 PM, Nicolas Goaziou 
wrote:

> Hello,
>
> Matt Price  writes:
>
> > What's going on here? Can anyone else reproduce this? I'm seeing it on
> org
> > 9.0.3 up to date as of today, emacs git from 2017-01-04.
>
> You mark a region then jump around the buffer with `org-map-entries'. At
> some point the region contains no headline, but you request a subtree
> export, hence the error.
>

But what about the weird export results, where files don't seem to contain
the expected content? And is there a better way (than marking and bouncing)
to constrain org-map-entries to first-level headings only?


[O] Bug: Problem with org-agenda-sticky and org-mobile

2017-01-10 Thread Ian Dunn

With trunk org mode, when I run org-mobile-push when in an agenda buffer, 
then refresh the buffer (via 'r' or 'g'), it spawns a new agenda buffer and 
populates it.  This only happens with org-agenda-sticky set to 't'.

To replicate, I do the following:

1. Turn on org-agenda-sticky
2. Activate an agenda (any agenda)
3. Run org-mobile-push
4. Press 'r' after it's finished

On mine, it spawns a new agenda buffer.  This is not the behavior I'd 
expect.

It looks to me like this is an issue in org-mobile-push.  It sets 
org-agenda-this-buffer-name to the original value of org-agenda-buffer-name, 
which isn't necessarily the same.

Thanks for your help.

--
Ian Dunn



Re: [O] org-collector not working

2017-01-10 Thread Charles Millar

Hi Malte,


On 01/02/2017 01:07 PM, Malte Deiseroth wrote:

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



See the discussion at the list 
https://www.mail-archive.com/emacs-orgmode@gnu.org/msg104915.html.
Nicolas Goaziou pointed out that

 'snip ((string= SPENDTYPE "food"))
snip
Properties are returned upper-cased by `org-entry-properties'.

Charlie Millar
 





[O] [org-ref] how to tweak display of links and entries

2017-01-10 Thread Christian Wittern

Hi Org, especially Org-ref users,

I have seen a number of org-ref related questions here recently, so I guess 
it is OK to ask here.


I am trying to move to a more sophisticated bibliography format involving 
some new field types recently added to biblatex. An author field for example 
can look like


author = {family=Fang, given=Ailong, cjk=方愛龍},

where cjk is defined using biblatex's tools for this as a name addon. 
Obviously, neither parsebib, helm-bibtex or org-ref understand this format 
(yet). However, I do not understand where I have to intervene to display 
this in a reasonable way, that is family name, given name and cjk name.  Is 
there a custom I have to redefine, or a hook I should add somewhere?


Another unrelated question is how to stop org-ref from displaying both the 
key and the description of the link.  I seem to remember having seen some 
discussion here about this, but can't find it now.


Any help appreciated,

Christian



--
Christian Wittern, Kyoto