[O] Calc in src blocks: No org-babel-execute function for calc!

2014-07-03 Thread Julien Cubizolles
How do I enable calc as a valid source block? The following code

#+BEGIN_SRC calc
2 + 3
#+END_SRC

gives the error in the title.

Julien.




Re: [O] MobileOrg

2014-07-03 Thread Aric Gregson
That's what I was looking for. Didn't realize I could do that...

Thanks, Aric

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




[O] Generating indexes

2014-07-03 Thread John Tait
Hi

Is is possible to produce an index using lines beginning with #+INDEX in
usual HTML or PDF export without setting up a publishing project?

Thanks, John


[O] ob-lilypond: referencing named src_block not working

2014-07-03 Thread Thorsten Jolitz

Hi List, 

I try to include a (lilypond) src_block using header-arg :var, but it
does not work:

,
| #+name: common
| #+begin_src lilypond :exports none :file common.eps
|   \version "2.18.2"
|   \paper{
| oddFooterMarkup = \markup {}
|   }
| #+end_src
| 
| #+name: score
| #+begin_src lilypond :var com=common :exports results :file Mixolydian.png 
|   com
| 
|   \relative c' { 
| g a b c d e f g f e d c b a g a b c d e f g f e d c b a g1 
|  }
| #+end_src
`

When exporting this to pdf (C-c C-e l p), the Lilypond Footer is still
printed. 

OTOH when I simply copy&paste the body of src_block common into
scr_block score like this:

,
| #+begin_src lilypond :exports results :file Mixolydian.png 
|   \version "2.18.2"
|   \paper{
| oddFooterMarkup = \markup {}
|   }
|   \relative c' { 
| g a b c d e f g f e d c b a g a b c d e f g f e d c b a g1 
|  }
| #+end_src
`

the output is as expected, i.e. the Lilypond Footer is not printed. 

Am I doing something wrong here?

-- 
cheers,
Thorsten





[O] bug: isearch puts ellipses at top of window

2014-07-03 Thread Samuel Wales
in maint, isearch very often puts ... at the top of the window.  is
this related to recent ellipsis bugs?

thanks.

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] little elisp help?

2014-07-03 Thread tom
Nick, that did the trick. Thanks very much everybody.


On Thu, Jul 3, 2014 at 7:44 AM, Nick Dokos  wrote:

