Re: [O] emails written in Org Mode

2014-07-10 Thread Thorsten Jolitz
Ken Mankoff mank...@gmail.com writes:

Hi Ken,

 orgstruct++-mode and orgtbl-mode help a lot. It would be nice to be able
 to execute code too. 

they are both nice but not the real thing

 I have an email in to the mu4e group about just switching to org-mode
 and then back to message-mode. Since mu4e isn't gnus, and doesn't use
 plain message-mode as the major mode, I need to switch back to the mu4e
 compose mode, but it lists as m4e:compose in the modeline, and that
 isn't a major mode I can figure out how to switch to.

When you start writing an email in mu4e, could you just:

 1. do

 ,
 | M-: major-mode
 `
 
 2. do M-x mark-whole-buffer  M-x kill-ring-save, i.e.
 
 ,
 | C-x h
 | M-w
 `

and post the results?

And maybe figure out if in the mu4e world there exists a customizable
variable like:

,[ C-h v mail-header-separator RET ]
| mail-header-separator is a variable defined in `sendmail.el'.
| Its value is --text follows this line--
| 
| Documentation:
| Line used to separate headers from text in messages being composed.
| You can customize this variable.
`

This would probably give me all the info I need to adapt outorg.

 On 2014-07-09 at 16:03, Nick Dokos wrote:

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

 Can't you just change your buffer mode to org-mode, compose, change back
 to message-mode and send? Did you want to do more than that?


 ... or, depending on what one wants to do, adding one of the minor modes
 (orgstruct-mode, orgstruct++-mode, orgtbl-mode) to message-mode buffers
 may be enough.


-- 
cheers,
Thorsten




Re: [O] emails written in Org Mode

2014-07-10 Thread Ken Mankoff
Hi Thorsten and others,

Thanks to your help I have it set up well. Here is my setup, based on
the idea from John Kitchin to just switch major modes:

1. I've set mu4e so that the reply line starts with * (an Org
   section) like this:

   #+BEGIN_SRC emacs-lisp
   (setq message-citation-line-format * On %Y-%m-%d at %R, %f wrote:)
   #+END_SRC

   Now, the quoted part of the email is its own section.

