Re: [O] Exporting to multiple files

2014-03-09 Thread Marcin Borkowski
Dnia 2014-03-09, o godz. 02:34:09
Marcin Borkowski mb...@wmi.amu.edu.pl napisał(a):

 Hi all,
 
 I'd like to export an Org-mode file to /multiple/ HTML files.  For
 instance, I might want to convert all first and second level headings
 to files, and third-level headings to h1, fourth-level ones to h2
 inside these files etc.  Is that possible?  I looked into the docs,
 but didn't find anything like this.
 
 Of course, there's an issue of /naming/ these files.  Basing the names
 on the text of the heading would be the best thing to have, but it's
 not strictly necessary for me - numbers or (as a /very last/ resort)
 some kind of SHA hashes might do as well.
 
 (In fact, I'd like to write a custom HTML exporter based on the HTML
 one, so that I'd be fine with some Elisp to do this as opposed to just
 setting some variables.)

It occurred to me that I could just walk through the file, creating
temporary buffers with my subtrees, demote them and export them one by
one to HTML.  This seems doable (and even not too complicated), but is
there a better/simpler way, or has someone already invented that wheel?

Best,

-- 
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Adam Mickiewicz University



[O] can org-mode file export to markdown file

2014-03-09 Thread jenenliu
Can I write a org file and then export it as a markdown file ?

-- 
A lazy Emacser




Re: [O] can org-mode file export to markdown file

2014-03-09 Thread Daimrod
jenenliu jenen...@gmail.com writes:
Hello,

 Can I write a org file and then export it as a markdown file ?

Sure, just load the library `ox-md' then you can export to a markdown
file with C-c C-e m m

-- 
Daimrod/Greg



Re: [O] LaTeX export TOC decorations : how to

2014-03-09 Thread FAb

On 03/08/2014 04:24 PM, Nick Dokos wrote:

FAb 0x...@free.fr writes:


Hi,
When I org-export in pdf the items in TOC have red box around them
like decoration for link in css.
How can I get ride of them ?
Or how to customize this stuff ?


Assuming you are going to PDF through latex, this is done by hyperref, so
you'll need to familiarize yourself with hyperref options and then
customize org-latex-hyperref-template. The default value of that
variable is

\\hypersetup{\n pdfkeywords={%k},\n  pdfsubject={%d},\n  pdfcreator={%c}}\n

You need to modify it to something like this:

\\hypersetup{\n  linkbordercolor={0 0 1}\n  pdfkeywords={%k},\n  pdfsubject={%d},\n 
 pdfcreator={%c}}\n

If you want to use color names rather than RGB values, you can
add

#+LATEX_HEADER: \usepackage{xcolor}

to your org file (or do a more permanent modification if so desired).
You can then use

\\hypersetup{\n  linkbordercolor=blue\n  pdfkeywords={%k},\n  pdfsubject={%d},\n  
pdfcreator={%c}}\n

as the value of org-latex-hyperref-template.

The hyperref manual can be found at

 https://www.tug.org/applications/hyperref/ftp/doc/manual.html


Ok thanks,
When I use that \hypersetup in #+LATEX_HEADER the job is perfectly done.

But I don't find the org-latex-hyperref-template and if I delcare it 
in my .emacs, nothing changes.

Are you sure about this name ?
Now as I know the keyword hyperref I find a lot of documentation on 
the web, but clue for that variable.


Closest variables :
org-export-latex-hyperref-format
org-export-latex-hyperref-options-format
org-latex-with-hyperref


I imagine that I could hack latex template to have the good 
'#+LaTeX_HEADER' but if there is a nice way to do it, I'd rather learn it.


Regards,

FAb
PS : thank you Tim



Re: [O] can org-mode file export to markdown file

2014-03-09 Thread jenenliu
Thanks :)

Daimrod daim...@gmail.com writes:

 jenenliu jenen...@gmail.com writes:
 Hello,

 Can I write a org file and then export it as a markdown file ?

 Sure, just load the library `ox-md' then you can export to a markdown
 file with C-c C-e m m

-- 
A lazy Emacser




Re: [O] LaTeX export TOC decorations : how to

2014-03-09 Thread Nick Dokos
FAb 0x...@free.fr writes:

 On 03/08/2014 04:24 PM, Nick Dokos wrote:

 When I use that \hypersetup in #+LATEX_HEADER the job is perfectly done.

 But I don't find the org-latex-hyperref-template and if I delcare it
 in my .emacs, nothing changes.
 Are you sure about this name ?

