Re: [O] patch for HTML links to GNU documents

2016-03-28 Thread Richard Y. Kim
Nicolas Goaziou  writes:

> Hello,
>
> Richard Kim  writes:
>
>> Attached patch affects how 'info' links in org mode are converted to HTML
>> links.  Today info links such as
>>
>> [[info:emacs#List Buffers]]
>>
>> are converted to this HTML link:
>>
>> emacs#List Buffers
>>
>> With the patch applied, the HTML link generated would be
>>
>> http://www.gnu.org/software/emacs/manual/html_mono/emacs.html#List-Buffers";>emacs#List
>> Buffers
>
> Thank you. Some comments follow.
>
>> +(defvar org-info-emacs-documents
>
> I suggest to use `defconst' instead, since you're not modifying or
> let-binding the variable whatsoever.
>
>> +  '("ada-mode" "auth" "autotype" "bovine" "calc" "ccmode" "cl" "dbus" 
>> "dired-x"
>> +"ebrowse" "ede" "ediff" "edt" "efaq-w32" "efaq" "eieio" "eintr" "elisp"
>> +"emacs-gnutls" "emacs-mime" "emacs" "epa" "erc" "ert" "eshell" "eudc" 
>> "eww"
>> +"flymake" "forms" "gnus" "htmlfontify" "idlwave" "ido" "info" 
>> "mairix-el"
>> +"message" "mh-e" "newsticker" "nxml-mode" "octave-mode" "org" "pcl-cvs"
>> +"pgg" "rcirc" "reftex" "remember" "sasl" "sc" "semantic" "ses" "sieve"
>> +"smtpmail" "speedbar" "srecode" "todo-mode" "tramp" "url" "vip" "viper"
>> +"widget" "wisent" "woman")
>> +  "List of emacs documents available at the official URL
>> +")
>
> The first sentence in the docstring is expected to be on a single line,
> e.g.
>
>   "List of emacs documents available.
>   Taken from "
>
>> +(defvar org-info-other-documents
>
> `defconst'
>
> Could you also write an entry about it in ORG-NEWS?

Nicolas,

I made all the changes that you suggested in the attached patch.
Please let me know if further changes are needed.

I mailed in my signed licensing paper for emacs to FSF today, so that it
FSF should get it later this week.

>From 20adf43716f602e0c4be1a427bf8c6afd5e44c7e Mon Sep 17 00:00:00 2001
From: Richard Kim 
Date: Thu, 10 Mar 2016 06:29:48 -0800
Subject: [PATCH] org-info.el: generate HTML links to gnu.org

* lisp/org-info.el (org-info-export): Convert info links to HTML URL's
that point to appropriate gnu.org or other pages.  User's can customize
the behavior using `org-info-emacs-documents' and
`org-info-other-documets' new variables.

TINYCHANGE
---
 etc/ORG-NEWS | 14 ++
 lisp/org-info.el | 35 +--
 2 files changed, 47 insertions(+), 2 deletions(-)

diff --git a/etc/ORG-NEWS b/etc/ORG-NEWS
index 4e6c7cb..3ddc3f9 100644
--- a/etc/ORG-NEWS
+++ b/etc/ORG-NEWS
@@ -317,6 +317,20 @@ called with 6 parameters.
 *** =ITEM= special property returns headline without stars
 *** Rename ~org-insert-columns-dblock~ into ~org-columns-insert-dblock~
 The previous name is, for the time being, kept as an obsolete alias.
+*** Function ~org-info-export~ changes.
+HTML links created from certain info links now point to =gnu.org= URL's rather
+than just to local files. For example info links such as =info:emacs#List
+Buffers= used to be converted to HTML links like this:
+
+: emacs#List Buffers
+
+where local file =emacs.html= is referenced.
+For most folks this file does not exist.
+Thus the new behavior is to generate this HTML link instead:
+
+: http://www.gnu.org/software/emacs/manual/html_mono/emacs.html#List-Buffers";>emacs#List Buffers
+
+All emacs related info links are similarly translated plus few other =gnu.org= manuals.
 * Version 8.3
 
 ** Incompatible changes
diff --git a/lisp/org-info.el b/lisp/org-info.el
index 270c19f..07693fe 100644
--- a/lisp/org-info.el
+++ b/lisp/org-info.el
@@ -81,6 +81,37 @@
 nodename-or-index)
 (user-error "Could not open: %s" name)))
 
