Re: [O] auto-creating checkbox list items

2013-11-29 Thread Alexander Baier
On 13-11-29 08:46 Ken Mankoff wrote:
 I think an older version of org-mode had the behavior where if I am making
 a  list like this:

 * Some list
 + [ ] and I then make a new item by pressing ESC+RET
 + [ ] the + and [] are auto-magically created.

 The current version only populates the +, not the [ ].

 Does anyone else recall this feature? Is there a preference to set it, or
 was it removed for some reason?

 Thanks,

-k.

They might have just changed the key-binding.  For me pressing M-S-RET
creates the + and the [ ].

Regards,
-- 
 Alexander Baier



Re: [O] LaTeX export with documentclass ltugboat

2013-11-29 Thread Jason Lewis
On 29/11/2013 5:53 pm, Thomas S. Dye wrote:
 Jason Lewis ja...@dickson.st writes:

 (require 'org-latex)
 (unless (boundp 'org-export-latex-classes)
 (add-to-list 'org-export-latex-classes
  '(ltugboat
\\documentclass{ltugboat}
(\\section{%s} . \\section*{%s})
(\\subsection{%s} . \\subsection*{%s})
(\\subsubsection{%s} . \\subsubsection*{%s})
(\\paragraph{%s} . \\paragraph*{%s})
(\\subparagraph{%s} . \\subparagraph*{%s})))
 It looks like you are using  8.0 functions.

 Try something like this:

 (require 'ox-latex)
 (add-to-list 'org-latex-classes
   '(ltugboat
 \\documentclass{ltugboat}
 (\\section{%s} . \\section*{%s})
 (\\subsection{%s} . \\subsection*{%s})
 (\\subsubsection{%s} . \\subsubsection*{%s})
 (\\paragraph{%s} . \\paragraph*{%s})
 (\\subparagraph{%s} . \\subparagraph*{%s})))

 Note: org-latex - ox-latex
   org-export-latex-classes - org-latex-classes

 hth,
 Tom

Thanks Tom, that works perfectly.

Jason

-- 
Jason Lewis
http://emacstragic.net




signature.asc
Description: OpenPGP digital signature


Re: [O] LaTeX export with documentclass ltugboat

2013-11-29 Thread Charles Millar

On 11/29/2013 12:21 AM, Jason Lewis wrote:

Hi Charles,

Thanks for your suggestion. I've tried it out it doesn't work for me.


I ran this elisp to add the export class

(require 'org-latex)
(unless (boundp 'org-export-latex-classes)
(add-to-list 'org-export-latex-classes
  '(ltugboat
\\documentclass{ltugboat}
(\\section{%s} . \\section*{%s})
(\\subsection{%s} . \\subsection*{%s})
(\\subsubsection{%s} . \\subsubsection*{%s})
(\\paragraph{%s} . \\paragraph*{%s})
(\\subparagraph{%s} . \\subparagraph*{%s})))

made an org file:

#+LaTeX_CLASS: ltugboat
TEST


but when I export it gives an error:

user-error: Unknown LaTeX class `ltugboat'

Thanks,

Jason



Charles Millar wrote, On 28/11/2013 11:37 PM:

Jason,

On 11/28/2013 7:02 AM, Jason Lewis wrote:

Hi,

How can I export an org file to LaTeX with a document class of ltugboat?

I've seen the example linked below but it doesn't appear to work in
8.2.1 and in fact states its for org  8.0.
http://orgmode.org/worg/org-tutorials/org-latex-export.html

Is this documented somewhere for versions  8.0?

Any pointers would be appreciated.

Thanks,

Jason


I just started LaTeX export recently and referred to that page.

I added (require 'ox-latex) to my .emacs and the custom classes example
(as modified for my purposes) worked fine.

Charlie Millar

---
This email is free from viruses and malware because avast! Antivirus
protection is active.
http://www.avast.com






I have read of your success using Tom Dye's suggestion.

 I realize that my original reply was not complete, so just to be sure 
- did you put (require 'ox-letex) before your customized LaTeX class?


Charlie

---
This email is free from viruses and malware because avast! Antivirus protection 
is active.
http://www.avast.com




Re: [O] Bug: LaTeX block above first heading ignored by latex exporter [8.2.3c (release_8.2.3c-308-gc811bb @ /home/rob/sw/org-mode/lisp/)]

2013-11-29 Thread Rob Stewart
Just to be clear, what is the command I am supposed to be using to
export to latex? I.e., which command is called with combination `C-c
C-e l l` ? I thought it was `org-export-as-latex` , and that
`org-latex-export-as-latex` was deprecated?

However, I have just pulled HEAD in my git clone of
git://orgmode.org/org-mode.git and...

$ grep org-export-as-latex *
$ grep org-latex-export-as-latex *
org-loaddefs.el:;;  org-latex-export-as-latex) ox-latex
ox-latex.el (2
org-loaddefs.el:(autoload 'org-latex-export-as-latex ox-latex \
org-loaddefs.el:  (defun org-latex-export-as-latex
ox.el:  \(defun org-latex-export-as-latex
Binary file ox.elc matches
ox-latex.el:   ((?L As LaTeX buffer org-latex-export-as-latex)
ox-latex.el:(defun org-latex-export-as-latex

Which command *should* I expect to be using?

--
Rob

On 28 November 2013 11:38, Rob Stewart robstewar...@gmail.com wrote:
 On 28 November 2013 10:49, Nicolas Goaziou n.goaz...@gmail.com wrote:

 Unfortunately, I'm unable to reproduce the problem. Anyway, it sounds
 like you're using somehow the old export framework.

 I'm not entirely sure how I do this. But here's a shot at it:

 org-version
 Org-mode version 8.2.1 (release_8.2.1-190-g228ea6 @ 
 /home/rob/sw/org-mode/lisp/)

 list-load-path-shadows
 https://gist.github.com/robstewart57/7690515

 Interestingly, org-export-as-latex does not work:
 org-export-as-latex: Symbol's value as variable is void:
 org-export-latex-default-packages-alist

 But org-latex-export-to-latex does work, generating the unexpected
 latex output. So there may be a problem with using an old exporter.
 But both the output of org-version and list-load-path-shadows would
 have me believe that my org-mode installation at ~/sw/org-mode is the
 presiding org-mode setup. This directory tracks HEAD, and is up to
 date.

 Regards,

 --
 Rob



Re: [O] Bug: LaTeX block above first heading ignored by latex exporter [8.2.3c (release_8.2.3c-308-gc811bb @ /home/rob/sw/org-mode/lisp/)]

2013-11-29 Thread Rob Stewart
More..

I now realise that the command to use is `org-latex-export-to-latex`.
However, my problem persists. This time, I use batch mode, to make
clear that the org-mode repository at /home/rob/sw/org-mode/ is being
used. This reflects HEAD from the git repo.

$ emacs -batch -L ~/sw/org-mode/lisp --visit=test.org -funcall
org-latex-export-to-latex
Loading /usr/share/emacs/site-lisp/site-start.d/auctex.el (source)...
Loading /usr/share/emacs/site-lisp/site-start.d/cmake-init.el (source)...
Loading /usr/share/emacs/site-lisp/site-start.d/desktop-entry-mode-init.el
(source)...
Loading /usr/share/emacs/site-lisp/site-start.d/git-init.el (source)...
Loading /usr/share/emacs/site-lisp/site-start.d/haskell-mode-init.el (source)...
Loading haskell-site-file...
Loading /usr/share/emacs/site-lisp/site-start.d/htmlize-init.el (source)...
Loading /usr/share/emacs/site-lisp/site-start.d/preview-latex.el (source)...
Loading /usr/share/emacs/site-lisp/site-start.d/systemtap-init.el (source)...
Source file `/home/rob/sw/org-mode/lisp/org.el' newer than byte-compiled file
Source file `/home/rob/sw/org-mode/lisp/org-macs.el' newer than
byte-compiled file
Source file `/home/rob/sw/org-mode/lisp/org-compat.el' newer than
byte-compiled file
Source file `/home/rob/sw/org-mode/lisp/ob-emacs-lisp.el' newer than
byte-compiled file
Source file `/home/rob/sw/org-mode/lisp/ob-core.el' newer than
byte-compiled file
Source file `/home/rob/sw/org-mode/lisp/ob-exp.el' newer than byte-compiled file
Source file `/home/rob/sw/org-mode/lisp/ob-table.el' newer than
byte-compiled file
Source file `/home/rob/sw/org-mode/lisp/ob-ref.el' newer than byte-compiled file
Source file `/home/rob/sw/org-mode/lisp/ob-tangle.el' newer than
byte-compiled file
Source file `/home/rob/sw/org-mode/lisp/org-src.el' newer than
byte-compiled file
Source file `/home/rob/sw/org-mode/lisp/org-list.el' newer than
byte-compiled file
Source file `/home/rob/sw/org-mode/lisp/org-footnote.el' newer than
byte-compiled file
Source file `/home/rob/sw/org-mode/lisp/org-element.el' newer than
byte-compiled file
Source file `/home/rob/sw/org-mode/lisp/org.el' newer than byte-compiled file
Source file `/home/rob/sw/org-mode/lisp/org-footnote.el' newer than
byte-compiled file
Source file `/home/rob/sw/org-mode/lisp/org-macro.el' newer than
byte-compiled file
Source file `/home/rob/sw/org-mode/lisp/org-bibtex.el' newer than
byte-compiled file
Source file `/home/rob/sw/org-mode/lisp/org-docview.el' newer than
byte-compiled file
OVERVIEW
Loading vc-git...
Source file `/home/rob/sw/org-mode/lisp/ox-latex.el' newer than
byte-compiled file
Source file `/home/rob/sw/org-mode/lisp/ox.el' newer than byte-compiled file
Source file `/home/rob/sw/org-mode/lisp/ox-ascii.el' newer than
byte-compiled file
Source file `/home/rob/sw/org-mode/lisp/ox-publish.el' newer than
byte-compiled file
Source file `/home/rob/sw/org-mode/lisp/ox-html.el' newer than
byte-compiled file
Source file `/home/rob/sw/org-mode/lisp/ox-icalendar.el' newer than
byte-compiled file
Source file `/home/rob/sw/org-mode/lisp/ox-latex.el' newer than
byte-compiled file
Saving file /home/rob/Documents/test.tex...
Wrote /home/rob/Documents/test.tex

This test.tex file omits (incorrectly) the following block:

\begin{abstract}
This is my abstract.
\end{abstract}

Before `\section{Introduction}`.

%
\documentclass[11pt]{article}
\author{Joe Bloggs}
\date{\today}
\title{My Title}
\hypersetup{
  pdfkeywords={},
  pdfsubject={},
  pdfcreator={Emacs 24.3.1 (Org mode 8.2.1)}}
\begin{document}

\maketitle
\tableofcontents


\section{Introduction}
\label{sec-1}

Hello.
% Emacs 24.3.1 (Org mode 8.2.1)
\end{document}
%

On 29 November 2013 13:52, Rob Stewart robstewar...@gmail.com wrote:
 Just to be clear, what is the command I am supposed to be using to
 export to latex? I.e., which command is called with combination `C-c
 C-e l l` ? I thought it was `org-export-as-latex` , and that
 `org-latex-export-as-latex` was deprecated?

 However, I have just pulled HEAD in my git clone of
 git://orgmode.org/org-mode.git and...

 $ grep org-export-as-latex *
 $ grep org-latex-export-as-latex *
 org-loaddefs.el:;;  org-latex-export-as-latex) ox-latex
 ox-latex.el (2
 org-loaddefs.el:(autoload 'org-latex-export-as-latex ox-latex \
 org-loaddefs.el:  (defun org-latex-export-as-latex
 ox.el:  \(defun org-latex-export-as-latex
 Binary file ox.elc matches
 ox-latex.el:   ((?L As LaTeX buffer org-latex-export-as-latex)
 ox-latex.el:(defun org-latex-export-as-latex

 Which command *should* I expect to be using?

 --
 Rob

 On 28 November 2013 11:38, Rob Stewart robstewar...@gmail.com wrote:
 On 28 November 2013 10:49, Nicolas Goaziou n.goaz...@gmail.com wrote:

 Unfortunately, I'm unable to reproduce the problem. Anyway, it sounds
 like you're using somehow the old export framework.

 I'm not entirely sure how I do this. But here's a shot at it:

 org-version
 Org-mode version 8.2.1 (release_8.2.1-190-g228ea6 @ 
 

Re: [O] orgtble and flyspell interaction causing mem exhaustion error?

2013-11-29 Thread Nick Dokos
Sivaram Neelakantan nsivaram@gmail.com writes:

 On Fri, Nov 29 2013,Nick Dokos wrote:

 Sivaram Neelakantan nsivaram@gmail.com writes:

 When I try to create an table using org-table-create, the table
 outline shows up and upon writing any word in any cell, it causes
 Emacs to freeze up with an error like 95% physical mem used.  When I
 disable flyspell mode and try it again, the issue does not happen.

 Anyone else experiencing this or is it only me?


 Worked fine here.

 sorry, forgot to mention, mine is win32 Emacs 24.3 on win 7 with
 aspell from cygwin and the latest git snapshot of org.


I'm on linux:

Org-mode version 8.2.3c (release_8.2.3c-305-g0911ed @
/home/nick/elisp/org-mode/lisp/)
GNU Emacs 24.3.50.2 (x86_64-unknown-linux-gnu, GTK+ Version 2.24.10) of
2013-07-14 on pierrot

-- 
Nick




Re: [O] Babel support for the D language

2013-11-29 Thread Nick Dokos
See 

http://orgmode.org/worg/org-contribute.html

for the general guidelines.

contrib is more relaxed: it is not distributed with emacs (the only way
to get it is from orgmode - git, elpa, tarball etc), so it does not
require a formal copyright assignment. It is explicitly stripped out of
the orgmode that is packaged with emacs.

All you need to do is send a request out to the list that it be
included in contrib. Then one of the developers (most probably Eric
Schulte in this case) will review it and if it passes muster, he will
add it to contrib.

There is a description of contrib at

  http://orgmode.org/worg/org-contrib/

but I'm not sure how current it is.
-- 
Nick






[O] Error: (wrong-type-argument integer-or-marker-p nil)

2013-11-29 Thread Sebastien Vauban
Hello,

When trying to convert a document which contains R graphics, I get the error:

--8---cut here---start-8---
Debugger entered--Lisp error: (wrong-type-argument integer-or-marker-p nil)
  goto-char(nil)
  (progn (goto-char link-end) (skip-chars-forward  ))
  (setq post-blank (progn (goto-char link-end) (skip-chars-forward )) end 
(point))
  (let ((begin (point)) end contents-begin contents-end link-end post-blank 
path type raw-link link search-option application) (cond ((and 
org-target-link-regexp (looking-at org-target-link-regexp)) (setq type radio 
link-end (match-end 0) path (org-match-string-no-properties 0))) ((looking-at 
org-bracket-link-regexp) (setq contents-begin (match-beginning 3) contents-end 
(match-end 3) link-end (match-end 0) raw-link (org-translate-link 
(org-link-expand-abbrev (org-match-string-no-properties 1 (cond ((or 
(file-name-absolute-p raw-link) (string-match ^\\.\\.?/ raw-link)) (setq type 
file path raw-link)) ((string-match org-link-re-with-space3 raw-link) (setq 
type (match-string 1 raw-link) path (match-string 2 raw-link))) ((string-match 
^id:\\([-a-f0-9]+\\) raw-link) (setq type id path (match-string 1 
raw-link))) ((string-match ^(\\(.*\\))$ raw-link) (setq type coderef path 
(match-string 1 raw-link))) ((= (aref raw-link 0) 35) (setq type custom-id 
path (substring raw-link 1))) (t (setq type fuzzy path raw-link 
((looking-at org-plain-link-re) (setq raw-link (org-match-string-no-properties 
0) type (org-match-string-no-properties 1) link-end (match-end 0) path 
(org-match-string-no-properties 2))) ((looking-at org-angle-link-re) (setq 
raw-link (buffer-substring-no-properties (match-beginning 1) (match-end 2)) 
type (org-match-string-no-properties 1) link-end (match-end 0) path 
(org-match-string-no-properties 2 (setq post-blank (progn (goto-char 
link-end) (skip-chars-forward  )) end (point)) (if (member type 
org-element-link-type-is-file) (progn (cond ((string-match ^file\\+\\(.*\\)$ 
type) (setq application (match-string 1 type))) ((not (string-match ^file 
type)) (setq application type))) (if (string-match ::\\(.*\\)$ path) (progn 
(setq search-option (match-string 1 path) path (replace-match  nil nil 
path (setq type file))) (list (quote link) (list :type type :path path 
:raw-link (or raw-link path) :application application :search-option 
search-option :begin begin :end end :contents-begin contents-begin 
:contents-end contents-end :post-blank post-blank)))
  (save-excursion (let ((begin (point)) end contents-begin contents-end 
link-end post-blank path type raw-link link search-option application) (cond 
((and org-target-link-regexp (looking-at org-target-link-regexp)) (setq type 
radio link-end (match-end 0) path (org-match-string-no-properties 0))) 
((looking-at org-bracket-link-regexp) (setq contents-begin (match-beginning 3) 
contents-end (match-end 3) link-end (match-end 0) raw-link (org-translate-link 
(org-link-expand-abbrev (org-match-string-no-properties 1 (cond ((or 
(file-name-absolute-p raw-link) (string-match ^\\.\\.?/ raw-link)) (setq type 
file path raw-link)) ((string-match org-link-re-with-space3 raw-link) (setq 
type (match-string 1 raw-link) path (match-string 2 raw-link))) ((string-match 
^id:\\([-a-f0-9]+\\) raw-link) (setq type id path (match-string 1 
raw-link))) ((string-match ^(\\(.*\\))$ raw-link) (setq type coderef path 
(match-string 1 raw-link))) ((= (aref raw-link 0) 35) (setq type custom-id 
path (substring raw-link 1))) (t (setq type fuzzy path raw-link 
((looking-at org-plain-link-re) (setq raw-link (org-match-string-no-properties 
0) type (org-match-string-no-properties 1) link-end (match-end 0) path 
(org-match-string-no-properties 2))) ((looking-at org-angle-link-re) (setq 
raw-link (buffer-substring-no-properties (match-beginning 1) (match-end 2)) 
type (org-match-string-no-properties 1) link-end (match-end 0) path 
(org-match-string-no-properties 2 (setq post-blank (progn (goto-char 
link-end) (skip-chars-forward  )) end (point)) (if (member type 
org-element-link-type-is-file) (progn (cond ((string-match ^file\\+\\(.*\\)$ 
type) (setq application (match-string 1 type))) ((not (string-match ^file 
type)) (setq application type))) (if (string-match ::\\(.*\\)$ path) (progn 
(setq search-option (match-string 1 path) path (replace-match  nil nil 
path (setq type file))) (list (quote link) (list :type type :path path 
:raw-link (or raw-link path) :application application :search-option 
search-option :begin begin :end end :contents-begin contents-begin 
:contents-end contents-end :post-blank post-blank
  org-element-link-parser()
  funcall(org-element-link-parser)
  (setq next (funcall (intern (format org-element-%s-parser (car closest)
  (if (or (not closest) ( (cdr closest) origin)) (catch (quote found) (progn 
(let ((--dolist-tail-- (cddr objects-data)) obj) (while --dolist-tail-- (setq 
obj (car --dolist-tail--)) 

Re: [O] Getting checkboxes in HTML output?

2013-11-29 Thread Rick Frankel

On 2013-11-28 16:58, Matt Price wrote:

On Thu, Nov 28, 2013 at 4:26 PM, Sebastien Vauban
sva-n...@mygooglest.com wrote:
Achim Gratz wrote:
Rick Frankel writes:
For xhtml compatibility, it would need to be 'checked=checked'. I've
done a quick look at the html dtd, and i does look like input elements
are allowed outside of forms, but i would need to double
check... Also, the fallback to [-] for the partially checked state
is a bit inconsistent, perhaps changing background color or other
attributre of the checkbox would be better.

I'd much prefer if you'd be using character entities for that since you
can't do any input on the HTML anyway (WHITE MEDIUM SQUARE, SQUARE WITH
LOWER RIGHT DIAGONAL BLACK and BLACK MEDIUM SQUARE look like good
candidates).  That probably makes it UTF-8 only since I don't think
these symbols are defined for plain (X)HTML, so for other encodings
things should probably stay as they are.

FWIW, here's what I do for the HTML export:

In JS:

#+begin_src js
$(function () {
$('li  code:contains([X])')
.parent()
.addClass('checked')
.end()
.remove();
$('li  code:contains([-])')
.parent()
.addClass('halfchecked')
.end()
.remove();
$('li  code:contains([ ])')
.parent()
.addClass('unchecked')
.end()
.remove();
});
#+end_src

In CSS:

#+begin_src css
li.checked {
list-style-image: url('../images/checked.png');
}

li.halfchecked {
list-style-image: url('../images/halfchecked.png');
}

li.unchecked {
list-style-image: url('../images/unchecked.png');
}
#+end_src

with 3 nice pictures of green V, red X, and blue || (line pause on
recorders).



so, I don't know if I'm the only one here who feels this way, but I
would like to be able to export to an HTML file with ACTUAL HECKBOXES
that I cna check off, say on a phone, when I put the milk in the
shopping art, or pack the swim goggles in the vacation bag, or
whatever.  Maybe though I should be thinking in terms of some other
export application, remember the milk or something.  Am I describing a
different use case than other users here, perhaps?


My 3 cents:

I don't see that active checkboxes would help since i don't see a use
case where you can save the html back with the modified input. The
github usecase mentioned in anothre thread requires a bunch of
javascript to work (and write-out the modified file).

While Sebastien's solution is visually appealing, i don't think
requiring image assets is viable for the core exporter (note that it
could be done w/o javascript, another dependency i would like to
avoid).

I've attached an html file which shows the various possible options. My
comments:

1. As mentioned above, I don't see active checkboxes as useful
since the modified state is transient.
2. I don't really like the disabled checkboxes visually.
3. Either of the other two approaches (the list item style, which
parallels Sebastien's approach w/o using images) works for me.
Visually I like the list item style solution, but doesn't really
make the intent clear.

So, my vote is to change the exporter to use the BALLOT BOX and BALLOT
BOX WITH CHECK instead of the ascii character currently used and
indicate partially checked boxes ([-]) with greyed text.

Opinions?

rick

Title: checkbox test

  
  
Checkbox samples
Active

   unchecked
   checked
  
 partial

Inactive

   unchecked
   checked
  
 partial

List item style

  unchecked
  checked
  partial

Unicode characters

   unchecked (BALLOT BOX)
   checked (BALLOT BOX WITH CHECK)
  
 partial (BALLOT BOX WITH CHECK)
  
   alternative checked (BALLOT BOX WITH X)

  



Re: [O] exporting a shopping list to my android phone?

2013-11-29 Thread Robert Eckl
Matt Price mopto...@gmail.com writes:

 I just asked this question I guess, but:  I do most everything in org,
 including composing shopping and packing lists, and so forth.
 Occasionally I would like to access these on my phone.  From what I
 can tell, org-mobile doesn't do quite what I want which is to let me
 toggle the state of a checkbox with my thumb as I throw something into
 a shopping cart, or pack a piece of clothing or rock climbing gear, or
 whatever.

 Does someone else out there have a workflow for this task they can
 recommend? If so I'd appreciate it!  Thanks,

Do you know MobileOrg for Android?
It's not really what you want, but you can synchronize your org-file
with itemizes. On Android phone you can edit the file and put an X in
the checkbox. So it seems to be near to your requirements, your thumb
have to find the big X, an other character is not accepted by org-mode.

Cu,

Robert



Re: [O] Bug: LaTeX block above first heading ignored by latex exporter [8.2.3c (release_8.2.3c-308-gc811bb @ /home/rob/sw/org-mode/lisp/)]

2013-11-29 Thread Nicolas Goaziou
Hello,

Rob Stewart robstewar...@gmail.com writes:

 This test.tex file omits (incorrectly) the following block:

 \begin{abstract}
 This is my abstract.
 \end{abstract}

 Before `\section{Introduction}`.

Now I remember. This is a feature.

When headlines are selectively exported, i.e. when you use :export: tag
or equivalent, text before the first headline is ignored.

This was a request from François Pinard, a few months ago, on the ML.


Regards,

-- 
Nicolas Goaziou



Re: [O] Error: (wrong-type-argument integer-or-marker-p nil)

2013-11-29 Thread Nicolas Goaziou


Hello,

Sebastien Vauban sva-news-D0wtAvR13HarG/idocf...@public.gmane.org
writes:

 When trying to convert a document which contains R graphics, I get the error:

 Debugger entered--Lisp error: (wrong-type-argument integer-or-marker-p nil)
   goto-char(nil)
   (progn (goto-char link-end) (skip-chars-forward))
   (setq post-blank (progn (goto-char link-end) (skip-chars-forward   )) end 
 (point))

Thank you for the report. Could you provide an ECM for it?


Regards,

-- 
Nicolas Goaziou




Re: [O] Bug: LaTeX block above first heading ignored by latex exporter [8.2.3c (release_8.2.3c-308-gc811bb @ /home/rob/sw/org-mode/lisp/)]

2013-11-29 Thread Rob Stewart
On 29 November 2013 17:44, Nicolas Goaziou n.goaz...@gmail.com wrote:

 Now I remember. This is a feature.

 When headlines are selectively exported, i.e. when you use :export: tag
 or equivalent, text before the first headline is ignored.

 This was a request from François Pinard, a few months ago, on the ML.

Ah! Thanks, I can confirm this has resolved my issue.

1. Which git commit changed this behaviour, i.e. implemented
Francois's feature request?
2. I'd like to share this lesson learned. Is there a way I could add
this to the org-mode webpages? Probably the sensible page to mention
this behaviour is: http://orgmode.org/manual/Export-settings.html .
Are the org-mode pages in a git repo somewhere? I'd  be happy to offer
a patch.

Thanks again.

--
Rob



Re: [O] Getting checkboxes in HTML output?

2013-11-29 Thread Peter Davis


On 11/29/13, 11:11 AM, Rick Frankel wrote:

On 2013-11-28 16:58, Matt Price wrote:

On Thu, Nov 28, 2013 at 4:26 PM, Sebastien Vauban
sva-n...@mygooglest.com wrote:
Achim Gratz wrote:
Rick Frankel writes:
For xhtml compatibility, it would need to be 'checked=checked'. I've
done a quick look at the html dtd, and i does look like input elements
are allowed outside of forms, but i would need to double
check... Also, the fallback to [-] for the partially checked state
is a bit inconsistent, perhaps changing background color or other
attributre of the checkbox would be better.

I'd much prefer if you'd be using character entities for that since you
can't do any input on the HTML anyway (WHITE MEDIUM SQUARE, SQUARE WITH
LOWER RIGHT DIAGONAL BLACK and BLACK MEDIUM SQUARE look like good
candidates).  That probably makes it UTF-8 only since I don't think
these symbols are defined for plain (X)HTML, so for other encodings
things should probably stay as they are.

FWIW, here's what I do for the HTML export:

In JS:

#+begin_src js
$(function () {
$('li  code:contains([X])')
.parent()
.addClass('checked')
.end()
.remove();
$('li  code:contains([-])')
.parent()
.addClass('halfchecked')
.end()
.remove();
$('li  code:contains([ ])')
.parent()
.addClass('unchecked')
.end()
.remove();
});
#+end_src

In CSS:

#+begin_src css
li.checked {
list-style-image: url('../images/checked.png');
}

li.halfchecked {
list-style-image: url('../images/halfchecked.png');
}

li.unchecked {
list-style-image: url('../images/unchecked.png');
}
#+end_src

with 3 nice pictures of green V, red X, and blue || (line pause on
recorders).



so, I don't know if I'm the only one here who feels this way, but I
would like to be able to export to an HTML file with ACTUAL HECKBOXES
that I cna check off, say on a phone, when I put the milk in the
shopping art, or pack the swim goggles in the vacation bag, or
whatever.  Maybe though I should be thinking in terms of some other
export application, remember the milk or something.  Am I describing a
different use case than other users here, perhaps?


My 3 cents:

I don't see that active checkboxes would help since i don't see a use
case where you can save the html back with the modified input. The
github usecase mentioned in anothre thread requires a bunch of
javascript to work (and write-out the modified file).

While Sebastien's solution is visually appealing, i don't think
requiring image assets is viable for the core exporter (note that it
could be done w/o javascript, another dependency i would like to
avoid).

I've attached an html file which shows the various possible options. My
comments:

1. As mentioned above, I don't see active checkboxes as useful
since the modified state is transient.
2. I don't really like the disabled checkboxes visually.
3. Either of the other two approaches (the list item style, which
parallels Sebastien's approach w/o using images) works for me.
Visually I like the list item style solution, but doesn't really
make the intent clear.

So, my vote is to change the exporter to use the BALLOT BOX and BALLOT
BOX WITH CHECK instead of the ascii character currently used and
indicate partially checked boxes ([-]) with greyed text.

Opinions?

rick



Thanks for the handy comparison page, Rick. Visually, I'm happy with 
either actual HTML input ... checkbox elements or the Unicode BALLOT 
BOX and BALLOT BOX WITH CHECK characters. Semantically, I suppose it's 
better to avoid having active input elements, since, as you point out, 
they're completely transient, and so potentially misleading.


Unfortunately, I don't think any of the partial options is very clear. 
They graying out is not particularly clear. But I could live with it if 
no better alternatives are found.


-pd

--

Peter Davis
The Tech Curmudgeon
www.techcurmudgeon.com




Re: [O] Bug: LaTeX block above first heading ignored by latex exporter [8.2.3c (release_8.2.3c-308-gc811bb @ /home/rob/sw/org-mode/lisp/)]

2013-11-29 Thread Nicolas Goaziou
Rob Stewart robstewar...@gmail.com writes:

 On 29 November 2013 17:44, Nicolas Goaziou n.goaz...@gmail.com wrote:

 Now I remember. This is a feature.

 When headlines are selectively exported, i.e. when you use :export: tag
 or equivalent, text before the first headline is ignored.

 This was a request from François Pinard, a few months ago, on the ML.

 Ah! Thanks, I can confirm this has resolved my issue.

 1. Which git commit changed this behaviour, i.e. implemented
 Francois's feature request?

7cf4406088d4d7f50c35c6ba7ca3c351db2086bc

 2. I'd like to share this lesson learned. Is there a way I could add
 this to the org-mode webpages? Probably the sensible page to mention
 this behaviour is: http://orgmode.org/manual/Export-settings.html .
 Are the org-mode pages in a git repo somewhere? I'd  be happy to offer
 a patch.

This could be documented in the manual, indeed.  If you want to take
care of this, you'll need to patch org.texi in doc/ directory.


Thank you.


Regards,

-- 
Nicolas Goaziou



Re: [O] Babel support for the D language

2013-11-29 Thread Thierry Banel
Nick Dokos ndokos at gmail.com writes:

 
 See 
 
 http://orgmode.org/worg/org-contribute.html
 
 for the general guidelines.
 ...

Ok, fine.
Let me include this information in org-contribute.html
Thanks Nick
Thierry





Re: [O] Error: (wrong-type-argument integer-or-marker-p nil)

2013-11-29 Thread Sebastien Vauban
Hello Nicolas,

Nicolas Goaziou wrote:
 Sebastien Vauban sva-n...@mygooglest.com writes:

 When trying to convert a document which contains R graphics, I get the error:

 Debugger entered--Lisp error: (wrong-type-argument integer-or-marker-p nil)
   goto-char(nil)
   (progn (goto-char link-end) (skip-chars-forward   ))
   (setq post-blank (progn (goto-char link-end) (skip-chars-forward  
 )) end (point))

 Thank you for the report.

Thank you for your prompt attitude, as always...

 Could you provide an ECM for it?

Not easy, no, as it now disappeared after an update to the latest version of
Org.

Now, to be honest, I've had very peculiar times with Org for the last week,
when working on a document full of R code, and converting it (mainly graphics)
to Beamer slides. Here a couple of problems:

- PDF said as updated, but in fact not regenerated; [1]

- PDF missing some sections (= some Beamer slides) while those headlines had to
  be exported; sometimes, I passed through a LaTeX file to generate my slides
  with AUCTeX...

Now, I know these descriptions are very inaccurate, no ECM to support my
sayings. But I was really under pressure, and could not get the same
reproducible problem twice in a row (that's what, in fact, does make me
afraid!).

I hope to get more stable results, or problems, in the future, and to be able
to report them with the needed details.

Best regards,
  Seb

[1] Francesco Pizzolante had initiated a thread about that, btw. See
http://lists.gnu.org/archive/html/emacs-orgmode/2013-10/msg00347.html. I
think his proposition of a catch-all errors would make a lot of sense, and
suppress false impressions of correct behavior -- help the user be aware of
problems as soon as they happen.

-- 
Sebastien Vauban




[O] How do I specify the language for a :results code block

2013-11-29 Thread Alan Schmitt
Hello,

I'm trying to write a block in some language (right now shell, but it
will probably be something different) whose output is an org source
block is some language (here coq). I keep looking at the documentation
and I cannot see how to specify the language. If I try something like:

#+BEGIN_SRC sh :results code
head -n 3 demo.v
#+END_SRC

When I evaluate the block I get:

#+RESULTS:
#+BEGIN_SRC sh
Definition toto : forall x, exists y, x = y.

Lemma foo: forall x, x=x.
#+END_SRC

How can I have a block with #+BEGIN_SRC coq instead? I looked at
http://orgmode.org/manual/Specific-header-arguments.html#Specific-header-arguments
and at http://orgmode.org/manual/results.html#results and could not find
where one would specify the language.

Thanks,

Alan



Re: [O] How do I specify the language for a :results code block

2013-11-29 Thread Thomas S. Dye
Aloha Alan,

Alan Schmitt alan.schm...@polytechnique.org writes:

 Hello,

 I'm trying to write a block in some language (right now shell, but it
 will probably be something different) whose output is an org source
 block is some language (here coq). I keep looking at the documentation
 and I cannot see how to specify the language. If I try something like:

 #+BEGIN_SRC sh :results code
 head -n 3 demo.v
 #+END_SRC

 When I evaluate the block I get:

 #+RESULTS:
 #+BEGIN_SRC sh
 Definition toto : forall x, exists y, x = y.

 Lemma foo: forall x, x=x.
 #+END_SRC

 How can I have a block with #+BEGIN_SRC coq instead? I looked at
 http://orgmode.org/manual/Specific-header-arguments.html#Specific-header-arguments
 and at http://orgmode.org/manual/results.html#results and could not find
 where one would specify the language.

I think this can be accomplished by chaining:

#+name: first-link
#+begin_src sh
ECHO XXX
#+end_src

#+begin_src emacs-lisp :var x=first-link()
(princ x)
#+end_src

#+results:
: XXX

hth,
Tom

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



Re: [O] Error: (wrong-type-argument integer-or-marker-p nil)

2013-11-29 Thread Charles Berry
Sebastien Vauban sva-news@... writes:

 
 Hello Nicolas,
 
 Nicolas Goaziou wrote:
  Sebastien Vauban sva-news@... writes:
 
  When trying to convert a document which contains R graphics, I get the
error:
 
  Debugger entered--Lisp error: (wrong-type-argument integer-or-marker-p nil)
goto-char(nil)
(progn (goto-char link-end) (skip-chars-forward ))
(setq post-blank (progn (goto-char link-end) (skip-chars-forward  
)) end (point))
 
  Thank you for the report.
 
 Thank you for your prompt attitude, as always...
 
  Could you provide an ECM for it?
 
 Not easy, no, as it now disappeared after an update to the latest version
 of Org.
 
[rest deleted]

There was a problem with org-element-cache-* that Nicolas just fixed 
recently that was generating issues that seem to me could be causing
what you reported.

See

http://thread.gmane.org/gmane.emacs.orgmode/79160/focus=79377


If you do pursue this, you might try turning off the caching to see
if the problems you mention goes away. Or just do

  M-: (org-element-cache-reset) RET

before each export.

HTH,

Chuck




Re: [O] Error: (wrong-type-argument integer-or-marker-p nil)

2013-11-29 Thread Nicolas Goaziou


Sebastien Vauban sva-news-D0wtAvR13HarG/idocf...@public.gmane.org
writes:

 Now, I know these descriptions are very inaccurate, no ECM to support my
 sayings. But I was really under pressure, and could not get the same
 reproducible problem twice in a row (that's what, in fact, does make me
 afraid!).

It's probably due to cache. In this case, set `org-element-use-cache' to
nil and try again. If the problem goes away, you get the culprit.

Anyway, I fixed a bad bug related to export and cache yesterday. I think
that most (hopefully all) of your problems were related to it.


Regards,

-- 
Nicolas Goaziou




Re: [O] How do I specify the language for a :results code block

2013-11-29 Thread Charles Berry
Thomas S. Dye tsd at tsdye.com writes:

 
 Aloha Alan,
 
 Alan Schmitt alan.schmitt at polytechnique.org writes:
 
  Hello,
 
  I'm trying to write a block in some language (right now shell, but it
  will probably be something different) whose output is an org source
  block is some language (here coq). I keep looking at the documentation
  and I cannot see how to specify the language. If I try something like:
[example-deleted]

 
  How can I have a block with #+BEGIN_SRC coq instead?
[snip]
 
 I think this can be accomplished by chaining:
 
[example-deleted]

The problem I see is that the :var x=y() idiom can hand an object to the
src block that is hard to parse and execute -- depending on the language.

If the object is create code in one language and run it in another, it
is sometimes easier to insert results using noweb abc() calls. 

A simple example: generate code in sh that is run in emacs-lisp

#+name: make-elisp
#+BEGIN_SRC sh :exports none :var fun=+
echo ( $fun 1 2)
#+END_SRC

#+BEGIN_SRC emacs-lisp :noweb yes :exports results
make-elisp()
#+END_SRC

#+RESULTS:
: 3

#+BEGIN_SRC emacs-lisp :noweb yes :exports results
make-elisp(-)
#+END_SRC

#+RESULTS:
: -1

#+BEGIN_SRC emacs-lisp :noweb yes :exports results
make-elisp(list)
#+END_SRC

#+RESULTS:
| 1 | 2 |

HTH,

Chuck




Re: [O] Getting checkboxes in HTML output?

2013-11-29 Thread Carsten Dominik
Dear Rick,

this is a very useful comparison, thank you!

I don't thing the partial ones work - we should just make then unchecked in 
export if there is nothing better.  the grey dos not convey the right 
information.

I like the last option (unicode characters) best. The inactive checkboxes are 
visually appealing, but not consistent with function, I think.

My vote:
- Unicode characters as default
- Both active and inactive checkboxes as option for people who want them, via a 
customize variable.
- Partial checkboxes should be shown as unchecked.

Cheers

- Carsten


On 29.11.2013, at 17:11, Rick Frankel r...@rickster.com wrote:

 On 2013-11-28 16:58, Matt Price wrote:
 On Thu, Nov 28, 2013 at 4:26 PM, Sebastien Vauban
 sva-n...@mygooglest.com wrote:
 Achim Gratz wrote:
 Rick Frankel writes:
 For xhtml compatibility, it would need to be 'checked=checked'. I've
 done a quick look at the html dtd, and i does look like input elements
 are allowed outside of forms, but i would need to double
 check... Also, the fallback to [-] for the partially checked state
 is a bit inconsistent, perhaps changing background color or other
 attributre of the checkbox would be better.
 I'd much prefer if you'd be using character entities for that since you
 can't do any input on the HTML anyway (WHITE MEDIUM SQUARE, SQUARE WITH
 LOWER RIGHT DIAGONAL BLACK and BLACK MEDIUM SQUARE look like good
 candidates).  That probably makes it UTF-8 only since I don't think
 these symbols are defined for plain (X)HTML, so for other encodings
 things should probably stay as they are.
 FWIW, here's what I do for the HTML export:
 In JS:
 #+begin_src js
 $(function () {
 $('li  code:contains([X])')
 .parent()
 .addClass('checked')
 .end()
 .remove();
 $('li  code:contains([-])')
 .parent()
 .addClass('halfchecked')
 .end()
 .remove();
 $('li  code:contains([ ])')
 .parent()
 .addClass('unchecked')
 .end()
 .remove();
 });
 #+end_src
 In CSS:
 #+begin_src css
 li.checked {
 list-style-image: url('../images/checked.png');
 }
 li.halfchecked {
 list-style-image: url('../images/halfchecked.png');
 }
 li.unchecked {
 list-style-image: url('../images/unchecked.png');
 }
 #+end_src
 with 3 nice pictures of green V, red X, and blue || (line pause on
 recorders).
 so, I don't know if I'm the only one here who feels this way, but I
 would like to be able to export to an HTML file with ACTUAL HECKBOXES
 that I cna check off, say on a phone, when I put the milk in the
 shopping art, or pack the swim goggles in the vacation bag, or
 whatever.  Maybe though I should be thinking in terms of some other
 export application, remember the milk or something.  Am I describing a
 different use case than other users here, perhaps?
 
 My 3 cents:
 
 I don't see that active checkboxes would help since i don't see a use
 case where you can save the html back with the modified input. The
 github usecase mentioned in anothre thread requires a bunch of
 javascript to work (and write-out the modified file).
 
 While Sebastien's solution is visually appealing, i don't think
 requiring image assets is viable for the core exporter (note that it
 could be done w/o javascript, another dependency i would like to
 avoid).
 
 I've attached an html file which shows the various possible options. My
 comments:
 
 1. As mentioned above, I don't see active checkboxes as useful
 since the modified state is transient.
 2. I don't really like the disabled checkboxes visually.
 3. Either of the other two approaches (the list item style, which
 parallels Sebastien's approach w/o using images) works for me.
 Visually I like the list item style solution, but doesn't really
 make the intent clear.
 
 So, my vote is to change the exporter to use the BALLOT BOX and BALLOT
 BOX WITH CHECK instead of the ascii character currently used and
 indicate partially checked boxes ([-]) with greyed text.
 
 Opinions?
 
 rick
 
 checkbox.html




Re: [O] Babel support for the D language

2013-11-29 Thread Thierry Banel
Thomas S. Dye tsd at tsdye.com writes:

 
 Aloha Thierry,
 
 Thanks for this contribution.
 
 Have you looked at
 http://orgmode.org/worg/org-contrib/babel/languages.html#develop?
 
 It describes how language support is added to the Org mode core or to
 contrib/ and the choices an author has in the process.
 
 Also, it contains a link for a documentation template. It would be great
 if your Example section below could be expanded into ob-doc-d.org.
 
 If you do decide to write ob-doc-d.org, I'm happy to proof-read, edit,
 etc. 
 
 All the best,
 Tom
 

Hi Thomas

Done !
The first draft of
http://orgmode.org/worg/org-contrib/babel/languages/ob-doc-D.html
has been committed.

Have a nice day
Thierry