That's the name in org 8.0 or later. If you are using a 7.x version of
org, many names are indeed different. My advice would be to upgrade to a
more recent org: these name changes are a continuing source of problems,
so the sooner everybody upgrades, the sooner we can put these problems
behind us.

 Closest variables :
 org-export-latex-hyperref-format
 org-export-latex-hyperref-options-format
 org-latex-with-hyperref


The variable corresponding to org-latex-hyperref-template was
org-export-latex-hyperref-options-format. Its default value
(in org 7.9.4) was

  \\hypersetup{\n  pdfkeywords={%s},\n  pdfsubject={%s},\n  pdfcreator={Emacs 
Org-mode version %s}}\n


-- 
Nick




Re: [O] Get to next NEXT headline with one key

2014-03-09 Thread Oleh
 And commands work from start of #+... as well.


 Like this one.

Note that you have to use f to get to the first #+ that belongs to a heading.

 Here's how I've implemented the functionality that you want:

 j/k are bound move down/up just like in vim, but they move by
 headings or #+ markers.
 But K can change their behavior temporarily: it will prompt you for
 a char that corresponds to a keyword:
 t - TODO
 d - DONE
 n - NEXT
 c - CANCELLED

 After a keyword is set, j/k will move by this keyword instead,
 until any command other than j/k is issued (for instance m,
 which reveals heading). After that j/k will return to their
 regular behavior.


 Question: is there a particular reason for restricting keyword j/k movement
 only to
 - headlines at lower/equal levels (I get stuck in the subtree with the first
 NEXT)?
 - visible headlines (I miss folded NEXT entries)?

Restriction lifted.

 Still eventually I would like to pack those Knjm keys into just one key to
 replicate what is done by Matt my-org-next-next() function.

Doable by defining these functions on your own:

(defun set-keyword-next ()
  (interactive)
  (worf-keyword NEXT))

(defun set-keyword-done ()
  (interactive)
  (worf-keyword DONE))

After a call to `set-keyword-next`, j/k will move by NEXT
keyword until any other command is called.

 Do you think that the selection procedure of *helm* could be compatible with
 sth like ace-jump-line-mode? The problem then will be to find a good keyword
 also for activating the ace commands.

I think I see what you mean, but `helm` is already good enough in my
opinion.

I have mixed opinion of `ace-jump-mode`: on one hand it's fast, on the
other - it always requires you to focus and read: it can never become
muscle memory.

`helm`, on the other hand, is very nice in this respect: if you want
to go to a heading related to ice cream, you just

1. Press g for go.
2. Type ice.

This will usually give you just one candidate to you can C-m
right away.

If you're an ice enthusiast and there are many
matches (from 2 to 10), use C-n/C-p to select.

If you're obsessed with ice and there are more than 10 matches,
press space to narrow the candidates and type in something else:
ice age will match not only the movie, but Aged rice as well.
This should bring you to less than 10 matches.

This also works nicely with org mode: todo coffee :office will match
a TODO related to coffee with tag :OFFICE:.

 I think this is a good step towards the ultimate keystroke-minimizing
 editing environment... it's just a thousand key-bindings-to-memorize away,
 but I can see it!

Hopefully it's not a thousand.  Actually the whole Knj thing was my
attempt at minimizing the amount that you have to remember. I don't
know much about vim, but I've glimpsed its notion of verb-modifier-object,
at least the modifier-verb part: Kn is the modifier
(keyword-next) and j is the verb (down).  Or 4 is the modifier (4
times) and j is the verb etc.

You don't have to remember each combination together, you just have to
remember the components and combine them as you like. So my suggestion
for you is consider not defining `set-keyword-next` and binding it to
some random free key binding, but using Kn for a while, maybe it'll
grow on you.
I can think of one more use for Kn: Kn+ could add a heading with
keyword NEXT (+ is the verb to add an empty heading).

regards,
Oleh



[O] Finer-grained control of published files

2014-03-09 Thread Brett Viren
Hi,

I'm trying to set up org-publish and am looking for more fine-grained
control over what files get published than what (I think) I can get from
configuring org-publish-project-alist.  I've played with the
publishing-function of org-publish-attachment and :exclude/:include and
:base-extension regexps.

