Re: [O] first #+LATEX_HEADER: in SETUPFILE not correctly exported and causes Missing \begin{document} error

2016-03-25 Thread Charles Millar

"Pushed" the send button too soon

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


On 03/25/2016 08:56 PM, Charles Millar wrote:

I have a #+SETUPFILE which starts as follows

#+LATEX_HEADER: \usepackage{lastpage}
#+LATEX_HEADER: \usepackage{scrpage2}
#+LATEX_HEADER: \pagestyle{scrheadings}
#+LATEX_HEADER: \setkomafont{pagefoot}{\normalfont\rmfamily}
#+LATEX_HEADER: \ifoot{foobar}
#+LATEX_HEADER: \cfoot[\pagemark]{\hspace{1.0in} Page \thepage\ of 
\pageref{LastPage}}

#+OPTIONS: H:5
#+LATEX_CLASS: mysetup

"mysetup" class is

(add-to-list 'org-latex-classes
 '("mysetup"
"\\documentclass[fontsize=11pt,letterpaper,twoside=false]{scrartcl}
\\usepackage{verbatim}
% \\usepackage[T1]{fontenc}
% \\usepackage{charter,parskip,setspace,layout}
\\usepackage{charter,setspace,layout}
\\usepackage{array,graphicx}
\\usepackage{tabularx,tabulary}
\\usepackage{longtable}
\\usepackage{numprint}
\\npstyleenglish
\\usepackage[at]{easylist}
\\usepackage{csquotes}
%\\usepackage[letterpaper,margin=1.00in]{geometry}
\\usepackage[letterpaper,left=1.00in,right=1.00in,top=1.00in,bottom=1.00in]{geometry} 


% \\usepackage[top=1.0in,bottom=0.4in,left=1.2in,nohead]{geometry}
%\\pagestyle{empty}
\\pagenumbering{arabic}
\\newcommand\\foo{bar}
  [NO-DEFAULT-PACKAGES]
  [NO-PACKAGES]
  [EXTRA]"
("\\section{%s}" . "\\section*{%s}")
 ("\\subsection{%s}" . "\\subsection*{%s}")
 ("\\subsubsection{%s}" . "\\subsubsection*{%s}")
 ("\\paragraph{%s}" . "\\paragraph*{%s}")
 ("\\subparagraph{%s}" . "\\subparagraph*{%s}")))

I do obtain the expected pdf output except that an extra page is added 
to the very beginning of the document. Investigating and running the 
output.tex file in TeXStudio throws an error  - Missing 
\begin{document} (Same result also typeset in TeXWorks is run)


Investigating the output.tex shows the following - please note how 
\usepackage{lastpage} is misaligned


% Created 2016-03-25 Fri 20:41
% Intended LaTeX compiler: pdflatex
\documentclass[fontsize=11pt,letterpaper,twoside=false]{scrartcl}
\usepackage{verbatim}
% \usepackage[T1]{fontenc}
% \usepackage{charter,parskip,setspace,layout}
\usepackage{charter,setspace,layout}
\usepackage{array,graphicx}
\usepackage{tabularx,tabulary}
\usepackage{longtable}
\usepackage{numprint}
\npstyleenglish
\usepackage[at]{easylist}
\usepackage{csquotes}
%\usepackage[letterpaper,margin=1.00in]{geometry}
\usepackage[letterpaper,left=1.00in,right=0.75in,top=1.00in,bottom=1.00in]{geometry} 


% \usepackage[top=1.0in,bottom=0.4in,left=1.2in,nohead]{geometry}
%\pagestyle{empty}
\pagenumbering{arabic}
\newcommand\foo{bar}
\usepackage{lastpage}
\usepackage{scrpage2}
\pagestyle{scrheadings}
\setkomafont{pagefoot}{\normalfont\rmfamily}
\ifoot{Sergi, F. Estate}
\cfoot[\pagemark]{\hspace{1.0in} Page \thepage\ of \pageref{LastPage}}

If I edit the output.tex file in TeXStudio by moving the 
\usepackage{lastpage} all the way to the left margin both problems are 
fixed, i.e. when I run build and view in TeXStudio there is no 
"Missing \begin{document}" error and there is no extra page is created 
at at the beginning of the document.


