[O] bibliography in exporting docx using ox-pandoc+org-ref

2016-02-22 Thread 童俊翔
I’m trying to use ox-pandoc to export files from org, I’ve installed pandoc and 
pandoc-citeproc and copied nature.csl to the working directory, and added the 
following scripts in the head of the org file

#+pandoc_options: csl:nature.csl

But when I save the org file, the feedback is 

Error: (cl-assertion-failed (stringp file1))


I can export to docx file, but the bibliography style is not correct

What’s the problem? Thank you for your help!

Junxiang


Re: [O] ox-tufte-latex

2016-02-22 Thread Thomas S . Dye
Hi John,

I added a section to tufte-latex.org that gives some instruction on how
to use that file.  I hope it goes some way toward answering your
queries.  I pushed the changes to the github repo:

https://github.com/tsdye/tufte-org-mode

Some other responses interspersed below.

John Hendy writes:

> Just gave this a whirl and am not sure if I'm doing something wrong. I
> think I have all of the required LaTeX packages.[1] I may have missed
> it, but I didn't see instructions that explicitly stated how to export
> the file tufte-latex.org. I assumed I could just =C-c C-e l p= like a
> typical LaTeX/pdf export?

If emacs is finding ox-tufte-latex.el, then the (require
'ox-tufte-latex) in the Local Variables part ought to register the
derived exporter with (org-export-dispatch) so you see an option to
export to Tufte LaTeX.  You should be able to =C-c C-e T p= to export to
Tufte LaTeX and open the pdf file.

> I've attached the output of *Org PDF LaTeX
> Ouput* if that shows what might have happened. It's *pretty* close,
> but the helix doesn't appear in the margin and the commands
> \mainmatter, \backmatter, etc. aren't registering.

I changed the default class to tufte-book, so \mainmatter etc. are
registered.  I also included instructions about changing the class to
tufte-handout in case you're exporting the handout subtree.

The helix didn't appear in the margin because =margin= is defined as an
argument to :float in ox-tufte-latex.el.  The ox-latex exporter ignores
:float margin.  So, when you used ox-latex the helix wasn't placed in
the margin.

> I added the path ~/.elisp/tufte-org-mode to .emacs and also accepted
> the local variables with "y" when I started .emacs and opened the
> file.
>
> For another check, I looked at TexLive 2016's tufte-latex-book.cls:
> ```
> $ head .texlive/2016/texmf-dist/tex/latex/tufte-latex/tufte-book.cls
> \NeedsTeXFormat{LaTeX2e}[1994/06/01]
>
> %% note; handout is the same at v3.5.2
> \ProvidesClass{tufte-book}[2015/06/21 v3.5.2 Tufte-book class]
> ```
>
> I think that should meet the > v3.2 requirement (also looks like the
> linked website is up to 3.5.2, so that seems to match with me being up
> to date).

A typo on my part, now fixed in the documentation to show 3.5.2.

> [1] note on that: xparse in TexLive appears to be provided by
> l3packages, as an FYI. I tried `tlmgr install xparse` and got a
> warning that it wasn't in the repository. Just a heads up potentially
> for the docs?

Fixed.  Thanks.

Let me know if you have other questions.

All the best,
Tom

-- 
Thomas S. Dye
http://www.tsdye.com



[O] make test is failing? [ob-fortran stuff]

2016-02-22 Thread Kaushal Modi
Hi all,

I cloned a fresh copy of org-mode and ran "make test" for the first time.

The following are failing:

3 unexpected results:
   FAILED  ob-fortran/list-matrix-from-table1
   FAILED  ob-fortran/list-matrix-from-table2
   FAILED  ob-fortran/list-var-from-table

Is it known? Or it's failing just for me?

I am running Emacs version: GNU Emacs 25.0.91.1 (x86_64-unknown-linux-gnu,
GTK+ Version 2.24.23) of 2016-02-21, built using commit
e19c1c301700430ae428f40c2a364671f5d50dcf.


--
Kaushal Modi


[O] Release Org 8.3.4

2016-02-22 Thread Bastien Guerry
Hi all,

Org 8.3.4 is out, a bugfix release.

Enjoy!

-- 
 Bastien




Re: [O] Bug: :export results does not replace previous results designated block

2016-02-22 Thread Nicolas Goaziou
Hello,

Charles Millar  writes:

> The last time (last Wednesday or so) I executed the following code
>
> ** Some subheading
> #+NAME: SCHEDAP
> #+begin_src rec :data foo.rec :type Finance :fields 
> AssetDate,Description,Basis :results silent
>   (File = 'Estate' && AccountSchedule = 'A')
> #+end_src
> #+RESULTS: SCHEDAP
> #+NAME: SCHEDA
> #+begin_src emacs-lisp :var table=SCHEDAP :exports results
>(setq table (cons 'hline table))
>(setq table (cons '("Date" "Description" "Inventory Value") table))
>(setq table (append table '(("|Total Schedule A"
>(setq table (append table '(("\n#+TBLFM: 
> @>$>=vsum(@I$>..@>>$>);%.2f::"
>table
> #+end_src
> #+ATTR_LATEX: :mode table :environment longtable :align 
> p{60pt}p{300pt}N{8}{2}
> #+TBLNAME: SCHEDA

[...]

> Should I change the code blocks or is this a bug? All of tables 
> generated by the same or similar code behave the same way - a table 
> after #+RESULTS: foobar is , but nothing for #+TBLNAME: foobar.

What happens if you replace TBLNAME with NAME?

Regards,

-- 
Nicolas Goaziou



Re: [O] ox-beamer export, no frames created

2016-02-22 Thread John W. Burroughs
Josiah Schwab  writes:

> Hello John,
>
>> I have been trying to produce my first presentation using org-mode and
>> ox-beamer export to create a pdf.  I am not seeing separate frames for
>> each slide.  For example, using the Beamer Example (12.5.6) from the
>> org-mode manual, I get the following generated .tex file.
>>
>> There are only \subsection{} generated, instead of the \begin{frame}
>> that is expected.
>
> To me, this looks like you used the LaTeX export commands instead of the
> beamer export commands.
>
> http://orgmode.org/manual/Beamer-export-commands.html#Beamer-export-commands
>
> Best,
> Josiah
>
Josiah:

Thank you, that was the issue.  I was using C-c C-e to invoke the export
and didn't realise I had to activate the Beamer entries in the
dispatcher display.

It is working as expected now.

John
--
+-+
| John W. Burroughs, P. Eng. | keyid 966D6DD1 |
+-+



[O] scheduled task without headline?

2016-02-22 Thread hymie!
Greetings.

I've got my notes organized mostly like this:
* major task
  - note
  - note
  - note
** minor task
   - note
   - note
** minor task
   - note
   - note

Now I have a "note" that I need to attach a "schedule" to (something I
have to do tomorrow).  However, when I try to do something like this:

  - TODO note
  SCHEDULED <2016-02-23 Tue>

the agenda shows me the nearest headline
  Scheduled: minor task

I'd really like to have my specific "note" listed in the agenda, but
what I need to do is so minor that I don't want it to have a "headline"
in my notes.  Is this possible?

--hymie!http://lactose.homelinux.net/~hymiehy...@lactose.homelinux.net




[O] Bug: :export results does not replace previous results designated block

2016-02-22 Thread Charles Millar

The last time (last Wednesday or so) I executed the following code

** Some subheading
#+NAME: SCHEDAP
#+begin_src rec :data foo.rec :type Finance :fields 
AssetDate,Description,Basis :results silent

 (File = 'Estate' && AccountSchedule = 'A')
#+end_src
#+RESULTS: SCHEDAP
#+NAME: SCHEDA
#+begin_src emacs-lisp :var table=SCHEDAP :exports results
  (setq table (cons 'hline table))
  (setq table (cons '("Date" "Description" "Inventory Value") table))
  (setq table (append table '(("|Total Schedule A"
  (setq table (append table '(("\n#+TBLFM: 
@>$>=vsum(@I$>..@>>$>);%.2f::"

  table
#+end_src
#+ATTR_LATEX: :mode table :environment longtable :align 
p{60pt}p{300pt}N{8}{2}

#+TBLNAME: SCHEDA

it produced -

** Some subheading
#+NAME: SCHEDAP
#+begin_src rec :data foo.rec :type Finance :fields 
AssetDate,Description,Basis :results silent

 (File = 'Estate' && AccountSchedule = 'A')
#+end_src
#+RESULTS: SCHEDAP
#+NAME: SCHEDA
#+begin_src emacs-lisp :var table=SCHEDAP :exports results
  (setq table (cons 'hline table))
  (setq table (cons '("Date" "Description" "Inventory Value") table))
  (setq table (append table '(("|Total Schedule A"
  (setq table (append table '(("\n#+TBLFM: 
@>$>=vsum(@I$>..@>>$>);%.2f::"

  table
#+end_src
#+ATTR_LATEX: :mode table :environment longtable :align 
p{60pt}p{300pt}N{8}{2}

#+TBLNAME: SCHEDA
(Desired table out put here)
#+TBLFM: @>$>=vsum(@I$>..@>>$>);%.2f::

Today, if I execute or evaluate the subheading, the results are not 
substituted into TBLNAME, rather a #+RESULTS: SCHEDA is produced 
followed by #+TBLNAME: SCHEDA, etc.


** Some subheading
#+NAME: SCHEDAP
#+begin_src rec :data foo.rec :type Finance :fields 
AssetDate,Description,Basis :results silent

 (File = 'Estate' && AccountSchedule = 'A')
#+end_src
#+RESULTS: SCHEDAP
#+NAME: SCHEDA
#+begin_src emacs-lisp :var table=SCHEDAP :exports results
  (setq table (cons 'hline table))
  (setq table (cons '("Date" "Description" "Inventory Value") table))
  (setq table (append table '(("|Total Schedule A"
  (setq table (append table '(("\n#+TBLFM: 
@>$>=vsum(@I$>..@>>$>);%.2f::"

  table
#+end_src

#+RESULTS: SCHEDA
(a new table)
#+TBLFM: @>$>=vsum(@I$>..@>>$>);%.2f::

#+TBLNAME: SCHEDA
#+ATTR_LATEX: :mode table :environment longtable :align 
p{60pt}p{300pt}N{8}{2}

(no table produced or retained)

Org-mode version 8.3.3 (release_8.3.3-644-g84e3f2 @ 
/usr/local/share/emacs/site-lisp/org-mode/lisp/)
GNU Emacs 24.4.1 (x86_64-pc-linux-gnu, GTK+ Version 3.14.5) of 
2015-03-07 on trouble, modified by Debian


Should I change the code blocks or is this a bug? All of tables 
generated by the same or similar code behave the same way - a table 
after #+RESULTS: foobar is , but nothing for #+TBLNAME: foobar.


Charlie Millar



Re: [O] ox-tufte-latex

2016-02-22 Thread John Hendy
On Mon, Feb 1, 2016 at 6:26 PM, Thomas S. Dye  wrote:
> Aloha all,
>
> I've cobbled together an exporter for the Tufte LaTeX classes, which I'd
> like to contribute to Org mode contrib/.  A brief description of the
> derived backend can be found below, and I've attached the
> ox-tufte-latex.el file for the review described on
> http://orgmode.org/worg/org-contribute.html.

Hi Tom,


Just gave this a whirl and am not sure if I'm doing something wrong. I
think I have all of the required LaTeX packages.[1] I may have missed
it, but I didn't see instructions that explicitly stated how to export
the file tufte-latex.org. I assumed I could just =C-c C-e l p= like a
typical LaTeX/pdf export? I've attached the output of *Org PDF LaTeX
Ouput* if that shows what might have happened. It's *pretty* close,
but the helix doesn't appear in the margin and the commands
\mainmatter, \backmatter, etc. aren't registering.

I added the path ~/.elisp/tufte-org-mode to .emacs and also accepted
the local variables with "y" when I started .emacs and opened the
file.

For another check, I looked at TexLive 2016's tufte-latex-book.cls:
```
$ head .texlive/2016/texmf-dist/tex/latex/tufte-latex/tufte-book.cls
\NeedsTeXFormat{LaTeX2e}[1994/06/01]

%% note; handout is the same at v3.5.2
\ProvidesClass{tufte-book}[2015/06/21 v3.5.2 Tufte-book class]
```

I think that should meet the > v3.2 requirement (also looks like the
linked website is up to 3.5.2, so that seems to match with me being up
to date).

Anyway, hope that's a fair amount of information to help start the
troubleshooting process!


Thanks,
John

[1] note on that: xparse in TexLive appears to be provided by
l3packages, as an FYI. I tried `tlmgr install xparse` and got a
warning that it wasn't in the repository. Just a heads up potentially
for the docs?


> I've been using the derived backend for a while now and am happy with
> how it is working.  The Tufte LaTeX classes (especially the book class)
> require quite a bit of set up to work optimally, and I'll be sharing
> what I've learned along these lines in the next couple of weeks.  Org
> mode is a great tool for authoring Tufte LaTeX documents!
>
> All the best,
> Tom
This is pdfTeX, Version 3.14159265-2.6-1.40.16 (TeX Live 2015) (preloaded 
format=pdflatex)
 restricted \write18 enabled.
entering extended mode
(/home/jwhendy/.elisp/tufte-org-mode/tufte-latex.tex
LaTeX2e <2016/02/01>
Babel <3.9n> and hyphenation patterns for 4 languages loaded.

(/home/jwhendy/.texlive/2016/texmf-dist/tex/latex/tufte-latex/tufte-handout.cls
Document Class: tufte-handout 2015/06/21 v3.5.2 Tufte-handout class
(/home/jwhendy/.texlive/2016/texmf-dist/tex/latex/tufte-latex/tufte-common.def
(/home/jwhendy/.texlive/2016/texmf-dist/tex/latex/xkeyval/xkeyval.sty
(/home/jwhendy/.texlive/2016/texmf-dist/tex/generic/xkeyval/xkeyval.tex
(/home/jwhendy/.texlive/2016/texmf-dist/tex/generic/xkeyval/xkvutils.tex
(/home/jwhendy/.texlive/2016/texmf-dist/tex/generic/xkeyval/keyval.tex
(/home/jwhendy/.texlive/2016/texmf-dist/tex/latex/xifthen/xifthen.sty
(/home/jwhendy/.texlive/2016/texmf-dist/tex/latex/tools/calc.sty)
(/home/jwhendy/.texlive/2016/texmf-dist/tex/latex/base/ifthen.sty)
(/home/jwhendy/.texlive/2016/texmf-dist/tex/latex/ifmtarg/ifmtarg.sty))
(/home/jwhendy/.texlive/2016/texmf-dist/tex/latex/hardwrap/hardwrap.sty
(/home/jwhendy/.texlive/2016/texmf-dist/tex/generic/oberdiek/pdftexcmds.sty
(/home/jwhendy/.texlive/2016/texmf-dist/tex/generic/oberdiek/infwarerr.sty)
(/home/jwhendy/.texlive/2016/texmf-dist/tex/generic/oberdiek/ifluatex.sty)
(/home/jwhendy/.texlive/2016/texmf-dist/tex/generic/oberdiek/ltxcmds.sty)
(/home/jwhendy/.texlive/2016/texmf-dist/tex/generic/oberdiek/ifpdf.sty))
(/home/jwhendy/.texlive/2016/texmf-dist/tex/generic/ifxetex/ifxetex.sty)
(/home/jwhendy/.texlive/2016/texmf-dist/tex/generic/ifxetex/ifxetex.sty))
(/home/jwhendy/.texlive/2016/texmf-dist/tex/latex/base/article.cls
Document Class: article 2014/09/29 v1.4h Standard LaTeX document class
(/home/jwhendy/.texlive/2016/texmf-dist/tex/latex/base/size10.clo))
(/home/jwhendy/.texlive/2016/texmf-dist/tex/latex/titlesec/titlesec.sty)
(/home/jwhendy/.texlive/2016/texmf-dist/tex/latex/titlesec/titletoc.sty)
(/home/jwhendy/.texlive/2016/texmf-dist/tex/latex/hyperref/hyperref.sty
(/home/jwhendy/.texlive/2016/texmf-dist/tex/generic/oberdiek/hobsub-hyperref.st
y
(/home/jwhendy/.texlive/2016/texmf-dist/tex/generic/oberdiek/hobsub-generic.sty
)) (/home/jwhendy/.texlive/2016/texmf-dist/tex/latex/oberdiek/auxhook.sty)
(/home/jwhendy/.texlive/2016/texmf-dist/tex/latex/oberdiek/kvoptions.sty)
(/home/jwhendy/.texlive/2016/texmf-dist/tex/latex/hyperref/pd1enc.def)
(/home/jwhendy/.texlive/2016/texmf-dist/tex/latex/latexconfig/hyperref.cfg)
(/home/jwhendy/.texlive/2016/texmf-dist/tex/latex/hyperref/puenc.def)
(/home/jwhendy/.texlive/2016/texmf-dist/tex/latex/url/url.sty))

Package hyperref Message: Driver (autodetected): hpdftex.

(/home/jwhendy/.texlive/2016/texmf-dist/tex/latex/hyperref/hpdftex.

Re: [O] ox-tufte-latex

2016-02-22 Thread Thomas S . Dye
Aloha Eduardo,

Eduardo Mercovich writes:

>
> Because of some talk in the tufte-latex list, I may have a (too much)
> old version of tufte-latex, so I'm working on this and I'll be back when
> I have more information, probable on that list that is more specific
> that this one. 
>
> In any case, thank you very much for your attention... :)

Tufte Org Mode depends on the latest version of Tufte-LaTeX, which is
not the version distributed with most TeX distributions.  See
https://github.com/tsdye/tufte-org-mode#the-tufte-latex-package for a
bit of information on this and a link to the up-to-date version of the
package. 

hth,
Tom

-- 
Thomas S. Dye
http://www.tsdye.com



Re: [O] ox-beamer export, no frames created

2016-02-22 Thread Josiah Schwab
Hello John,

> I have been trying to produce my first presentation using org-mode and
> ox-beamer export to create a pdf.  I am not seeing separate frames for
> each slide.  For example, using the Beamer Example (12.5.6) from the
> org-mode manual, I get the following generated .tex file.
>
> There are only \subsection{} generated, instead of the \begin{frame}
> that is expected.

To me, this looks like you used the LaTeX export commands instead of the
beamer export commands.

http://orgmode.org/manual/Beamer-export-commands.html#Beamer-export-commands

Best,
Josiah



[O] ox-beamer export, no frames created

2016-02-22 Thread John W. Burroughs
I have been trying to produce my first presentation using org-mode and
ox-beamer export to create a pdf.  I am not seeing separate frames for
each slide.  For example, using the Beamer Example (12.5.6) from the
org-mode manual, I get the following generated .tex file.

--
% Created 2016-02-22 Mon 12:57
\documentclass[presentation]{beamer}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{fixltx2e}
\usepackage{graphicx}
\usepackage{grffile}
\usepackage{longtable}
\usepackage{wrapfig}
\usepackage{rotating}
\usepackage[normalem]{ulem}
\usepackage{amsmath}
\usepackage{textcomp}
\usepackage{amssymb}
\usepackage{capt-of}
\usepackage{hyperref}
\author{Carsten Dominik}
\date{\today}
\title{Example Presentation}
\hypersetup{
 pdfauthor={Carsten Dominik},
 pdftitle={Example Presentation},
 pdfkeywords={},
 pdfsubject={},
 pdfcreator={Emacs 24.5.2 (Org mode 8.3.3)},
 pdflang={English}}
\begin{document}

\maketitle
\tableofcontents


\section{This is the first structural section}
\label{sec:orgheadline7}

\subsection{Frame 1}
\label{sec:orgheadline4}
\begin{enumerate}
\item Thanks to Eric Fraga\hfill{}\textsc{B\_block}
\label{sec:orgheadline1}
for the first viable Beamer setup in Org
\item Thanks to everyone else:B\(_{\text{block}}\):
\label{sec:orgheadline3}
for contributing to the discussion
\begin{enumerate}
\item This will be formatted as a beamer note\hfill{}\textsc{B\_note}
\label{sec:orgheadline2}
\end{enumerate}
\end{enumerate}
\subsection{Frame 2 (where we will not use columns)}
\label{sec:orgheadline6}
\begin{enumerate}
\item Request
\label{sec:orgheadline5}
Please test this stuff!
\end{enumerate}
\end{document}
--

There are only \subsection{} generated, instead of the \begin{frame}
that is expected.

Any suggestions what might be wrong.

I am using: GNU Emacs 24.5.2
Org-mode version 8.3.3 (8.3.3-43-g0b97a5-elpa @
/home/jwb/.emacs.d/elpa/org-20160215/)"
TeX 3.14159265 (TeX Live 2015/Debian)
Linux 4.2.0-27-generic #32-Ubuntu SMP Fri Jan 22 04:48:15
UTC 2016

Many thanks

John
--
+-+
| John W. Burroughs, P. Eng. | keyid 966D6DD1 |
+-+



Re: [O] ox-tufte-latex

2016-02-22 Thread Eduardo Mercovich
Aloha Thomas. 

[...]
 + if I put a plain text link in a sidenote (like
 "\sidenote{see http://AgileManifesto.org}";), it doesn't get
 automagically converted to a link as it is in the text body. It appears
 as normal text and without the \url{...}, so it doesn't look and doesn't
 act as a link.

> Tufte Org Mode uses the Org mode footnote mechanism to make the
> sidenotes.  When I placed a link in an Org mode footnote and then
> exported with Tufte Org Mode, I get a clickable link in the resulting
> pdf file. [...]

Because of some talk in the tufte-latex list, I may have a (too much)
old version of tufte-latex, so I'm working on this and I'll be back when
I have more information, probable on that list that is more specific
that this one. 

In any case, thank you very much for your attention... :)

Best regards. 


-- 
eduardo mercovich 

 Donde se cruzan tus talentos 
 con las necesidades del mundo, 
 ahí está tu vocación.



Re: [O] [PATCH] Implement RSS_FEED_URL option keyword

2016-02-22 Thread Arun Isaac
Nicolas Goaziou  writes:

> Hello,
>
> Arun Isaac  writes:
>
>> I have implemented a new option keyword, RSS_FEED_URL, for the RSS
>> exporter backend.

This is a patch I submitted some time back.

> Although it is not strictly necessary for applying patches to contrib
> libraries, did you sign FSF papers already? It can matter if we consider
> moving this library into core some day.

My FSF copyright assignment process is now complete. What details should
I submit here to have my patch included in org mode? Do let me know.

Thanks,
Arun I.


signature.asc
Description: PGP signature


Re: [O] Errors get suppressed by org-babel-execute-src-block

2016-02-22 Thread Aaron Ecay
Hi Nick, hi Nicolas,

2016ko otsailak 20an, Nick Dokos-ek idatzi zuen:
>> IMO, it looks good. You might as well push it and wait for more
>> feedback, if needed.
>> 
>> Regards,
> 
> I did some testing as well and it seems to work.

Thanks for the feedback.  Pushed to master.

-- 
Aaron Ecay



Re: [O] Help with fixing an org-mode multicolumn implementation - LaTeX special characters

2016-02-22 Thread Aaron Ecay
Hi mcg,

2016ko otsailak 21an, mcg-ek idatzi zuen:
> 
> I found a very nice implementation of LaTeX multicolumn functionality in 
> this thread:
> https://lists.gnu.org/archive/html/emacs-orgmode/2013-02/msg00736.html

[...]

> However, using any of the characters of the left column of my example 
> table in the merged <2colc> column, I get:
> "setq: Invalid use of `\' in replacement text"

I think the function should be written (untested):

(defun my-latex-multicolumn-filter (row backend info)
  (when (org-export-derived-backend-p backend 'latex)
(while (string-match 
"\\(<\\([0-9]+\\)col\\([lrc]\\)?>[[:blank:]]*\\([^&]+\\)\\)" row)
  (let ((columns (string-to-number (match-string 2 row)))
(start (match-end 0))
(contents (replace-regexp-in-string "[[:blank:]]*$" "" 
(match-string 4 row)))
(algn (or (match-string 3 row) "l")))
(setq row (replace-match
   (format "\\multicolumn{%d}{%s}{%s}" columns algn contents)
   nil t row 1))
(while (and (> columns 1) (string-match "&" row start))
  (setq row (replace-match "" nil nil row))
  (decf columns
row))

The change is setting the third argument (‘literal’) to ‘replace-match’
to t, and deleting an extra backslash in the "\\multicolumn..." string.

> 
> 
> Questions:
> - How to escape the special characters in the left column properly to be 
> able to use them? (tried everything I could think of)
> or
> - How to modify the code above so that it allows for such characters.
> 
> - If anyone likes the implementation and is more capable than I am, then 
> the same for multirow would be really nice...

Unfortunately I think that’s more complicated, since it would necessitate
examining/modifying the whole table in one go, rather than operating one
row at a time.

-- 
Aaron Ecay



Re: [O] Numbered list counting down?

2016-02-22 Thread Peter Davis

Great! Thank you, Christian.

-pd

On 2/22/16 7:03 AM, Christian Moe wrote:

Hi,

This will work:

1.  [@3] Third
2.  [@2] Second
3.  [@1] First

Yours,
Christian

Peter Davis writes:


I'm trying to create a numbered list where the numbers count down
instead of up. As I understand this:
, the following should work:


* Countdown list

   [@3] Third
   [@2] Second
   [@1] First


But in fact, I just get a paragraph like with all the list elements run
together.

Am I misunderstanding this?

Thanks,
-pd




--

Peter Davis
http://www.techcurmudgeon.com




Re: [O] Numbered list counting down?

2016-02-22 Thread Christian Moe

Hi,

This will work:

1.  [@3] Third
2.  [@2] Second
3.  [@1] First

Yours,
Christian

Peter Davis writes:

> I'm trying to create a numbered list where the numbers count down 
> instead of up. As I understand this: 
> , the following should work:
>
> 
> * Countdown list
>
>   [@3] Third
>   [@2] Second
>   [@1] First
> 
>
> But in fact, I just get a paragraph like with all the list elements run 
> together.
>
> Am I misunderstanding this?
>
> Thanks,
> -pd




[O] Numbered list counting down?

2016-02-22 Thread Peter Davis


I'm trying to create a numbered list where the numbers count down 
instead of up. As I understand this: 
, the following should work:



* Countdown list

 [@3] Third
 [@2] Second
 [@1] First


But in fact, I just get a paragraph like with all the list elements run 
together.


Am I misunderstanding this?

Thanks,
-pd

--

Peter Davis
http://www.techcurmudgeon.com




Re: [O] "atomic knowledge" modeling tool

2016-02-22 Thread Samuel Loury
Hello,
Nicolas Goaziou  writes:

> Samuel Loury  writes:
>
>> I have made a custom agenda command¹ to implement a "kind of" GTD
>> workflow.
>>
>> On a quite old computer with no SSD disk, the commands takes about 20
>> seconds. My org files sum up to 27K lines and 2629 headings (with the
>> archives, there are 5630 headings in 66K lines).
>>
>> I attached the result of elp-instrument-package "org-" when running this
>> command without the archives. I don't know if that helps...
>
> So Org is slow only when calling the agenda?

I would not reach that conclusion so fast. Since I spent most of my time
using the agenda, it is the place where I am most likely to experience
slowness, but that does not mean that org is slow only in that
situation.

On the other hand, I often use the following snippet of code to make
sure the org element cache is up to date and it is very fast (~1s).

--8<---cut here---start->8---
(mapc
 (lambda (file)
   (save-window-excursion
 (save-excursion
 (find-file file)
 (org-element-cache-reset)
 )
 )
   )
 (org-agenda-files)
 )
--8<---cut here---end--->8---

> Could you also send a profiler report? Thank you.

Reproducing a slow behavior is not easy. Today, the agenda is produced
in about 10s with almost the same contents. I included the profiler
report anyway, hoping that you will find something useful in it.

- command-execute3301  91%
 - call-interactively3301  91%
  - eval-last-sexp   2868  79%
   - eval-last-sexp-12868  79%
- eval   2868  79%
 - org-agenda2868  79%
  - apply2868  79%
   - ad-Advice-org-agenda2868  79%
- #  1922  53%
 - byte-code 1922  53%
  - org-agenda-run-series1922  53%
   - org-let21221  33%
- eval   1221  33%
 - let   1221  33%
  - let  1221  33%
   - org-todo-list595  16%
- byte-code   583  16%
 - byte-code  463  12%
  - org-agenda-get-day-entries463  12%
   - org-agenda-get-todos 459  12%
- byte-code   431  11%
   org-get-priority   136   3%
 - org-agenda-skip 96   2%
  - org-agenda-skip-eval   96   2%
   - eval  96   2%
- konix/org-agenda-skip-if-tags 96   2%
 - let 96   2%
  - setq   92   2%
   - org-get-tags-at   80   2%
- byte-code72   1%
 - byte-code   72   1%
  - org-up-heading-safe 56   1%
 org-outline-level  8   0%
  - org-remove-uninherited-tags  4  
 0%
 org-delete-all 4   0%
  - error   4   0%
 apply  4   0%
  org-remove-uninherited-tags  4   
0%
   - progn  8   0%
  outline-next-heading  8   0%
  - while   4   0%
 if 4   0%
 - org-agenda-format-item  67   1%
  - replace-regexp-in-string   16   0%
 apply  4   0%
  - org-agenda-fix-displayed-tags 15   0%
   - mapconcat  4   0%
 

Re: [O] [PATCH] org.el: Fix typo in `org-previous-visible-heading' documentation string

2016-02-22 Thread Nicolas Goaziou
Hello,

Jason Furtney  writes:

> Hi, Here is a small patch to fix a typo. Thanks.
>
> From d931a64e0482cddcef9ba5490994f24ab886e4f1 Mon Sep 17 00:00:00 2001
> From: Jason Furtney 
> Date: Sat, 20 Feb 2016 20:14:22 -0600
> Subject: [PATCH] org.el: Fix typo in `org-previous-visible-heading'
>  documentation string
>
> * lisp/org.el (org-previous-visible-heading): change next to previous.
>
> TINYCHANGE

Applied. Thank you.


Regards,

-- 
Nicolas Goaziou



Re: [O] Two functions for efficient headline navigation

2016-02-22 Thread Nicolas Goaziou
Hello,

Christoph LANGE  writes:

> Related to these functions I have a comment on Org's design.
> org-jump-to-child (prompts for the title of a sub-heading of the current
> heading and navigates there) was fairly complex to implement.  Coming
> from an XML background I was surprised to see that Org has no notion of
> a data model or of the semantics of a document and its tree, but that I
> was basically required to implement an algorithm to walk through all
> sub-headings and collect them.  Has an implementation based on a data
> model ever been considered?

See

  (org-with-wide-buffer
   (org-narrow-to-subtree)
   (org-element-parse-buffer 'headline))

and

  `org-element-map'

Also, `org-map-entries' could do the job, with a `tree' SCOPE and an
appropriate MATCH (e.g. "LEVEL>N" where N is the current level).

Regards,

-- 
Nicolas Goaziou



Re: [O] Inline code syntax highlighting

2016-02-22 Thread Nicolas Goaziou
Hello,

medit...@gmail.com writes:

> In conclusion, do you have any tips on how to get syntax highlighting
> for ~...~ blocks?

You can use `org-export-filter-parse-tree' and replace all occurrences
of (code ...) into (inline-src-block ...) using a combination of
`org-element-map', and `org-element-set-element'.

Another option is indeed to create a new export back-end that replaces
code transcoder with a custom function, probably something ultimately
calling `org-html-inline-src-block', e.g.,

  (defun my-code-to-haskell (code contents info)
(let ((haskell
   `(inline-src-block
 (:language "haskell" :value ,(org-element-property :value code)
  (org-html-inline-src-block haskell nil info)))

  (org-export-define-derived-backend 'haskell-html 'html
:translate-alist '((code . my-code-to-haskell)))


Regards,

-- 
Nicolas Goaziou