> tom  writes:
>
> > this
> >
> > (setq org-link-abbrev-alist
> > '(("foo" . "file:/path/to/%s.txt")))
> >
> > allow me to do this
> >
> > [[foo:file to open]]
> >
> > but it creates a file with spaces in the name.  so I'd like to replace
> "%s" with "%(myfun)".
> >
> > with your example, how can I get "foo bar  loo" from
> >
> > [[foo:foo bar  loo]]
> >
> > see what I mean?
> >
>
> Using Thorsten's suggestion
>
> --8<---cut here---start->8---
> (setq org-link-abbrev-alist
> '(("foo" . "file:/path/to/%(foobar).txt")))
>
> (defun foobar (x)
>   (replace-regexp-in-string "[[:space:]]" "_" x))
> --8<---cut here---end--->8---
>
> will turn
>
> [[foo:foo bar  loo]]
>
> to
>
> [[file:/path/to/foo_bar__loo.txt]]
>
> when you click on it.
> --
> Nick
>
>
>


Re: [O] unwelcome tmp and ltxpng directories in my home

2014-07-03 Thread Joseph Vidal-Rosset
Thank you Nick for this helpful email.

The good news is that I have succeeded to get the png image in /tmp/ltxpng/
directory.

The bad news is that my gnus persist in saying to me that there is no
/tmp/ltxpng/image.png ...  here is the message :

Loading reftex...done
Loading reftex...done
Creating LaTeX Image...
Failed to create dvi file from /tmp/orgtex6500qb1.tex
Ispell process killed
Starting new Ispell process [aspell::fr] ...
Mark set
Sending...
Mark set [2 times]
mm-insert-file-contents: Opening input file: aucun fichier ou dossier de ce
type, /tmp/ltxpng/latex6500dRv_882193079df36c558aa30f292b503a46cfd2aa88.png
Auto-saving...

I attach the orgtex6500qb1.tex  and orgtex6500qb1.log

Again thanks for this help.

Best regards,

Jo.


2014-07-03 17:55 GMT+02:00 Nick Dokos :

> Joseph Vidal-Rosset  writes:
>
> > Hello,
> >
> > My O.S. is Debian GNU/Linux  testing version.  My desktop is mainly xfce
> (or openbox).
> >
> > In Gnus when I create png image via M-x org-preview-latex-fragment and
> after having M-x org-mime-htmlize  the png image is
> > created in  /home/joseph/ltxpng directory and not in /ltxpng  directory.
> That's why when I try to send my message, I have an
> > error message saying to me that the png image is not in ltxpng
> directory... of course, it is created not in the /tmp/ltxpng   but
> > in /home/joseph/tmp/lxpng 
> >
> > These unwelcome tmp  and ltxpng directories are created automatically in
> my home and I do not know why.
> >
> > I suspect a problem in my setup and not in org-mode, that is why I
> apologize is this email is irrelevant in this list. But maybe
> > some Debian expert will be able to help me.
> >
>
> When you do org-preview-latex-fragment, a ltxpng subdirectory is created
> under the directory that contains the org file. So if you have
> /home/joseph/foo.org and you preview it, you are going to get
> /home/joseph/ltxpng as a subdirectory. That is controlled by the setting
> of org-latex-preview-ltxpng-directory however:
>
> ,
> | org-latex-preview-ltxpng-directory is a variable defined in `org.el'.
> | Its value is "ltxpng/"
> |
> | Documentation:
> | Path to store latex preview images.
> | A relative path here creates many directories relative to the
> | processed org files paths.  An absolute path puts all preview
> | images at the same place.
> `
>
> So you could customize it to store all the png files into /tmp/ltxpng
> e.g.
>
> No idea where the tmp/ directory comes from, but I don't think it's from
> the preview.
>
> Nick
>
>
>
>
>
This is pdfTeX, Version 3.14159265-2.6-1.40.15 (TeX Live 2014/Debian) (preloaded format=latex 2014.7.1)  3 JUL 2014 18:48
entering extended mode
 restricted \write18 enabled.
 %&-line parsing enabled.
**/tmp/orgtex6500qb1.tex
(/tmp/orgtex6500qb1.tex
LaTeX2e <2014/05/01>
Babel <3.9k> and hyphenation patterns for 78 languages loaded.
(/usr/share/texlive/texmf-dist/tex/latex/base/article.cls
Document Class: article 2007/10/19 v1.4h Standard LaTeX document class
(/usr/share/texlive/texmf-dist/tex/latex/base/size10.clo
File: size10.clo 2007/10/19 v1.4h Standard LaTeX file (size option)
)
\c@part=\count79
\c@section=\count80
\c@subsection=\count81
\c@subsubsection=\count82
\c@paragraph=\count83
\c@subparagraph=\count84
\c@figure=\count85
\c@table=\count86
\abovecaptionskip=\skip41
\belowcaptionskip=\skip42
\bibindent=\dimen102
)
(/usr/share/texlive/texmf-dist/tex/latex/graphics/color.sty
Package: color 2014/04/23 v1.1a Standard LaTeX Color (DPC)

(/usr/share/texlive/texmf-dist/tex/latex/latexconfig/color.cfg
File: color.cfg 2007/01/18 v1.5 color configuration of teTeX/TeXLive
)
Package color Info: Driver file: dvips.def on input line 137.

(/usr/share/texlive/texmf-dist/tex/latex/graphics/dvips.def
File: dvips.def 2014/04/23 v3.0j Driver-dependant file (DPC,SPQR)
)
(/usr/share/texlive/texmf-dist/tex/latex/graphics/dvipsnam.def
File: dvipsnam.def 2014/04/23 v3.0j Driver-dependant file (DPC,SPQR)
))
(/usr/share/texlive/texmf-dist/tex/latex/minted/minted.sty
Package: minted 2011/09/17 v1.7 Yet another Pygments shim for LaTeX

(/usr/share/texlive/texmf-dist/tex/latex/graphics/keyval.sty
Package: keyval 2014/05/08 v1.15 key=value parser (DPC)
\KV@toks@=\toks14
)
(/usr/share/texlive/texmf-dist/tex/latex/fancyvrb/fancyvrb.sty
Package: fancyvrb 2008/02/07

Style option: `fancyvrb' v2.7a, with DG/SPQR fixes, and firstline=lastline fix 
<2008/02/07> (tvz)
\FV@CodeLineNo=\count87
\FV@InFile=\read1
\FV@TabBox=\box26
\c@FancyVerbLine=\count88
\FV@StepNumber=\count89
\FV@OutFile=\write3
) (/usr/share/texlive/texmf-dist/tex/latex/xcolor/xcolor.sty
Package: xcolor 2007/01/21 v2.11 LaTeX color extensions (UK)

(/usr/share/texlive/texmf-dist/tex/latex/latexconfig/color.cfg
File: color.cfg 2007/01/18 v1.5 color configuration of teTeX/TeXLive
)
Package xcolor Info: Driver file: dvips.def on input line 225.
LaTeX Info: Redefining \color on input line 702.
Package xcolor Info: Model `cmy' substituted by `cmy0' on input line 1337.
Package xcolor I

Re: [O] Force new page on exporting

2014-07-03 Thread York Zhao
Thought I should post an update to fix a regexp problem, hopfully somebody
else
will find it useful.

(defun yz/org-export-headline-on-new-page (contents backend info)
  "Export headlines with tag `newpage' on new pages."
  (when (org-export-derived-backend-p backend 'latex)
(with-temp-buffer
  (insert contents)
  (goto-char (point-min))
  (let ((case-fold-search t))
(when (re-search-forward
   "^\\(?:sub\\)?section{.*\\(.*{newpage}\\).*$"
   nil 'noerror)
  (replace-match "" nil nil nil 1) ; Delete the "newpage" tag
  (forward-line -1)
  (insert "\\newpage\n")
  (setq contents (buffer-substring (point-min) (point-max

York


Re: [O] Installing from git

2014-07-03 Thread Achim Gratz
Vicente Vera writes:
> - M-x info shows the updated info manual which now resides in
> /usr/local/share/info (I think it replaced the built-in manual?).

That depends on where your system installation put it originally.  But
even if it was originally installed someplace else, it would now find
the version in /usr/local.

> - Org data files now reside in /usr/local/share/emacs/24.4.50/etc/org
> (replacing the built-in files?).

You could have just kept the default, but this is not critical unless
you are planning to use multiple Emacs versions.

> No extra elisp code was needed (adding the cloned repository to
> load-path, etc.).

That's the main point of this install method.  But please do remember to
put a "(require 'org-loaddefs)" at the beginning of your init file.


Regards,
Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

SD adaptations for KORG EX-800 and Poly-800MkII V0.9:
http://Synth.Stromeko.net/Downloads.html#KorgSDada




Re: [O] Installing from git

2014-07-03 Thread Achim Gratz
Jorge A. Alfaro-Murillo writes:
> Why? emacs/lisp points to org-mode/lisp, if I update org it updates in
> its org-mode repo, what can I break?

All the derivative files that were lifted out of this directory into
other places, like cus-load and loaddefs.  Again, Emacs doesn't treat
any of its built-in code like a package, it doesn't expect or support
those being removed or changed.

> Do you mean the files that "make install" creates? Doesn't "make" alone
> create all things necessary for org to work?

A "make install" proper also puts them into place where they are needed.
If you install someplace else you have to adapt your Emacs configuration
to match, but you're using your own Emacs anyway.


Regards,
Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

SD adaptation for Waldorf rackAttack V1.04R1:
http://Synth.Stromeko.net/Downloads.html#WaldorfSDada




Re: [O] unwelcome tmp and ltxpng directories in my home

2014-07-03 Thread Nick Dokos
Joseph Vidal-Rosset  writes:

> Hello,
>
> My O.S. is Debian GNU/Linux  testing version.  My desktop is mainly xfce (or 
> openbox).
>
> In Gnus when I create png image via M-x org-preview-latex-fragment and after 
> having M-x org-mime-htmlize  the png image is
> created in  /home/joseph/ltxpng directory and not in /ltxpng  directory. 
> That's why when I try to send my message, I have an
> error message saying to me that the png image is not in ltxpng directory... 
> of course, it is created not in the /tmp/ltxpng   but
> in /home/joseph/tmp/lxpng 
>
> These unwelcome tmp  and ltxpng directories are created automatically in my 
> home and I do not know why.
>
> I suspect a problem in my setup and not in org-mode, that is why I apologize 
> is this email is irrelevant in this list. But maybe
> some Debian expert will be able to help me.
>

When you do org-preview-latex-fragment, a ltxpng subdirectory is created
under the directory that contains the org file. So if you have
/home/joseph/foo.org and you preview it, you are going to get
/home/joseph/ltxpng as a subdirectory. That is controlled by the setting
of org-latex-preview-ltxpng-directory however:

,
| org-latex-preview-ltxpng-directory is a variable defined in `org.el'.
| Its value is "ltxpng/"
| 
| Documentation:
| Path to store latex preview images.
| A relative path here creates many directories relative to the
| processed org files paths.  An absolute path puts all preview
| images at the same place.
`

So you could customize it to store all the png files into /tmp/ltxpng
e.g.

No idea where the tmp/ directory comes from, but I don't think it's from
the preview.

Nick






Re: [O] still seeing semi-regular lockups

2014-07-03 Thread York Zhao
> I'm now using commit "fdc673d". The problem I experienced 2 days ago happened
> again. The direct operations I did was that I programmatically deleted a few
> table line in one table and inserted them in another table which is in the
> subtree immediately following the current table. But I ended up having more
> lines in the new table, most of them were duplicated. Here is roughly the
> snippet of the command I used:
>
> (defun yhj-drop-something ()
>   (interactive)
>   (save-excursion
> (let* ((beg (line-beginning-position))
>(end (1+ (line-end-position)))
>(line (buffer-substring beg end)))
>   (kill-region beg end)
>   (unless (re-search-forward "^\\*+[ \t]+Newtable[ \t]*$"
>  (save-excursion
>(org-end-of-subtree t)) t)
> (error "Incompatible contents format"))
>   (forward-line 4)
>   (unless (org-at-table-p 'any)
> (error "Incompatible contents format"))
>   (beginning-of-line)
>   (insert line)
>   (org-table-align)
>   (org-table-sort-lines nil ?a

I just noticed these errors in my "*messages*" buffer:

user-error: Not in table data field
2 lines sorted, based on column 1
Starting "egrep" process...
3 lines sorted, based on column 1
4 lines sorted, based on column 1
After 0 kbd macro iterations: let: Wrong type argument: number-or-marker-p, nil
Error in post-command-hook (zfill-post-command-function): (user-error
"An element cannot be parsed line 76823")
Error in pre-command-hook (zfill-pre-command-function): (user-error
"An element cannot be parsed line 76823")
6 lines sorted, based on column 1

I'm not sure if the `(user-error "An element cannot be parsed line 76823")' can
be of any help. Line 76823 was the last line in the table where the table lines
were being moved to (the "Destination Table"). This table looks like thin:

*** Source Table
|-+-+-+-+---|
| COL1| COL2| COL3| COL4|   |
|-+-+-+-+---|
| Content | Content | Content | Content | A |
| Content | Content | Content | Content | A |
| Content | Content | Content | Content | A |
| Content | Content | Content | Content | A |
| Content | Content | Content | Content | A |
| Content | Content | Content | Content | A |
| Content | Content | Content | Content | A |
|-+-+-+-+---|

 Destination Table
|-+-+-+-+---|
| COL1| COL2| COL3| COL4|   |
|-+-+-+-+---|
| Content | Content | Content | Content | A |
| Content | Content | Content | Content | A |
| Content | Content | Content | Content | A |
| Content | Content | Content | Content | A |
| Content | Content | Content | Content | A |
|-+-+-+-+---|



Re: [O] still seeing semi-regular lockups

2014-07-03 Thread York Zhao
> I'm now using commit "126e2bc", this morning I did experience some funny
> things which I had never experienced before. Unfortunately I let them go. I
> will keep an eye on the new problems.

I'm now using commit "fdc673d". The problem I experienced 2 days ago happened
again. The direct operations I did was that I programmatically deleted a few
table line in one table and inserted them in another table which is in the
subtree immediately following the current table. But I ended up having more
lines in the new table, most of them were duplicated. Here is roughly the
snippet of the command I used:

(defun yhj-drop-something ()
  (interactive)
  (save-excursion
(let* ((beg (line-beginning-position))
   (end (1+ (line-end-position)))
   (line (buffer-substring beg end)))
  (kill-region beg end)
  (unless (re-search-forward "^\\*+[ \t]+Newtable[ \t]*$"
 (save-excursion
   (org-end-of-subtree t)) t)
(error "Incompatible contents format"))
  (forward-line 4)
  (unless (org-at-table-p 'any)
(error "Incompatible contents format"))
  (beginning-of-line)
  (insert line)
  (org-table-align)
  (org-table-sort-lines nil ?a

I can't post everything here because the command operates on my personal
contents. I have been using this snippet for years without problem. I executed
this command several times with point moved to different lines in the first
table. Each time this command is executed it is supposed to "move" one table
line to another table.

Hope this will help a bit and I will pay close attention next time to give more
details.



Re: [O] little elisp help?

2014-07-03 Thread Nick Dokos
tom  writes:

> this
>
> (setq org-link-abbrev-alist
> '(("foo" . "file:/path/to/%s.txt")))
>
> allow me to do this
>
> [[foo:file to open]]
>
> but it creates a file with spaces in the name.  so I'd like to replace "%s" 
> with "%(myfun)".
>
> with your example, how can I get "foo bar  loo" from
>
> [[foo:foo bar  loo]]
>
> see what I mean?
>

Using Thorsten's suggestion

--8<---cut here---start->8---
(setq org-link-abbrev-alist
'(("foo" . "file:/path/to/%(foobar).txt")))

(defun foobar (x)
  (replace-regexp-in-string "[[:space:]]" "_" x))
--8<---cut here---end--->8---

will turn

[[foo:foo bar  loo]]

to 

[[file:/path/to/foo_bar__loo.txt]]

when you click on it.
-- 
Nick




Re: [O] Problem with org-mode after upgradiing to org 8

2014-07-03 Thread Roland Everaert
Hi John,

I am using Bernt's configuration (at least a part of it) for years without
problems until I switch to org 8.

I hame commented most of my init.el file and uncomment bits of
configuration lines one at a time. and I have found where is located the
problem. I have know to investigate why it is a problem.

The offending line is (bh/org-agenda-to-appt), this is one of the function
from the configuration of Bernt, so I have now to check my version against
the one on his page to see if he doesn't update it.

And to answer your question, the loaded version of org-mode is "Org-mode
version beta_8.3 (beta_8.3-16-g16c71d6 @
/home/reveatwork/.emacs.d/site-lisp/org-mode/lisp/)"

I will also perform a "make clean > make" of my installation of org-mode
just in case some their is some garbage left from previous version.


Thanks for your help,


Roland.





On Tue, Jul 1, 2014 at 5:55 PM, John Hendy  wrote:

> On Tue, Jul 1, 2014 at 5:04 AM, Roland Everaert 
> wrote:
> > I have upgraded using git on a Linux fedora 20 64 bit.
> >
> > I perform the following commands from the directory of org-mode:
> >
> > make clean
> > git pull
> > make
>
> I usually do git pull > make clean > make, but don't know if that
> makes a difference, so that's probably fine.
>
> > I have also read the following page:
> > http://orgmode.org/worg/org-8.0.html
> >
> > And search for all variables in my configuration that start with
> org-export,
> > but I have none of them.
>
> Well, I'm interested in the original error, "Autoloading failed to
> define function org-element-cache-reset", not anything to do with
> org-export. You should be able to start emacs without any errors, and
> I think that's the primary thing to troubleshoot first.
>
> > My configuration is heavily inspired by this article:
> > http://doc.norang.ca/org-mode.html
>
> Bernt's page is one of the most advanced orgmode setups documented
> that I've ever seen. I wouldn't get too deep into that before figuring
> out what's going on at the basic level.
>
> >
> > I have quickly browsed it in case some specific changes needs to be done,
> > but the only ones concernes the exporters that I have not configured yet.
> >
> > Which lines from the my ~/.emacs.d/init.el, would you like to see?
>
> How are you telling Emacs where Orgmode lives? My suggestion would be
> the following:
>
> Create a minimal .emacs file with just the following (change path to
> wherever your orgmode git repo is):
>
> (add-to-list 'load-path "~/path/to/org.git/lisp/")
>
> From a command line, run:
>
> $ emacs -Q
>
> Then from Emacs, run:
>
> M-x load-file [press enter] /path/to/minimal-config/from/above [press
> enter]
>
> Then run:
>
> M-x org-version
>
> You should get something like this:
>
> Org-mode version 8.2.6 (release_8.2.6-950-ge599e8 @
> /home/jwhendy/.elisp/org.git/lisp/)
>
> If you don't get any errors, close emacs, copy some lines from your
> "real" config into that minimal config, and repeat the process (emacs
> -Q -> M-x load-file...) until you get the error again. Then you'll
> know what's causing it. Doing it this way helps know that you've at
> least got the "right" Org-mode loaded (not the one built in to your
> Emacs), and from there we can track the issue.
>
> Once that's all set, getting exporters going is a pretty simple
> matter. I have this in my .emacs:
>
> (require 'ox-latex)
> (require 'ox-html)
> (require 'ox-beamer)
> (require 'ox-md)
> (require 'ox-odt)
> (require 'ox-taskjuggler)
>
> (add-to-list 'org-latex-classes
>  '("beamer"
>"\\documentclass\[presentation\]\{beamer\}"
>("\\section\{%s\}" . "\\section*\{%s\}")
>("\\subsection\{%s\}" . "\\subsection*\{%s\}")
>("\\subsubsection\{%s\}" . "\\subsubsection*\{%s\}")))
>
> That handles it all for me.
>
> Also, please keep cc'ing the Org list. They know much more than I do,
> and as you provide more information can probably help you better than
> I can as well.
>
>
> Good luck!
> John
>
>
> >
> >
> > Roland.
> >
> >
> >
> >
> >
> >
> > On Mon, Jun 30, 2014 at 1:39 PM, John Hendy  wrote:
> >>
> >>
> >> On Jun 30, 2014 4:48 AM, "Roland Everaert" 
> wrote:
> >> >
> >> > Second part of the message:
> >> >
> >> > Information from M-x org-version:
> >> >
> >> > Org-mode version beta_8.3 (beta_8.3-16-g16c71d6 @
> >> > /home/reveatwork/.emacs.d/site-lisp/org-mode/lisp/)
> >> >
> >> > I have downloaded the last version using git.
> >>
> >> Can you elaborate on your exact procedure for upgrading as well as
> posting
> >> relevant lines from .emacs?
> >>
> >> John
> >>
> >> >
> >> > How can I switch to a stable branch instead of the last beta, to check
> >> > if that solves the problem?
> >> >
> >> >
> >> > Thanks for your help.
> >> >
> >> >
> >> >
> >> > On Mon, Jun 30, 2014 at 11:24 AM, Roland Everaert <
> reveatw...@gmail.com>
> >> > wrote:
> >> >>
> >> >> Hi,
> >> >>
> >> >> I have recently upgraded to org-mode version 8. Each time I start
> emacs
> >> >> I