So, is my SETUPFILE not correct or is there a problem with the 
exporter in that extra spaces are added to the first line of the 
SETUPFILE upon export or  do I have incompatible packages, etc.?


Charlie Millar







[O] first #+LATEX_HEADER: in SETUPFILE not correctly exported and causes Missing \begin{document} error

2016-03-25 Thread Charles Millar

I have a #+SETUPFILE which starts as follows

#+LATEX_HEADER: \usepackage{lastpage}
#+LATEX_HEADER: \usepackage{scrpage2}
#+LATEX_HEADER: \pagestyle{scrheadings}
#+LATEX_HEADER: \setkomafont{pagefoot}{\normalfont\rmfamily}
#+LATEX_HEADER: \ifoot{foobar}
#+LATEX_HEADER: \cfoot[\pagemark]{\hspace{1.0in} Page \thepage\ of 
\pageref{LastPage}}

#+OPTIONS: H:5
#+LATEX_CLASS: mysetup

"mysetup" class is

(add-to-list 'org-latex-classes
 '("mysetup"
"\\documentclass[fontsize=11pt,letterpaper,twoside=false]{scrartcl}
\\usepackage{verbatim}
% \\usepackage[T1]{fontenc}
% \\usepackage{charter,parskip,setspace,layout}
\\usepackage{charter,setspace,layout}
\\usepackage{array,graphicx}
\\usepackage{tabularx,tabulary}
\\usepackage{longtable}
\\usepackage{numprint}
\\npstyleenglish
\\usepackage[at]{easylist}
\\usepackage{csquotes}
%\\usepackage[letterpaper,margin=1.00in]{geometry}
\\usepackage[letterpaper,left=1.00in,right=1.00in,top=1.00in,bottom=1.00in]{geometry}
% \\usepackage[top=1.0in,bottom=0.4in,left=1.2in,nohead]{geometry}
%\\pagestyle{empty}
\\pagenumbering{arabic}
\\newcommand\\foo{bar}
  [NO-DEFAULT-PACKAGES]
  [NO-PACKAGES]
  [EXTRA]"
("\\section{%s}" . "\\section*{%s}")
 ("\\subsection{%s}" . "\\subsection*{%s}")
 ("\\subsubsection{%s}" . "\\subsubsection*{%s}")
 ("\\paragraph{%s}" . "\\paragraph*{%s}")
 ("\\subparagraph{%s}" . "\\subparagraph*{%s}")))

I do obtain the expected pdf output except that an extra page is added 
to the very beginning of the document. Investigating and running the 
output.tex file in TeXStudio throws an error  - Missing \begin{document} 
(Same result also typeset in TeXWorks is run)


Investigating the output.tex shows the following - please note how 
\usepackage{lastpage} is misaligned


% Created 2016-03-25 Fri 20:41
% Intended LaTeX compiler: pdflatex
\documentclass[fontsize=11pt,letterpaper,twoside=false]{scrartcl}
\usepackage{verbatim}
% \usepackage[T1]{fontenc}
% \usepackage{charter,parskip,setspace,layout}
\usepackage{charter,setspace,layout}
\usepackage{array,graphicx}
\usepackage{tabularx,tabulary}
\usepackage{longtable}
\usepackage{numprint}
\npstyleenglish
\usepackage[at]{easylist}
\usepackage{csquotes}
%\usepackage[letterpaper,margin=1.00in]{geometry}
\usepackage[letterpaper,left=1.00in,right=0.75in,top=1.00in,bottom=1.00in]{geometry}
% \usepackage[top=1.0in,bottom=0.4in,left=1.2in,nohead]{geometry}
%\pagestyle{empty}
\pagenumbering{arabic}
\newcommand\foo{bar}
\usepackage{lastpage}
\usepackage{scrpage2}
\pagestyle{scrheadings}
\setkomafont{pagefoot}{\normalfont\rmfamily}
\ifoot{Sergi, F. Estate}
\cfoot[\pagemark]{\hspace{1.0in} Page \thepage\ of \pageref{LastPage}}

