[O] bug#21818: 24.5; org-set-tags-to indentation problems when called programmatically

2015-11-05 Thread Nicolas Goaziou
Hello,

Emanuel Evans  writes:

> Great, is there anything else I should do from my end to make sure it
> gets to the org mailing list? (I looked for the original post there and
> didn't see it.)

You report reached the Org mailing list. Thank you.

After a quick glance, I think you are right: invisible characters are
not treated the same way in both cases. I'll investigate deeper soon.

Regards,

-- 
Nicolas Goaziou





Re: [O] Resolving links breaks workflow using org-narrow-to-subtree

2015-11-05 Thread Nicolas Goaziou
Hello,

Aaron Ecay  writes:

> This issue has been discussed recently.  Nicolas proposed a “draft mode”
> that would solve your problem.  His most recent proposal is at
> .  It hasn’t been
> pushed to the org repository yet though.

Actually, it is, as notified in
.


Regards,

-- 
Nicolas Goaziou



Re: [O] Capture and use export header numbering?

2015-11-05 Thread Nicolas Goaziou
Hello,

Lawrence Bottorff  writes:

> It would also be nice if org-mode simply used these numbers in the original
> buffer instead of stars.

That will not happen. Stars are part of Org syntax.

However, you can add overlays on top of stars in order to display
numbering instead.


Regards,

-- 
Nicolas Goaziou



Re: [O] why does exporting look for org-id in the entire file even when subtree export?

2015-11-05 Thread Nicolas Goaziou
Hello,

Samuel Wales  writes:

> i do not claim to understand the code but org-export-get-environment
> is possibly calling org-id-find on entire buffer instead of subtree.
>
> perhaps this explains why exporting a couple of lines without any
> org-id link takes 15s to a minute or so.
>
> it is always checking all of my files for org id even when i export to
> subtree.

You are right. 

It used to be necessary for footnote definitions outside export scope
but yet referenced within it. It is no longer necessary. It is fixed in
master.

Thank you.


Regards,

-- 
Nicolas Goaziou



Re: [O] Combine tables which are results from calculations?

2015-11-05 Thread Rainer M Krug
Rick Frankel  writes:

> On Wed, Nov 04, 2015 at 10:03:48AM +0100, Rainer M Krug wrote:
>> Rick Frankel  writes:
>>
>> > On Tue, Nov 03, 2015 at 02:18:05PM +0100, Rainer M Krug wrote:
>> >> Hi
>> >>
>> >> Considering the following example:
>> >
>> > here's a way to do it in ruby. There is probably a way in {emacs,cl}-lisp, 
>> > but
>> > I'm not sure how...
>> >
>> > #+BEGIN_SRC ruby :var a=t1[,0] b=t2[,0] c=t3[,0] :colnames '(a b c)
>> >   r = [a, b, c]
>> >   len = r.collect(&:length).max
>> >   r.each { |l| l.fill('', l.length, len - l.length) }
>> >   a.zip(b, c)
>> > #+END_SRC
>>
>> Thanks - I'll look into this and see if I can do something similar in R
>> or elisp.
>
> Here's a elisp version:
>
> * zip lists
> #+name: a
> | a |
> |---|
> | 1 |
> | 2 |
>
>
> #+name: b
> | b |
> |---|
> | 4 |
> | 5 |
> | 6 |
> | 7 |
> | 8 |
>
> #+name: c
> |  c |
> ||
> |  9 |
> | 10 |
> | 11 |
>
> #+BEGIN_SRC emacs-lisp :var a=a[,0] b=b[,0] c=c[,0] :colnames '(a b c)
>   (let*  ((l (list a b c))
>   (max (apply #'max (mapcar #'length l
> (apply
>  #'mapcar* #'list
>  (mapcar (lambda (x) (append x (make-list (- max (length x)) ""))) l)))
> #+END_SRC

Thanks a lot - I think this should possibly go ito worg?

I'll keep it for reference as I implemented the whole layouting in R.

Thanks,

Rainer

>
>
> rick
>
> Note: previous reply was not to list (whoops) CC'ing the list on this so the
> answer is saved for posterity :).

-- 
Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, 
UCT), Dipl. Phys. (Germany)

Centre of Excellence for Invasion Biology
Stellenbosch University
South Africa

Tel :   +33 - (0)9 53 10 27 44
Cell:   +33 - (0)6 85 62 59 98
Fax :   +33 - (0)9 58 10 27 44

Fax (D):+49 - (0)3 21 21 25 22 44

email:  rai...@krugs.de

Skype:  RMkrug

PGP: 0x0F52F982


signature.asc
Description: PGP signature


Re: [O] [RFC] [PATCH] Automatically quote the arguments to an eval macro

2015-11-05 Thread Nicolas Goaziou
Hello,

Aaron Ecay  writes:

> Currently, eval macros need to quote their arguments:
>
> #+macro: identity (eval "$1")
>
> This means:
> 1. Users need to remember to put quotes around $n all the time
> 2. It’s impossible to pass arguments with a " character to a macro

This can be fixed by removing the `literal' optional argument from
`replace-regexp-in-string' call in `org-macro-expand'.

> The attached patch changes the behavior of eval macro arguments so that
> $1 etc. expand to the argument with quotation marks.  That is, the
> following is now the correct way to write a macro (note lack of "s):
>
> #+macro: identity (eval $1)

I'm not totally opposed to it but it introduces a limitation: all
arguments must be strings. This is not strictly required, actually. As
a consequence, I slightly prefer fixing the current situation instead.

Is there any strong reason to force string?

> * lisp/org-macro.el (org-macro-expand): Automatically quote the
> arguments to an eval macro.

You would also need to update `org-macro-initialize-templates' and
`org-export-as'.

> + (cond
> +  (evalp (format "%S" arg-val))
> +  (arg-val arg-val)

Nitpick: this is equivalent to (arg-val)


Regards,

-- 
Nicolas Goaziou



Re: [O] [RFC] [PATCH] Automatically quote the arguments to an eval macro

2015-11-05 Thread Aaron Ecay
Hi Nicolas,

Thanks for your feedback.

2015ko azaroak 5an, Nicolas Goaziou-ek idatzi zuen:

[...]

>> This means:
>> 1. Users need to remember to put quotes around $n all the time
>> 2. It’s impossible to pass arguments with a " character to a macro
> 
> This can be fixed by removing the `literal' optional argument from
> `replace-regexp-in-string' call in `org-macro-expand'.

I’ve actually managed to make it work with the code as-is, by escaping
the quote with a single backslash.  I must have been confused about
single- vs. double-escaping.

The inconsistency that remains is that quotes need to be backslash-escaped
for eval macros, but not regular macros.

Here’s a test case (works with current master):

,
| #+macro: foo $1
| 
| {{{foo(xyz\"abc)}}}
| 
| #+macro: bar (eval "$1")
| 
| {{{bar(xyz\"abc)}}}
`

Ascii export yields:

,
| Foo is: xyz\"abc
| 
| Bar is: xyz"abc
`

> 
>> The attached patch changes the behavior of eval macro arguments so that
>> $1 etc. expand to the argument with quotation marks.  That is, the
>> following is now the correct way to write a macro (note lack of "s):
>> 
>> #+macro: identity (eval $1)
> 
> I'm not totally opposed to it but it introduces a limitation: all
> arguments must be strings. This is not strictly required, actually. As
> a consequence, I slightly prefer fixing the current situation instead.
> 
> Is there any strong reason to force string?

I’d say the reason is that (AIUI) macros are for string manipulation
during export.  I’m hard-pressed to come up with a good usage of a macro
that treats its arguments as non-strings.  But maybe that’s just a
function of my limited creativity. :)

> 
>> * lisp/org-macro.el (org-macro-expand): Automatically quote the
>> arguments to an eval macro.
> 
> You would also need to update `org-macro-initialize-templates' and
> `org-export-as'.
> 
>> +(cond
>> + (evalp (format "%S" arg-val))
>> + (arg-val arg-val)
> 
> Nitpick: this is equivalent to (arg-val)

I didn’t know this usage of cond

Thanks again,

-- 
Aaron Ecay



Re: [O] Resolving links breaks workflow using org-narrow-to-subtree

2015-11-05 Thread Aaron Ecay
Hi Nicolas,

2015ko azaroak 5an, Nicolas Goaziou-ek idatzi zuen:
> 
> Hello,
> 
> Aaron Ecay  writes:
> 
>> This issue has been discussed recently.  Nicolas proposed a “draft mode”
>> that would solve your problem.  His most recent proposal is at
>> .  It hasn’t been
>> pushed to the org repository yet though.
> 
> Actually, it is, as notified in
> .

Excellent news!  I missed the announcement.  Sorry for the confusion.

Thanks,

-- 
Aaron Ecay



[O] bug#21818: 24.5; org-set-tags-to indentation problems when called programmatically

2015-11-05 Thread Nicolas Goaziou
Nicolas Goaziou  writes:

> After a quick glance, I think you are right: invisible characters are
> not treated the same way in both cases. I'll investigate deeper soon.

Fixed in d5767ad.





Re: [O] BUG: emacs orgmode ob-R.el function org-babel-R-evaluate-session over aggressively performs "; ; cleanup extra prompts left in output" and a possible workaround

2015-11-05 Thread Nicolas Goaziou
Hello,

"Charles C. Berry"  writes:

> I have traced this back to its source, and the culprit appears to be me.
>
> See
>   commit dc92eaa08d89e4bc9556f868ae65633196157a8d
>   Author: Eric Schulte 
>   Date:   Wed Jul 28 08:05:30 2010 -0600
> and subsequent modifications.
>
> I believe the leading blank(s) in the regex were copied from ess, but
> nowadays I only see this in code in ess-traceback.el that is commented
> out.
>
> So I guess there would be no harm in pushing the latter regex.

Would you want to provide a patch for that (and commit it while you're
at it)?

Thank you for the investigation.


Regards,

-- 
Nicolas Goaziou



Re: [O] Org Babel resolution of `:var` value reference inconsistent

2015-11-05 Thread Martin Carlé

On 2015-11-04 Wed 14:14, Andreas Leha wrote:

> ,---
> | > I'd say it is a bug if the results from evaluation differ between
> | > manual evaluation and during export.
> | >
> | > And even if it is not explicitely contradicting the manual [1] (which
> | > does not say anything about finding references), I'd prefer if
> | > references in COMMENT'ed sections are not found -- neither during export
> | > nor during evaluation.  This would be more inline with my intuition of
> | > COMMENT is equivalent to # (which is also suggested by the fact that
> | > COMMENT is described in the section on #).
> `---

I'd like to strongly support this view.

Regards,
mc

-- 
Fetch my gnupg key:
gpg --keyserver pgp.mit.edu --recv-keys 7E3CA33F


smime.p7s
Description: S/MIME cryptographic signature


Re: [O] Capture and use export header numbering?

2015-11-05 Thread Myles English

Hello Lawrence,

Lawrence Bottorff writes:

> When an outline tree of headers
>
> * top 1
> ** something
> ** something
> ** something
> *** something
>  something
> * something
> ** something
>
> is exported, say, to html, org-mode produces a numerical outline as deep as
> the options are set
>
> 1. top
> 1.1. something
> 1.2. something
> 1.3. something
> 1.3.1. something
> 1.3.1.1. something
> 1.3.1.1.1. something
> 1.3.1.1.1.1. something
>
>
> Now, is there any way to actually capture that outline numeration for use
> in the original buffer? I'm thinking I would like to make a sort of tags or
> custom_id  system based on these numbers.

You might find something useful as a starting point in this old code I
posted here:

http://lists.gnu.org/archive/html/emacs-orgmode/2012-10/msg00245.html

Basically it exported to text to get the heading numbers.

Myles




Re: [O] Org and Citations / References / Bibliography

2015-11-05 Thread John Kitchin
Can you send me a minimal org and bib file you are using that doesn't
work, and how you have it set up?

Does helm-bibtex work for you?

We use org-ref on a daily basis, so it should work.

Rainer M Krug writes:

> Hi
>
> I have been following the whole discussion about the implementation of a
> good citation system in org, which is really necessary.
>
> At the moment I am again at that point where I would like to include
> citations in a document and I don't get any citation system to work -
> neither org-ref[1] nor org's org-reftex-citation nor reftex
> citation. None of these find anything in a .bib file, I have no overview
> where I have to specify the bib file and I am frustrated, because it
> worked some months ago.
>
> I would very much like to use org-ref, but I don't even get the supplied
> examples to work, i.e. find something from the .bib file.
>
> Any suggestions what I can do, any simple / minimalistic init.el file
> which I can merge into my config?
>
> Thanks,
>
> Rainer
>
>
> Footnotes:
> [1]  
> http://kitchingroup.cheme.cmu.edu/blog/2014/05/13/Using-org-ref-for-citations-and-references/

--
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] environmental variables in links in org

2015-11-05 Thread Zhihao Ding
Hi guys,

Is it a good idea to use environment variables in the links referenced in a
org file?  e.g.

[[$mydata/myfigure.pdf]]

If so how to achieve this?

Many thanks,
Zhihao


Re: [O] Wrong results from R source block when returning a list

2015-11-05 Thread Rainer M Krug
"Charles C. Berry"  writes:

> On Tue, 3 Nov 2015, Rainer M Krug wrote:
>
>> Hi
>>
>> The following code block returns a wrong table / list:
>>
>>
>> #+begin_src R :results value list
>> list(1:10, 1:5)
>> #+end_src
>>
>> #+RESULTS:
>> - (1 1)
>> - (2 2)
>> - (3 3)
>> - (4 4)
>> - (5 5)
>> - (6 1)
>> - (7 2)
>> - (8 3)
>> - (9 4)
>> - (10 5)
>>
>> The result is actually in R:
>
>
> In particular in `org-babel-R-write-object-command' which uses
> write.table() which uses as.data.frame() which dispatches to
> as.data.frame.list() which calls data.frame() where the recycling
> occurs.

Thanks for this info - I thought something along these lines, but this
makes it clear why.

>
> [snip]
>
>> I have no idea if this is a bug or wrong result due to incompatible
>> types (R list and org table)?
>
> If you can't coerce a non-atomic R object to a data.frame and get a
> pleasing result, you need to craft your own solution.

Yup - I did it in R

>
>>
>> Is this mentioned in the manual?
>
> Not that I know of. A comment in `Results Types' in ob-doc-R -
>
> http://orgmode.org/worg/org-contrib/babel/languages/ob-doc-R.html#orgheadline6
>
> - might be helpful.

Yes - thanks,

Rainer

>
> Chuck

-- 
Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, 
UCT), Dipl. Phys. (Germany)

Centre of Excellence for Invasion Biology
Stellenbosch University
South Africa

Tel :   +33 - (0)9 53 10 27 44
Cell:   +33 - (0)6 85 62 59 98
Fax :   +33 - (0)9 58 10 27 44

Fax (D):+49 - (0)3 21 21 25 22 44

email:  rai...@krugs.de

Skype:  RMkrug

PGP: 0x0F52F982


signature.asc
Description: PGP signature


[O] Org and Citations / References / Bibliography

2015-11-05 Thread Rainer M Krug
Hi

I have been following the whole discussion about the implementation of a
good citation system in org, which is really necessary.

At the moment I am again at that point where I would like to include
citations in a document and I don't get any citation system to work -
neither org-ref[1] nor org's org-reftex-citation nor reftex
citation. None of these find anything in a .bib file, I have no overview
where I have to specify the bib file and I am frustrated, because it
worked some months ago.

I would very much like to use org-ref, but I don't even get the supplied
examples to work, i.e. find something from the .bib file.

Any suggestions what I can do, any simple / minimalistic init.el file
which I can merge into my config?

Thanks,

Rainer


Footnotes: 
[1]  
http://kitchingroup.cheme.cmu.edu/blog/2014/05/13/Using-org-ref-for-citations-and-references/

-- 
Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, 
UCT), Dipl. Phys. (Germany)

Centre of Excellence for Invasion Biology
Stellenbosch University
South Africa

Tel :   +33 - (0)9 53 10 27 44
Cell:   +33 - (0)6 85 62 59 98
Fax :   +33 - (0)9 58 10 27 44

Fax (D):+49 - (0)3 21 21 25 22 44

email:  rai...@krugs.de

Skype:  RMkrug

PGP: 0x0F52F982


signature.asc
Description: PGP signature


[O] :noweb no-export and syntax highlighting upon export to html

2015-11-05 Thread Joost Helberg
ls,

In the org-code below syntax highlighting in both code-blocks in the
emacs-buffer is fine, but the html-export only works nice in case of
using :noweb yes, the no-export option screws up syntax highlighting in
the html-output (two screenshots included).

I understood that htmlize is used for html-export and that it honours
the faces in the emacs-buffer. It seems as if htmlize doesn't do this
after encountering the '>>' token.

Can I avoid this? Are settings involved?

Org-code:

/bla/ is for re-use in scripts.
#+caption: /bla/:
#+name: bla
#+begin_src sh 
   # this sits in projects/t-stuff
#+end_src

#+caption: /t1.sh/:
#+name: t1
#+begin_src sh :tangle t1.sh :noweb no-export 
  <>
  for i in `seq 1 10`
  do
echo $i
  done
#+end_src

#+caption: /t2.sh/:
#+name: t2
#+begin_src sh :tangle t2.sh :noweb yes 
  <>
  for i in `seq 1 10`
  do
echo $i
  done
#+end_src


many regards,

Joost Helberg

-- 
Snow B.V.


Re: [O] bug#21818: 24.5; org-set-tags-to indentation problems when called programmatically

2015-11-05 Thread Emanuel Evans
Nicolas Goaziou  writes:

> Fixed in d5767ad.

Awesome, thanks for looking at this!




[O] Bug: Export fails with a type error [8.3.2 (8.3.2-10-g00dacd-elpa @ /Users/hedman/.emacs.d/elpa/org-20151005/)]

2015-11-05 Thread Noruna AB c/o Hedman
When exporting an org-documnent that has worked before I get the
following error

   apply: Wrong type argument: listp, #("Post-it lappar från workshop" 0 28 
(:parent (#0))).

It seems that it is the header of the file that is causing problems.
The error started to occur after upgrading.  

Removing the TITLE and AUTHOR removes the error:

#+LATEX_CLASS: report
#+LATEX_CLASS_OPTIONS: [a4paper,pdftex]

#+AUTHOR: Fredrik B. Hedman
#+TITLE: Post-it lappar från workshop

Cheers,
/F








Emacs  : GNU Emacs 24.5.1 (x86_64-apple-darwin13.4.0, NS apple-appkit-1265.21)
 of 2015-04-10 on builder10-9.porkrind.org
Package: Org-mode version 8.3.2 (8.3.2-10-g00dacd-elpa @ 
/Users/hedman/.emacs.d/elpa/org-20151005/)

current state:
==
(setq
 org-export-backends '(ascii beamer html icalendar latex man md odt org)
 org-tab-first-hook '(org-hide-block-toggle-maybe
  org-babel-hide-result-toggle-maybe
  org-babel-header-arg-expand)
 org-latex-classes '(("beamer" "\\documentclass[presentation]{beamer}"
  ("\\section{%s}" . "\\section*{%s}")
  ("\\subsection{%s}" . "\\subsection*{%s}")
  ("\\subsubsection{%s}" . "\\subsubsection*{%s}"))
 ("article" "\\documentclass[11pt]{article}"
  ("\\section{%s}" . "\\section*{%s}")
  ("\\subsection{%s}" . "\\subsection*{%s}")
  ("\\subsubsection{%s}" . "\\subsubsection*{%s}")
  ("\\paragraph{%s}" . "\\paragraph*{%s}")
  ("\\subparagraph{%s}" . "\\subparagraph*{%s}"))
 ("report" "\\documentclass[11pt]{report}"
  ("\\chapter{%s}" . "\\chapter*{%s}")
  ("\\section{%s}" . "\\section*{%s}")
  ("\\subsection{%s}" . "\\subsection*{%s}")
  ("\\subsubsection{%s}" . "\\subsubsection*{%s}"))
 ("book" "\\documentclass[11pt]{book}"
  ("\\part{%s}" . "\\part*{%s}")
  ("\\chapter{%s}" . "\\chapter*{%s}")
  ("\\section{%s}" . "\\section*{%s}")
  ("\\subsection{%s}" . "\\subsection*{%s}")
  ("\\subsubsection{%s}" . "\\subsubsection*{%s}"))
 )
 org-latex-default-packages-alist '(("AUTO" "inputenc" t) ("T1" "fontenc" t)
("" "longtable" nil) ("" "float" nil)
("" "wrapfig" nil) ("normalem" "ulem" t)
("" "amsmath" t) ("" "textcomp" t)
("" "marvosym" t) ("" "hyperref" t)
("" "amssymb" t) "\\tolerance=1000")
 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 '(lambda (name contents) 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 '(lambda (name contents) contents)
 org-odt-format-headline-function 'org-odt-format-headline-default-function
 org-from-is-user-regexp "\\"
 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 '(turn-on-auto-fill
 #[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-archive-hook '(org-attach-archive-delete-maybe)
 org-ascii-format-drawer-function '(lambda (name contents width) contents)
 org-odt-format-inlinetask-function 'org-odt-format-inlinetask-default-function
 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-show-empty-lines
  org-optimize-window-after-visibility-change)
 org-footnote-define-inline t
 org-babel-tangle-lang-exts '(("python" . "py") ("emacs-lisp" . "el")
  ("elisp" 

Re: [O] Bug: Export fails with a type error [8.3.2 (8.3.2-10-g00dacd-elpa @ /Users/hedman/.emacs.d/elpa/org-20151005/)]

2015-11-05 Thread Noruna AB c/o Hedman
Downloading and recompiling again fixed this problem.  Close this.

/F

3 nov 2015 kl. 11:19 skrev Noruna AB c/o Hedman :

> When exporting an org-documnent that has worked before I get the
> following error
> 
>   apply: Wrong type argument: listp, #("Post-it lappar från workshop" 0 28 
> (:parent (#0))).
> 
> It seems that it is the header of the file that is causing problems.
> The error started to occur after upgrading.  
> 
> Removing the TITLE and AUTHOR removes the error:
> 
> #+LATEX_CLASS: report
> #+LATEX_CLASS_OPTIONS: [a4paper,pdftex]
> 
> #+AUTHOR: Fredrik B. Hedman
> #+TITLE: Post-it lappar från workshop
> 
> Cheers,
> /F
> 
> 
> 
> 
> 
> 
> 
> 
> Emacs  : GNU Emacs 24.5.1 (x86_64-apple-darwin13.4.0, NS apple-appkit-1265.21)
> of 2015-04-10 on builder10-9.porkrind.org
> Package: Org-mode version 8.3.2 (8.3.2-10-g00dacd-elpa @ 
> /Users/hedman/.emacs.d/elpa/org-20151005/)
> 
> current state:
> ==
> (setq
> org-export-backends '(ascii beamer html icalendar latex man md odt org)
> org-tab-first-hook '(org-hide-block-toggle-maybe
>  org-babel-hide-result-toggle-maybe
>  org-babel-header-arg-expand)
> org-latex-classes '(("beamer" "\\documentclass[presentation]{beamer}"
>  ("\\section{%s}" . "\\section*{%s}")
>  ("\\subsection{%s}" . "\\subsection*{%s}")
>  ("\\subsubsection{%s}" . "\\subsubsection*{%s}"))
> ("article" "\\documentclass[11pt]{article}"
>  ("\\section{%s}" . "\\section*{%s}")
>  ("\\subsection{%s}" . "\\subsection*{%s}")
>  ("\\subsubsection{%s}" . "\\subsubsection*{%s}")
>  ("\\paragraph{%s}" . "\\paragraph*{%s}")
>  ("\\subparagraph{%s}" . "\\subparagraph*{%s}"))
> ("report" "\\documentclass[11pt]{report}"
>  ("\\chapter{%s}" . "\\chapter*{%s}")
>  ("\\section{%s}" . "\\section*{%s}")
>  ("\\subsection{%s}" . "\\subsection*{%s}")
>  ("\\subsubsection{%s}" . "\\subsubsection*{%s}"))
> ("book" "\\documentclass[11pt]{book}"
>  ("\\part{%s}" . "\\part*{%s}")
>  ("\\chapter{%s}" . "\\chapter*{%s}")
>  ("\\section{%s}" . "\\section*{%s}")
>  ("\\subsection{%s}" . "\\subsection*{%s}")
>  ("\\subsubsection{%s}" . "\\subsubsection*{%s}"))
> )
> org-latex-default-packages-alist '(("AUTO" "inputenc" t) ("T1" "fontenc" t)
>("" "longtable" nil) ("" "float" nil)
>("" "wrapfig" nil) ("normalem" "ulem" t)
>("" "amsmath" t) ("" "textcomp" t)
>("" "marvosym" t) ("" "hyperref" t)
>("" "amssymb" t) "\\tolerance=1000")
> 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 '(lambda (name contents) 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 '(lambda (name contents) contents)
> org-odt-format-headline-function 'org-odt-format-headline-default-function
> org-from-is-user-regexp "\\"
> 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 '(turn-on-auto-fill
> #[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-archive-hook '(org-attach-archive-delete-maybe)
> org-ascii-format-drawer-function '(lambda (name contents width) contents)
> org-odt-format-inlinetask-function 'org-odt-format-inlinetask-default-function
> org-ctrl-c-ctrl-c-hook '(org-babel-hash-at-point
>  org-babel-execute-safely-maybe)
> org-cycle-hook 

[O] Bug: org-set-tags-to indentation problems when called programmatically [8.2.10 (release_8.2.10 @ /usr/share/emacs/24.5/lisp/org/)]

2015-11-05 Thread Emanuel Evans

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-mode mailing list.


This is cross-filed as
https://debbugs.gnu.org/cgi/bugreport.cgi?bug=21818 in Emacs. Steps to
reproduce:

1. Start emacs with emacs -Q
2. Evaluate the following:

(require 'org-mode)

(defun bad-indent ()
  (interactive)
  (insert "* ")
  (org-insert-link nil "http://www.example.com/foo/bar/baz/qux/abc123f56789; 
"something")
  (org-set-tags-to '("foo")))

3. Switch to an empty buffer
4. M-x org-mode
5. M-x bad-indent
6. The result looks like the following (except with an actual hyperlink):

* something :foo:

This indentation is incorrect. If you follow the steps for `bad-indent'
interactively (or even using edebug), the indentation looks like:

* something :foo:

Digging in some more, it looks like the problem is the `current-column'
call in `org-set-tags' (where it says 'setq c0 (current-column)', on
line 14620 of org.el in my distribution). With some instrumentation,
`current-column' seems to be giving different values in interactive mode
than programatically; I'm guessing it has something to do with the long
link target causing the value to be different.


Emacs  : GNU Emacs 24.5.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.16.6)
 of 2015-09-09 on foutrelis
Package: Org-mode version 8.2.10 (release_8.2.10 @ 
/usr/share/emacs/24.5/lisp/org/)



Re: [O] bug in org-habits

2015-11-05 Thread Bastien Guerry
Hi John and Achim,

John Wiegley  writes:

>> Achim Gratz  writes:
>
>> I don't think so. Search for end of entry can be complex in itself and you
>> would never know if the properties you find by looking back aren't belonging
>> to an entry one level down unless you scanned the whole span again. Also,
>> properties can be any size and you have to search for the beginning of the
>> drawer.
>
> Good point.  Still, the option I'd still choose would be:
>
> org-allow-floating-properties
>
>   If set to `non-nil', the :PROPERTIES: drawer may begin anywhere within
>   an entry. Note that this will slow down many operations due to the
>   additional scan needed, and may lead to incorrect result if similar text
>   is found elsewhere within an entry, which is the recommended and default
>   value for this variable is nil.

I think Achim's points above are very valid, and the flexibility
offered by the option above should be very carefully examined.

I'm trying hard to put aside one day or two for org-mode next week,
I'll come back on this issue then.

Thanks,

-- 
 Bastien



Re: [O] why does exporting look for org-id in the entire file even when subtree export?

2015-11-05 Thread Samuel Wales
thank you.

p.s. any reason this is not also fixed in maint?



[O] Best way to edit org files via Dropbox on an IOS device?

2015-11-05 Thread Chris Patti
I've tried MobileOrg and the strange (to me :) push/pull workflow
doesn't fit my needs very well.

Dropbox has an excellent IOS client, I'd love to just be able to load
and edit my .org files from that with some app or other.

Does such exist?

Thanks!
-Chris

-- 
Christopher Patti - Geek At Large | GTalk: cpa...@gmail.com | AIM:
chrisfeohpatti | P: (260) 54PATTI
"Technology challenges art, art inspires technology." - John Lasseter, Pixar



Re: [O] Best way to edit org files via Dropbox on an IOS device?

2015-11-05 Thread Eric S Fraga
On Thursday,  5 Nov 2015 at 15:53, Chris Patti wrote:
> I've tried MobileOrg and the strange (to me :) push/pull workflow
> doesn't fit my needs very well.
>
> Dropbox has an excellent IOS client, I'd love to just be able to load
> and edit my .org files from that with some app or other.
>
> Does such exist?

Has anybody ported Emacs to iOS?

If not, move to an open system, e.g. the OpenPandora! ;-)
I use Emacs on the move all the time.  But it's not iOS...

Seriously, trying to edit org files in anything other than org mode in
Emacs is difficult except for minor changes.  (exception: I believe
there is a vim org compatible mode)  If Emacs is not available on iOS,
can you ssh to a system which does have Emacs?  I do this in a pinch (if
I've left my Pandora at home).

-- 
: Eric S Fraga (0xFFFCF67D), Emacs 24.5.1, Org release_8.3.2-215-gb4af3f



Re: [O] Publishing a Book as PDF and ePub.

2015-11-05 Thread Eric S Fraga
On Thursday,  5 Nov 2015 at 20:34, Ian Barton wrote:
> Thanks, that looks as though it will do what I need and much simpler
> than KOMA scrbook.

Once you are comfortable with the default book class, you can consider
moving to the KOMA equivalent as it *is* much nicer and allows you to
control all aspects, should you need to.  But you might not need to!

Let us know how you get on.
-- 
: Eric S Fraga (0xFFFCF67D), Emacs 24.5.1, Org release_8.3.2-215-gb4af3f



Re: [O] [Rittwik Chatterjee] bug#21838: Org Table edits item incorrectly

2015-11-05 Thread Nicolas Goaziou
Hello,

John Wiegley  writes:

> In case this wasn't seen by the Org maintainers...

It wasn't.

> Date: Thu, 5 Nov 2015 10:07:36 +0530 (17 hours, 46 minutes, 45 seconds ago)
> From: Rittwik Chatterjee 
> To: 21...@debbugs.gnu.org
> Subject: bug#21838: Org Table edits item incorrectly
>
> Start emacs with `emacs -Q'
> Create a Org file `test.org'
>
> Copy the following table into that file and save.
>
> |---+-|
> | Plugins   | How to install  |
> |---+-|
> | Bookmark plus | Create a folder "bookmark-plus" |
> | Company-mode  | Create a folder "company"   |
> |---+-|
>
> Double click on the word `Create' (to select it) in the third row and press
> `:'.
>
> Expected output:
> |---+-|
> | Plugins   | How to install  |
> |---+-|
> | Bookmark plus | Create a folder "bookmark-plus" |
> | Company-mode  | Create: a folder "company"  |
> |---+-|
>
> Actual output:
> |---+-|
> | Plugins   | How to install  |
> |---+-|
> | Bookmark plus | Create a folder "bookmark-plus" |
> | Company-mode  | |
> |---:+-|
>
> This can be reproduce by pressing any other character keys, ex. a-z, ( { [
> " etc.

Fixed. Thank you.

Regards,

-- 
Nicolas Goaziou



[O] bug#21818: 24.5; org-set-tags-to indentation problems when called programmatically

2015-11-05 Thread Emanuel Evans
Glenn Morris  writes:

> Nope, just a mailing list AFAIK. Assigning something to the debbugs
> org-mode package (which I already did for this report) sends stuff there.

Great, is there anything else I should do from my end to make sure it
gets to the org mailing list? (I looked for the original post there and
didn't see it.)






Re: [O] Publishing a Book as PDF and ePub.

2015-11-05 Thread Ian Barton
On Tue, Nov 03, 2015 at 10:56:14AM +, Eric S Fraga wrote:
> On Monday,  2 Nov 2015 at 15:37, Ian Barton wrote:
> > Next year our mountaineering club has its 50th anniversary. On the
> > 21st anniversary we published a book of articles written by members of
> > the club.
> [...]
>
> > However, as a Latex
> > neophyte I was wondering which of the several Latex packages would be
> > suitable.
>
> The book class may be enough for you.  In org, it is trivial to
> use.  Simply put the line
>

Thanks, that looks as though it will do what I need and much simpler
than KOMA scrbook.

--
Best wishes,

Ian.



Re: [O] why does exporting look for org-id in the entire file even when subtree export?

2015-11-05 Thread Nicolas Goaziou
Samuel Wales  writes:

> thank you.
>
> p.s. any reason this is not also fixed in maint?

It relies on a previous change which is master only.

Regards,



[O] bug#21818: 24.5; org-set-tags-to indentation problems when called programmatically

2015-11-05 Thread Emanuel Evans
Eli Zaretskii  writes:

> Org mode has its own bug tracker, AFAIR.

OK, I'll submit there. Thanks!

> P.S. Your email bounces, so sending me a private email is not very
> wise...

Oops, sorry about that and thanks for the heads up.






Re: [O] Org Babel resolution of `:var` value reference inconsistent

2015-11-05 Thread Andreas Leha
Hi Nicolas,

Nicolas Goaziou  writes:
> Hello,
>
> Martin Carlé  writes:
>
>> On 2015-11-04 Wed 14:14, Andreas Leha wrote:
>>
>>> ,---
>>> | > I'd say it is a bug if the results from evaluation differ between
>>> | > manual evaluation and during export.
>>> | >
>>> | > And even if it is not explicitely contradicting the manual [1] (which
>>> | > does not say anything about finding references), I'd prefer if
>>> | > references in COMMENT'ed sections are not found -- neither during export
>>> | > nor during evaluation.  This would be more inline with my intuition of
>>> | > COMMENT is equivalent to # (which is also suggested by the fact that
>>> | > COMMENT is described in the section on #).
>>> `---
>>
>> I'd like to strongly support this view.
>
> Fixed, in master (02c78501472fba94f8cf5a3d218b5c8845b28827).
>
> Thank you.
>

Thank you.

Regards,
Andreas




[O] [Rittwik Chatterjee] bug#21838: Org Table edits item incorrectly

2015-11-05 Thread John Wiegley
In case this wasn't seen by the Org maintainers...

--- Begin Message ---
Start emacs with `emacs -Q'
Create a Org file `test.org'

Copy the following table into that file and save.

|---+-|
| Plugins   | How to install  |
|---+-|
| Bookmark plus | Create a folder "bookmark-plus" |
| Company-mode  | Create a folder "company"   |
|---+-|

Double click on the word `Create' (to select it) in the third row and press
`:'.

Expected output:
|---+-|
| Plugins   | How to install  |
|---+-|
| Bookmark plus | Create a folder "bookmark-plus" |
| Company-mode  | Create: a folder "company"  |
|---+-|

Actual output:
|---+-|
| Plugins   | How to install  |
|---+-|
| Bookmark plus | Create a folder "bookmark-plus" |
| Company-mode  | |
|---:+-|

This can be reproduce by pressing any other character keys, ex. a-z, ( { [
" etc.



In GNU Emacs 24.5.1 (x86_64-redhat-linux-gnu, GTK+ Version 3.16.2)
 of 2015-04-22 on buildhw-10.phx2.fedoraproject.org
Windowing system distributor `Fedora Project', version 11.0.11702000
Configured using:
 `configure --build=x86_64-redhat-linux-gnu
 --host=x86_64-redhat-linux-gnu --program-prefix=
 --disable-dependency-tracking --prefix=/usr --exec-prefix=/usr
 --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc
 --datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib64
 --libexecdir=/usr/libexec --localstatedir=/var
 --sharedstatedir=/var/lib --mandir=/usr/share/man
 --infodir=/usr/share/info --with-dbus --with-gif --with-jpeg --with-png
 --with-rsvg --with-tiff --with-xft --with-xpm --with-x-toolkit=gtk3
 --with-gpm=no build_alias=x86_64-redhat-linux-gnu
 host_alias=x86_64-redhat-linux-gnu 'CFLAGS=-DMAIL_USE_LOCKF -O2 -g
 -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2
 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4
 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1
 -m64 -mtune=generic' LDFLAGS=-Wl,-z,relro'

Important settings:
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Lisp Interaction

Minor modes in effect:
  tooltip-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.
Making completion list...

Load-path shadows:
None found.

Features:
(shadow sort gnus-util mail-extr emacsbug message format-spec rfc822 mml
mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev
gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util
help-fns mail-prsvr mail-utils help-mode easymenu time-date tooltip
electric uniquify ediff-hook vc-hooks lisp-float-type mwheel x-win x-dnd
tool-bar dnd fontset image regexp-opt fringe tabulated-list newcomment
lisp-mode prog-mode register page menu-bar rfn-eshadow timer select
scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame cham
georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao
korean japanese hebrew greek romanian slovak czech european ethiopic
indian cyrillic chinese case-table epa-hook jka-cmpr-hook help simple
abbrev minibuffer nadvice loaddefs button faces cus-face macroexp files
text-properties overlay sha1 md5 base64 format env code-pages mule
custom widget hashtable-print-readable backquote make-network-process
dbusbind gfilenotify dynamic-setting system-font-setting
font-render-setting move-toolbar gtk x-toolkit x multi-tty emacs)

Memory information:
((conses 16 72390 5112)
 (symbols 48 17647 0)
 (miscs 40 36 113)
 (strings 32 9239 4277)
 (string-bytes 1 254414)
 (vectors 16 8986)
 (vector-slots 8 383759 19219)
 (floats 8 64 222)
 (intervals 56 289 4)
 (buffers 960 12)
 (heap 1024 34048 744))

Thanks,
Rittwik
--- End Message ---


Re: [O] contributing to work on citations

2015-11-05 Thread Matt Price
On Wed, Nov 4, 2015 at 10:18 AM, Aaron Ecay  wrote:

> >
> > 3. Handling of citation links in the various export engines
> > Functions must be written to handle citations in, at minimum, latex,
> html,
> > and org
> >
> > 4. Interface with backends
> > Org should be able to talk to bibtex and zotero databases, at least (and
> > maybe more).
>
> The code I wrote should have enough hooks to enable this.  But I haven’t
> looked at zotero at all.  If zotero support is important to you, you
> could investigate the “lookup types” in the citation code I wrote, see
> if they are adequate, and try to use them to implement zotero lookup.
> From the docstring:
>
> "Types of citation lookup backends.
>
> Alist from type to list of:
>
> - Function called at the beginning of export, with the rest of
>   the keyword line after #+BIBDB: type, and the info plist.
>   Should cache whatever it needs in the info plist.
>
> - Function to lookup a citation.  Called with the key and the
>   info plist.  Will be memoized by
>   `org-export-cite--lookup' (TODO).  Should return an alist of
>   keys and values about the citation (author, year, title, etc.)
>
> - A boolean; non-nil = this lookup type is remote.  All local
>   lookups will be tried before any remote one is.
>   TODO: not yet implemented"
>

Hey, Aaron,
Am I right that I need to check out your wip-cite-awe branch from ~8 months
ago? Would it make sense to try to merge recent changes on master into that
branch first?

Anyway, I figure I will try to modify zotxt-emacs so it provides these
functions and generates conformant cite: links.  That seems the easiest
solution, and maybe Erik will give me some help once I've made some initial
progress.  Meanwhile I will try to learn enough about javascript to get
started on the citeproc-js ocmmand-line tool.  thx,
matt


Re: [O] problems with export and :cache

2015-11-05 Thread Nicolas Goaziou
Aaron Ecay  writes:

> Thanks for the comments.  I pushed a patch with all your suggestions
> applied.

Thank you.

Regards,



Re: [O] [RFC] [PATCH] bug with babel call lines and cache

2015-11-05 Thread Aaron Ecay
Hello all,

2015ko urriak 30an, Aaron Ecay-ek idatzi zuen:
> 
> Hello all,
> 
> In playing around with some of the cache-related issues, I’ve discovered
> that C-c C-c on the following #+call line will give the following
> backtrace:
> 

[...]

> 
> The problem is that unprocessed params (in the sense of
> org-babel-process-params) are passed to org-babel-sha1-hash under some
> circumstances.
> 
> The attached patch fixes this issue by simplifying some code in
> org-babel-execute-src-block.  I’m slightly uncomfortable about it
> because I remember touching the various nested ‘let’s which toggle
> between different states of ‘params’ in that function once upon a
> time, and they seemed important.  Now I can’t remember why, though.
> So I’d be happier if someone else familiar with babel’s code looked
> the patch over.
> 
> If no one pipes up in a few days, I will push the patch and see if
> anything breaks.

Pushed to master as 4750e44 (with a couple cosmetic changes from the
original version).

-- 
Aaron Ecay



Re: [O] :noweb no-export and syntax highlighting upon export to html

2015-11-05 Thread Aaron Ecay
Hi Joost,

Org’s html export relies on the syntax of the source block being valid
in the block’s language, for the corresponding emacs major mode to
highlight it properly.  In general, I wouldn’t rely on it behaving
properly in the presence of unexpanded noweb references.  That said...

2015ko azaroak 5an, Joost Helberg-ek idatzi zuen:
> 
> ls,
> 
> In the org-code below syntax highlighting in both code-blocks in the
> emacs-buffer is fine, but the html-export only works nice in case of
> using :noweb yes, the no-export option screws up syntax highlighting in
> the html-output (two screenshots included).
> 
> I understood that htmlize is used for html-export and that it honours
> the faces in the emacs-buffer. It seems as if htmlize doesn't do this
> after encountering the '>>' token.

Your example works fine for me on latest org master.  Can you send your
org version?  (M-x org-version)  What happens if you insert the code for
t1 into an sh-mode buffer: is it highlighted as expected?

-- 
Aaron Ecay



Re: [O] Org Babel resolution of `:var` value reference inconsistent

2015-11-05 Thread Nicolas Goaziou
Hello,

Martin Carlé  writes:

> On 2015-11-04 Wed 14:14, Andreas Leha wrote:
>
>> ,---
>> | > I'd say it is a bug if the results from evaluation differ between
>> | > manual evaluation and during export.
>> | >
>> | > And even if it is not explicitely contradicting the manual [1] (which
>> | > does not say anything about finding references), I'd prefer if
>> | > references in COMMENT'ed sections are not found -- neither during export
>> | > nor during evaluation.  This would be more inline with my intuition of
>> | > COMMENT is equivalent to # (which is also suggested by the fact that
>> | > COMMENT is described in the section on #).
>> `---
>
> I'd like to strongly support this view.

Fixed, in master (02c78501472fba94f8cf5a3d218b5c8845b28827).

Thank you.


Regards,

-- 
Nicolas Goaziou



Re: [O] problems with export and :cache

2015-11-05 Thread Aaron Ecay
Hi Nicolas,

Thanks for the comments.  I pushed a patch with all your suggestions
applied.

-- 
Aaron Ecay