What I'm finding is that I want to control what type of files get
published on almost a per-directory basis and different directories may
have mutually conflicting file patterns to include/exclude.  Creating a
new org-publish-project-alist entry for each is tedious.

What I hope for is something equivalent to git's .gitignore
functionality where I can place, say, .orgignore files full of regexp
patterns anywhere in my org source tree and have org-publish honor them.

Is there anything in this direction?

Thanks,
-Brett.




pgpYXBBGs4DBQ.pgp
Description: PGP signature


[O] Org-Mode setup documentation

2014-03-09 Thread David Masterson
I am not a user of org-mode yet, but it looks very interesting.  I have
been able to get it setup with org-toodledo so that I can pull in my
task list from Toodledo.  I'm working on understanding how to get
org-mode to work with MobileOrg.  There's a lot I'd like to go further
with, but the documentation is slowing me down.  In particular, I have
not found good examples of how to setup org-mode to achieve particular
goals.  For instance, I think I'm finding that not all parts of org-mode
are loaded just by (require 'org) and I'm not sure what else would be
useful to load.

Is there good examples of .emacs setups for org-mode?  If so, where?

-- 
David Masterson




Re: [O] LaTeX export TOC decorations : how to

2014-03-09 Thread FAb

On 03/09/2014 12:51 PM, Nick Dokos wrote:

FAb 0x...@free.fr writes:


On 03/08/2014 04:24 PM, Nick Dokos wrote:
When I use that \hypersetup in #+LATEX_HEADER the job is perfectly done.

But I don't find the org-latex-hyperref-template and if I delcare it
in my .emacs, nothing changes.
Are you sure about this name ?

That's the name in org 8.0 or later. If you are using a 7.x version of
org, many names are indeed different. My advice would be to upgrade to a
more recent org: these name changes are a continuing source of problems,
so the sooner everybody upgrades, the sooner we can put these problems
behind us.

Uh... I'm already in 8.2.5h-elpa...
An update later : 8.2.5h-30-gdd810b-elpa (M-x org-version)
but no trace for org-latex-hyperref-template... Neither C-h v
nor grep -R

I need to investigate further.




Closest variables :
org-export-latex-hyperref-format
org-export-latex-hyperref-options-format
org-latex-with-hyperref

Still there.

FAb



Re: [O] LaTeX export TOC decorations : how to

2014-03-09 Thread Nick Dokos
FAb 0x...@free.fr writes:

 On 03/09/2014 12:51 PM, Nick Dokos wrote:
 FAb 0x...@free.fr writes:

 On 03/08/2014 04:24 PM, Nick Dokos wrote:
 When I use that \hypersetup in #+LATEX_HEADER the job is perfectly done.

 But I don't find the org-latex-hyperref-template and if I delcare it
 in my .emacs, nothing changes.
 Are you sure about this name ?
 That's the name in org 8.0 or later. If you are using a 7.x version of
 org, many names are indeed different. My advice would be to upgrade to a
 more recent org: these name changes are a continuing source of problems,
 so the sooner everybody upgrades, the sooner we can put these problems
 behind us.
 Uh... I'm already in 8.2.5h-elpa...
 An update later : 8.2.5h-30-gdd810b-elpa (M-x org-version)
 but no trace for org-latex-hyperref-template... Neither C-h v
 nor grep -R

 I need to investigate further.


You are probably picking up bits and pieces of the org-mode that came
bundled with your emacs. Look up mixed installation in the ML
archives. Note also that the new latex exporter is in a file called
ox-latex.el. If you are doing something like

(require 'org-latex)
or
(load-library org-latex)

you are loading the old exporter.


 Closest variables :
 org-export-latex-hyperref-format
 org-export-latex-hyperref-options-format
 org-latex-with-hyperref
 Still there.


These are all old exporter names. The new names use
a org-BACKEND prefix (e.g org-latex-xxx, org-html-xxx etc)

-- 
Nick




Re: [O] Org-Mode setup documentation

2014-03-09 Thread Nick Dokos
David Masterson dsmaster...@gmail.com writes:

 I am not a user of org-mode yet, but it looks very interesting.  I have
 been able to get it setup with org-toodledo so that I can pull in my
 task list from Toodledo.  I'm working on understanding how to get
 org-mode to work with MobileOrg.  There's a lot I'd like to go further
 with, but the documentation is slowing me down.  In particular, I have
 not found good examples of how to setup org-mode to achieve particular
 goals.  For instance, I think I'm finding that not all parts of org-mode
 are loaded just by (require 'org) and I'm not sure what else would be
 useful to load.

 Is there good examples of .emacs setups for org-mode?  If so, where?

Bernt Hansen's writeup. I'm not sure if Bernt is still keeping it up to
date (I suspect he is, but I haven't checked recently), but it should
still be very helpful even if not quite up to date:

  http://doc.norang.ca/org-mode.html

Many of use got our start following Bernt.

If that doesn't float your boat, there are many other tutorials here:

  http://orgmode.org/worg/org-tutorials/index.html

Let me also point out something that I sent to the ML a few months ago:

  http://thread.gmane.org/gmane.emacs.orgmode/80330/focus=80340

-- 
Nick




[O] analog of org-element-at-point for objects?

2014-03-09 Thread John Kitchin
Is there an easy way to to get the object at point? I found
org-element-at-point, but what I need is to determine if point is on a link
of a particular type, and links appear to be objects rather than elements.

an alternative solution for me would be how do you move point to the
beginning of a link (if it is on a link)? I found org-next-link and
org-previous-link, but neither of these move you to the beginning of the
current link. Then, I could use org-element-link-parser, but that only
works with point at the beginning of a link.

The reason I was looking into this is here:
http://kitchingroup.cheme.cmu.edu/blog/2014/03/07/Storing-label-links-in-org-mode/

It just seems there must be a better way than I implemented. thanks!


John

---
John Kitchin
Associate Professor
Doherty Hall A207F
Department of Chemical Engineering
Carnegie Mellon University
Pittsburgh, PA 15213
412-268-7803
http://kitchingroup.cheme.cmu.edu


Re: [O] analog of org-element-at-point for objects?

2014-03-09 Thread Daimrod
John Kitchin jkitc...@andrew.cmu.edu writes:
Hi John,

 Is there an easy way to to get the object at point? I found
 org-element-at-point, but what I need is to determine if point is on a
 link of a particular type, and links appear to be objects rather than
 elements.

I think that `org-element-context' is what you're looking for.

 an alternative solution for me would be how do you move point to the
 beginning of a link (if it is on a link)? I found org-next-link and
 org-previous-link, but neither of these move you to the beginning of
 the current link. Then, I could use org-element-link-parser, but that
 only works with point at the beginning of a link.

 The reason I was looking into this is here: 
 http://kitchingroup.cheme.cmu.edu/blog/2014/03/07/Storing-label-links-in-org-mode/

 It just seems there must be a better way than I implemented. thanks!

Best,

-- 
Daimrod/Greg



Re: [O] analog of org-element-at-point for objects?

2014-03-09 Thread John Kitchin
Thanks! That does seem to do what I want.

John

---
John Kitchin
Associate Professor
Doherty Hall A207F
Department of Chemical Engineering
Carnegie Mellon University
Pittsburgh, PA 15213
412-268-7803
http://kitchingroup.cheme.cmu.edu



On Sun, Mar 9, 2014 at 9:26 PM, Daimrod daim...@gmail.com wrote:

 John Kitchin jkitc...@andrew.cmu.edu writes:
 Hi John,

  Is there an easy way to to get the object at point? I found
  org-element-at-point, but what I need is to determine if point is on a
  link of a particular type, and links appear to be objects rather than
  elements.

 I think that `org-element-context' is what you're looking for.

  an alternative solution for me would be how do you move point to the
  beginning of a link (if it is on a link)? I found org-next-link and
  org-previous-link, but neither of these move you to the beginning of
  the current link. Then, I could use org-element-link-parser, but that
  only works with point at the beginning of a link.
 
  The reason I was looking into this is here:
 http://kitchingroup.cheme.cmu.edu/blog/2014/03/07/Storing-label-links-in-org-mode/
 
  It just seems there must be a better way than I implemented. thanks!

 Best,

 --
 Daimrod/Greg




Re: [O] feature request: agenda time stamp manipulation

2014-03-09 Thread Tory S. Anderson
I've written the following code/function which seems to fulfill my needs in the 
agenda to be able to manipulate plain time stamps in the same way we can 
manipulate deadlines and schedules, so that entries added with i can then be 
customized to a particular hour, or be otherwise altered. Hopefully it will be 
of use to others. 

(defun org-agenda-time-stamp (arg optional time)
  Schedule the item at point.
ARG is passed through to `org-time-stamp'.
  (interactive P)
  (org-agenda-check-type t 'agenda 'timeline 'todo 'tags 'search)
  (org-agenda-check-no-diary)
  (let* ((marker (or (org-get-at-bol 'org-marker)
 (org-agenda-error)))
 (buffer (marker-buffer marker))
 (pos (marker-position marker))
 (org-insert-labeled-timestamps-at-point nil)
 ts)
(org-with-remote-undo buffer
  (with-current-buffer buffer
(widen)
(goto-char pos)
(setq ts (org-time-stamp arg)))
  (org-agenda-show-new-time marker ts  Ts))
(message %s ts)))

(org-defkey org-agenda-mode-map \C-c\. 'org-agenda-time-stamp)



Re: [O] [bug] [babel] babel corrupts undo history

2014-03-09 Thread Samuel Wales
as far as i know, my assessment below is correct, but i cannot confirm.

i believe that if undo-related code is ripped out of babel, then undo
will work correctly in the source buffer and in the edit buffer.  i am
not clear on what the purpose of changing undo behavior is?

On 10/28/13, Samuel Wales samolog...@gmail.com wrote:
 Hi Aaron,

 I think, but not sure, that:

   - your original patch had the right idea, and i think it improved
 it, but did not fix it
   - my tiny fix seemed to fix it, but i did not test enough
   - i avoid the bug rather than carrying along my patch or yours
   - my impression is that the bug was due to unnecessary undo fanciness
   - there might have been a patch that made it into the repo?

 Samuel

 On 10/28/13, Aaron Ecay aarone...@gmail.com wrote:
 2013ko urriak 28an, Samuel Wales-ek idatzi zuen:

 Hi Aaron,

 Below?

 If you mean my fix, I don't know why it worked and cannot investigate
 it.

 Samuel

 Argh, I must have mistakenly deleted the quoted text from my reply; I
 did mean the suggestion to comment out the line

 (setq buffer-undo-list ul)

 But since my original patch worked for you (?), all should be fine now.

 --
 Aaron Ecay



 --
 The Kafka Pandemic: http://thekafkapandemic.blogspot.com

 The disease DOES progress.  MANY people have died from it.  ANYBODY can get
 it.

 Denmark: free Karina Hansen NOW.



-- 
The Kafka Pandemic: http://thekafkapandemic.blogspot.com

The disease DOES progress.  MANY people have died from it.  ANYBODY can get it.

Denmark: free Karina Hansen NOW.



[O] Strange newline characters in org-export-as-html

2014-03-09 Thread Grant Rettke
Hi,

Org version 7.9.3f with Emacs version 24. Running org-export-as-html.
Have these options:

#+TITLE: Creation and conservation of computer files (C3F)
#+AUTHOR: Grant Rettke
#+EMAIL: g...@wisdomandwonder.com
#+DESCRIPTION: A literate programming style exposition of my Emacs configuration
#+KEYWORDS: Literate Programming, Reproducible Research, Programming
Language, Lisp, Elisp, IDE, Emacs, Babel, org-mode
#+LANGUAGE: en

Just noticed tonight that in my exported source blocks, mostly
emacs-lisp, wherever there is a newline in the code, I get the
following
sequence exported for example this:

  (setq auto-mode-alist
(append
 '((\\.scm\\' . scheme-mode)

becomes

pre class=src src-emacs-lisp(setq auto-mode-alist#57344;#57345;#57345;
  (append#57344;#57345;#57345;
   '((span style=color: #2aa198;\\.scm\\'/span .
scheme-mode)#57344;#57345;#57345;

which looks like this

Auto Modes 83
(setq auto-mode-alist
  (append
   '((\\.scm\\' . scheme-mode)
 (\\.rkt\\' . scheme-mode)

In a web browser, those block line things are not what I expect.

Thoughts:
1. My org document is using unicode symbols. Perhaps this is a bad thing.
2. I have wrong export as html settings.
3. I'm missing something.

Thoughts?

Regards,

-- 
Grant Rettke | ACM, AMA, COG, IEEE
g...@wisdomandwonder.com | http://www.wisdomandwonder.com/
“Wisdom begins in wonder.” --Socrates
((λ (x) (x x)) (λ (x) (x x)))
“Life has become immeasurably better since I have been forced to stop
taking it seriously.” --Thompson



Re: [O] Strange newline characters in org-export-as-html

2014-03-09 Thread Grant Rettke
This is the simplest example:

#+BEGIN_SRC emacs-lisp
(message Hello, world.)
#+END_SRC

On Sun, Mar 9, 2014 at 11:09 PM, Grant Rettke g...@wisdomandwonder.com wrote:
 Hi,

 Org version 7.9.3f with Emacs version 24. Running org-export-as-html.
 Have these options:

 #+TITLE: Creation and conservation of computer files (C3F)
 #+AUTHOR: Grant Rettke
 #+EMAIL: g...@wisdomandwonder.com
 #+DESCRIPTION: A literate programming style exposition of my Emacs 
 configuration
 #+KEYWORDS: Literate Programming, Reproducible Research, Programming
 Language, Lisp, Elisp, IDE, Emacs, Babel, org-mode
 #+LANGUAGE: en

 Just noticed tonight that in my exported source blocks, mostly
 emacs-lisp, wherever there is a newline in the code, I get the
 following
 sequence exported for example this:

   (setq auto-mode-alist
 (append
  '((\\.scm\\' . scheme-mode)

 becomes

 pre class=src src-emacs-lisp(setq auto-mode-alist#57344;#57345;#57345;
   (append#57344;#57345;#57345;
'((span style=color: #2aa198;\\.scm\\'/span .
 scheme-mode)#57344;#57345;#57345;

 which looks like this

 Auto Modes 83
 (setq auto-mode-alist
   (append
'((\\.scm\\' . scheme-mode)
  (\\.rkt\\' . scheme-mode)

 In a web browser, those block line things are not what I expect.

 Thoughts:
 1. My org document is using unicode symbols. Perhaps this is a bad thing.
 2. I have wrong export as html settings.
 3. I'm missing something.

 Thoughts?

 Regards,

 --
 Grant Rettke | ACM, AMA, COG, IEEE
 g...@wisdomandwonder.com | http://www.wisdomandwonder.com/
 “Wisdom begins in wonder.” --Socrates
 ((λ (x) (x x)) (λ (x) (x x)))
 “Life has become immeasurably better since I have been forced to stop
 taking it seriously.” --Thompson



-- 
Grant Rettke | ACM, AMA, COG, IEEE
g...@wisdomandwonder.com | http://www.wisdomandwonder.com/
“Wisdom begins in wonder.” --Socrates
((λ (x) (x x)) (λ (x) (x x)))
“Life has become immeasurably better since I have been forced to stop
taking it seriously.” --Thompson



[O] Using sideways table with :placement in Org 8.0?

2014-03-09 Thread John Hendy
I was just playing around with the new syntax for accessing
sidewaystable in Org 8.0, but it doesn't seem to be working. The
manual /seems/ pretty straightforward:
- http://orgmode.org/manual/LaTeX-specific-attributes.html

:placement
Float environment for the table. Possible values are sidewaystable,
multicolumn, t and nil. When unspecified, a table with a caption will
have atable environment. Moreover, :placement attribute can specify
the positioning of the float. 

Here's a test document:

* Heading

#+attr_latex: :placement sidewaystable
| *alpha* | *beta* | *gamma* | *delta* |
|-++-+-|
| 100 |200 | 300 | 400 |
| 200 |100 |  17.321 |   133.3 |
| 400 | 50 |   4.162 |44.4 |
| 800 | 25 |   2.040 |14.8 |

Minimal config loaded with `emacs -Q`:

(add-to-list 'load-path ~/.elisp/org.git/lisp/)
(add-to-list 'load-path ~/.elisp/org.git/contrib/lisp/)
(require 'ox-latex)

The resultant table is not inside of \begin/end{sidewaystable}:

\begin{center}
\begin{tabular}{}
\textbf{alpha}  \textbf{beta}  \textbf{gamma}  \textbf{delta}\\
\hline
100  200  300  400\\
200  100  17.321  133.3\\
400  50  4.162  44.4\\
800  25  2.040  14.8\\
\end{tabular}
\end{center}

The heading contains \usepackage{rotating}, but it's not calling for
sidewaystable anyway, so that shouldn't matter.

Thanks for any suggestions.


John



Re: [O] Strange newline characters in org-export-as-html

2014-03-09 Thread Nick Dokos
Grant Rettke g...@wisdomandwonder.com writes:

 This is the simplest example:

 #+BEGIN_SRC emacs-lisp
 (message Hello, world.)
 #+END_SRC


This  gives me:

pre class=src src-emacs-lisp(message span style=color: #ffa07a;Hello, 
world./span)
/pre

so it's probably some setting of yours. Try with emacs -q and a minimal
.emacs file perhaps?

 On Sun, Mar 9, 2014 at 11:09 PM, Grant Rettke g...@wisdomandwonder.com 
 wrote:
 Hi,

 Org version 7.9.3f with Emacs version 24. Running org-export-as-html.
 Have these options:

 #+TITLE: Creation and conservation of computer files (C3F)
 #+AUTHOR: Grant Rettke
 #+EMAIL: g...@wisdomandwonder.com
 #+DESCRIPTION: A literate programming style exposition of my Emacs 
 configuration
 #+KEYWORDS: Literate Programming, Reproducible Research, Programming
 Language, Lisp, Elisp, IDE, Emacs, Babel, org-mode
 #+LANGUAGE: en

 Just noticed tonight that in my exported source blocks, mostly
 emacs-lisp, wherever there is a newline in the code, I get the
 following
 sequence exported for example this:

   (setq auto-mode-alist
 (append
  '((\\.scm\\' . scheme-mode)

 becomes

 pre class=src src-emacs-lisp(setq auto-mode-alist#57344;#57345;#57345;
   (append#57344;#57345;#57345;
'((span style=color: #2aa198;\\.scm\\'/span .
 scheme-mode)#57344;#57345;#57345;

 which looks like this

 Auto Modes 83
 (setq auto-mode-alist
   (append
'((\\.scm\\' . scheme-mode)
  (\\.rkt\\' . scheme-mode)

 In a web browser, those block line things are not what I expect.

 Thoughts:
 1. My org document is using unicode symbols. Perhaps this is a bad thing.
 2. I have wrong export as html settings.
 3. I'm missing something.

 Thoughts?

 Regards,

 --
 Grant Rettke | ACM, AMA, COG, IEEE
 g...@wisdomandwonder.com | http://www.wisdomandwonder.com/
 “Wisdom begins in wonder.” --Socrates
 ((λ (x) (x x)) (λ (x) (x x)))
 “Life has become immeasurably better since I have been forced to stop
 taking it seriously.” --Thompson

-- 
Nick




Re: [O] Using sideways table with :placement in Org 8.0?

2014-03-09 Thread Nick Dokos
John Hendy jw.he...@gmail.com writes:

 I was just playing around with the new syntax for accessing
 sidewaystable in Org 8.0, but it doesn't seem to be working. The
 manual /seems/ pretty straightforward:
 - http://orgmode.org/manual/LaTeX-specific-attributes.html

 :placement
 Float environment for the table. Possible values are sidewaystable,
 multicolumn, t and nil. When unspecified, a table with a caption will
 have atable environment. Moreover, :placement attribute can specify
 the positioning of the float. 


Actually it says:

,
| `:float'
| `:placement'
|  Float environment for the table.  Possible values are
|  `sidewaystable', `multicolumn', `t' and `nil'.  When unspecified,
|  a table with a caption will have a `table' environment.  Moreover,
|  `:placement' attribute can specify the positioning of the float.
`

Try

#+attr_latex: :float sidewaystable

instead. The doc does need clarification.

 Here's a test document:

 * Heading

 #+attr_latex: :placement sidewaystable
 | *alpha* | *beta* | *gamma* | *delta* |
 |-++-+-|
 | 100 |200 | 300 | 400 |
 | 200 |100 |  17.321 |   133.3 |
 | 400 | 50 |   4.162 |44.4 |
 | 800 | 25 |   2.040 |14.8 |

 Minimal config loaded with `emacs -Q`:

 (add-to-list 'load-path ~/.elisp/org.git/lisp/)
 (add-to-list 'load-path ~/.elisp/org.git/contrib/lisp/)
 (require 'ox-latex)

 The resultant table is not inside of \begin/end{sidewaystable}:

 \begin{center}
 \begin{tabular}{}
 \textbf{alpha}  \textbf{beta}  \textbf{gamma}  \textbf{delta}\\
 \hline
 100  200  300  400\\
 200  100  17.321  133.3\\
 400  50  4.162  44.4\\
 800  25  2.040  14.8\\
 \end{tabular}
 \end{center}

 The heading contains \usepackage{rotating}, but it's not calling for
 sidewaystable anyway, so that shouldn't matter.

 Thanks for any suggestions.


 John



-- 
Nick




[O] Bug: Failure to Tangle Source Block without Header [8.2.5h (8.2.5h-30-gdd810b-elpa @ /Users/sean/Dropbox/.emacs.d/elpa/org-20140303/)]

2014-03-09 Thread Sean Allred

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.


With the following file:

#+BEGIN_SRC org
  ,#+BEGIN_SRC sh :tangle test.sh
  ./test
  ,#+END_SRC
  ,* header
#+END_SRC

calling `org-babel-tangle` fails with stack trace:

  string-match(... nil)
  org-store-link(nil)
  org-babel-tangle-single-block(1)
  org-babel-tangle-collect-blocks(nil nil)
  org-babel-tangle(nil)
  call-interactively(org-babel-tangle nil nil)

The problem is fixable by adding a dummy heading that `org-babel-tangle`
can give an ID to.  (Note my `org-id-link-to-org-use-id` is set to `t`.)

I'm unsure on what correct behavior here would be; it seems the variable
must be honored in any case, so perhaps it would be best to give a
better error message along the lines of 'cannot give identification to a
null heading' or somesuch.

All the best,
Sean

Emacs  : GNU Emacs 24.3.1 (x86_64-apple-darwin, NS apple-appkit-1038.36)
 of 2013-03-13 on bob.porkrind.org
Package: Org-mode version 8.2.5h (8.2.5h-30-gdd810b-elpa @ 
/Users/sean/Dropbox/.emacs.d/elpa/org-20140303/)

current state:
==
(setq
 org-export-preprocess-final-hook '((lambda nil (replace-string  --\n  -- 
\n)))
 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-speed-command-hook '(org-speed-command-default-hook 
org-babel-speed-command-hook)
 org-occur-hook '(org-first-headline-recenter)
 org-metaup-hook '(org-babel-load-in-session-maybe)
 org-html-format-drawer-function '(lambda (name contents) contents)
 org-latex-format-inlinetask-function 'ignore
 org-confirm-shell-link-function 'yes-or-no-p
 org-id-link-to-org-use-id t
 org-ascii-format-inlinetask-function 'org-ascii-format-inlinetask-default
 org-latex-format-headline-function 'org-latex-format-headline-default-function
 org-default-notes-file ~/Dropbox/org/notes.org
 org-after-todo-state-change-hook '(org-clock-out-if-current)
 org-latex-format-drawer-function '(lambda (name contents) contents)
 org-from-is-user-regexp \\Sean Allred\\
 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-ascii-format-drawer-function '(lambda (name contents width) contents)
 org-ctrl-c-ctrl-c-hook '(org-babel-hash-at-point 
org-babel-execute-safely-maybe)
 org-directory ~/Dropbox/org
 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-babel-tangle-lang-exts '((perl . pl) (ruby . rb) (python . py)
  (emacs-lisp . el))
 org-confirm-elisp-link-function 'yes-or-no-p
 org-metadown-hook '(org-babel-pop-to-session-maybe)
 org-html-format-headline-function 'ignore
 org-structure-template-alist '((nt
 #+name: ?\n#+begin_src emacs-lisp :tangle 
\\\n\n#+end_src)
(n #+name: ?\n#+begin_src \n\n#+end_src)
(es #+begin_src emacs-lisp\n?\n#+end_src)
(esf #+begin_src emacs-lisp :tangle 
%file\n?\n#+end_src)
(s #+BEGIN_SRC ?\n\n#+END_SRC src 
lang=\?\\n\n/src)
(e #+BEGIN_EXAMPLE\n?\n#+END_EXAMPLE
 example\n?\n/example)
(q #+BEGIN_QUOTE\n?\n#+END_QUOTE 
quote\n?\n/quote)
(v #+BEGIN_VERSE\n?\n#+END_VERSE 
verse\n?\n/verse)
(V #+BEGIN_VERBATIM\n?\n#+END_VERBATIM
 verbatim\n?\n/verbatim)
(c #+BEGIN_CENTER\n?\n#+END_CENTER 
center\n?\n/center)
(l #+BEGIN_LaTeX\n?\n#+END_LaTeX
 literal style=\latex\\n?\n/literal)
(L #+LaTeX:  literal 
style=\latex\?/literal)
(h #+BEGIN_HTML\n?\n#+END_HTML
 literal style=\html\\n?\n/literal)
(H #+HTML:  literal 
style=\html\?/literal)
(a