If I edit the output.tex file in TeXStudio by moving the 
\usepackage{lastpage} all the way to the left margin both problems are 
fixed, i.e. when I run build and view in TeXStudio there is no "Missing 
\begin{document}" error and there is no extra page is created at at the 
beginning of the document.


So, is my SETUPFILE not correct or is there a problem with the exporter 
in that extra spaces are added to the first line of the SETUPFILE upon 
export or  do I have incompatible packages, etc.?


Charlie Millar



Re: [O] [PATCH] org-babel C math.h issue

2016-03-25 Thread Nicolas Goaziou
Hello,

Thierry Banel  writes:

> Attached is Oz's patch adding optional :libs support to Babel C++

Applied. Thank you.

Would you (or the OP) mind documenting the feature at
?

Regards,

-- 
Nicolas Goaziou



Re: [O] Bug: Incorrect type in ob-C.el for D code [8.3.4 (8.3.4-elpa @ ~/.emacs.d/elpa/org-20160222/)]

2016-03-25 Thread Nicolas Goaziou
Hello,

Thierry Banel  writes:

> Attached is a patch to keep Babel D compliant
> with the latest version of the language.

Applied. Thank you.

Regards,

-- 
Nicolas Goaziou



Re: [O] Bug: Error in table formula with @> reference [8.3.4 (release_8.3.4-5-gdc68d2)]

2016-03-25 Thread Nicolas Goaziou
Hello,

Pablo S. Casas  writes:

>The problem can be reproduced with the table:
>
> |   399. |
> ||
> | 100.00 |
> | 301.00 |
> |  -2.00 |
> ||
> #+TBLFM: @1$1=vsum(@2..@>)::
>
> The value in @1$1 is calculated correctly when using C-c C-c on the
> #+TBLFM line. However using C-u C-c = on cell @1$1 gives #ERROR.

Fixed. Thank you.

Regards,

-- 
Nicolas Goaziou



[O] Bug: C-o yanks on newline in one org-mode buffer [8.2.10 (release_8.2.10 @ c:/Program Files/emacs-24.5/share/emacs/24.5/lisp/org/)]

2016-03-25 Thread Leo J Buchignani III
I previously submitted this bug here:
https://lists.gnu.org/archive/html/emacs-orgmode/2015-12/msg00515.html

I was advised to update my versions.

A while later, I updated to the latest standard Org Mode + Emacs
combination, and redid
my .emacs file mostly from scratch. Then I encountered the bug again.

I assume it is a bug since it appears to have no documentation and
serves no likely use.

Bug arose while writing an 82-line text heading in a 3027-line 2.3M text
.org file titled "di]ks81-ca.org". Text was mostly random thought
snippets about psychology with basic outlining, to give an idea of the
document structure and composition. Lots of top level headings;
nesting not that deep. I had about 6 panes open.

Normally, C-o opens a blank newline as expected.

Bug behavior:
With point at the beginning of a line, C-o yanks snippet
With point elsewhere, C-o behaves normally.

Snippet is a 7-word fragment of the text I was just writing. I
suspect I C-k killed the fragment immediately before the bug appeared.
Snippet is
always the same, regardless of kill-ring.

Bug appears only in the "di]ks81-ca.org" buffer; not in other .org files
or other Emacs modes.

Bug vanishes when I execute M-x org-mode in that buffer, reloading Org
Mode. Thus I conclude it must be an Org Mode bug.

I suspect it has something to do with working in >1M org files.

Cheers,
Leo

Emacs  : GNU Emacs 24.5.1 (i686-pc-mingw32)
 of 2015-04-11 on LEG570
Package: Org-mode version 8.2.10 (release_8.2.10 @ c:/Program
Files/emacs-24.5/share/emacs/24.5/lisp/org/)

current state:
==
(setq
 org-ctrl-c-ctrl-c-hook '(org-babel-hash-at-point
org-babel-execute-safely-maybe)
 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-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-agenda-before-write-hook '(org-agenda-add-entry-text)
 org-speed-command-hook '(org-speed-command-default-hook