+(defconst org-info-emacs-documents
+  '("ada-mode" "auth" "autotype" "bovine" "calc" "ccmode" "cl" "dbus" "dired-x"
+"ebrowse" "ede" "ediff" "edt" "efaq-w32" "efaq" "eieio" "eintr" "elisp"
+"emacs-gnutls" "emacs-mime" "emacs" "epa" "erc" "ert" "eshell" "eudc" "eww"
+"flymake" "forms" "gnus" "htmlfontify" "idlwave" "ido" "info" "mairix-el"
+"message" "mh-e" "newsticker" "nxml-mode" "octave-mode" "org" "pcl-cvs"
+"pgg" "rcirc" "reftex" "remember" "sasl" "sc" "semantic" "ses" "sieve"
+"smtpmail" "speedbar" "srecode" "todo-mode" "tramp" "url" "vip" "viper"
+"widget" "wisent" "woman")
+  "List of emacs documents available.
+Taken from ")
+
+(defconst org-info-other-documents
+  '(("libc" . "http://www.gnu.org/software/libc/manual/html_mono/libc.html";)
+("make" . "http://www.gnu.org/software/make/manual/make.html";))
+  "Alist of documents generated from texinfo source.
+
+When converting info links to html, links to any one of these manuals are
+converted to use these URL's.")
+
+(defun org-info-map-html-url (filename)
+  "Given info FILENAME, either return it (plus '.html' suffix added) or convert
+it to URL pointing to the official page on 

[O] Bug: Using CALL to evaluate elisp blocks does not show table headers [8.3.4 (release_8.3.4-686-g18b766 @ ~/org-mode/org-mode/lisp/)]

2016-03-28 Thread Shlomi Vaknin
Hey,
I have an elisp source block that builds a table from some computation.
When trying to #+CALL that block, the table header (before the 'hline) is
simply not shown. Here is a simple reproduce on my system:

--
#+name: test
#+BEGIN_SRC elisp
(list (list 'a 'b 'c 'd) 'hline (list 1 2 3 4) (list 3 4 5 6))
#+END_SRC

#+RESULTS: test
| a | b | c | d |
|---+---+---+---|
| 1 | 2 | 3 | 4 |
| 3 | 4 | 5 | 6 |


#+CALL: test()
#+RESULTS:
| 1 | 2 | 3 | 4 |
| 3 | 4 | 5 | 6 |

#+CALL: test() :results raw
#+RESULTS:
((1 2 3 4) (3 4 5 6))
--

What am I doing wrong? ;)

Thanks,
Shlomi

Emacs  : GNU Emacs 25.1.50.1 (x86_64-apple-darwin13.4.0, NS appkit-1265.21
Version 10.9.5 (Build 13F1603))
 of 2016-03-17
Package: Org-mode version 8.3.4 (release_8.3.4-686-g18b766 @
~/org-mode/org-mode/lisp/)


Re: [O] ditaa and plantuml in PATH

2016-03-28 Thread briangpowell .
I remember looking into NixOS years ago and it was very interesting--also
looked into "GNU Stow" and it may help you
with PATH problems: https://www.gnu.org/software/stow

GNU Stow comes with NixOS:
https://github.com/NixOS/nixpkgs/tree/master/pkgs/tools/misc/stow

On Mon, Mar 28, 2016 at 1:18 PM, Nick Dokos  wrote:

> Alexey Shmalko  writes:
>
> > Hi!
> >
> > I use NixOS and ditaa is globally installed. That means I have ditaa
> > executable in PATH but no easy way to find a ditaa.jar file. There is
> > no way to instruct org-ditaa to use the specified executable (it
> > requires java and path to the ditaa jar file). Note also that I don't
> > have java in PATH.
> >
> > I would like org-ditaa to use ditaa executable from the PATH. Same
> > goes for org-plantuml.
> >
>
> Does setting org-babel-ditaa-java-cmd to "ditaa" help? Maybe in
> combination with setting org-ditaa-jar-path to nil or ""?
>
> --
> Nick
>
>
>


[O] nethack and orgmode

2016-03-28 Thread Jude DaShiell

| level \ row \ column \note \ |   |
|  | - |
|  |   |

--




Re: [O] How to export table from a src block?

2016-03-28 Thread John Kitchin
Try this:

* Export table from src-block

#+name: mytable
| a | b |
| 1 | 2 |
| 3 | 4 |


#+BEGIN_SRC emacs-lisp
(save-excursion
  (org-open-link-from-string "[[mytable]]")
  (while (not (org-table-p)) (forward-line))
  (org-table-export "mytable.csv" "orgtbl-to-csv"))
#+END_SRC
#+RESULTS:
: Export done.

#+BEGIN_SRC sh
cat mytable.csv
#+END_SRC
#+RESULTS:
: a,b
: 1,2
: 3,4



William Denton writes:

> I have a big table (with #+NAME: mytable).  I can export it to a CSV file by
> hand by having the point somewhere in the table and running
>
> M-x org-table-export
>
> but how could I do this from a source block?  I've got one line so far, but 
> how
> would I get it to be in the table when it runs?  There's nothing else in this
> file, just a table and then this source block.
>
> #+BEGIN_SRC emacs-lisp
> (org-table-export "/tmp/mytable.csv" "orgtbl-to-csv")
> #+END_SRC
>
> Any help appreciated!
>
> Bill


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



Re: [O] no div/id on named example blocks in html export

2016-03-28 Thread John Kitchin
I gave this a shot (I think ;).

I sent patches to the mailing list adding an id attribute to three
blocks: example, quote and special.

Hopefully that is the right way to do it. I signed the FSF papers in
April 2014, and they were approved in May 2014.

Let me know if there is another way to do this. Thanks,

Nicolas Goaziou writes:

> Hello,
>
> John Kitchin  writes:
>
>> I noticed that if I make a block like this:
>>
>> #+name: methane-smiles
>> #+BEGIN_EXAMPLE
>> C
>> #+END_EXAMPLE
>>
>> There is no id="methane-smiles" assocated with the pre block in the HTML
>> export.
>>
>> The place to add it would be in org-html-example-block I suppose. Is
>> there any reason not to do that?
>
> I think that nobody felt the need for that yet. Do you want to provide
> a patch?
>
>
> Regards,


--
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] How to export table from a src block?

2016-03-28 Thread William Denton
I have a big table (with #+NAME: mytable).  I can export it to a CSV file by 
hand by having the point somewhere in the table and running


M-x org-table-export

but how could I do this from a source block?  I've got one line so far, but how 
would I get it to be in the table when it runs?  There's nothing else in this 
file, just a table and then this source block.


#+BEGIN_SRC emacs-lisp
(org-table-export "/tmp/mytable.csv" "orgtbl-to-csv")
#+END_SRC

Any help appreciated!

Bill
--
William Denton ↔  Toronto, Canada ↔  https://www.miskatonic.org/

[O] [PATCH 3/3] add html attributes to special blocks.

2016-03-28 Thread John Kitchin
Enables #+attr_html and puts an id in when the special block is named.
---
 lisp/ox-html.el | 26 --
 1 file changed, 16 insertions(+), 10 deletions(-)

diff --git a/lisp/ox-html.el b/lisp/ox-html.el
index 5bdfc14..da67958 100644
--- a/lisp/ox-html.el
+++ b/lisp/ox-html.el
@@ -3209,22 +3209,28 @@ contextual information."
   "Transcode a SPECIAL-BLOCK element from Org to HTML.
 CONTENTS holds the contents of the block.  INFO is a plist
 holding contextual information."
-  (let* ((block-type (org-element-property :type special-block))
-(contents (or contents ""))
-(html5-fancy (and (org-html--html5-fancy-p info)
-  (member block-type org-html-html5-elements)))
-(attributes (org-export-read-attribute :attr_html special-block)))
+  (let* ((block-type (downcase
+  (org-element-property :type special-block)))
+ (contents (or contents ""))
+ (html5-fancy (and (org-html-html5-p info)
+   (plist-get info :html-html5-fancy)
+   (member block-type org-html-html5-elements)))
+ (attributes (org-export-read-attribute :attr_html special-block)))
 (unless html5-fancy
   (let ((class (plist-get attributes :class)))
-   (setq attributes (plist-put attributes :class
-   (if class (concat class " " block-type)
- block-type)
+(setq attributes (plist-put attributes :class
+(if class (concat class " " block-type)
+  block-type)))
+(when (org-element-property :name special-block)
+  (setq attributes (plist-put
+attributes :id
+(org-element-property :name special-block))
 (setq attributes (org-html--make-attribute-string attributes))
 (when (not (equal attributes ""))
   (setq attributes (concat " " attributes)))
 (if html5-fancy
-   (format "<%s%s>\n%s" block-type attributes
-   contents block-type)
+(format "<%s%s>\n%s" block-type attributes
+contents block-type)
   (format "\n%s\n" attributes contents
 
  Src Block
-- 
2.4.4




[O] [PATCH 1/3] add id attribute to example-block on html export.

2016-03-28 Thread John Kitchin
This allows you to hyperlink to the block.
---
 lisp/ox-html.el | 15 ---
 1 file changed, 12 insertions(+), 3 deletions(-)

diff --git a/lisp/ox-html.el b/lisp/ox-html.el
index d07cdcc..92de209 100644
--- a/lisp/ox-html.el
+++ b/lisp/ox-html.el
@@ -2370,14 +2370,23 @@ contextual information."
 
  Example Block
 
-(defun org-html-example-block (example-block _contents info)
+(defun org-html-example-block (example-block contents info)
   "Transcode a EXAMPLE-BLOCK element from Org to HTML.
 CONTENTS is nil.  INFO is a plist holding contextual
 information."
   (if (org-export-read-attribute :attr_html example-block :textarea)
   (org-html--textarea-block example-block)
-(format "\n%s"
-   (org-html-format-code example-block info
+(let ((attributes (org-export-read-attribute :attr_html example-block)))
+  (when (org-element-property :name example-block)
+   (setq attributes (plist-put
+ attributes :id
+ (org-element-property :name example-block
+  (setq attributes (org-html--make-attribute-string attributes))
+  (when (not (equal attributes ""))
+   (setq attributes (concat " " attributes)))
+  (format "\n%s"
+ attributes
+ (org-html-format-code example-block info)
 
  Export Snippet
 
-- 
2.4.4




[O] [PATCH 2/3] add html attributes to quote-block

2016-03-28 Thread John Kitchin
Enables #+attr_html: and puts a id attribute when the block is named into the 
html element.
---
 lisp/ox-html.el | 12 ++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/lisp/ox-html.el b/lisp/ox-html.el
index 92de209..5bdfc14 100644
--- a/lisp/ox-html.el
+++ b/lisp/ox-html.el
@@ -3155,11 +3155,19 @@ holding contextual information."
 
  Quote Block
 
-(defun org-html-quote-block (_quote-block contents _info)
+(defun org-html-quote-block (quote-block contents info)
   "Transcode a QUOTE-BLOCK element from Org to HTML.
 CONTENTS holds the contents of the block.  INFO is a plist
 holding contextual information."
-  (format "\n%s" contents))
+  (let ((attributes (org-export-read-attribute :attr_html quote-block)))
+(when (org-element-property :name quote-block)
+  (setq attributes (plist-put
+   attributes :id
+   (org-element-property :name quote-block
+(setq attributes (org-html--make-attribute-string attributes))
+(when (not (equal attributes ""))
+  (setq attributes (concat " " attributes)))
+(format "\n%s" attributes contents)))
 
  Section
 
-- 
2.4.4




Re: [O] Internal non-PROPERTY links don't export to HTML with the "a" IDs that were assigned

2016-03-28 Thread D. C. Toedt
> So what problems are you seeing (other than that the label looks funny)?

The problem is that the label can vary from export to export.  EXAMPLE:  I
added a <> target ID in the paragraph before the paragraph
containing <>; the result was that <> now
exports as http://www.CommonDraft.org/#orgtarget21"; the link would no longer point to
where it was supposed to.

> CUSTOM_ID

That works for heading properties, but I'm not aware that CUSTOM_ID can be
used in the text internal to a heading-designated section.




>
>
>
>


Re: [O] ditaa and plantuml in PATH

2016-03-28 Thread Nick Dokos
Alexey Shmalko  writes:

> Hi!
>
> I use NixOS and ditaa is globally installed. That means I have ditaa
> executable in PATH but no easy way to find a ditaa.jar file. There is
> no way to instruct org-ditaa to use the specified executable (it
> requires java and path to the ditaa jar file). Note also that I don't
> have java in PATH.
>
> I would like org-ditaa to use ditaa executable from the PATH. Same
> goes for org-plantuml.
>

Does setting org-babel-ditaa-java-cmd to "ditaa" help? Maybe in
combination with setting org-ditaa-jar-path to nil or ""?

--
Nick




Re: [O] Internal non-PROPERTY links don't export to HTML with the "a" IDs that were assigned

2016-03-28 Thread Nick Dokos
"D. C. Toedt"  writes:

> I'm using the latest update from the package updater, released 2016-03-28:  
> Org-mode version 8.3.2 (release_8.3.2-164-g50a182).  
>
> I can best illustrate the problem with an example:
>
> Org source:  
>
> See also the [[IndemnNonAssign][Indemnity rights not
> ​​
> assignable]] provision. 
>
> ​Former exported HTML (correct):
>
> See also the Indemnity rig
> ​​
> hts not assignable provision.
>
> ​​
>
> Current exported HTML (incorrect):
>
> ​​
> See also the <
> ​​
> a href="#orgtarget21">Indemnity rights not assignable provision. 
>
> ​​
>
> ​​
> This causes problems, because "orgtarget21" won't necessarily be assigned to 
> the same point in the text, which in turn means that "jump cite" ​​links to 
> specific points internal to the
> document will break.​​
> ​​

Do you actually see breakage?  I get

Indemnity rights not assignable

coupled with



at the referent, which is correct I believe.

So what problems are you seeing (other than that the label looks funny)?

> ​​I scanned through the documentation but didn't see anything indicating
> ​that there's a setting to use assigned names instead of "orgtargetNN"

 CUSTOM_ID  - I'm muttering because I'm not
sure what problem you are having and whether CUSTOM_ID can
solve it.

LaTeX export can override these labels with org-latex-prefer-user-labels
(see its documentation for the rationale), but there is no similar
provision for HTML export.

The issue (actually not quite the same issue but it *is* related) last
came up about a month ago:

http://thread.gmane.org/gmane.emacs.orgmode/105329

and Nicolas indicated that he would be willing to accept a patch
to do something similar with HTML export:

http://thread.gmane.org/gmane.emacs.orgmode/105329/focus=105391

The underlying rationale in that thread was that one might want
predictable labels so that they could be used e.g. in CSS to style
something.

--
Nick






[O] ditaa and plantuml in PATH

2016-03-28 Thread Alexey Shmalko
Hi!

I use NixOS and ditaa is globally installed. That means I have ditaa
executable in PATH but no easy way to find a ditaa.jar file. There is
no way to instruct org-ditaa to use the specified executable (it
requires java and path to the ditaa jar file). Note also that I don't
have java in PATH.

I would like org-ditaa to use ditaa executable from the PATH. Same
goes for org-plantuml.

Regards,
Alexey Shmalko



Re: [O] Exporting usenet links

2016-03-28 Thread Michael Welle
Hello,

Eric S Fraga wrote:
> 
> On Saturday, 26 Mar 2016 at 13:12, Eric S Fraga wrote:
> > On Saturday, 26 Mar 2016 at 13:55, Michael Welle wrote:
> >> Hello,
> >>
> >
> >> exporting usenet links to html seems to be broken:
> >>
> >> [[news:de.sci.electronics][dse]]
> >
> > Not broken per se in that the default behaviour is to treat news: the
> > same as http: on export.  If that's not what you want, you can customise
> > the behaviour yourself using
> 
> Actually, I'm not entirely sure what is meant to happen with news: links
> by default so partially ignore my previous post.  You can definitely
> customise the behaviour yourself but it could be that the default
> behaviour is broken, as you suggest.
I'm could be wrong, but I think ages ago that type of link had been
exported as news:de.sci.electronics. I don't use it that much ;).

Thanks for the hint with org-add-link-type, I will try that. I
inspected org-link-types before and news is in it, so I thought that
would be enough.

Regards
hmw



Re: [O] headers on special blocks

2016-03-28 Thread John Kitchin
If anyone is interested, here is a way I am using headers on special blocks:
http://kitchingroup.cheme.cmu.edu/blog/2016/03/28/Another-approach-to-embedded-molecular-data-in-org-mode/

The org-source can be found here:
http://kitchingroup.cheme.cmu.edu/org/2016/03/28/Another-approach-to-embedded-molecular-data-in-org-mode.org

It is kind of interesting I think.

Nicolas Goaziou writes:

> Hello,
>
> John Kitchin  writes:
>
>> I am playing around with storing data in special blocks. For example,
>> here is an example bit of "data" which is the CH4 (methane) molecule in
>> SMILES format in a MOLECULE block.
>>
>>
>> #+header: :format smiles
>> #+name: methane-smiles
>> #+BEGIN_MOLECULE
>> C
>> #+END_MOLECULE
>>
>> Is is legal syntax to put a header in like this? It works, as in it
>> parses to
>>
>> (special-block
>>   (:type "MOLECULE" :begin 240 :end 323 :hiddenp nil
>>   :contents-begin 305 :contents-end 307 :post-blank 1
>>   :post-affiliated 288 :header
>>  (":format smiles")
>>  :name "methane-smiles" :parent nil))
>>
>>
>> but I haven't seen any documentation for headers on a special block.
>
> Almost all elements accept HEADER affiliated keywords. They work the
> same in every type of element but ATM, only source blocks make use of
> them.
>
> In a nutshell, those locations are up for grabs.
>
> Regards,


--
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] Bug: Active Timestamps in HTML Export [8.3.4 (8.3.4-28-gf9464d-elpa @ c:/Users/xxxx/AppData/Roaming/.emacs.d/elpa/org-20160328/)]

2016-03-28 Thread Keith Sutton
With HTML export and org-export-with-planning t, no translation is done in
org-html-planning to convert the angle brackets of an active timestamp to
< and >. This gets shown by some browsers anyway, but is swallowed
and ignored by others.

Expected behavior: active timestamps have characters properly turned into
HTML entities.

Actual behavior: active timestamps retain angle brackets and therefore the
HTML produced does not validate.

Suggested remedy: use org-html-plain-text to convert the output of
org-timestamp-translate to HTML.

Emacs  : GNU Emacs 24.5.1 (i686-pc-mingw32)
 of 2015-04-11 on LEG570
Package: Org-mode version 8.3.4 (8.3.4-28-gf9464d-elpa @
c:/Users/sut89614/AppData/Roaming/.emacs.d/elpa/org-20160328/)

-- 
Keith Sutton


[O] using info in a filter

2016-03-28 Thread John Kitchin
How does one use the info in a filter?

e.g.

in (defun my-block-filter (data backend info))

data is the transcoded block string, and I want to add something to it
based on say the type of block, name and header of the corresponding
block. Is it possible to get to that from the info? Or is this a case
where it is easier to make a custom backend with a function like:

(defun sb-format (sb contents info)) that builds up the output string?


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



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

2016-03-28 Thread Charles Millar



On 03/26/2016 01:14 PM, Eric S Fraga wrote:

On Saturday, 26 Mar 2016 at 10:15, Charles Millar wrote:

[...]


I was not clear - I ran the exports after I made the correction to
"mysetup", i.e. \newcommand{\\foo}{bar}

but I am confused: why the \\ for foo but \ for newcommand?  What is the
actual result in the output.tex file?


I do agree that the one file that exports as desired must be a result
of luck. I compared the output.tex file for each document. In each the
first \usepackage{foo} which is inserted from the SETUPFILE is
indented several tabs or spaces to the right and not aligned to the
left margin.

The indentation or not itself is not the issue but only a symptom of an
error before that line, in my opinion.
As we agreed my first successful export was lucky, so I revised that 
file template from which I was exporting - the extra first page and the 
missing\begin{document} do not seem to be a problem now.


However, the LATEX_HEADER: still is placed several spaces to the left,

first few lines from the file.tex

% Created 2016-03-28 Mon 10: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=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}
\usepackage{lastpage}
\usepackage{scrpage2}
\pagestyle{scrheadings}
\setkomafont{pagefoot}{\normalfont\rmfamily}

I have also placed the LATEX_HEADER: \usepackage{lastline} directly in 
the file to be exported, i.e. not relying on a SETUPFILE: and the 
\usepackage, etc. is also placed to the left. Perhaps this is a bug or 
is it expected?


Anyway, thanks Eric for your comments and to everyone else who has read 
this thread.


Charlie Millar



[O] Internal non-PROPERTY links don't export to HTML with the "a" IDs that were assigned

2016-03-28 Thread D. C. Toedt
I'm using the latest update from the package updater, released 2016-03-28:
 Org-mode version 8.3.2 (release_8.3.2-164-g50a182).

I can best illustrate the problem with an example:

*Org source:  *

See also the [[IndemnNonAssign][Indemnity rights not
> ​​
> assignable]] provision.


*​Former exported HTML (correct):*


See also the http://www.commondraft.org/#IndemnNonAssign>
> demnNonAssign ">Indemnity rig
> ​​
> hts not assignable provision.

​​

*Current exported HTML (incorrect):*

​​
> See also the <
> ​​
> a href="#orgtarget21">Indemnity rights not assignable provision.

​​

​​
This causes problems, because "orgtarget21" won't necessarily be assigned
to the same point in the text, which in turn means that "jump cite" ​​links
to specific points internal to the document will break.​​
​​
​​I scanned through the documentation but didn't see anything indicating
​that there's a setting to use assigned names instead of "orgtargetNN"


​​

D. C. Toedt III
*(My last name is pronounced "Tate")*
Attorney & arbitrator -- tech contracts & IP
O: +1 (713) 364-6545   C: +1 (713) 516-8968
​​

d...@toedt.com@dctoedt 
​
Skype: dctoedt
​

www.OnContracts.com/About 
​​


Unless expressly stated otherwise,
this message is not intended to serve
as assent to an agreement or other document,
even if attached to this message.


Re: [O] headers on special blocks

2016-03-28 Thread Nicolas Goaziou
Hello,

John Kitchin  writes:

> I am playing around with storing data in special blocks. For example,
> here is an example bit of "data" which is the CH4 (methane) molecule in
> SMILES format in a MOLECULE block.
>
>
> #+header: :format smiles
> #+name: methane-smiles
> #+BEGIN_MOLECULE
> C
> #+END_MOLECULE
>
> Is is legal syntax to put a header in like this? It works, as in it
> parses to
>
> (special-block
>   (:type "MOLECULE" :begin 240 :end 323 :hiddenp nil
>   :contents-begin 305 :contents-end 307 :post-blank 1
>   :post-affiliated 288 :header
>  (":format smiles")
>  :name "methane-smiles" :parent nil))
>
>
> but I haven't seen any documentation for headers on a special block.

Almost all elements accept HEADER affiliated keywords. They work the
same in every type of element but ATM, only source blocks make use of
them.

In a nutshell, those locations are up for grabs.

Regards,

-- 
Nicolas Goaziou



[O] headers on special blocks

2016-03-28 Thread John Kitchin
Hi all,

I am playing around with storing data in special blocks. For example,
here is an example bit of "data" which is the CH4 (methane) molecule in
SMILES format in a MOLECULE block.


#+header: :format smiles
#+name: methane-smiles
#+BEGIN_MOLECULE
C
#+END_MOLECULE

Is is legal syntax to put a header in like this? It works, as in it
parses to

(special-block
  (:type "MOLECULE" :begin 240 :end 323 :hiddenp nil
  :contents-begin 305 :contents-end 307 :post-blank 1
  :post-affiliated 288 :header
 (":format smiles")
 :name "methane-smiles" :parent nil))


but I haven't seen any documentation for headers on a special block.

Thanks,

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



Re: [O] switch parsing in babel

2016-03-28 Thread John Kitchin

Nicolas Goaziou writes:

> Hello,
>
> John Kitchin  writes:
>
>> I am trying to make a new source block that looks like this:
>>
>> #+BEGIN_SRC obabel -icml -osmi
>> [CH4]
>> #+END_SRC
>>
>> This gets parsed to:
>>
>> (src-block
>>  (:language "obabel" :switches "-i" :parameters "cml -osmi" :begin
>> 190 :end 240 :number-lines nil :preserve-indent t :retain-labels
>> t :use-labels t :label-fmt nil :hiddenp nil :value "[CH4]
>> \n" :post-blank 1 :post-affiliated 190 :parent nil))
>>
>> Is that correct? I would have thought that
>> 1. The first switch should be -icml
>> 2. -osmi would also be a switch.
>
> This is incorrect, but not in the way you think.
>
> There is no concatenation for switches in Org syntax, so it should be
> parsed as
>
>   :switches nil :parameters -icml -osmi
>
> which looks wrong anyway.
>
> Maybe you're simply mis-using switches here, which are reserved to Org?

It could be. I get it now, I was looking at
http://orgmode.org/guide/Working-With-Source-Code.html

#+NAME: 
#+BEGIN_SRC   

#+END_SRC

and I just noticed that " can be used to control export of the
code block" which isn't what I was trying to do with it.

>
>
> Regards,


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



Re: [O] no div/id on named example blocks in html export

2016-03-28 Thread Nicolas Goaziou
Hello,

John Kitchin  writes:

> I noticed that if I make a block like this:
>
> #+name: methane-smiles
> #+BEGIN_EXAMPLE
> C
> #+END_EXAMPLE
>
> There is no id="methane-smiles" assocated with the pre block in the HTML
> export.
>
> The place to add it would be in org-html-example-block I suppose. Is
> there any reason not to do that?

I think that nobody felt the need for that yet. Do you want to provide
a patch?


Regards,

-- 
Nicolas Goaziou



Re: [O] Exporting usenet links

2016-03-28 Thread Nicolas Goaziou
Hello,

Michael Welle  writes:

> exporting usenet links to html seems to be broken:
>
> [[news:de.sci.electronics][dse]]
>
> becomes
>
>  dse
>
> in html.

Fixed. Thank you.

Regards,

-- 
Nicolas Goaziou



Re: [O] switch parsing in babel

2016-03-28 Thread Nicolas Goaziou
Hello,

John Kitchin  writes:

> I am trying to make a new source block that looks like this:
>
> #+BEGIN_SRC obabel -icml -osmi
> [CH4]
> #+END_SRC
>
> This gets parsed to:
>
> (src-block
>  (:language "obabel" :switches "-i" :parameters "cml -osmi" :begin
> 190 :end 240 :number-lines nil :preserve-indent t :retain-labels
> t :use-labels t :label-fmt nil :hiddenp nil :value "[CH4]
> \n" :post-blank 1 :post-affiliated 190 :parent nil))
>
> Is that correct? I would have thought that 
> 1. The first switch should be -icml
> 2. -osmi would also be a switch.

This is incorrect, but not in the way you think.

There is no concatenation for switches in Org syntax, so it should be
parsed as

  :switches nil :parameters -icml -osmi

which looks wrong anyway.

Maybe you're simply mis-using switches here, which are reserved to Org?


Regards,

-- 
Nicolas Goaziou



Re: [O] patch for HTML links to GNU documents

2016-03-28 Thread Nicolas Goaziou
Hello,

Richard Kim  writes:

> Attached patch affects how 'info' links in org mode are converted to HTML
> links.  Today info links such as
>
> [[info:emacs#List Buffers]]
>
> are converted to this HTML link:
>
> emacs#List Buffers
>
> With the patch applied, the HTML link generated would be
>
> http://www.gnu.org/software/emacs/manual/html_mono/emacs.html#List-Buffers";>emacs#List
> Buffers

Thank you. Some comments follow.

> +(defvar org-info-emacs-documents

I suggest to use `defconst' instead, since you're not modifying or
let-binding the variable whatsoever.

> +  '("ada-mode" "auth" "autotype" "bovine" "calc" "ccmode" "cl" "dbus" 
> "dired-x"
> +"ebrowse" "ede" "ediff" "edt" "efaq-w32" "efaq" "eieio" "eintr" "elisp"
> +"emacs-gnutls" "emacs-mime" "emacs" "epa" "erc" "ert" "eshell" "eudc" 
> "eww"
> +"flymake" "forms" "gnus" "htmlfontify" "idlwave" "ido" "info" "mairix-el"
> +"message" "mh-e" "newsticker" "nxml-mode" "octave-mode" "org" "pcl-cvs"
> +"pgg" "rcirc" "reftex" "remember" "sasl" "sc" "semantic" "ses" "sieve"
> +"smtpmail" "speedbar" "srecode" "todo-mode" "tramp" "url" "vip" "viper"
> +"widget" "wisent" "woman")
> +  "List of emacs documents available at the official URL
> +")

The first sentence in the docstring is expected to be on a single line,
e.g.

  "List of emacs documents available.
  Taken from "

> +(defvar org-info-other-documents

`defconst'

Could you also write an entry about it in ORG-NEWS?


Regards,

-- 
Nicolas Goaziou