2. I've added a function to switch between org-mode and
   mu4e-compose-mode, and bound it to C-@, so I can easily swap modes:

   #+BEGIN_SRC emacs-lisp
   (defun kdm-mu4e-org-compose ()
   Switch to/from mu4e-compose-mode and org-mode
   (interactive)
   (if (eq 'mu4e-compose-mode (buffer-local-value 'major-mode (current-buffer)))
   (org-mode)
 (mu4e-compose-mode)))
   (global-set-key \M-@ 'kdm-mu4e-org-compose)
   #+END_SRC

With this, I read emails in mu4e. When I hit reply, I reply
normally. If I want to drop into Org mode for the reply, I do so with
M-@, use Org, and then M-@ back to mu4e before sending.

I've just set this up. We'll see how well it works. mu4e used to
support Org and I'm sure it will in the future, and then things might
be better integrated, but I think this will work for now.

  -k.

* On 2014-07-10 at 04:28, Thorsten Jolitz wrote:
 Ken Mankoff mank...@gmail.com writes:

 Hi Ken,

 orgstruct++-mode and orgtbl-mode help a lot. It would be nice to be able
 to execute code too. 

 they are both nice but not the real thing

 I have an email in to the mu4e group about just switching to org-mode
 and then back to message-mode. Since mu4e isn't gnus, and doesn't use
 plain message-mode as the major mode, I need to switch back to the mu4e
 compose mode, but it lists as m4e:compose in the modeline, and that
 isn't a major mode I can figure out how to switch to.

 When you start writing an email in mu4e, could you just:

  1. do

  ,
  | M-: major-mode
  `
  
  2. do M-x mark-whole-buffer  M-x kill-ring-save, i.e.
  
  ,
  | C-x h
  | M-w
  `

 and post the results?

 And maybe figure out if in the mu4e world there exists a customizable
 variable like:

 ,[ C-h v mail-header-separator RET ]
 | mail-header-separator is a variable defined in `sendmail.el'.
 | Its value is --text follows this line--
 | 
 | Documentation:
 | Line used to separate headers from text in messages being composed.
 | You can customize this variable.
 `

 This would probably give me all the info I need to adapt outorg.

 On 2014-07-09 at 16:03, Nick Dokos wrote:

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

 Can't you just change your buffer mode to org-mode, compose, change back
 to message-mode and send? Did you want to do more than that?


 ... or, depending on what one wants to do, adding one of the minor modes
 (orgstruct-mode, orgstruct++-mode, orgtbl-mode) to message-mode buffers
 may be enough.




Re: [O] emails written in Org Mode

2014-07-10 Thread Thorsten Jolitz
Ken Mankoff mank...@gmail.com writes:

 Hi Thorsten and others,

 Thanks to your help I have it set up well. Here is my setup, based on
 the idea from John Kitchin to just switch major modes:

Just FYI, after having a look at this

,
| http://www.djcbsoftware.nl/code/mu/mu4e/EV-Overview.html
`

I think that mu4e-compose-mode is basically a modified
message-mode. Since I use

,
| (and (derived-mode-p 'message-mode) ...)
`

in outorg to check major-mode, I would guess that outorg works out of
the box with mu4e-compose-mode after adding outline-minor-mode to its
mode-hook:

,
| (when (require 'outline nil t)
| (add-hook 'emacs-lisp-mode-hook 'outline-minor-mode)
| (add-hook 'message-mode-hook 'outline-minor-mode)
| (add-hook 'mu4e-compose-mode-hook 'outline-minor-mode))
| 
| ;; outshine
| (require 'outshine nil t)
| (add-hook 'outline-minor-mode-hook 'outshine-hook-function)
| (setq outshine-use-speed-commands t)
`

I know nothing about mu4e and don't have it installed, so I cannot test
this (will somebody do?), but I'm pretty sure this is enough to make it
work with outorg.

-- 
cheers,
Thorsten




[O] [bug?, org-element] latex-environment delimiters must be at BOL

2014-07-10 Thread Rasmus
Hi,

I couldn't find previous discussions on this.

Looking at org-element-latex-environment-parser LaTeX environments are
recognized as [ \t]*begin{\\([A-Za-z0-9]+\\*?\\)} (for start)
and ^[ \t]*end{%s}[ \t]*$ (for the end).

However, for e.g. small equations one might want to write

(*) \begin{equation} PLACEHOLDER \end{equation},

i.e. in one line.  This fails to be recognized as the latter regexp is
not satisfied.  For code generated by humans this is not an issue.
However, e.g. SymPy generates code in the (*) format.  Prefixing (*)
with #+LATEX: will prevent ox-html from recognizing it.

Should org-element try to catch one-line environments as the one
above?  Or is it a can of worms?

Cheers,
Rasmus

-- 
Don't panic!!!







Re: [O] emails written in Org Mode

2014-07-10 Thread Alan Schmitt
Hello,

On 2014-07-09 09:49, Thorsten Jolitz tjol...@gmail.com writes:

 Yes, I use Gnus and thus write my mails in message-mode. 

 My setup is the standard outshine.el + outorg.el setup, since it works
 out-of-the-box with message-mode, given you follow the installation
 description. 

I've given this a try, and it's not obvious how to make it work. This is
what I did:

- installed outorg through MELPA
- tried on an email, as no outorg function was loaded, I evaluated
 '(require 'outorg')'
- upon calling the 'outorg-edit-as-org' function I got an error about
  a missing outshine variable (something about comments, IIRC)
- I installed outshine, and restarted emacs to make sure the autoloads
  were loaded
- tried again on some email, and still there was no outorg proposed, so
  I required it and outshine as well
- I then got the following error

Debugger entered--Lisp error: (error before first heading)
  signal(error (before first heading))
  error(before first heading)
  outline-back-to-heading(INVISIBLE-OK)
  outorg-copy-and-convert()
  outorg-edit-as-org(nil)

My questions are:
- Is this a bug?
- does outorg require outshine to work? If so, it may be good to mark
the latter as a dependency of the former.
- there is no installation instructions on the package description on
MELPA. Where can I find the installation description referred to
above?

Thanks,

Alan

-- 
OpenPGP Key ID : 040D0A3B4ED2E5C7


pgp3YEfo2Uyvx.pgp
Description: PGP signature


[O] cdlatex and indentation

2014-07-10 Thread Federico Beffa
Hi,

when I insert a LaTeX environment with the cdlatex keybinding C-{, the
environment is not properly indented as the rest of the text and the TAB
key is bound to the cdlatex functions. Is there a way to get it properly
aligned directly, without having to select the region and press TAB?

I would like to achieve a real indentation and not a virtual one as
provided by org-indent-mode. Therefore org-indent-mode is nil and
org-adapt-indent is t (as per the default config).

Thanks,
Fede


[O] latex formula error when nested into a list?

2014-07-10 Thread Luca Ferrari
Hi all,
don't know if this is a normal behavior, but using a latex formula like this:

\begin{equation}
\begin{align}
a \times b = c \times d \\ = f
\end{align}
\end{equation}

into an org list, that is:

- \begin{equation}
\begin{align}
a \times b = c \times d \\ = f
\end{align}
\end{equation}

produces the following latex error:

! Package amsmath Error: Erroneous nesting of equation structures;
(amsmath)trying to recover with `aligned'.

while removing the list bullet makes it working. Am I doing something
wrong? Is it possible to nest formulas into lists?

Luca



Re: [O] emails written in Org Mode

2014-07-10 Thread Joseph Vidal-Rosset
Le mar.  08 juil. 2014  à 08:28:35  , Ken Mankoff  mank...@gmail.com a
envoyé ce message:
 Hi Thorsten,  On a recent thread you wrote: 

 ... *outorg-edit-buffer* (where I write my message-mode email in
 full
 org-mode).

 I already write emails in emacs. I'm interested in being able to compose
 emails using Org Mode. I see you use gnus. I use mu4e[1]. I wonder if
 your setup is gnus-specific or might work with other emacs mail
 clients. Will you provide some information about this?

 Thanks,

  -k.

 [1] http://www.djcbsoftware.nl/code/mu/mu4e.html

Hello Ken,

In my  own little experience of  Gnus, it can be  perfectly synchronized
with gmail client (i.e. gmail in your browser).
But probably the most interesting thing is the use of links with org-mode
(that I  do not use, but  I am interested to  learn it). It is  not gnus
specific  but maybe  gnus offers  more advantages,  I do  not know.  I'm
learning gnus step by step. 

Manual: 

http://orgmode.org/manual/External-links.html

http://orgmode.org/manual/Handling-links.html

org-mode list: 

http://lists.gnu.org/archive/html/emacs-orgmode/2007-05/msg00058.html

http://lists.gnu.org/archive/html/emacs-orgmode/2007-07/msg00258.html

http://comments.gmane.org/gmane.emacs.orgmode/55066

http://blog.schiessle.org/tag/org-mode/

But every help from gnus + org-mode  expert is welcome for a newbie like
me. 

Best wishes,

Jo. 







Re: [O] latex formula error when nested into a list?

2014-07-10 Thread Rasmus
Hi Luca,

Luca Ferrari fluca1...@gmail.com writes:

 Hi all,
 don't know if this is a normal behavior, but using a latex formula like this:

 \begin{equation}
 \begin{align}
 a \times b = c \times d \\ = f
 \end{align}
 \end{equation}

 into an org list, that is:

 - \begin{equation}
 \begin{align}
 a \times b = c \times d \\ = f
 \end{align}
 \end{equation}

 produces the following latex error:

 ! Package amsmath Error: Erroneous nesting of equation structures;
 (amsmath)trying to recover with `aligned'.

 while removing the list bullet makes it working. Am I doing something
 wrong? Is it possible to nest formulas into lists?

Did you see the error message?  

 ! Package amsmath Error: Erroneous nesting of equation structures;
 (amsmath)trying to recover with `aligned'.

You want

\begin{equation}
\begin{aligned}
a \times b = c \times d \\ = f
\end{aligned}
\end{equation}

or

\begin{align}
a \times b = c \times d \\ = f
\end{align}

depending on whether you want the expression to have one number or one
number per line.

You can access the amsmath help file by typing texdoc amsmath or
mthelp amsmath in your terminal with TL or MikTeX.

Hope it helps,
Rasmus

-- 
Dobbelt-A





Re: [O] emails written in Org Mode

2014-07-10 Thread Thorsten Jolitz
Alan Schmitt alan.schm...@polytechnique.org writes:

Hello,

 On 2014-07-09 09:49, Thorsten Jolitz tjol...@gmail.com writes:

 Yes, I use Gnus and thus write my mails in message-mode. 

 My setup is the standard outshine.el + outorg.el setup, since it works
 out-of-the-box with message-mode, given you follow the installation
 description. 

 I've given this a try, and it's not obvious how to make it work. This is
 what I did:

 - installed outorg through MELPA

You *need* outshine too, navi-mode is a nice addition. The 3 libs belong
together somehow, outshine is the core library.

 - tried on an email, as no outorg function was loaded, I evaluated
  '(require 'outorg')'

since navi-mode requires outorg, and outshine has a soft-dependency to
outorg, I don't have that explicitly in my init.el.

 - upon calling the 'outorg-edit-as-org' function I got an error about
   a missing outshine variable (something about comments, IIRC)
 - I installed outshine, and restarted emacs to make sure the autoloads
   were loaded
 - tried again on some email, and still there was no outorg proposed, so
   I required it and outshine as well
 - I then got the following error

 Debugger entered--Lisp error: (error before first heading)
   signal(error (before first heading))
   error(before first heading)
   outline-back-to-heading(INVISIBLE-OK)
   outorg-copy-and-convert()
   outorg-edit-as-org(nil)

 My questions are:
 - Is this a bug?

I hope (and think) not.

Looks like the hooks are not set. Here (again) my configuration from
init.el: 

,
| (add-hook 'emacs-lisp-mode-hook 'outline-minor-mode)
| (add-hook 'message-mode-hook 'outline-minor-mode)
| ;; more hooks for other major-modes ...
|
| ;; outorg ; = required indirectly
| ;; (require 'outorg)
| 
| ;; outshine
| (require 'outshine)
| (add-hook 'outline-minor-mode-hook
|   'outshine-hook-function) ; = important!
| 
| (setq outshine-use-speed-commands t)
| 
| ;; navi-mode   ; = optional
| (require 'navi-mode)
| 
| ;; poporg  ; = optional
| (require 'poporg)
`

You need to set this too in your init.el (*before* outline is loaded):

,
| (defvar outline-minor-mode-prefix \M-#)
`

Restarting Emacs once after installation is a good idea. Then it should
work, let me know if you still have troubles.

 - does outorg require outshine to work? If so, it may be good to mark
 the latter as a dependency of the former.

Yes. 
With mark the latter as a dependency of the former you mean in the
MELPA package description?

 - there is no installation instructions on the package description on
 MELPA. Where can I find the installation description referred to
 above?

,
| https://github.com/tj64/outshine
| https://github.com/tj64/outorg
| https://github.com/tj64/navi
`

or  

,
| http://orgmode.org/worg/org-tutorials/org-outside-org.html
`

but the excerpt above from my init.el should do the job.

-- 
cheers,
Thorsten




[O] Maxima code blocks does not work in windows revisited

2014-07-10 Thread Juan Alvaro Fuentes
Dear all,

It seems that maxima code blocks still does not work in windows as the
following code did not work when I tried to run it:

#+begin_src maxima
 a: 1+1;
 print(a);
#+end_src

This is an old issue already emailed to this emacs org-mode list in an
email dating from june 2011.

The conversation ended up with a final reflection which I copy next:

* Okay, it definitely is a Windows problem. If I run the following command*
* in a cygwin shell, everything works as expected:*

* maxima --very-quiet -r*
* 
'batchload(c:/Users/weiss/AppData/Local/Temp/babel-17716aLH/maxima-17716hCp)$'*
* nil*

* However, it does not work in a Windows shell. But this is no longer an*
* org issue.*

* Bernd*


Trying to find the correct string that makes maxima execute the batch
file in windows I found that this command does work:

maxima --very-quiet -r
batchload(\c:/Users/alvaro/AppData/Local/Temp/babel-7740OHt/maxima-7740OpY.max\)$

maxima --very-quiet -r
batchload(\c:/Users/alvaro/AppData/Local/Temp/babel-7740OHt/maxima-7740OpY.max\)$

2


I tried to make this string when maxima is executed in the shell and
modifying ob-maxima.el found that this seems to work for windows 8,
emacs 24.4 and org 8.2.7b:


 (let* ((cmdline (or (cdr (assoc :cmdline params)) ))
  (in-file (org-babel-temp-file maxima- .max))
(cmd (format %s --very-quiet -r \batchload(\\\%s\\\)$\ %s
 org-babel-maxima-command in-file cmdline)))


The problem is that my lisp skills are not very good, to say the
least, and sending a patch is one more problem so I write this email
if this can help anybody to makemaxima code blocks work in windows.


Thanks,

Juan Alvaro


Re: [O] Mathjax vs. problems with imagemagick

2014-07-10 Thread Joseph Vidal-Rosset
#+OPTIONS: latex:t
#+LATEX_HEADER: \usepackage{bussproofs}

Hello Nick, hello everybody

Before using your  suggestion of debugging, I have made  another test to
convert formulas made with different  latex packages into png images for
a html file. 

At the beginning of my org file: 

#+LATEX_HEADER: \usepackage{fitch}
#+LATEX_HEADER: \usepackage{bussproofs}
#+OPTIONS: tex:imagemagick

All formulas used  with the equation environment have a  nice png image,
and the Fitch proofs also. 
But that is not  the case with proofs in Gentzen  tree style created via
bussproofs.sty : the png images are corrupted. 

That's strange  because it works  well with  LaTeX export and  even with
latex-preview-image   and  org-htmlize.This  image   of  implication
elimination rule in my gnus-message should be nice: 

\begin{prooftree}
\AxiomC{$A \to B$}
\AxiomC{$A$}
\RightLabel{\scriptsize{$\to E$}}
\BinaryInfC{$B$}
\end{prooftree}


I am  afraid to be  not competent enough  to use correctly  the debugger
that  you suggest,  but  it is  probably  again a  problem  my setup  or
something missing in my headers and not a bug somewhere. 

Best wishes,

Jo. 

Le  dim. 06  juil. 2014  à 11:25:30  , Nick  Dokos ndo...@gmail.com  a
envoyé ce message:
 The process by which images are produced (for imagemagick: dvipng
 follows a slightly different path) is to wrap the latex fragment
 into a complete latex file, run pdflatex (or whatever your
 org-latex-pdf-process says) to produce a pdf file and then run
 the imagemagick `convert' program to produce the png.

 I'd suggest that you duplicate this process by hand and see where
 it goes wrong.

 I usually do that by adding a (debug) call into
 org-create-formula-image-with-imagemagick like this:

 (let ((latex-header (org-create-formula--latex-header)))
   (with-temp-file texfile
 (insert latex-header)
 (insert \n\\begin{document}\n
 \\definecolor{fg}{rgb}{ fg }\n
 \\definecolor{bg}{rgb}{ bg }\n
 \n\\pagecolor{bg}\n
 \n{\\color{fg}\n
 string
 \n}\n
 \n\\end{document}\n)))
 (org-latex-compile texfile t)
 (debug)   ADDED THIS
 (if (not (file-exists-p pdffile))
 (progn (message Failed to create pdf file from %s texfile) nil)
   (ignore-errors
 (if (featurep 'xemacs)
 (call-process convert nil nil nil
   -density 96
   -trim
   -antialias
   pdffile
   -quality 100
   ;; -sharpen 0x1.0
   pngfile)
   (call-process convert nil nil nil
 -density dpi
 -trim
 -antialias
 pdffile
 -quality 100
 ;; -sharpen 0x1.0
 pngfile)))


 I then reload the file (M-x load-file RET /path/to/org.el RET) to pick
 up the modified function and proceed normally to export the file. When
 the (debug) is executed, I get a debug buffer and I can examine things
 like `texfile' and `dpi', using the debugger's `e' command. I then copy
 the latex file named by `texfile' to some private directory and run
 pdflatex on it and then (using the dpi value the debugger showed me - in
 my case, it was 120.0), I convert to png using the same command as the
 function does:

 cp /tmp/orgtex3771B9p.tex foo.tex
 pdflatex foo.tex
 convert -density 120.0 -trim -antialias foo.pdf -quality 100 foo.png

 The whole thing is a bit fiddly but not really difficult: it takes more
 time to explain than to do.

 BTW, if you go this way, don't forget to delete the (debug) afterwards.

 HTH.


[O] latex export for 4th-level heading

2014-07-10 Thread Ken Mankoff

When exporting to LaTeX, fourth-level headings become \enumerate. In
LaTeX, the item below \subsubsection is \paragraph, not \enumerate.

Here is what happens:

* Top becomes \section
** Second becomes \subsection
*** Third becomes \subsubsection
 Fourth becomes \enumerate

Is there a way to set Fourth to either \paragraph or just nothing?

 -k.



[O] org-babel

2014-07-10 Thread Federico Beffa
Hi,

is there any plan to make org-babel a minor-mode (similarly to orgtbl)?

Regards,
Fede


Re: [O] latex export for 4th-level heading

2014-07-10 Thread Thomas S. Dye
Aloha Ken,

Ken Mankoff mank...@gmail.com writes:

 When exporting to LaTeX, fourth-level headings become \enumerate. In
 LaTeX, the item below \subsubsection is \paragraph, not \enumerate.

 Here is what happens:

 * Top becomes \section
 ** Second becomes \subsection
 *** Third becomes \subsubsection
  Fourth becomes \enumerate

 Is there a way to set Fourth to either \paragraph or just nothing?

Only the first three outline levels will be used as headings. Deeper
levels will become itemized lists. You can change the location of this
switch globally by setting the variable org-export-headline-levels, or
on a per-file basis with a line

 #+OPTIONS: H:4


hth,
Tom

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



Re: [O] latex export for 4th-level heading

2014-07-10 Thread Ken Mankoff

* On 2014-07-10 at 17:08, Thomas S. Dye wrote:
 Aloha Ken,

 Ken Mankoff mank...@gmail.com writes:

 When exporting to LaTeX, fourth-level headings become \enumerate. In
 LaTeX, the item below \subsubsection is \paragraph, not \enumerate.

 Here is what happens:

 * Top becomes \section
 ** Second becomes \subsection
 *** Third becomes \subsubsection
  Fourth becomes \enumerate

 Is there a way to set Fourth to either \paragraph or just nothing?

 Only the first three outline levels will be used as headings. Deeper
 levels will become itemized lists. You can change the location of this
 switch globally by setting the variable org-export-headline-levels, or
 on a per-file basis with a line

  #+OPTIONS: H:4


Thanks. That makes sense. I thought that was just for controlling the
TOC depth, but it makes sense it controls content headings too.

  -k.



Re: [O] SOLVED: source code block language 'makefile' and listings package

2014-07-10 Thread Thorsten Jolitz
Rainer M Krug rai...@krugs.de writes:

 Now if I just could figure out on how I can simply *add* the makefile to
 the list without defining it completely new..

Maybe

,[ C-h f add-to-list RET ]
| add-to-list is a compiled Lisp function in `subr.el'.
| 
| (add-to-list LIST-VAR ELEMENT optional APPEND COMPARE-FN)
| 
| Add ELEMENT to the value of LIST-VAR if it isn't there yet.
| The test for presence of ELEMENT is done with `equal',
| or with COMPARE-FN if that's non-nil.
| If ELEMENT is added, it is added at the beginning of the list,
| unless the optional argument APPEND is non-nil, in which case
| ELEMENT is added at the end.
| 
| The return value is the new value of LIST-VAR.
| 
| If you want to use `add-to-list' on a variable that is not defined
| until a certain package is loaded, you should put the call to `add-to-list'
| into a hook function that will be run only after loading the package.
| `eval-after-load' provides one way to do this.  In some cases
| other hooks, such as major mode hooks, can do the job.
| 
| [back]
`

?

-- 
cheers,
Thorsten




Re: [O] emails written in Org Mode

2014-07-10 Thread Esben Stien
John Kitchin jkitc...@andrew.cmu.edu writes:

 I played around with using a heading with properties to send an
 email. Basically the heading is the subject, you set some properties
 about TO, CC, etc... and the heading content is the body. You just put
 your cursor in the heading and run M-x email-heading. You can see the
 code here https://github.com/jkitchin/jmax/blob/master/email.el#L31

That's like the coolest thing ever. I need to try that;)

-- 
Esben Stien is b0ef@e s  a 
 http://www. s tn m
  irc://irc.  b  -  i  .   e/%23contact
   sip:b0ef@   e e 
   jid:b0ef@n n



Re: [O] latex export for 4th-level heading

2014-07-10 Thread Thomas S. Dye
Ken Mankoff mank...@gmail.com writes:

 * On 2014-07-10 at 17:08, Thomas S. Dye wrote:
 Aloha Ken,

 Ken Mankoff mank...@gmail.com writes:

 When exporting to LaTeX, fourth-level headings become \enumerate. In
 LaTeX, the item below \subsubsection is \paragraph, not \enumerate.

 Here is what happens:

 * Top becomes \section
 ** Second becomes \subsection
 *** Third becomes \subsubsection
  Fourth becomes \enumerate

 Is there a way to set Fourth to either \paragraph or just nothing?

 Only the first three outline levels will be used as headings. Deeper
 levels will become itemized lists. You can change the location of this
 switch globally by setting the variable org-export-headline-levels, or
 on a per-file basis with a line

  #+OPTIONS: H:4


 Thanks. That makes sense. I thought that was just for controlling the
 TOC depth, but it makes sense it controls content headings too.

The table of contents is normally inserted directly before the first
headline of the file.

 #+OPTIONS: toc:2  (only to two levels in TOC)
 #+OPTIONS: toc:nil(no TOC at all)

hth,
Tom

-- 
T.S. Dye  Colleagues, Archaeologists
735 Bishop St, Suite 315, Honolulu, HI 96813
Tel: 808-529-0866, Fax: 808-529-0884
http://www.tsdye.com



[O] Basic Literate Program

2014-07-10 Thread Jacob Gerlach
Hi List,

I only became aware of literate programming through org and have been
looking for a chance to try it out. I need to write a small command
line utility that parses through a plain text log file and performs
some operations, which I think is a reasonably simple use case for me
to try out this new method.

I have the basics of the program outlined in org mode already, and
envision simply adding SRC blocks to each list item. Tangling the org
file and compiling the result will give me my program.

I have several questions:
- Does this sound like a reasonable use case and approach?
- I am writing this program in C++. I believe that I can interweave
  SRC blocks with different header arguments so that they tangle to my
  .h file and .cpp file as appropriate. Is this correct?
- I may need to share the tangled cpp files with colleagues. Are there
  any ways to control the sequence of code in the resulting files
  other than the sequence of SRC blocks in org mode?
- On a related note, are there any tools to take org content from
  outside the SRC blocks and tangle it into comments in the C++ files?

Thanks,
Jake


[O] Excluding habits from Diary?

2014-07-10 Thread Aric Gregson
Hello,

I have recently found that I can combine my org-mode
calendar/scheduling/todo with the Emacs diary to output to latex via
cal-tex.el. This is fantastic, despite a few nagging issues.

The main improvement for me would be to repress the introduction of
habits into the diary output. I have not been able to accomplish this
thus far, and am unsure of how I might go about trying to do so.

To integrate org-mode with the diary I simply have the following at the
top of my diary:

%%(diary-sunrise-sunset)
%%(diary-lunar-phases)
%%(org-diary)

Thanks in advance, Aric

-- 
~O
/\_,
###-\  |_
(*) / (*)




Re: [O] Basic Literate Program

2014-07-10 Thread Thorsten Jolitz
Jacob Gerlach jacobgerl...@gmail.com writes:

 - On a related note, are there any tools to take org content from
 outside the SRC blocks and tangle it into comments in the C++ files?

When I call M-: (outorg-convert-org-to-outshine) on this Org-mode buffer:

,
| * ORG SCRATCH
| 
| ** A bit C++
| 
| This program displays a string
|and then it exits
| 
| This program justs displays a string and exits, variation 2
| #+begin_src c
| #include iostream
|  
| int main() {
|   std::cout  Hello World!;
|   std::cout  std::endl;
|  
|   return 0;
| }
| #+end_src
| 
| #+results:
| : Hello World!
`

I get

,
| /* * ORG SCRATCH */
| 
| /* ** A bit C++ */
| 
| /* This program displays a string */
| /*and then it exits */
| 
| /* This program justs displays a string and exits, variation 2 */
| #include iostream
|  
| int main() {
|   std::cout  Hello World!;
|   std::cout  std::endl;
|  
|   return 0;
| }
| 
| /* #+results: */
| /* : Hello World! */
`

This uses C, because thats in my org-babel-load-languages, should work
with C++ too. Some modes need a little fix due to inconsistent mode
naming, e.g. ESS[R]:
 
,
| ;; special case R-mode
| (if (eq mode 'ess-mode)
| (funcall 'R-mode)
|   (funcall mode)))
`

maybe C++ needs this kind of special handling too, let me know if it
does not work out-of-the-box.

-- 
cheers,
Thorsten




Re: [O] Basic Literate Program

2014-07-10 Thread Jacob Gerlach
On Thu, Jul 10, 2014 at 6:28 PM, Thorsten Jolitz tjol...@gmail.com wrote:

 When I call M-: (outorg-convert-org-to-outshine) on this Org-mode buffer:

Thanks for this suggestion. It seems outorg/outshine are not distributed
with org and must be added separately? I have to watch the size of bites I
take when experimenting with org, or otherwise I spend all my time
tinkering instead of getting work done. I'm already reaching a bit to try
tangling this project instead of just writing it, so I want to avoid
setting up additional pieces and parts. If I run in to trouble with good
commenting down the road and there are no other suggestions, I will revisit
this.


Re: [O] Basic Literate Program

2014-07-10 Thread Grant Rettke
On Thu, Jul 10, 2014 at 4:31 PM, Jacob Gerlach jacobgerl...@gmail.com wrote:
 - Does this sound like a reasonable use case and approach?

Yes.

 - I am writing this program in C++. I believe that I can interweave
   SRC blocks with different header arguments so that they tangle to my
   .h file and .cpp file as appropriate. Is this correct?

Yes.

 - I may need to share the tangled cpp files with colleagues. Are there
   any ways to control the sequence of code in the resulting files
   other than the sequence of SRC blocks in org mode?

Yes.

 - On a related note, are there any tools to take org content from
   outside the SRC blocks and tangle it into comments in the C++ files?

Yes.



Re: [O] SOLVED: source code block language 'makefile' and listings package

2014-07-10 Thread Nick Dokos
Rainer M Krug rai...@krugs.de writes:

 Much simpler then that: I simply changed the variable
 org-latex-listings-langs to include makefile:

 ,
 | (setq org-latex-listings-langs 
 |   '((emacs-lisp Lisp) 
 | (lisp Lisp) 
... 
 | (sql SQL)
 | (sqlite sql)
 | (makefile make)))
 `

 Works perfectly.

 Now if I just could figure out on how I can simply *add* the makefile to
 the list without defining it completely new..


Two methods:

this one is pretty much generic lisp:

--8---cut here---start-8---
(setq org-latex-listings-langs
  (append org-latex-listings-langs '((makefile make
--8---cut here---end---8---

A slightly simpler, more idiomatic emacs-lisp way:

--8---cut here---start-8---
(add-to-list 'org-latex-listings-langs '(makefile make))
--8---cut here---end---8---

-- 
Nick




Re: [O] An Org centric research lab: Goodbye MS word, excel, and powerpoint

2014-07-10 Thread Grant Rettke
On Wed, Jul 9, 2014 at 5:37 PM, Doyley, Marvin M.
mdoy...@ur.rochester.edu wrote:
 I notice that you prefer to use python rather than matlab. Is there a reason  
 for this ? Matlab is free at my
 institution so cost  is not an issue.

Doing all of your reproducible research with free software will
maximize the number of people who may reproduce your research. MATLAB
is a great, great tool, and not many people purchase it other than
universities or professional engineers, minimize the number of people
to reproduce your research.



Re: [O] Mathjax vs. problems with imagemagick

2014-07-10 Thread Nick Dokos
Joseph Vidal-Rosset joseph.vidal.ros...@gmail.com writes:

 Hello Nick, hello everybody

 Before using your suggestion of debugging, I have made another test to
 convert formulas made with different latex packages into png images for
 a html file.

 At the beginning of my org file:

 All formulas used with the equation environment have a nice png image,
 and the Fitch proofs also.
 But that is not the case with proofs in Gentzen tree style created via
 bussproofs.sty : the png images are corrupted.

 That's strange because it works well with LaTeX export and even with
 latex-preview-image and org-htmlize. This image of implication
 elimination rule in my gnus-message should be nice:


It was far from nice in my case: almost completely unreadable.

Can you please post an example org file and the tex file that's produced
that gives you such bad images?


 I am afraid to be not competent enough to use correctly the debugger
 that you suggest, but it is probably again a problem my setup or
 something missing in my headers and not a bug somewhere.


That was just to get the details of what org does with it, just in case
the parameters had something to do with it. But it seems that the
problem is with bussproofs.sty (maybe?)

Nick




Re: [O] An Org centric research lab: Goodbye MS word, excel, and powerpoint

2014-07-10 Thread Ken Mankoff

* On 2014-07-10 at 20:45, Grant Rettke wrote:
 On Wed, Jul 9, 2014 at 5:37 PM, Doyley, Marvin M.
 mdoy...@ur.rochester.edu wrote:
 I notice that you prefer to use python rather than matlab. Is there a reason 
  for this ? Matlab is free at my
 institution so cost  is not an issue.

It won't be free in the future for the people you are training...

  -k.



Re: [O] ~C-c '~ not code

2014-07-10 Thread Alan Schmitt
On 2014-07-08 11:36, Axel Kielhorn org-m...@axelkielhorn.de writes:

 Hello,

 I'm writing a manual and I found the following problem:

 ~C-c '~ is not recognized as code. The following

You should probably remove the quote from the list of boundary items in
org-emphasis-regexp-components. This is what I have in my init file.

--8---cut here---start-8---
;; needed to be set before loading org

(setq org-emphasis-regexp-components
  '( \t('\{ - \t.,:!?;'\)}\\  \t\n, . 1))
--8---cut here---end---8---

Alan

-- 
OpenPGP Key ID : 040D0A3B4ED2E5C7


pgp9w6i39Jbla.pgp
Description: PGP signature


Re: [O] An Org centric research lab: Goodbye MS word, excel, and powerpoint

2014-07-10 Thread Doyley, Marvin M.
Good point.
Thanks
On Jul 10, 2014, at 8:45 PM, Grant Rettke 
g...@wisdomandwonder.commailto:g...@wisdomandwonder.com wrote:

Doing all of your reproducible research with free software will
maximize the number of people who may reproduce your research. MATLAB
is a great, great tool, and not many people purchase it other than
universities or professional engineers, minimize the number of people
to reproduce your research.



[O] possible correction to manual

2014-07-10 Thread Samuel Wales
[1] If the headline contains a timestamp, it will be removed from the
link and result in a wrong link—you should avoid putting timestamp in
the headline.

i frequently link to headlines with timestamps, and the links work
correctly.  so perhaps this footnote can be removed now.

i find timestamps in headlines to be excellent.  for example, with
sorting, they entirely eliminate the need for date trees in my usage.

samuel

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

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

Denmark: free Karina Hansen NOW.



Re: [O] possible correction to manual

2014-07-10 Thread Samuel Wales
in normal use what i wrote is correct.  however, i found an exception,
and it is is possibly a bug:

;; the fuzzy
;; match is stricter than the exact match so it fails.
;; (setq org-link-search-must-match-exact-headline nil)


On 7/10/14, Samuel Wales samolog...@gmail.com wrote:
 [1] If the headline contains a timestamp, it will be removed from the
 link and result in a wrong link—you should avoid putting timestamp in
 the headline.

 i frequently link to headlines with timestamps, and the links work
 correctly.  so perhaps this footnote can be removed now.

 i find timestamps in headlines to be excellent.  for example, with
 sorting, they entirely eliminate the need for date trees in my usage.

 samuel

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

 The disease DOES progress.  MANY people have died from it.  And
 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.  And
ANYBODY can get it.

Denmark: free Karina Hansen NOW.



Re: [O] An Org centric research lab: Goodbye MS word, excel, and powerpoint

2014-07-10 Thread John Kitchin
Matlab is free for us too, but it does not work in org-babel on
windows. it works ok on linux, but not as well as python. Plus, we use
python for all our research, and most importantly, I like it better ;)

Doyley, Marvin M. mdoy...@ur.rochester.edu writes:

 Thanks John,

 The biggest challenge has been getting my team to use emacs, and
 appreciate its power. A few of the students are now comfortable with
 it, but most are still novices, even the computationally savvy members
 of my team. For now I am forcing everybody to use org as a latex
 replacement no babel or beamer yet. However, In the fall I will
 mandate that all data analysis (matlab babel) should be included with
 all manuscripts. I notice that you prefer to use python rather than
 matlab. Is there a reason for this ? Matlab is free at my institution
 so cost is not an issue.

 I welcome any advise or tips you may have 

 Best Wishes,

 M


 On Jul 9, 2014, at 3:08 PM, John Kitchin jkitc...@andrew.cmu.edu wrote:

 That is great! Congratulations, and thanks for sharing. I have also
 converted my group into an org-centric group.  Did you find many
 challenges in implementing this in your group?
 
 Doyley, Marvin M. mdoy...@ur.rochester.edu writes:
 
 Dear All,
 
 Here is a link to a manuscript my research group produced completely with 
 org
 https://urldefense.proofpoint.com/v1/url?u=http://medicalimaging.spiedigitallibrary.org/issue.aspxk=p4Ly7qpEBiYPBVenR9G2iQ%3D%3D%0Ar=Fwb4ac3v7AhcQoTcqa9wemihF49yp0vUvrJ%2BiX5Re4w%3D%0Am=rV9Ve%2BKzfjY9BDOqxI1YYuowCcKG%2BP5hNOX3zMZtRDA%3D%0As=f6e37fd82613c5c7a791b1df10042b390be86728522e227f9316ec27d12c08c1.
 
 For the last 6 years, I have used org mainly for teaching (beamer),
 productivity, outlining ideas, and note taking. Inspired by John
 Kitchin's 2013 Scipy talk, I tried to encourage members of my research
 group to use Org. Since the gentle approach didn't work, I made it 
 mandatory requirement that all junior members must generate
 manuscripts in org, and now I am seeing the fruits of this decision--- we 
 are now a org-centric  research group :)
 
 I would like to thank  Carsten and all the other contributors for creating 
 such
 an awesome research tool. 
 
 Cheers,
 M
 
 
 -- 
 ---
 John Kitchin
 Professor
 Doherty Hall A207F
 Department of Chemical Engineering
 Carnegie Mellon University
 Pittsburgh, PA 15213
 412-268-7803
 https://urldefense.proofpoint.com/v1/url?u=http://kitchingroup.cheme.cmu.edu/k=p4Ly7qpEBiYPBVenR9G2iQ%3D%3D%0Ar=Fwb4ac3v7AhcQoTcqa9wemihF49yp0vUvrJ%2BiX5Re4w%3D%0Am=rV9Ve%2BKzfjY9BDOqxI1YYuowCcKG%2BP5hNOX3zMZtRDA%3D%0As=c42f68beb01d6c32f1ce25775cb9df73f29f6198e9a3dc71beb1514a293e1533




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