org-babel-speed-command-hook)
 org-babel-pre-tangle-hook '(save-buffer)
 org-occur-hook '(org-first-headline-recenter)
 org-metaup-hook '(org-babel-load-in-session-maybe)
 org-confirm-elisp-link-function 'yes-or-no-p
 org-id-link-to-org-use-id t
 org-clock-out-hook '(org-clock-remove-empty-clock-drawer)
 org-mode-hook '((lambda nil (visual-line-mode -1))
 #[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-from-is-user-regexp nil
 org-metadown-hook '(org-babel-pop-to-session-maybe)
 org-src-mode-hook '(org-src-babel-configure-edit-buffer
org-src-mode-configure-edit-buffer)
 org-after-todo-state-change-hook '(org-clock-out-if-current)
 org-confirm-shell-link-function 'yes-or-no-p
 )



Re: [O] Duplicate word in org-mode manual online

2016-03-25 Thread Eduardo Mercovich
[...]
> > In http://orgmode.org/manual/LaTeX-specific-attributes.html
> > you can read: "You can specify specify image...". .

> > I know it's important to be specific specific, but isn't this a little
> > too too much? ;)

> This very typo has been specifically handled. Thank you.

Thank you. :)

Best...

--
eduardo mercovich

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


Re: [O] Multipart/Alternative reply to email?

2016-03-25 Thread Peter Davis
Thorsten Jolitz  writes:

> Peter Davis  writes:
>
>> I realize this would require somehow converting the original message
>> to org-mode markup, and that seems very tricky. I just wondered
>> if anyone had taken a stab at building something like this.
>
> outorg.el works with message-mode too, so I currently write this message
> in Org-mode. Not related to org-mime in anyway, maybe not even to your
> intention, but nevertheless helpful perhaps.

Thank you, Thorsten. This looks very interesting. I'll look into it further.

Best,
-pd




Re: [O] Bug: Error in table formula with @> reference [8.3.4 (release_8.3.4-5-gdc68d2)]

2016-03-25 Thread Nicolas Goaziou
Nicolas Goaziou  writes:

> I cannot reproduce it on maint (i.e., ELPA release). Could you
> double-check that you are using the latest stable release?

Nevermind. I misread the bug report. I can reproduce it. I'll look into
it.



Re: [O] Bug: Fancy HTML5 export: video and aside blocks in documentation does not work [8.3.4 (8.3.4-20-g6f439a-elpaplus @ /home/semente/.emacs.d/elpa/org-plus-contrib-20160321/)]

2016-03-25 Thread Nicolas Goaziou
Hello,

Guilherme Gondim  writes:

> HTML5 fancy block names must be in lowercase but documentation example
> shows in uppercase. I don't know if it is documentation or coding bug.

The former.

Fixed. Thank you.

Regards,

-- 
Nicolas Goaziou



Re: [O] Bug: Error in table formula with @> reference [8.3.4 (release_8.3.4-5-gdc68d2)]

2016-03-25 Thread Nicolas Goaziou
Hello,

Pablo S. Casas  writes:

>The problem can be reproduced with the table:
>
> |   399. |
> ||
> | 100.00 |
> | 301.00 |
> |  -2.00 |
> ||
> #+TBLFM: @1$1=vsum(@2..@>)::
>
> The value in @1$1 is calculated correctly when using C-c C-c on the
> #+TBLFM line. However using C-u C-c = on cell @1$1 gives #ERROR.

I cannot reproduce it on maint (i.e., ELPA release). Could you
double-check that you are using the latest stable release?

Regards,

-- 
Nicolas Goaziou



Re: [O] Multipart/Alternative reply to email?

2016-03-25 Thread Thorsten Jolitz
Peter Davis  writes:

> I realize this would require somehow converting the original message
> to org-mode markup, and that seems very tricky. I just wondered
> if anyone had taken a stab at building something like this.

outorg.el works with message-mode too, so I currently write this message
in Org-mode. Not related to org-mime in anyway, maybe not even to your
intention, but nevertheless helpful perhaps. Just install outshine and
outorg via package manager and follow the instructions for your .emacs
file, and don't forget to put

#+BEGIN_SRC emacs-lisp  
(add-hook 'message-mode-hook 'outline-minor-mode)
#+END_SRC

then this lets you edit your message-mode buffer in org-mode:

,[ C-h f outorg-edit-as-org RET ]
| outorg-edit-as-org is an interactive Lisp function in `outorg.el'.
| 
| It is bound to M-# #,   .
| 
| (outorg-edit-as-org &optional ARG)
| 
| Convert and copy to temporary Org buffer
| 
| With ARG, act conditional on the raw value of ARG:
| 
| | prefix | raw | action 1  | action 2   |
| |+-+---+|
| | C-u| (4) | edit-whole-buffer | ---|
| | C-1|   1 | edit-whole-buffer | insert default export-template |
| | C-2|   2 | edit-whole-buffer | prompt user for template-file  |
| | C-3|   3 | edit-whole-buffer | insert & keep default template |
| | C-4|   4 | edit-whole-buffer | insert & keep template-file|
| | C-5|   5 | propagate changes | ---|
`

and this lets you return from org-mode to message-mode (bound to M-#):

,[ C-h f outorg-copy-edits-and-exit RET ]
| outorg-copy-edits-and-exit is an interactive Lisp function in
| `outorg.el'.
| 
| (outorg-copy-edits-and-exit)
| 
| Replace code-buffer content with (converted) edit-buffer content and
|   kill edit-buffer
`

-- 
cheers,
Thorsten




[O] Bug: Fancy HTML5 export: video and aside blocks in documentation does not work [8.3.4 (8.3.4-20-g6f439a-elpaplus @ /home/semente/.emacs.d/elpa/org-plus-contrib-20160321/)]

2016-03-25 Thread Guilherme Gondim


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.


HTML5 fancy block names must be in lowercase but documentation example
shows in uppercase. I don't know if it is documentation or coding bug.

For example, the following code does not works:

#+BEGIN_ASIDE
Everything should be made as simple as possible,
but not any simpler --Albert Einstein
#+END_ASIDE

It shows a  container with class "ASIDE", but with the block name
in lowercase as following works:

#+BEGIN_aside
Everything should be made as simple as possible,
but not any simpler --Albert Einstein
#+END_aside

I tested also with the  tag. Same problem.

Thanks,
Guilherme

Emacs  : GNU Emacs 24.4.1 (x86_64-pc-linux-gnu, GTK+ Version 3.14.5)
 of 2015-03-07 on trouble, modified by Debian
Package: Org-mode version 8.3.4 (8.3.4-20-g6f439a-elpaplus @ 
/home/semente/.emacs.d/elpa/org-plus-contrib-20160321/)

-- 
Guilherme Gondim



[O] Bug: Error in table formula with @> reference [8.3.4 (release_8.3.4-5-gdc68d2)]

2016-03-25 Thread Pablo S . Casas
Hi Org mode users:

   The problem can be reproduced with the table:

|   399. |
||
| 100.00 |
| 301.00 |
|  -2.00 |
||
#+TBLFM: @1$1=vsum(@2..@>)::

The value in @1$1 is calculated correctly when using C-c C-c on the
#+TBLFM line. However using C-u C-c = on cell @1$1 gives #ERROR.

By means of edebug I've checked that in function
org-table-eval-formula, in the code (line 160):

;; Insert complex ranges
(while (and (string-match org-table-range-regexp form)
(> (length (match-string 0 form)) 1))

the variable org-table-range-regexp doesn't parse well the range
@2..@>, missunderstanding the ">".

   I hope this helps to fix the issue.

   Pablo S. Casas


Emacs  : GNU Emacs 24.5.1 (x86_64-pc-linux-gnu)
Package: Org-mode version 8.3.4 (release_8.3.4-5-gdc68d2 @ 
$HOME/.emacs.d/elpa/org-mode/lisp/)

current state:
==
(setq
 org-tab-first-hook '(org-hide-block-toggle-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-after-todo-state-change-hook '(org-clock-out-if-current)
 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 '(#[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-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-confirm-elisp-link-function 'yes-or-no-p
 org-metadown-hook '(org-babel-pop-to-session-maybe)
 org-clock-out-hook '(org-clock-remove-empty-clock-drawer)
 )