Re: #+BEGIN_SRC sh C-c C-c in Windows

2020-04-23 Thread Robert Klein
Hi,

On Wed, 22 Apr 2020 08:09:39 -0400
Neil Cherry  wrote:

> I've searched for a resolution for this but haven't found one. I want
> to be able to call a different command shell in Windows. What I keep
> seeing is that it can't find /bin/sh
> 
> #+BEGIN_SRC sh :results output
> set
> #+END_SRC
> 
> I would prefer that I can change it to the bash shell in PortableGit.
> Also I have no ability to add packages to the machine (other than
> emacs). I don't have admin on this machine.
> 
> Thanks

use

#begin_src bash ...


Best regards
Robert



Re: Problem

2020-04-04 Thread Robert Klein
Hi,

I use ox-koma-letter, and have nothing concerning koma n
org-latex-classes:

- ensure ox-koma-letter is installed
- to install it, add to your local.mk:
  #+begin_src text
ORG_ADD_CONTRIB = ox-koma-letter
  #+end_src

- (require 'ox-koma-letter) in your .emacs

- export using C-c C-e k p  (for pdf; l for LaTeX)

- #+LaTeX_CLASS: scrlttr2

(two t's, not three)


Best regards
Robert

On Fri, 3 Apr 2020 16:49:15 -0400
Charles Millar  wrote:

> I am attempting to use ox-koma-letter, etc.
> 
> My set up
> 
> GNU Emacs 28.0.50 (build 84, x86_64-pc-linux-gnu, GTK+ Version
> 3.24.14, cairo version 1.16.0) of 2020-04-03
> Org mode version 9.3.6 (release_9.3.6-449-gb99357 @ 
> /usr/local/share/org-mode/lisp/)
> 
> org-latex-classes includes
> 
> "default-koma-letter" "\\documentclass[11pt]{scrlttr2}"
> 
> There are no other entries that include scrlttr2 in org-latex-classes
> 
> I have a barebones header
> 
> #+LATEX_CLASS: scrlttr2 (I also have tried 'default-koma-letter')
> 
> and then entered the Romeo to Juliet letter
> 
> and i receive the following error
> 
> Unknown LaTex class scrlttr2
> 
> I searched the list and one suggested problem does not seem to be 
> applicable - I do not have a mixed org installation.
> 
> Any suggestions.
> 
> Charlie Millar
> 




Re: Step by step tutorial on Worg on how to create a new export backend

2020-02-15 Thread Robert Klein
On Fri, 14 Feb 2020 21:48:02 +0100
Bastien  wrote:

> We have a good reference documentation for creating export backends:
> https://orgmode.org/worg/dev/org-export-reference.html
> 
> But we *badly* need a step by step tutorial on Worg.
> 
> Anyone would like to volunteer for writing such a tutorial?
> 

I actually began writing something about “deriving a export backend”
back in 2013.

Deriving a backend might be an ideal starting point of creating an
export backend; IIRC the main difference is, for a new backend you'll
have to provide /all/ the options whereas in a derived exporter you
could simply provide e.g. another src-block interpretation as
alternative to the html exporter.

Back then for some reason I didn't like punchagan's “org2blog” (which
is not an exporter) and wrote my own ox-blog (derived from ox-html) for
exporting into wordpress (i don't use wordpress anymore, so it's
rotting away on github...).

Best regards
Robert



Re: code.orgmode.org

2020-01-23 Thread Robert Klein
Hi,

Gogs config does the trace automatically due to a configuration
inheritance issue (cf. https://github.com/gogs/gogs/issues/5007).

I added the following lines to the custom/conf/app.ini file and
restarted gogs:


[log.file]
LEVEL = Info


Btw. the trace was afaik on all the time.  Dunno why it started to show
up in the web interface only now.


Best regards
Robert


On Wed, 22 Jan 2020 18:37:38 -0500
Nick Dokos  wrote:

> Somebody seems to be playing with stuff on code.orgmode.org: every
> once in a while when I look at the repo (e.g by visiting
> https://code.orgmode.org/bzg/org-mode), I get a literal HTML page,
> instead of a rendered one. That seems to be caused by some extra text
> at the beginning:
> 
> ,
> | 2020/01/22 23:14:06 [TRACE] Session ID: 6961d7733328363f
> | 2020/01/22 23:14:06 [TRACE] CSRF Token:
> CMr9jiGTHiieFuGUEVds1J-EeOg6MTU3OTcyODI2MzgzMDMwMzA3OA== | HTTP/1.0
> 200 OK | Content-Type: text/html; charset=UTF-8
> | Date: Wed, 22 Jan 2020 23:14:07 GMT
> | 
> | 
> | 
> | ...
> | 
> `
> 
> The TRACE lines seem to indicate that somebody is trying to debug
> something, but it's killing the website. Has anybody seen that? Does
> anybody know what is going on?
> 
> Thanks!




breakage: Using self-defined Macro in macro definition

2020-01-20 Thread Robert Klein


Hi,

when I use a self-defined macro in a macro definition, subsequent
macros in the same macro definition don't get expanded (tested with
org version 9.2.1 and tip of maint):

--- snip example ---
#+Macro: newline (eval "\n")
#+Macro: new $1 {{{newline}}}#+Index: $1 {{{newline}}}

Use the {{{new(format)}}}
command to format a string according to the
/format-string/ argument.
--- snip example ---


the output of which is:

--- snip resulting output ---
Use the format a 
\index{format {{{newline
command to format a string according to the
\emph{format-string} argument.
--- snip resulting output ---


The expected output would be:

--- snip expected output ---
Use the format a 
\index{format} 
command to format a string according to the
\emph{format-string} argument.
--- snip expected output ---


PS: leaving the second {{{newline}}} out is not a solution, as
paragraph reformatting will put the macro in the middle of the line.



The issue doesn't crop up, when using a predefined macro, e.g. ` date'
or `author'.


It also doesn't show up, when the first macro in the macro is e.g. the
predefined macro `date'.  That is the following example 2 works ok:

--- snip example 2 ---
#+Date: <2020-01-20 Mon>
#+Macro: old $1 {{{date}}} {{{newline}}} alpha {{{newline}}} beta

{{{old}}}
--- snip example 2 ---


Thanks for any hints/help.

Best regards
Robert



Re: [O] minimal testing setup for pdf export?

2019-08-27 Thread Robert Klein
On Mon, 26 Aug 2019 21:20:53 -0400
Matt Price  wrote:

> Can someone point me to a minimal setup for testing PDF export with
> "emacs -Q"? I am unable to produce a pdf with default settings and I
> am pretty sure  that the latex is invalid... but I'm having trouble
> testing it since I 9still) know so little about latex.
> 
> Thanks everyone!
> 
> Matt

What is in your *messages* buffer after the export attempt?

Whats the result when you export a blank “empty.org” file to LaTeX (C-c
C-e l l)? I get

--- snip ---
% Created 2019-08-27 Tue 08:10
% Intended LaTeX compiler: pdflatex
\documentclass[11pt]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{graphicx}
\usepackage{grffile}
\usepackage{longtable}
\usepackage{wrapfig}
\usepackage{rotating}
\usepackage[normalem]{ulem}
\usepackage{amsmath}
\usepackage{textcomp}
\usepackage{amssymb}
\usepackage{capt-of}
\usepackage{hyperref}
\author{Robert Klein}
\date{\today}
\title{}
\hypersetup{
 pdfauthor={Robert Klein},
 pdftitle={},
 pdfkeywords={},
 pdfsubject={},
 pdfcreator={Emacs 26.2 (Org mode 9.1.9)}, 
 pdflang={English}}
\begin{document}

\tableofcontents

\end{document}
--- snip ---

Just in case, do you have latex/pdflatex installed and in your path?

Best regards
Robert



Re: [O] org.texi errors when compiling

2019-03-12 Thread Robert Klein
Hi Diego,

On Tue, 12 Mar 2019 06:45:28 +0100
Diego Zamboni  wrote:

> Hi,
> 
> Not sure how long this has been happening, but I just noticed the
> following errors when building org (output from "make"):
> 
> /Library/Developer/CommandLineTools/usr/bin/make -C doc info
> org-version: 9.2.2 (release_9.2.2-287-gb1429c)
> makeinfo --no-split org.texi -o org
> org.texi:6: warning: unrecognized encoding name `UTF-8'.
> org.texi:808: Unknown command `arrow'.
> org.texi:808: Misplaced {.
> org.texi:808: Misplaced }.
> org.texi:808: Unknown command `arrow'.
> org.texi:808: Misplaced {.
> org.texi:808: Misplaced }.
> org.texi:819: Unknown command `arrow'.
> org.texi:819: Misplaced {.
> org.texi:819: Misplaced }.
> org.texi:2595: Unknown command `arrow'.
> org.texi:2595: Misplaced {.
> org.texi:2595: Misplaced }.
> org.texi:2597: Unknown command `arrow'.
> org.texi:2597: Misplaced {.
> org.texi:2597: Misplaced }.
> org.texi:3452: Unknown command `arrow'.
> org.texi:3452: Misplaced {.
> org.texi:3452: Misplaced }.
> org.texi:3452: Unknown command `arrow'.
> org.texi:3452: Misplaced {.
> org.texi:3452: Misplaced }.
> org.texi:19512: Unknown command `arrow'.
> org.texi:19512: Misplaced {.
> org.texi:19512: Misplaced }.
> org.texi:19512: Unknown command `arrow'.
> org.texi:19512: Misplaced {.
> org.texi:19512: Misplaced }.
> makeinfo: Removing output file `org' due to errors; use --force to
> preserve. make[1]: *** [org] Error 1
> make: *** [info] Error 2
> 
> Any ideas?

Try the Gnu version of “makeinfo” (may be available as “gmakeinfo”,
maybe you'll have to install it).

I use “gmakeinfo” with the following lines added to my local.mk

# How to create the info files from the texinfo file
MAKEINFO = gmakeinfo

# How to create the HTML file
TEXI2HTML = gmakeinfo --html --number-sections



Bet regards
Robert




> 
> --Diego




[O] funny remote time/duration values

2019-01-07 Thread Robert Klein
Hi,

when using values (time/duration) from a remote table I sometimes get
funny values:


#+name: teta
| 4:50 |


| 2:25 |
#+TBLFM: @1$1=remote(teta,@1$1)


When I set e.g. 7:50 in “teta” the same value shows up in the second
table (after C-u C-c C-c).

For 1:00 in “teta” I get #ERROR in the second table.  same in all cases
with a 0 in front (04:50, 07:50, 01:00).


Org-version is 9.2

Any ideas?

Thanks and best regards
Robert

-- 
Robert Klein UNIX Operations
Max Planck-Institut für Polymerforschung
Anschrift:  Ackermannweg 10, 55128 Mainz




[O] funny remote time/duration values

2019-01-07 Thread Robert Klein


Hi,

when using values (time/duration) from a remote table I sometimes get
funny values:


#+name: teta
| 4:50 |


| 2:25 |
#+TBLFM: @1$1=remote(teta,@1$1)


When I set e.g. 7:50 in “teta” the same value shows up in the second
table (after C-u C-c C-c).

For 1:00 in “teta” I get #ERROR in the second table.  same in all cases
with a 0 in front (04:50, 07:50, 01:00).


Org-version is 9.2

Any ideas?

Thanks and best regards
Robert



Re: [O] exporting to latex and docx not honouring carriage returns to tabbing

2018-10-09 Thread Robert Klein
On Mon, 08 Oct 2018 16:54:39 +0100
Eric S Fraga  wrote:

> On Monday,  8 Oct 2018 at 10:56, Sharon Kimble wrote:
> > My finished output in the pdf will have every line indented/tabbed
> > to 4 spaces and have a carriage-return at the end of each
> > paragraph, with no spacings in between paragraphs.
> >
> > I can get it how I want in org-mode, but when its exported to latex
> > and converted into a pdf file, the whole section comes out in one
> > block of text!  
> 
> Both LaTeX and org define new paragraphs by a blank line.   Spaces at
> the start of a line only have meaning, in org, if the lines are part
> of a list (and never mean anything in LaTeX).
> 
> I am not sure exactly what you want to achieve so it is difficult to
> suggest anything.  Try separating your paragraphs with empty lines to
> see how much closer this gets you to what you want.
> 

What Eric says.

Then try to add to the org-file a line

#+LaTeX_Header: \parskip=0pt

so the spacing between paragraphs is 0.  Then add

#+LaTeX_Header: \parindent=0pt

so the first line of a paragraph isn't indented.

If you want to get /all/ the text indented by “4 spaces”, put a line

#+LaTeX: \setlength{\leftskip}{2em}

at the top of your document.


If you want only parts indented, put the line before the beginning of
the part to be indented and put this line after it:

#+LaTeX: \setlength{\leftskip}{0em}


Does this help?

Best regards
Robert




Re: [O] PATH question for gnus

2018-10-08 Thread Robert Klein
Hi,

On Mon, 8 Oct 2018 14:15:17 +0200
Joseph Vidal-Rosset  wrote:

> Hello,
> 
> I am a Debian GNU/Linux user, but, contrarily that I did, I have
> recently decided to install texlive via the sources in /usr/local/ .
> I put in my init.el (user.el in scimax) : (setenv "PATH" (concat
> "/usr/local/texlive/2018/bin/x86_64-linux/:" (getenv "PATH")))
> (setenv "PATH" (concat
> "/usr/texbin:/usr/local/bin/:" (getenv "PATH")))
> 
> and the export in LaTeX works.  But in Gnus, org-mime  does not work
> and I cannot create pgn images:  neither latex nor dvipng exist for
> Gnus. It is a problem of PATH configuration that I do not succeed to
> solve.

put something like

PATH=/usr/local/texlive/2018/bin/x86_64-linux:$PATH
MANPATH=/usr/local/texlive/2018/texmf/doc/man:$MANPATH
INFOPATH=/usr/local/texlive/2018/texmf/doc/info:$INFOPATH
export PATH MANPATH INFOPATH

in your .profile/.bashrc, (and .xsessionrc if your're using lightdm for
login)

Best regards
Robert


> 
> Your help is welcome.
> 
> Best wishes,
> 
> Jo.




Re: [O] How to upgrade to make beamer export work

2018-09-24 Thread Robert Klein
Hi,

On Mon, 24 Sep 2018 15:49:28 +0800
jiewuza  wrote:

> I used orgmode to prepare my lecture materials.
> Now I upgrade org to the latest version, and read the [[new
> exporter][https://orgmode.org/worg/exporters/ox-overview.html]].
> 
> It seems the configure is much easier.
> But I cannot get my lectures right after all my efforts.
> 
> So I start all over. I removed all my beamer configure.
> With the [[beamer
> example][https://orgmode.org/manual/A-Beamer-example.html]], I get a
> pdf (see attachment) like a latex article, no beamer frame.
> 
> Is this normal? 
> 


your example does seem to have Beamer frames.

Do you have a complete minimal setup which doesn't work with the new
version (.org-file, .emacs, both only having enough content to show the
issue)?

I your “latest” version the zip files downloaded from the home page, or
maint or master from git?

Best regards
Robert



Re: [O] Expandin Org Babel snippets

2018-09-20 Thread Robert Klein
On Thu, 20 Sep 2018 14:53:56 +0100
Lorenzo Bolla  wrote:

> I upgraded to orgmode TIP (from
> https://code.orgmode.org/bzg/org-mode), and now I am not able to
> expand Babel snippets in org files anymore. E.g. it used to be
> possible to type " and get an expanded
> "#+begin_src ... #+end_src" block. Similarly, with " to get a
> quote block.
> Any ideas how to fix this?
> 
> Thanks!
> Lorenzo
> 
> 
> 
> (org-version t t)
> Org mode version 9.1.14 (release_9.1.14-914-gfa3dab @
> /home/lbolla/src/org-mode/lisp/)
> 
> Emacs version is:
> 
> (version)
> "GNU Emacs 26.1 (build 1, x86_64-unknown-linux-gnu, GTK+ Version
> 2.24.32) of 2018-07-25"
> 

Please see

*** Change in the structure template expansion

in the etc/ORG-NEWS file.

Best regards
Robert



[O] bug#32722: bug#32722: bug#32722: bug#32722: 26.1; Org-publish depend on non-free platform ?

2018-09-20 Thread Robert Klein
Hi,
On Thu, 20 Sep 2018 08:43:19 +0300
Eli Zaretskii  wrote:

> > From: Kaushal Modi 
> > Date: Wed, 19 Sep 2018 17:16:28 -0400
> > Cc: Nicolas Goaziou , Glenn Morris
> > , n...@flqt.fr, Richard Stallman ,
> > 32...@debbugs.gnu.org, Robert Horn , Eli
> > Zaretskii 
> > 
> > I got approval from Hrvoje Nikšić that he was fine with your
> > mirror[0].
> > 
> > So I believe it should be OK reference that mirror repo in
> > ox-html?  
> 
> I think we could do better by using htmlfontify.el.  I asked a few
> questions about that in this discussion, see
> 
>   https://debbugs.gnu.org/cgi/bugreport.cgi?bug=32722#95
> 
> Would the Org developers please reply to those questions?  If indeed
> it is not hard to adapt htmlfontify to be used by Org, then I think
> it's a better solution.

Not an “Org developer” -- I guess mostly Nicolas Goaziou can claim that
title at the moment with two thirds of all commits last year..

As to your questions:

> This should be very easy to fix, by using temporary buffers with a
> copy of the region to produce HTML for.  Right?

plus removing HTML document headers and footers, remove css stuff,
rework this, so we have css to include in the final document...


> > Additionally htmlfontify also requires several external tools
> > (according to the man page) which might not be available on all
> > platform Emacs and org-mode is used on:
> > 
> > - a copy of “find” which provides the “-path” predicate
> > - a copy of “sed”
> > - a copy of the “file” command
> 
> These are only needed if one invokes htmlfontify-copy-and-link-dir to
> produce HTML for files in a directory.  Is that an important use case
> for the issue at hand?  E.g., if you need to produce HTML for a region
> of a buffer, these facilities seem to not be relevant, AFAIU.  Did I
> miss something?

No. At that moment in the discussion it wasn't clear the issue with htmlize 
(and github) has been seen fundamentally different by non-org people as opposed 
to people developing and using org-mode.

> > A switch to htmlfontify might end up in rewriting a good part of
> > htmlfontify or some very ugly hacks.
> 
> I wonder whether we could begin by just supporting the immediate use
> case(s) in point, maybe that is possible without too much rewriting.

See above.

> > If Hrvoje Niksic has or is willing to sign the copyright assignment
> > documents it will be easier to put htmlize.el into Emacs.
> 
> We've been through this several times in the past: it isn't going to
> happen.  I think htmlfontify was added to Emacs for that rteason,
> among others.

Sorry, didn't know there's a history.


Best regards
Robert





[O] bug#32722: bug#32722: bug#32722: bug#32722: 26.1; Org-publish depend on non-free platform ?

2018-09-18 Thread Robert Klein
On Tue, 18 Sep 2018 19:53:14 +0300
Eli Zaretskii  wrote:

> > From: Robert Horn 
> > Cc: Nicolas Goaziou , Eli Zaretskii
> > , kaushal.m...@gmail.com, 32...@debbugs.gnu.org,
> > r...@gnu.org Date: Tue, 18 Sep 2018 12:37:45 -0400
> > 
> > /* from RMS email later in thread
> > To motivate people to do this, I say we shouild not ship another
> > release with that reference to GitHub.  Eli, do you agree?
> > */
> > 
> > This makes it clearly the reference to Github that is the concern.  
> 
> We have quite a few references to GitHub in Emacs, just grep for it.
> 
> 
> 

That's, what the original message on the bug list refers to, however.

I think the original bug report is bogus.  Especially in view of your
statement above.

As already pointed out by Nicolas Goaziou, org-mode also requires other
external stuff (just as htmlfontify does, see my mail and its manual:
https://www.gnu.org/software/emacs/manual/html_mono/htmlfontify.html#Requirements).

The reason, e.g. LaTeX isn't mentioned explicitly in the manual or in
org is that it is a well-known software.  The link is only given as a
friendly hint.  


Also, in regards to the original bug report, while htmlize is _hosted_
on github, which indeed is not free, htmlize itself _is_ free.  Right
at the beginning of htmlize.el it says:

;; This program is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation; either version 2, or (at your option)
;; any later version.

When the original poster doesn't want to use htmlize, he probably
should try to export without fontifying source code (I think there's a
switch, but I'm not sure).


Best regards
Robert








[O] bug#32722: bug#32722: bug#32722: 26.1; Org-publish depend on non-free platform ?

2018-09-18 Thread Robert Klein
On Tue, 18 Sep 2018 14:49:27 +0300
Eli Zaretskii  wrote:

> > From: Nicolas Goaziou 
> > Cc: r...@gnu.org,  kaushal.m...@gmail.com,  n...@flqt.fr,
> > 32...@debbugs.gnu.org Date: Tue, 18 Sep 2018 11:37:15 +0200
> > 
> > This is a genuine question: what /exactly/ do you want Org
> > developers to solve, assuming they can? Also, if they cannot, who
> > is willing to give them a hand?  
> 
> From my POV, the immediate problem is to switch Org-publish from using
> htmlize to htmlfontify.  Can this be done, please?
> 
> 
> 

Not easily, no.  Afaik htmlfontify always creates a complete HTML
document, which htmlize doesn't.  Also, htmlize can format parts of a
buffer. which htmlfontify can't.

Additionally htmlfontify also requires several external tools
(according to the man page) which might not be available on all
platform Emacs and org-mode is used on:

- a copy of “find” which provides the “-path” predicate
- a copy of “sed”
- a copy of the “file” command

A switch to htmlfontify might end up in rewriting a good part of
htmlfontify or some very ugly hacks.


If Hrvoje Niksic has or is willing to sign the copyright assignment
documents it will be easier to put htmlize.el into Emacs.


Best regards
Robert





Re: [O] A strange problem with org-babel and SQLite

2018-09-09 Thread Robert Klein
On Wed, 5 Sep 2018 08:56:02 +0200
Robert Klein  wrote:

> Hi Cecil,
> 
> On Mon, 3 Sep 2018 03:23:17 +0200
> Cecil Westerhof  wrote:
> 
> > It has to do with the data. With the following I can reproduce it:
> > #+BEGIN_SRC sqlite :db ~/testingOrgBabel.sqlite :colnames yes
> > DROP TABLE IF EXISTS quotes
> > ;
> > CREATE TABLE "quotes" (
> > quoteID TEXT   PRIMARY KEY,
> > quote   TEXT NOT NULL  UNIQUE,
> > lastUsedTEXT,
> > totalUsed   INT  DEFAULT 'unused'
> > )
> > ;
> > INSERT INTO quotes
> > (quoteID, quote)
> > VALUES
> > ("1230FCF5-B25D-4087-88A4-41DF3AC353DA", '[
> >   "Limitations live only in our minds.
> > But if we use our imaginations,
> > our possibilities become limitless.
> > 
> > - Jamie Paolinett",
> >   "Hoe gebruik jij je verbeelding om
> > je mogelijkheden te vergroten?"
> > ]'),
> > (2, "Second record.")
> > ;
> > SELECT *
> > FROM   quotes
> > ;
> > #+END_SRC
> > 
> > When I put a JSON field in the quote field the parsing goes wrong.
> > 
> >   
> 
> umm, yes.  Actually what seems to happen is that emacs tries to
> evaluate the JSON part as emacs lisp code, in this case an array.  In
> detail, I think, this happens:
> 
> 
> - org-babel-execute:sqlite (ob-sqlite, line 60)
>   calls (for converting the results)
> 
> - org-babel-sqlite-table-or-scalar (ob-sqlite, line 133),
>   which apparently thinks the result looks like a “trivial table” and
>   calls
> 
> - org-babel-read (ob-core.el, line 2912),
>   which detects the JSON string (begins with a "[ ) as lisp and tries
>   to evaluate the lisp form.  The call to “read” in line 2927 then
>   fails, because there is no closing ]  (only the contents on one cell
>   is sent to org-babel-read; note, there are no multi-line cells in
> org tables).
> 
> 
> Line numbers are from Org release_9.1.14-1-g4931fc.
> 
> 
> 
> 
> That's no solution of course. To resolve this,
> 
> - is there a reason to evaluate table cell contents as lisp code?
> 
> If no,
> 
> - don't use org-babel-read (in org-babel-sqlite-table-or-scalar)
> - or compare “(org-babel-result-cond...)” code with other ob-*.el
>   (ob-sql.el?) and rewrite.
> 
> If yes,
> 
> - is there a way to check if a string is correct lisp code before
>   calling “read”?
> 
> 
> 
> In the “yes” case, there's still the issue of JSON being possibly
> detected as “correct” lisp code (e.g. ["alfa"]).
> 
> 
> In your case, if you haven't invested too much in the dependency on
> JSON, you might want to redesign the database, e.g. 
> 
> 
> CREATE TABLE "quotes" (
> quoteID TEXT   PRIMARY KEY,
> quote_enTEXT NOT NULL  UNIQUE,
>   quote_nlTEXT NOT NULL  UNIQUE,
> lastUsedTEXT,
> totalUsed   INT  DEFAULT 'unused'
> );
> 
> 
> 
> 
> Best regards
> Robert

Hi Cecil,

could you try to put the following code in your .emacs _after_
“org-babel-do-load-languages” for ob-sqlite?

(defun org-babel-read (cell  inhibit-lisp-eval)
  "Convert the string value of CELL to a number if appropriate.
Otherwise if cell looks like lisp (meaning it starts with a
\"(\", \"\\='\", \"\\=`\" or a \"[\") then read it as lisp,
otherwise return it unmodified as a string.  Optional argument
NO-LISP-EVAL inhibits lisp evaluation for situations in which is
it not appropriate."
  (if (and (stringp cell) (not (equal cell "")))
  (or (org-babel-number-p cell)
  (if (and (not inhibit-lisp-eval)
   (or (member (substring cell 0 1) '("(" "'" "`" "["))
   (string= cell "*this*")))
  (eval (read cell))
(if (and (not inhibit-lisp-eval)
 (string= (substring cell 0 1) "\""))
(read cell)
  (progn (set-text-properties 0 (length cell) nil cell)
cell cell))


(This should work for Emacs 25.x)


Best regards
Robert



[O] Fix for ob-sqlite tests

2018-09-09 Thread Robert Klein
Hi,

the tests for sqlite don't work because

1. the executable is sqlite3, not sqlite anymore for current software
(and obsqlite uses “sqlite3”, too)

2. the test doesn't have ob-sqlite loaded.


Please advice, if the “(require 'obsqlite)” is offensive.


Patch is attached.



Best regards
Robert
>From c48a90b94bc7f0a86c7dd3b4747c893e64ec2e31 Mon Sep 17 00:00:00 2001
From: Robert Klein 
Date: Sun, 9 Sep 2018 14:27:20 +0200
Subject: [PATCH] Fix tests for sqlite

- sqlite executable used by ob-sqlite is 'sqlite3'
- require ob-sqlite for test
---
 testing/lisp/test-ob-sqlite.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/testing/lisp/test-ob-sqlite.el b/testing/lisp/test-ob-sqlite.el
index f73251534..0cf68fabc 100644
--- a/testing/lisp/test-ob-sqlite.el
+++ b/testing/lisp/test-ob-sqlite.el
@@ -19,7 +19,8 @@
 ;; along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 ;;; Code:
-(org-test-for-executable "sqlite")
+(org-test-for-executable "sqlite3")
+(require 'ob-sqlite)
 (unless (featurep 'ob-sqlite)
   (signal 'missing-test-dependency "Support for sqlite code blocks"))
 
-- 
2.16.2



Re: [O] code.orgmode.org misbehaving?

2018-09-05 Thread Robert Klein
Hi Adam,

On Sun, 02 Sep 2018 19:19:25 -0500
Adam Porter  wrote:

> Hi,
> 
> Trying to pull with git from the main Org repo, I'm getting errors
> from git:
> 
> fatal: https://code.orgmode.org/bzg/org-mode.git/info/refs not valid:
> is this a git repository?
> 
> Loading https://code.orgmode.org/ in a browser, that page loads fine,
> but loading https://code.orgmode.org/bzg/org-mode does not: the server
> appears to be inserting debug messages before the HTTP headers, which
> causes the browser and git to fail to parse the response.  The raw
> HTTP response begins with:
> 
> 2018/09/03 00:14:32 [TRACE] Session ID: badcd72c524a221e
> 2018/09/03 00:14:32 [TRACE] CSRF Token:
> 6GjMG7eVb5ftPm2fwg0PMuBUY7c6MTUzNTkzMzI5MDc1NTE5OTU0Mg== 2018/09/03
> 00:14:32 [TRACE] Template: repo/home HTTP/1.0 200 OK
> Content-Type: text/html; charset=UTF-8
> Date: Mon, 03 Sep 2018 00:14:32 GMT
> 
> 
> 
> 
> ...


Someone seems to have fixed it (not me).

Best regards
Robert



Re: [O] English and Dutch version of a Graphviz picture

2018-09-05 Thread Robert Klein
Hi Cecil,

On Sun, 2 Sep 2018 15:27:29 +0200
Cecil Westerhof  wrote:

> 2018-09-01 17:04 GMT+02:00 Robert Klein :
> 
> > On Sat, 1 Sep 2018 12:38:54 +0200
> > Cecil Westerhof  wrote:
> >  
> > > I have the following:
> > > #+BEGIN_SRC dot :file Graphviz/habitLoop.png :cmdline -Kfdp -Tpng
> > > digraph habitLoop {
> > > bgcolor = steelblue
> > > edge [penwidth = 4.0 ]
> > > node [fontcolor = white, fontsize = 60, style = filled]
> > >
> > > spur   [pos = "4,4!" color = red]
> > > habit  [pos = "7,1!" color = darkgreen]
> > > reward [pos = "1,1!" color = blue]
> > >
> > > spur:e   -> habit:n
> > > habit:w  -> reward:e
> > > reward:n -> spur:w
> > >
> > > copyright [
> > > pos   = "4,.75!"
> > > color = steelblue,
> > > fontcolor = black,
> > > fontsize  = 14,
> > > label = "© Cecil
> > > Westerhof\ntimemanagem...@decebal.nl", shape = plaintext
> > >   ]
> > >
> > > spur   [label = "Spur"]
> > > habit  [label = "Habit"]
> > > reward [label = "Reward"]
> > > }
> > > #+END_SRC
> > >
> > > But I also want to have a Dutch version. So I also have:
> > > #+BEGIN_SRC dot :file Graphviz/gewoonteLoop.png :cmdline -Kfdp
> > > -Tpng digraph habitLoop {
> > > bgcolor = steelblue
> > > edge [penwidth = 4.0 ]
> > > node [fontcolor = white, fontsize = 60, style = filled]
> > >
> > > spur   [pos = "4,4!" color = red]
> > > habit  [pos = "7,1!" color = darkgreen]
> > > reward [pos = "1,1!" color = blue]
> > >
> > > spur:e   -> habit:n
> > > habit:w  -> reward:e
> > > reward:n -> spur:w
> > >
> > > copyright [
> > > pos   = "4,.75!"
> > > color = steelblue,
> > > fontcolor = black,
> > > fontsize  = 14,
> > > label = "© Cecil
> > > Westerhof\ntimemanagem...@decebal.nl", shape = plaintext
> > >   ]
> > >
> > > spur   [label = "Prikkel"]
> > > habit  [label = "Gewoonte"]
> > > reward [label = "Beloning"]
> > > }
> > > #+END_SRC
> > >
> > > The only difference are the three label statements. Can this be
> > > done more efficient? Because now I need to do updates at two
> > > places. That is an accident waiting to happen.
> > >  
> >
> >
> > There's a complicated solution (like, using variables from tables)
> > at
> > https://orgmode.org/worg/org-contrib/babel/languages/ob-doc-dot.html
> >
> > In your case you might want to use noweb (see
> > https://orgmode.org/org.html#Noweb-reference-syntax).  Then your
> > code might look like this:
> >
> > #+Name: habitloop-main
> > #+BEGIN_SRC dot
> > bgcolor = steelblue
> > edge [penwidth = 4.0 ]
> > node [fontcolor = white, fontsize = 60, style = filled]
> >
> > spur   [pos = "4,4!" color = red]
> > habit  [pos = "7,1!" color = darkgreen]
> > reward [pos = "1,1!" color = blue]
> >
> > spur:e   -> habit:n
> > habit:w  -> reward:e
> > reward:n -> spur:w
> >
> > copyright [
> > pos   = "4,.75!"
> > color = steelblue,
> > fontcolor = black,
> > fontsize  = 14,
> > label = "© Cecil
> > Westerhof\ntimemanagem...@decebal.nl",
> > shape = plaintext
> >   ]
> > #+END_SRC
> >
> >
> > #+BEGIN_SRC dot :file gewoonteLoop.png :cmdline -Kfdp -Tpng :noweb
> > yes digraph habitLoop {
> > <>
> > spur   [label = "Prikkel"]
> > habit  [label = "Gewoonte"]
> > reward [label = "Beloning"]
> > }
> > #+END_SRC
> >
> > #+RESULTS:
> > [[file:gewoonteLoop.png]]
> >
> > #+BEGIN_SRC dot :file habitLoop.png :cmdline -Kfdp -Tpng :noweb yes
> > digraph habitLoop {
> > <>
> > spur   [label = "Spur"]
> > habit  [label = "Habit"]
> > reward [label = "Reward"]
> > }
> > #+END_SRC
> >  
> 
> I tried this, but I did not get it to work. Maybe something in my
> configuration is wrecking havoc on me. I have to play with it a bit
> more I am afraid.

Did you C-c C-c on the two smaller snippets (not on the main-loop part)?


Best regards
Robert



> 
> > Note, for better looks I put the whole surrounding block in the
> > language-specific parts (the “digraph”-line could be in the
> > “habitloop-main” block, too).
> >
> >
> > When your code gets more involved this can get ugly, fast.  Then
> > you'll probably have to go the elisp way.
> >  
> 
> For the moment I do not think it will get more involved very soon,
> but you never know. Maybe the elisp route is not a bad idea.
> 




Re: [O] A strange problem with org-babel and SQLite

2018-09-05 Thread Robert Klein
Hi Cecil,

On Mon, 3 Sep 2018 03:23:17 +0200
Cecil Westerhof  wrote:

> It has to do with the data. With the following I can reproduce it:
> #+BEGIN_SRC sqlite :db ~/testingOrgBabel.sqlite :colnames yes
> DROP TABLE IF EXISTS quotes
> ;
> CREATE TABLE "quotes" (
> quoteID TEXT   PRIMARY KEY,
> quote   TEXT NOT NULL  UNIQUE,
> lastUsedTEXT,
> totalUsed   INT  DEFAULT 'unused'
> )
> ;
> INSERT INTO quotes
> (quoteID, quote)
> VALUES
> ("1230FCF5-B25D-4087-88A4-41DF3AC353DA", '[
>   "Limitations live only in our minds.
> But if we use our imaginations,
> our possibilities become limitless.
> 
> - Jamie Paolinett",
>   "Hoe gebruik jij je verbeelding om
> je mogelijkheden te vergroten?"
> ]'),
> (2, "Second record.")
> ;
> SELECT *
> FROM   quotes
> ;
> #+END_SRC
> 
> When I put a JSON field in the quote field the parsing goes wrong.
> 
> 

umm, yes.  Actually what seems to happen is that emacs tries to
evaluate the JSON part as emacs lisp code, in this case an array.  In
detail, I think, this happens:


- org-babel-execute:sqlite (ob-sqlite, line 60)
  calls (for converting the results)

- org-babel-sqlite-table-or-scalar (ob-sqlite, line 133),
  which apparently thinks the result looks like a “trivial table” and
  calls

- org-babel-read (ob-core.el, line 2912),
  which detects the JSON string (begins with a "[ ) as lisp and tries
  to evaluate the lisp form.  The call to “read” in line 2927 then
  fails, because there is no closing ]  (only the contents on one cell
  is sent to org-babel-read; note, there are no multi-line cells in org
  tables).


Line numbers are from Org release_9.1.14-1-g4931fc.




That's no solution of course. To resolve this,

- is there a reason to evaluate table cell contents as lisp code?

If no,

- don't use org-babel-read (in org-babel-sqlite-table-or-scalar)
- or compare “(org-babel-result-cond...)” code with other ob-*.el
  (ob-sql.el?) and rewrite.

If yes,

- is there a way to check if a string is correct lisp code before
  calling “read”?



In the “yes” case, there's still the issue of JSON being possibly
detected as “correct” lisp code (e.g. ["alfa"]).


In your case, if you haven't invested too much in the dependency on
JSON, you might want to redesign the database, e.g. 


CREATE TABLE "quotes" (
quoteID TEXT   PRIMARY KEY,
quote_enTEXT NOT NULL  UNIQUE,
quote_nlTEXT NOT NULL  UNIQUE,
lastUsed    TEXT,
    totalUsed   INT  DEFAULT 'unused'
);




Best regards
Robert






> 2018-09-03 3:09 GMT+02:00 Cecil Westerhof :
> 
> > 2018-09-01 14:24 GMT+02:00 Robert Klein :
> >  
> >> Hi Cecil,
> >>
> >> On Sat, 1 Sep 2018 11:12:57 +0200
> >> Cecil Westerhof  wrote:
> >>  
> >> > 2018-08-31 13:22 GMT+02:00 Robert Klein :
> >> >  
> >> > > On Fri, 31 Aug 2018 12:24:33 +0200
> >> > > Cecil Westerhof  wrote:
> >> > >  
> >> > > > 2018-08-31 11:17 GMT+02:00 Robert Klein :
> >> > > >  
> >> > > > > Hi Cecil,
> >> > > > >
> >> > > > > On Fri, 31 Aug 2018 10:47:50 +0200
> >> > > > > Cecil Westerhof  wrote:
> >> > > > >  
> >> > > > > > I have a strange problem with org-babel and SQLite.
> >> > > > > >
> >> > > > > > I have a database that is created with:
> >> > > > > > CREATE TABLE "quotes" (
> >> > > > > > quoteID TEXT   PRIMARY KEY,
> >> > > > > > quote   TEXT NOT NULL  UNIQUE,
> >> > > > > > lastUsedTEXT,
> >> > > > > > totalUsed   INT  DEFAULT 'unused'
> >> > > > > > )
> >> > > > > >
> >> > > > > > When using:
> >> > > > > > #+BEGIN_SRC sqlite :db
> >> > > > > > ~/Twitter/twitter.sqlite :colnames yes SELECT   lastUsed
> >> > > > > > ,totalUsed
> >> > > > > > FROM quotes
> >> > > > > > ORDER BY lastused  ASC
> >> > > > > > ,totalUsed DESC
> >> > > > > > LIMIT40
> >> > > > > > #+END_SRC
> >> > > > > >
> >> > > > > > Everything is fine. But when I use (add the quote field
> >&g

Re: [O] newbie which LaTeX for PDF publish

2018-09-02 Thread Robert Klein
Hi Adam,

On Mon, 03 Sep 2018 09:32:14 +1200
adam  wrote:

> On Sun, 2018-09-02 at 11:04 +0100, Eric S Fraga wrote:
> > On Saturday,  1 Sep 2018 at 22:12, adam wrote:  
> > > 
> > > Am on Ubuntu 16.04, org-version is 8.2.10 
> > > 
> > > Export to PDF C-c C-e l o  is working. 
> > > However I wish finer grain LaTeX control. 
> > > 
> > > 
> > > For Export to PDF to work, I needed  pdftex    
> > But org exports to LaTeX, not TeX.  I.e. it exports to TeX with the
> > assumption that the LaTeX macros are all available.
> > 
> > Am I missing something?
> > 
> > What finer grain control would you like that you cannot achieve
> > using org directions such as #+latex: and #+begin_export latex?
> >   
> 
> I require management of TeX (TeX Live) for export to PDF (LaTeX). 
> 
> The Tex Live manager (tlmgr) displays available fonts, loads and
> removes fonts and other packages. 
> https://www.tug.org/texlive/doc/tlmgr.html 
> 
> 
> Sure, pdftex (from texlive-latex-extra) enables org-mode export to
> PDF, however the fonts available are opaque within the TexLive
> environment without tlmgr. Navigation of TexLive customizations, set
> with install-tl are opaque without tlmgr.  
> 
> 
> packages for Ubuntu 16.04 LTS can be seen here, 
> https://packages.ubuntu.com/search?keywords=texlive 
> 
> using the TexLive installer  install-tl  can be seen here, 
> https://tex.stackexchange.com/questions/1092/how-to-install-vanilla-texlive-on-debian-or-u
> buntu 
> 
> 
> In other words, org-mode export to PDF assumes a pdftex, and the
> tex/texlive/LaTex environment is up to the user to simply provide a
> pdftex. 
> 

I don't get the “require management” part of this.  Ubuntu has about
100 texlive packages, the texlive distribution offers about 47.  The
SUSE guys went overboard and had (still have?) about 3500 packages ---
a former 2-hour installation with about 3-5 “texlive” packages (fully
automated) took 4.5 plus then...

Why don't you just install Ubuntu's texlive-full and be done with it?

Best regards
Robert





Re: [O] org-latex-export: Name sections by CUSTOM_ID (rather than %s)?

2018-09-02 Thread Robert Klein
Hi,

On Sat, 1 Sep 2018 21:30:19 -0500
Florian Hollerweger  wrote:

> Hi everyone,
> 
> When exporting an .org file to LaTeX, is it possible to name the
> sections in the exported .tex file *not* according to the
> corresponding headlines in the .org file, but instead according to
> the respective sections' CUSTOM_ID ?
> 
> For example, there might be an equivalent to the %s operator (which
> is replaced by the headline string; see
> https://orgmode.org/worg/org-tutorials/org-latex-export.html), only
> for the section's CUSTOM_ID?
> 
> To clarify, I'd like the .org code
> 
> * My section
> :PROPERTIES:
> :CUSTOM_ID: foo
> :END:
> 
> to result in the following .tex code when exported via C-c C-e C-b l
> L:
> 
> \section{foo}
> \label{sec:orga20100d}
> 
> and *not* in the following (which is the default behavior):
> 
> \section{My section}
> \label{sec:orga20100d}
> 
> For the record, I have also posted this question to StackExchange
> (https://emacs.stackexchange.com/questions/44497) and would be more
> than happy to provide credit for an answer there.
> 
> Best wishes,
> Florian
> 


You could write a derived exporter (from ox-latex) and replace
the org-latex-headline function.



Otherwise, mechanically replace headlines with their custom-ids before
exporting...


BTW, the “%s” is not an operator, but a format specifier Emacs uses for
strings.  See “man 3 printf” under “Conversion Specifier” on Linux.


Best regards
Robert




Re: [O] English and Dutch version of a Graphviz picture

2018-09-01 Thread Robert Klein
Hi Cecil,

On Sat, 1 Sep 2018 12:38:54 +0200
Cecil Westerhof  wrote:

> I have the following:
> #+BEGIN_SRC dot :file Graphviz/habitLoop.png :cmdline -Kfdp -Tpng
> digraph habitLoop {
> bgcolor = steelblue
> edge [penwidth = 4.0 ]
> node [fontcolor = white, fontsize = 60, style = filled]
> 
> spur   [pos = "4,4!" color = red]
> habit  [pos = "7,1!" color = darkgreen]
> reward [pos = "1,1!" color = blue]
> 
> spur:e   -> habit:n
> habit:w  -> reward:e
> reward:n -> spur:w
> 
> copyright [
> pos   = "4,.75!"
> color = steelblue,
> fontcolor = black,
> fontsize  = 14,
> label = "© Cecil
> Westerhof\ntimemanagem...@decebal.nl", shape = plaintext
>   ]
> 
> spur   [label = "Spur"]
> habit  [label = "Habit"]
> reward [label = "Reward"]
> }
> #+END_SRC
> 
> But I also want to have a Dutch version. So I also have:
> #+BEGIN_SRC dot :file Graphviz/gewoonteLoop.png :cmdline -Kfdp -Tpng
> digraph habitLoop {
> bgcolor = steelblue
> edge [penwidth = 4.0 ]
> node [fontcolor = white, fontsize = 60, style = filled]
> 
> spur   [pos = "4,4!" color = red]
> habit  [pos = "7,1!" color = darkgreen]
> reward [pos = "1,1!" color = blue]
> 
> spur:e   -> habit:n
> habit:w  -> reward:e
> reward:n -> spur:w
> 
> copyright [
> pos   = "4,.75!"
> color = steelblue,
> fontcolor = black,
> fontsize  = 14,
> label = "© Cecil
> Westerhof\ntimemanagem...@decebal.nl", shape = plaintext
>   ]
> 
> spur   [label = "Prikkel"]
> habit  [label = "Gewoonte"]
> reward [label = "Beloning"]
> }
> #+END_SRC
> 
> The only difference are the three label statements. Can this be done
> more efficient? Because now I need to do updates at two places. That
> is an accident waiting to happen.
> 


There's a complicated solution (like, using variables from tables) at
https://orgmode.org/worg/org-contrib/babel/languages/ob-doc-dot.html

In your case you might want to use noweb (see
https://orgmode.org/org.html#Noweb-reference-syntax).  Then your code
might look like this:

#+Name: habitloop-main
#+BEGIN_SRC dot
bgcolor = steelblue
edge [penwidth = 4.0 ]
node [fontcolor = white, fontsize = 60, style = filled]

spur   [pos = "4,4!" color = red]
habit  [pos = "7,1!" color = darkgreen]
reward [pos = "1,1!" color = blue]

spur:e   -> habit:n
habit:w  -> reward:e
reward:n -> spur:w

copyright [
pos   = "4,.75!"
color = steelblue,
fontcolor = black,
fontsize  = 14,
label = "© Cecil
Westerhof\ntimemanagem...@decebal.nl",
shape = plaintext
  ]
#+END_SRC


#+BEGIN_SRC dot :file gewoonteLoop.png :cmdline -Kfdp -Tpng :noweb yes
digraph habitLoop {
<>
spur   [label = "Prikkel"]
habit  [label = "Gewoonte"]
reward [label = "Beloning"]
}
#+END_SRC

#+RESULTS:
[[file:gewoonteLoop.png]]

#+BEGIN_SRC dot :file habitLoop.png :cmdline -Kfdp -Tpng :noweb yes
digraph habitLoop {
<>
spur   [label = "Spur"]
habit  [label = "Habit"]
reward [label = "Reward"]
}
#+END_SRC


Note, for better looks I put the whole surrounding block in the
language-specific parts (the “digraph”-line could be in the
“habitloop-main” block, too).


When your code gets more involved this can get ugly, fast.  Then you'll
probably have to go the elisp way.

Best regards
Robert








Re: [O] newbie which LaTeX for PDF publish

2018-09-01 Thread Robert Klein
Hi,

On Sat, 01 Sep 2018 22:12:39 +1200
adam  wrote:

> Am on Ubuntu 16.04, org-version is 8.2.10 
> 
> Export to PDF C-c C-e l o  is working. 
> However I wish finer grain LaTeX control. 
> 
> 
> For Export to PDF to work, I needed  pdftex  
> 
> So I followed one suggestion and installed    
> sudo apt-get install texlive-latex-extra 
> 
> However Tex's tlmgr reports errors and doesn't work. Tex users
> suggest a version incompatibility between that tlmgr and this Tex
> package. 
> 
> Any suggestions are welcome. 
> 
> Perhaps I should un-install texlive-latex-extra  and install a more
> fully blown LaTex package. In which case, which one?

I typically install texlive-full (Debian 9), but don't use tlmgr on it.

If you want newer packages best download and install it from
texlive.net to a separate location (e.g. /opt/texlive/$YEAR).

Are you sure you don't have pdftex installed already?

Is your Ubuntu an “update” installation that may have gone wrong?  Or
does Ubuntu offer several tex/latex distributions?  I think most people
nowadays use the texlive distribution.

Best regards
Robert




Re: [O] A strange problem with org-babel and SQLite

2018-09-01 Thread Robert Klein
Hi Cecil,

On Sat, 1 Sep 2018 11:12:57 +0200
Cecil Westerhof  wrote:

> 2018-08-31 13:22 GMT+02:00 Robert Klein :
> 
> > On Fri, 31 Aug 2018 12:24:33 +0200
> > Cecil Westerhof  wrote:
> >  
> > > 2018-08-31 11:17 GMT+02:00 Robert Klein :
> > >  
> > > > Hi Cecil,
> > > >
> > > > On Fri, 31 Aug 2018 10:47:50 +0200
> > > > Cecil Westerhof  wrote:
> > > >  
> > > > > I have a strange problem with org-babel and SQLite.
> > > > >
> > > > > I have a database that is created with:
> > > > > CREATE TABLE "quotes" (
> > > > > quoteID TEXT   PRIMARY KEY,
> > > > > quote   TEXT NOT NULL  UNIQUE,
> > > > > lastUsedTEXT,
> > > > > totalUsed   INT  DEFAULT 'unused'
> > > > > )
> > > > >
> > > > > When using:
> > > > > #+BEGIN_SRC sqlite :db ~/Twitter/twitter.sqlite :colnames
> > > > > yes SELECT   lastUsed
> > > > > ,totalUsed
> > > > > FROM quotes
> > > > > ORDER BY lastused  ASC
> > > > > ,totalUsed DESC
> > > > > LIMIT40
> > > > > #+END_SRC
> > > > >
> > > > > Everything is fine. But when I use (add the quote field in the
> > > > > select): #+BEGIN_SRC sqlite :db
> > > > > ~/Twitter/twitter.sqlite :colnames yes SELECT   quote
> > > > > ,lastUsed
> > > > > ,totalUsed
> > > > > FROM quotes
> > > > > ORDER BY lastused  ASC
> > > > > ,totalUsed DESC
> > > > > LIMIT40
> > > > > #+END_SRC
> > > > >
> > > > > I get:
> > > > > executing Sqlite code block...
> > > > > Wrote /tmp/babel-27920y_/ob-input-2792BTG
> > > > > org-babel-read: End of file during parsing
> > > > >
> > > > > What could be the problem?
> > > > >  
> > > >
> > > > does it work outside of org/babel/emacs, that is, when you use
> > > > the query in a command line sqlite session, does it work?
> > > > “quote” is also a function in sqlite, so this might be your
> > > > issue. 
> > >
> > > Yes, in sqlite3 and sqlitebrowser it works without problems.
> > > In org-babel even 'SELECT *' goes wrong.
> > >  
> >
> > I can't reproduce the issue, it works for me.  What are your
> > org-mode and Emacs versions?
> >  
> 
> GNU Emacs 25.1.1 (x86_64-pc-linux-gnu, GTK+ Version 3.22.11) of
> 2017-09-15, modified by Debian
> Org-mode version 8.2.10 (release_8.2.10
> @ /usr/share/emacs/25.1/lisp/org/)
> 
> 
> >
> > Can you provide an ECM (Example, complete, minimal) org-mode setup /
> > Emacs initialization file?
> >  
> 
> (add-hook 'org-babel-after-execute-hook 'bh/display-inline-images
> 'append)
> 
> ; Make babel results blocks lowercase
> (setq org-babel-results-keyword "results")
> 
> (defun bh/display-inline-images ()
>   (condition-case nil
>   (org-display-inline-images)
> (error nil)))
> 
> (org-babel-do-load-languages
>  (quote org-babel-load-languages)
>  (quote ((emacs-lisp . t)
>  (sqlite . t)
>  (dot . t)
>  (ditaa . t)
>  (R . t)
>  (python . t)
>  (ruby . t)
>  (gnuplot . t)
>  (clojure . t)
>  (sh . t)
>  (ledger . t)
>  (org . t)
>  (plantuml . t)
>  (latex . t
> 
> ; Do not prompt to confirm evaluation
> ; This may be dangerous - make sure you understand the consequences
> ; of setting this -- see the docstring for details
> (setq org-confirm-babel-evaluate nil)
> 
> ; Use fundamental mode when editing plantuml blocks with C-c '
> (add-to-list 'org-src-lang-modes (quote ("plantuml" . fundamental)))
> 
> Is this what you need, or do you need more?
> 

sorry, I still can't reproduce the issue, even using the same stock
Emacs and org-mode from Debian 9 as you do.

Could you _attach_ the emacs init file and the org-mode file which
shows the issue?  (so I can simply start “emacs -Q -l sqlite.emacs
sqlite.org” and then press C-c C-c inside the sqlite code to see the
issue?

Best regards
Robert



Re: [O] A strange problem with org-babel and SQLite

2018-08-31 Thread Robert Klein
Hi Cecil,


On Fri, 31 Aug 2018 12:24:33 +0200
Cecil Westerhof  wrote:

> 2018-08-31 11:17 GMT+02:00 Robert Klein :
> 
> > Hi Cecil,
> >
> > On Fri, 31 Aug 2018 10:47:50 +0200
> > Cecil Westerhof  wrote:
> >  
> > > I have a strange problem with org-babel and SQLite.
> > >
> > > I have a database that is created with:
> > > CREATE TABLE "quotes" (
> > > quoteID TEXT   PRIMARY KEY,
> > > quote   TEXT NOT NULL  UNIQUE,
> > > lastUsedTEXT,
> > > totalUsed   INT  DEFAULT 'unused'
> > > )
> > >
> > > When using:
> > > #+BEGIN_SRC sqlite :db ~/Twitter/twitter.sqlite :colnames yes
> > > SELECT   lastUsed
> > > ,totalUsed
> > > FROM quotes
> > > ORDER BY lastused  ASC
> > > ,totalUsed DESC
> > > LIMIT40
> > > #+END_SRC
> > >
> > > Everything is fine. But when I use (add the quote field in the
> > > select): #+BEGIN_SRC sqlite :db
> > > ~/Twitter/twitter.sqlite :colnames yes SELECT   quote
> > > ,lastUsed
> > > ,totalUsed
> > > FROM quotes
> > > ORDER BY lastused  ASC
> > > ,totalUsed DESC
> > > LIMIT40
> > > #+END_SRC
> > >
> > > I get:
> > > executing Sqlite code block...
> > > Wrote /tmp/babel-27920y_/ob-input-2792BTG
> > > org-babel-read: End of file during parsing
> > >
> > > What could be the problem?
> > >  
> >
> > does it work outside of org/babel/emacs, that is, when you use the
> > query in a command line sqlite session, does it work?  “quote” is
> > also a function in sqlite, so this might be your issue.
> >  
> 
> Yes, in sqlite3 and sqlitebrowser it works without problems.
> In org-babel even 'SELECT *' goes wrong.
> 

I can't reproduce the issue, it works for me.  What are your org-mode
and Emacs versions?

Can you provide an ECM (Example, complete, minimal) org-mode setup /
Emacs initialization file?

Best regards
Robert





Re: [O] A strange problem with org-babel and SQLite

2018-08-31 Thread Robert Klein
Hi Cecil,

On Fri, 31 Aug 2018 10:47:50 +0200
Cecil Westerhof  wrote:

> I have a strange problem with org-babel and SQLite.
> 
> I have a database that is created with:
> CREATE TABLE "quotes" (
> quoteID TEXT   PRIMARY KEY,
> quote   TEXT NOT NULL  UNIQUE,
> lastUsedTEXT,
> totalUsed   INT  DEFAULT 'unused'
> )
> 
> When using:
> #+BEGIN_SRC sqlite :db ~/Twitter/twitter.sqlite :colnames yes
> SELECT   lastUsed
> ,totalUsed
> FROM quotes
> ORDER BY lastused  ASC
> ,totalUsed DESC
> LIMIT40
> #+END_SRC
> 
> Everything is fine. But when I use (add the quote field in the
> select): #+BEGIN_SRC sqlite :db ~/Twitter/twitter.sqlite :colnames yes
> SELECT   quote
> ,lastUsed
> ,totalUsed
> FROM quotes
> ORDER BY lastused  ASC
> ,totalUsed DESC
> LIMIT40
> #+END_SRC
> 
> I get:
> executing Sqlite code block...
> Wrote /tmp/babel-27920y_/ob-input-2792BTG
> org-babel-read: End of file during parsing
> 
> What could be the problem?
> 

does it work outside of org/babel/emacs, that is, when you use the
query in a command line sqlite session, does it work?  “quote” is also
a function in sqlite, so this might be your issue.

Best regards
Robert




[O] OK again, was: Re: Bug: git clone https://code.orgmode.org/bzg/org-mode.git fails with fatal: unable to access 'https://code.orgmode.org/bzg/org-mode.git/': server certificate verification failed.

2018-08-19 Thread Robert Klein
Hi Brent,

On Sun, 19 Aug 2018 08:32:27 -0700
Brent Goodrick  wrote:

> 
> I noted that even browsing to the website at https://orgmode.org
> required me to add a certificate exception to my browser.

[rest deleted]

thanks a lot for the information.

It seems the certificate for the web site expired.  I managed to renew
the certificate, so everything should work again as expected.

The automatic renewal of certificates doesn't work at the moment, so we
might encounter the issue again in a couple of months.

I'll try to find a solution in the meantime.

Best regards
Robert





Re: [O] Suspected bug with LaTeX export: the pdf does not open

2018-08-18 Thread Robert Klein
Hi,

On Sat, 18 Aug 2018 06:52:19 +0200
alain.coch...@unistra.fr wrote:

> Hello.
> 
> I read in the manual:
> 
>'C-c C-e l o'
>Export as LaTeX file and convert it to PDF, then open the PDF
>using the default viewer.
> 
> I have the file ~/tmp/scr.org which contains only 
> 
>* head 
>blah
> 
> and file ~/.emacs.debug which contains only
> 
>(add-to-list 'load-path "/home/cochard/Org/Coch-git/org-mode/lisp")
>(find-file "~/tmp/scr.org")
> 
> I do:
> 
>emacs -Q -l ~/.emacs.debug
> 
> and then:
> 
>C-c C-e l o
> 
> The compilation is OK and the pdf file is created, but not open.
> With 'M-x buffer-menu' one can see that the only buffers are:
> 
>.   scr.org  13 Org  ~/tmp/scr.org
>  *scratch*   191 Lisp Interaction 
>   %* *Messages*  367 Messages 
>   %* *Org PDF LaTeX O...4577 Compilation  
> 
> I have:
> 
>Emacs : GNU Emacs 24.5.1 (x86_64-redhat-linux-gnu, GTK+ Version
>3.18.9) of 2016-04-11 on buildvm-25.phx2.fedoraproject.org Package:
>Org mode version 9.1.13 (release_9.1.13-894-gf79545 @
>/home/cochard/Org/Coch-git/org-mode/lisp/)
> 
> By contrast, with simply
> 
>emacs -Q
> 
> which corresponds to
> 
>Emacs : GNU Emacs 24.5.1 (x86_64-redhat-linux-gnu, GTK+ Version
>3.18.9) of 2016-04-11 on buildvm-25.phx2.fedoraproject.org Package:
>Org-mode version 8.2.10 (release_8.2.10 @
>/usr/share/emacs/24.5/lisp/org/)
>  
> when visiting the scr.org file and typing 'C-c C-e l o', the frame
> splits into 2 windows and the pdf appears in one of them, as I'd
> expect.  The buffers are
> 
>.   scr.org  13 Org  ~/tmp/scr.org
>   %  scr.pdf   50938 DocView  ~/tmp/scr.pdf
>  *scratch*   191 Lisp Interaction 
>   %* *Messages*  283 Messages 
>* *Org PDF LaTeX O...4702 Fundamental  
> 



I tried to reproduce this, but can't.  I tested org-mode master using
Emacs 24.4, 24.5, 25.1, 25.2, 25.3, and 26.1, and the only difference I
find is that in Emacs 24.x an external viewer (gv) is used instead of
Emacs' DocView mode.

Your Org version, master (which is three commits ahead of your
version), maint, and the bundled versions (9.1.9 for Emacs 26.1, 8.2.10
for the others) behave the same.

Do you have any information in the *Messages* buffer which might help?

Best regards
Robert





Re: [O] One column TOC?

2018-08-12 Thread Robert Klein
Hi,

On Sun, 12 Aug 2018 13:25:34 +0200
Eric S Fraga  wrote:

> On Sunday, 12 Aug 2018 at 06:49, alain.coch...@unistra.fr wrote:
> > Sharon Kimble writes on Sun 12 Aug 2018 00:36:  
> >  > 
> >  > I've been puzzling over this for several weeks now, how can I
> >  > get the  
> >  
> >  > TOC of a document, written in org-mode and exported as latex and
> >  > then built into a PDF, have just one column of its TOC, instead
> >  > of what seems to be its default of 2 columns, please?  
> >
> > That is funny, for me it has always been one column.  How do you do
> > two columns?
> 
> It might depend on the LaTeX class used.  It's not an org issue.

Indeed.  I remember looking for a way to make the Toc two column.  My
LaTeX export now sports a line

\usepackage[toc]{multitoc}

plus some configurations.

If you don't find a “#+LaTeX_Header: ” line \usepackaging some toc
package or stuff, you might want to look at your emacs initialization
file.  In particular look for a modification of the
“org-latex-packages-alist” variable.

Best regards
Robert



Re: [O] can't get table output when running r babel

2018-08-08 Thread Robert Klein
On Wed, 8 Aug 2018 16:10:10 +0100
Zhihao Ding  wrote:

> Hi there,
> 
> I can't seem to get a table output from running this toy example:
> 
>#+HEADER: :results value
> #+BEGIN_SRC R
>   data <- data.frame(list(a=c(1,2,3), b=c(4,5,6)))
>   data
> #+END_SRC
> 
> #+RESULTS:
> 
> The problem seems to be
> org-babel-insert-result: Wrong type argument: markerp, nil
> 
> I see that the value of org-field-marker is nil in org-table.el.
> 
> I am using this version of org:
> Org mode version 9.1.13 (9.1.13-elpa @
> /home/user/.emacs.d/elpa/org-20180806/)
> 
> If anyone could advise it'd be great.
> 
> Thanks,
> Zhihao


Hi Zhihao,

I als get

#+RESULTS:
| 1 | 4 |
| 2 | 5 |
| 3 | 6 |


using
"GNU Emacs 26.1 (build 3, x86_64-unknown-openbsd6.3, GTK+ Version 2.24.32)
 of 2018-05-30"
Org mode version 9.1.13 (release_9.1.13-5-g30498e @ 
/home/roklein/.emacs.d/org-mode/lisp/)

My org version is up-to-date “maint”, your elpa version should be up to date, 
too (“20180806”).

What ist your Emacs version?  Do you also encounter the issue with a minimal 
Emacs/Org setup?

Best regards
Robert








Re: [O] Cannot access repository

2018-06-06 Thread Robert Klein
Hi,

I can confirm, that the gogs service is down.

Bastien, I'm not sure how you started gogs.  How about starting it
using a systemd unit?  (Example @
https://github.com/gogs/gogs/blob/master/scripts/systemd/gogs.service)

Best regards
Robert


On Wed, 6 Jun 2018 08:48:18 -0400
Charles Millar  wrote:

> I cannot access
> 
> https://code.orgmode.org/bzg/org-mode.git
> 
> requested url returned error 502
> 
> Charlie Millar
> 




Re: [O] Table latex exporting ignores #+ATTR_LATEX:

2018-03-26 Thread Robert Klein
Hi,

On Sun, 25 Mar 2018 19:23:53 +0300
Peter Mukhachev  wrote:

> $ cat table-source.org
> #+ATTR_LATEX: :align lp{2cm}l
> | Name   | Text | Rationale  |
> | height | 18 m | ATC requriment |
> 
> # Here I export with M-x org-table-export RET org-table-export-
> result.tex RET orgtbl-to-latex RET
> 
> It gives the following (note the alignment string is "lll")
> $ cat org-table-export-result.tex
> \begin{tabular}{lll}
> Name & Text & Rationale\\
> height & 18 m & ATC requriment\\
> \end{tabular}
> 
> However, when I dispatch it via M-x org-latex-export-to-latex, the
> output is the following (alignment stirg is the same as in org file)
> $ tail -n 6 table_source.tex
> \begin{tabular}{lp{2cm}l}
> Name & Text & Rationale\\
> height & 18 m & ATC requriment\\
> \end{tabular}
> \end{center}
> \end{document}%
> 
> 

Can you use body-only export?  (That is, is your table the only content
of your document?)

In elisp (org-latex-export-to-latex nil nil nil t), or interactively
C-c C-e C-b .



Best regards
Robert



> 
> On Sun, 2018-03-25 at 12:55 +0100, Eric S Fraga wrote:
> > On Tuesday, 20 Mar 2018 at 15:43, Peter Mukhachev wrote:  
> > > (org-table-export) can probably do the thing I want. However,
> > > dispatching it with latex backend ends up with #+ATTR_LATEX: line
> > > ignored and exports bare table only in its tabular environment.
> > > However, I would like to be able to control the alignment either
> > > at my
> > > .org file with #+ATTR_LATEX (preferred) or at my top-level .tex
> > > file
> > > using tabular environment.  
> > 
> > Maybe show us a minimal example that does not work?  Ideally, you
> > should
> > have something along the lines of
> > 
> > #+attr_latex: ...  
> > > a | table |  
> > 
> >   
> 




Re: [O] Git repository error

2017-12-20 Thread Robert Klein
Hi guys,

I removed old git-daemon processes and restartet the git daemon.

Does it work better, now?

Best regards
Robert

On Wed, 20 Dec 2017 18:03:01 +
li...@wilkesley.net wrote:

> On 2017-12-20 17:14, swfl...@flintfam.org wrote:
> 
> > I'm still having this problem
> >   
> > CB> -- Colin Baxter m43...@yandex.com
> > CB>   
> > -  
> > CB> GnuPG fingerprint: 68A8 799C 0230 16E7 BF68 2A27 BBFA 2492
> > CB> 91F5 41C8
> > CB>   
> > -  
> > CB> The sole cause of all human misery is the inability of
> > CB> people   
> > to  
> > CB> sit quietly in their rooms.  Blaise Pascal, 1670  
> 
> Same here:
> 
> dell src/org-mode ‹master› » git pull
> -v 
>  1 ↵
> Looking up orgmode.org ... done.
> Connecting to orgmode.org (port 9418) ... 104.239.132.130 done.
> fatal: read error: Connection reset by peer
> 
> 
> Ian.
> 




Re: [O] Recent regression in Org master with parsing of verbatim code with spaces

2017-10-11 Thread Robert Klein
Hi,

On Wed, 11 Oct 2017 00:47:04 +0100
Reuben Thomas  wrote:

> On 10 October 2017 at 18:29, Kaushal Modi 
> wrote:
> 
> > On Tue, Oct 10, 2017 at 1:08 PM Kaushal Modi
> >  wrote:
> >  
> >> I scanned through recent commits, but haven't yet figured out which
> >> commit affected this. Before I end up with git bisect, does anyone
> >> know a master branch commit that could have caused this?
> >>  
> >
> > Hello,
> >
> > I found the commit causing this change:
> >
> > http://orgmode.org/cgit.cgi/org-mode.git/commit/?id=
> > 8383f7e08b964e129b175ef1c0297b1f4a8ed235
> >  
> 
> ​I haven't seen the rest of this thread, but at a guess is the
> problem to do with [:space:] matching vertical space such as newline
> and vertical tab? Fixing that is a bit painful, since as far as I
> know there's no regex for "horizontal space"; I guess it would be a
> matter of enumerating a suitable range of code points.​

I'm fiddling with org-emphasis-regexp-components in my .emacs.  I
put all horizontal whitespace characters (Wikipedia: "whitespace
character" with Unicode character property WSpace="y") in a string and
concat org-emphasis-regexp-components.  Note, I include some extra
characters for pre, post, and borders (typographical double quotes).

(setq horizontal-whitespace
  (string
   (cdr (assoc-string "CHARACTER TABULATION" (ucs-names)))
   (cdr (assoc-string "SPACE" (ucs-names)))
   (cdr (assoc-string "NO-BREAK SPACE" (ucs-names)))
   (cdr (assoc-string "OGHAM SPACE MARK" (ucs-names)))
   (cdr (assoc-string "EN QUAD" (ucs-names)))
   (cdr (assoc-string "EM QUAD" (ucs-names)))
   (cdr (assoc-string "EN SPACE" (ucs-names)))
   (cdr (assoc-string "EM SPACE" (ucs-names)))
   (cdr (assoc-string "THREE-PER-EM SPACE" (ucs-names)))
   (cdr (assoc-string "FOUR-PER-EM SPACE" (ucs-names)))
   (cdr (assoc-string "SIX-PER-EM SPACE" (ucs-names)))
   (cdr (assoc-string "FIGURE SPACE" (ucs-names)))
   (cdr (assoc-string "PUNCTUATION SPACE" (ucs-names)))
   (cdr (assoc-string "THIN SPACE" (ucs-names)))
   (cdr (assoc-string "HAIR SPACE" (ucs-names)))
   (cdr (assoc-string "NARROW NO-BREAK SPACE" (ucs-names)))
   (cdr (assoc-string "MEDIUM MATHEMATICAL SPACE" (ucs-names)))
   (cdr (assoc-string "IDEOGRAPHIC SPACE" (ucs-names)
(setq org-emphasis-regexp-components
  `(,(concat horizontal-whitespace
 "('\"{„“")
,(concat "-"
 horizontal-whitespace
 ".,:!?;'\")}\\[“”")
,(concat horizontal-whitespace
 "[:space:],\"'„“”")
"."
10))


Best regards
Robert



Re: [O] export of formatted date macro fails

2017-09-27 Thread Robert Klein
Hi,

On Wed, 27 Sep 2017 13:21:14 +
Kaushal Modi <kaushal.m...@gmail.com> wrote:

> On Wed, Sep 27, 2017, 8:52 AM Robert Klein <rokl...@roklein.de> wrote:
> 
> >
> > and later the macro
> >
> > {{{date(%A, %B %e, %Y)}}
> >
> > The exported document only has the "Sunday" (%A) part of the date.
> >
> > Same for {{{date(%A,%B%e,%Y)}}.
> >  
> 
> , is used as Org macro arguments separator. So that needs to be
> escaped with a backslash.
> 
> Try:
> 
> {{{date(%A\, %B %e\, %Y)}}
> 

you're so right.  IIRC I use it in some files, too.  *Banging my head
on the wall*


Thank you very much!!

Best regards
Robert




[O] export of formatted date macro fails

2017-09-27 Thread Robert Klein
Hi,

when I export a formatted date via the {{{date}}} macro _and_ use e.g.
commas and/or spaces, I only get the first component in the exported
file (tested for HTML and PDF export).


E.g. in my document I have a date:

#+DATE: [2008-11-09 Sun 11:00]


and later the macro

{{{date(%A, %B %e, %Y)}}

The exported document only has the "Sunday" (%A) part of the date.

Same for {{{date(%A,%B%e,%Y)}}.


So far I see (org-timestamp-format timestamp "%A, %B %e, %Y") works for
a timestamp created by (org-element-timestamp-parser).

I don't understand the macro code at all (e.g.. org-macro-replace-all).


Versions are:

Org mode version 9.1.1 (release_9.1.1-7-g226d2f
@ /home/roklein/.emacs.d/org-mode/lisp/)

GNU Emacs 25.3.1 (x86_64-unknown-openbsd, GTK+ Version 2.24.31) of
2017-09-26


Any help is greatly appreciated.

Thank you very much.

Best regards
Robert




[O] org-list-to-subtree strange behaviour

2017-09-16 Thread Robert Klein
Hi,

I'm trying to use org-list-to-subtree in a publishing projects
sitemap-function.

However, the org-list-to-subtree function only returns the first entry.

That is, when I run

(org-list-to-subtree  l '(:istart "** "))

after setting the variable l (see below, I didn't want the
120+ lines interrupting this text) , I get this result:


"**   [[file: openbsd-pxe.org][OpenBSD deployment via PXE]]
#+begin_article-info
#+BEGIN_date
2017-09-10
#+END_date
#+BEGIN_tags
OpenBSD, PXE, Installation, Deployment
#+END_tags
#+begin_article-info

"

where I expected all nine entries in the list.


It works for simple lists, e.g.

  (setq l '(unordered
("alpha")
("beta")
("gamma")))

results in

"** alpha
** beta
** gamma"

which is about what I expect.

Any Ideas?


Thank you very much!

Best regards
Robert



(setq l
'(unordered ("
[[file: openbsd-pxe.org][OpenBSD deployment via PXE]]
#+begin_article-info
#+begin_date
2017-09-10
#+end_date
#+begin_tags
OpenBSD, PXE, Installation, Deployment
#+end_tags
#+begin_article-info


#+INCLUDE: \"openbsd-pxe.org::lead\"

[[file:openbsd-pxe.org]][Read more]]
") ("
[[file: dhcp-to-fixed-ip.org][Change from DHCP to fixed IP during
autoYaST]] #+begin_article-info
#+begin_date
2017-09-10
#+end_date
#+begin_tags
SUSE, autoYaST, DHCP, network configuration
#+end_tags
#+begin_article-info


#+INCLUDE: \"dhcp-to-fixed-ip.org::lead\"

[[file:dhcp-to-fixed-ip.org]][Read more]]
") ("
[[file: ksh93-getopts.org][Man-Page mit ksh93 getopts]]
#+begin_article-info
#+begin_date
2017-09-06
#+end_date
#+begin_tags
nil
#+end_tags
#+begin_article-info


#+INCLUDE: \"ksh93-getopts.org::lead\"

[[file:ksh93-getopts.org]][Read more]]
") ("
[[file: autoyast-group-ids.org][Assigning group IDs with autoYaST]]
#+begin_article-info
#+begin_date
2017-06-03
#+end_date
#+begin_tags
nil
#+end_tags
#+begin_article-info


#+INCLUDE: \"autoyast-group-ids.org::lead\"

[[file:autoyast-group-ids.org]][Read more]]
") ("
[[file: derived-exporter.org][Deriving a Back-End]]
#+begin_article-info
#+begin_date
2017-06-03
#+end_date
#+begin_tags
nil
#+end_tags
#+begin_article-info


#+INCLUDE: \"derived-exporter.org::lead\"

[[file:derived-exporter.org]][Read more]]
") ("
[[file: freebsd-pxe.org][FreeBSD deployment via PXE]]
#+begin_article-info
#+begin_date
2017-06-03
#+end_date
#+begin_tags
nil
#+end_tags
#+begin_article-info


#+INCLUDE: \"freebsd-pxe.org::lead\"

[[file:freebsd-pxe.org]][Read more]]
") ("
[[file: htdig.org][ht://Dig]]
#+begin_article-info
#+begin_date
2017-06-03
#+end_date
#+begin_tags
nil
#+end_tags
#+begin_article-info


#+INCLUDE: \"htdig.org::lead\"

[[file:htdig.org]][Read more]]
") ("
[[file: index.org][xyzzy.de — Robert's weblog]]
#+begin_article-info
#+begin_date
2017-06-03
#+end_date
#+begin_tags
nil
#+end_tags
#+begin_article-info


#+INCLUDE: \"index.org::lead\"

[[file:index.org]][Read more]]
") ("
[[file: ox-blog-example.org][ox-blog example post]]
#+begin_article-info
#+begin_date
2017-06-03
#+end_date
#+begin_tags
nil
#+end_tags
#+begin_article-info


#+INCLUDE: \"ox-blog-example.org::lead\"

[[file:ox-blog-example.org]][Read more]]
")))



Re: [O] Bug: http://orgmode.org/cgit.cgi/org-mode.git/ - 502 Bad Gateway

2017-07-31 Thread Robert Klein
Hi,

it works again now.

Best regards
Robert


On Mon, 31 Jul 2017 18:50:44 +0800
Chunyang Xu  wrote:

> I visited the URL by clicking "cgit" on http://orgmode.org/.
> 
> 
> 




Re: [O] BUG: ox-latex export pdf options issue

2017-06-30 Thread Robert Klein
Please disregard this.  \hypersetup works as it is.

I had a +text+ title which put a \sout{} in the pdftitle.  That caused a
error message about too many }'s from the pdflatex.  This I mistook to
mean the closing brace of \hypersetup.

Sorry about the fuss.

Best regards,
Robert


On Thu, 29 Jun 2017 14:28:26 +0200
Robert Klein <robert.kl...@mpip-mainz.mpg.de> wrote:

> Hi,
> 
> The Latex \hypersetup options like to be on their own line and hate
> when the closing } intrudes on them.
> 
> Patch which puts the closing brace in its place below.
> 
> Best regards
> Robert
> 
> 
> 
> 
> diff --git a/lisp/ox-latex.el b/lisp/ox-latex.el
> index ec4b49585f8..474f9b6e9c4 100644
> --- a/lisp/ox-latex.el
> +++ b/lisp/ox-latex.el
> @@ -596,7 +596,7 @@ the toc:nil option, not to those generated with
> #+TOC keyword." 
>  (defcustom org-latex-hyperref-template
>"\\hypersetup{\n pdfauthor={%a},\n pdftitle={%t},\n
> pdfkeywords={%k},
> - pdfsubject={%d},\n pdfcreator={%c}, \n pdflang={%L}}\n"
> + pdfsubject={%d},\n pdfcreator={%c}, \n pdflang={%L}\n}\n"
>"Template for hyperref package options.
>  
>  This format string may contain these elements:
> 




[O] BUG: ox-latex export pdf options issue

2017-06-30 Thread Robert Klein
Hi,

The Latex \hypersetup options like to be on their own line and hate
when the closing } intrudes on them.

Patch which puts the closing brace in its place below.

Best regards
Robert




diff --git a/lisp/ox-latex.el b/lisp/ox-latex.el
index ec4b49585f8..474f9b6e9c4 100644
--- a/lisp/ox-latex.el
+++ b/lisp/ox-latex.el
@@ -596,7 +596,7 @@ the toc:nil option, not to those generated with
#+TOC keyword." 
 (defcustom org-latex-hyperref-template
   "\\hypersetup{\n pdfauthor={%a},\n pdftitle={%t},\n pdfkeywords={%k},
- pdfsubject={%d},\n pdfcreator={%c}, \n pdflang={%L}}\n"
+ pdfsubject={%d},\n pdfcreator={%c}, \n pdflang={%L}\n}\n"
   "Template for hyperref package options.
 
 This format string may contain these elements:



Re: [O] Documentation fix

2017-05-15 Thread Robert Klein
Hallo,

On Mon, 15 May 2017 08:42:42 +0200
Nicolas Goaziou <m...@nicolasgoaziou.fr> wrote:

> Hello,
> 
> Robert Klein <rokl...@roklein.de> writes:
> 
> > there are two typos which causes compile to fail.  Patch below.
> 
> Thank you.
> 
> >  Options for MathJax (@code{org-html-mathjax-options}).  MathJax is
> > used to -typeset @LaTeX{} math in HTML documents.  @xref{Math
> > formatting in HTML -export} for an example.
> > +typeset @LaTeX{} math in HTML documents.  For an example
> > @pxref{Math +formatting in HTML export}.
> 
> I don't get this one. It looks valid Texinfo to me. Also, "make info"
> doesn't return any error here.

Ahh, well, on second look it only was a warning:

org.texi:11371: warning: `.' or `,' must follow @xref, not `f'.

Best regards
Robert



[O] Documentation fix

2017-05-15 Thread Robert Klein
Hi,

there are two typos which causes compile to fail.  Patch below.

PS: Probably there should be a comma after the “example”.  Sorry, my
English not so good is...

Best regards
Robert





From 355901f48b9b81e9d5509f2df66e4f25eb23adae Mon Sep 17 00:00:00 2001
From: Robert Klein <rokl...@roklein.de>
Date: Mon, 15 May 2017 08:31:19 +0200
Subject: [PATCH] Fix typos in Documentation

---
 doc/org.texi | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/doc/org.texi b/doc/org.texi
index d233001..d8173e7 100644
--- a/doc/org.texi
+++ b/doc/org.texi
@@ -11367,8 +11367,8 @@ The URL for the up link of exported HTML pages
(@code{org-html-link-up}). @cindex #+HTML_MATHJAX
 @vindex org-html-mathjax-options
 Options for MathJax (@code{org-html-mathjax-options}).  MathJax is
used to -typeset @LaTeX{} math in HTML documents.  @xref{Math
formatting in HTML -export} for an example.
+typeset @LaTeX{} math in HTML documents.  For an example @pxref{Math
+formatting in HTML export}. 
 
 @item HTML_HEAD
 @cindex #+HTML_HEAD
@@ -12198,7 +12198,7 @@ environments.  @code{:spread} has no effect if
@code{:width} is not set. @vindex org-latex-tables-booktabs
 @vindex org-latex-tables-centered
 All three commands are toggles.  @code{:booktabs} brings in modern
-typesetting enhancements to regular tables.  The @code {booktabs}
package has +typesetting enhancements to regular tables.  The
@code{booktabs} package has to be loaded through
@code{org-latex-packages-alist}.  @code{:center} is for centering the
table.  @code{:rmlines} removes all but the very first horizontal line
made of ASCII characters from "table.el" tables only.
-- 
2.6.6





[O] [PATCH] Fix custom timestamps during export (ox-groff)

2017-03-13 Thread Robert Klein
Hi,

this patch updates ox-groff.el in contrig to use the
org-timestamp-translate function instead of the non-existing
org-translate-time.

Best regards
Robert

From 632764856ecbc0f6a733d3d919f4904c6465605c Mon Sep 17 00:00:00 2001
From: Robert Klein <rokl...@roklein.de>
Date: Mon, 13 Mar 2017 07:29:27 +0100
Subject: [PATCH] Fix custom timestamps during export (ox-groff)

* contrib/lisp/ox-groff.el (org-groff-clock, org-groff-planning): Use
  org-translate-time'.

(propagate changes introduced to other export backends in commit
e1adb17ba509a43e9a03a5b367a98b8bc8de8b02.)
---
 contrib/lisp/ox-groff.el | 13 -
 1 file changed, 4 insertions(+), 9 deletions(-)

diff --git a/contrib/lisp/ox-groff.el b/contrib/lisp/ox-groff.el
index a9478b9..555a89d 100644
--- a/contrib/lisp/ox-groff.el
+++ b/contrib/lisp/ox-groff.el
@@ -823,9 +823,7 @@ information."
   (concat
(format "\\fB%s\\fP " org-clock-string)
(format org-groff-inactive-timestamp-format
-   (concat (org-translate-time
-		(org-element-property :raw-value
-	  (org-element-property :value clock)))
+   (concat (org-timestamp-translate (org-element-property :value clock))
(let ((time (org-element-property :duration clock)))
  (and time (format " (%s)" time)))
 
@@ -1409,22 +1407,19 @@ information."
(concat
 (format "\\fR %s \\fP" org-closed-string)
 (format org-groff-inactive-timestamp-format
-(org-translate-time
-			 (org-element-property :raw-value closed))
+(org-timestamp-translate closed)
(let ((deadline (org-element-property :deadline planning)))
  (when deadline
(concat
 (format "\\fB %s \\fP" org-deadline-string)
 (format org-groff-active-timestamp-format
-(org-translate-time
-			 (org-element-property :raw-value deadline))
+(org-timestamp-translate deadline)
(let ((scheduled (org-element-property :scheduled planning)))
  (when scheduled
(concat
 (format "\\fR %s \\fP" org-scheduled-string)
 (format org-groff-active-timestamp-format
-(org-translate-time
-			 (org-element-property :raw-value scheduled
+(org-timestamp-translate scheduled)))
 "")
""))
 
-- 
2.6.6



Re: [O] publishing files with images to latex

2017-03-09 Thread Robert Klein
Hi,

Nicolas Goaziou <m...@nicolasgoaziou.fr> wrote:

> Hello,
> 
> Robert Klein <rokl...@roklein.de> writes:
> 
> > when I publish a project to PDF org-mode does not include the
> > images in the exported PDF (i.e. LaTeX doesn't find them), when I
> > start the publishing process from a buffer which is /not/ in the
> > directory to be published.
> >
> >
> > E.e. when I have the org files in ~/Documents/mpipdocs/linux and
> > publish to the same directory, but I'm in a buffer ~/.emacs, the
> > images show not up in the PDF export and in the *Messages* I get
> > messages "PDF file exported with errors" or so.
> >
> > However, when I'm visiting, e.g.
> > ~/Documents/mpipdocs/linux/index.org and start the publishing
> > process, everything goes Ok.  
> 
> Fixed. Could you confirm it?

Yes, it works.  Thank you very much!

Best regards
Robert





[O] publishing files with images to latex

2017-02-28 Thread Robert Klein
Hi,

when I publish a project to PDF org-mode does not include the images in
the exported PDF (i.e. LaTeX doesn't find them), when I start the
publishing process from a buffer which is /not/ in the directory to be
published.


E.e. when I have the org files in ~/Documents/mpipdocs/linux and
publish to the same directory, but I'm in a buffer ~/.emacs, the images
show not up in the PDF export and in the *Messages* I get messages "PDF
file exported with errors" or so.

However, when I'm visiting, e.g. ~/Documents/mpipdocs/linux/index.org
and start the publishing process, everything goes Ok.

This is probably caused by commit
120f8c09f460c55131eb8d99685732ee88f538ae (and at least one follow-up
commit after the 9.0.1 release (with 9.0.1 publishing doesn't work at
all -- at least when the visited buffer directory isn't the publishing
directory, perhaps 2e35a59763efc5324874ec1a894691fe2123495c ?).

Any help is very much appreciated.

Thanks and best regards
Robert



Re: [O] Tangling include files

2016-11-24 Thread Robert Klein
On Wed, 23 Nov 2016 21:22:08 -0800
"Charles C. Berry"  wrote:

> On Thu, 24 Nov 2016, Harry Butterworth wrote:
> 
> > I tried org-org-export-to-org which puts everything into a single
> > document but it strips the :tangle parameters out so a subsequent
> > tangle doesn't generate any source code.
> >
> 
> You might try this. Put this at the *top* of your file:
> 
> --8<---cut here---start->8---
> 
> #+PROPERTY: header-args :eval never-export
> 
> #+NAME: tangle file
> #+BEGIN_SRC emacs-lisp :eval yes :exports results
> (org-babel-tangle)
> #+END_SRC
> 
> --8<---cut here---start->8---
> 
> Type C-c C-c on the property line to refresh it.
> 
> Now export. Type 'y' in reply to the query to eval the `tangle file'
> src block and again to the `discard edits' query.
> 
> Even exporting to a buffer should be fine. You do not really want the 
> exported document, you just want to force the inclusions to take
> place and then run that src block.
> 
> This should work, because `org-export-as' will expand all the
> include's before running babel. If the above block runs before any
> others, then the :tangle headers will still be in place.
> 
> In fact you could create a separate file, place all the above in it
> and add one line at the bottom to include the top level org file you
> want to tangle from. Then export that.
> 
> HTH,
> 
> Chuck
> 

A line

#+Property: tangle yes

in your org document is sufficient to get it tangled (in org 8.3.6).

I'm currently using the attached script for tangling configuration
files and scripts from the command line.  Please note, it expects
the Emacs initialization file to be ~/.emacs 


Best regards
Robert

#!/usr/bin/emacs --script
;;  -*- coding: utf-8-unix; -*-

;; modified from ob-tanbgle.el:org-babel-tangle-publish
(defun roklein/tangle-publish (filename pub-dir)
  "Tangle FILENAME and place the results in PUB-DIR."
  (unless (file-exists-p pub-dir)
(make-directory pub-dir t))
  (mapc (lambda (el)
  (rename-file el
   (concat (directory-file-name pub-dir)
   "/"
   (file-name-nondirectory el))
   t))
(org-babel-tangle-file filename)))

(defun roklein/tangle-with-include (filename

output-filename
output-directory)
  "Extract the body of source blocks in FILENAME.
Optional argument OUTPUT-FILE can be used to have a more original
file name for the tangled files (instead of FILENAME.lang, where
filename retains its 'org' ending).  Optional argument
OUTPUT-DIRECTORY can be used to have the tangles files moved to
it.  Note, as the original file is exported to org first, a file
FILENAME.org, or -- if given as argument -- OUTPUT-FILE will
remain in the directory of the original FILENAME file."
  (cond
   ;; filename without extension must not be outfile, or the original
   ;; org file would be overwritten.
   ((equal filename output-filename)
(message
 "%s\n"
 "'output-filename' must not be the same as 'filename' minus extension.")
(usage))
   ;; does the original orgfile exist and is readable?
   ((or (not (file-exists-p filename))
(not (file-readable-p filename)))
(message "%s\n" "Org file 'filename' does not exist or is not readable.")
(usage))
   ;; does the output-directory exist?
   ((and output-directory
 (or (not (file-exists-p output-directory))
 (not (file-accessible-directory-p output-directory)))
 (message "%s\n" "output directory does not exist")))
   (t
(load "~/.emacs")
(find-file filename)
(setq org-confirm-babel-evaluate nil)
(let ((new-org-file (org-org-export-to-org))
  (overwrite-existing
   (when output-filename
 (if (file-exists-p output-filename)
 (y-or-n-p
  (concat "Output file "
  output-filename
  " already exists. Overwrite? "))
   t
  (when (and output-filename overwrite-existing)
(rename-file new-org-file output-filename overwrite-existing))
  (when (not output-filename)
(setq output-filename new-org-file))
  (message "output filename: %s" output-filename)
  (roklein/tangle-publish output-filename
  (or output-directory "."))
 
(defun usage()
  (message "\n%s\n"
   "Usage: tangle.el filename [output-filename output-directory]"))

(defun main ()
  (let ((argc (length command-line-args-left)))
(cond ((< argc 1)
   (message "%s\n" "Too few arguments.")
   (usage))
  ((> argc 3)
   (message "%s\n" "Too many arguments.")
   (usage))
  (t
   (apply 'roklein/tangle-with-include
 

Re: [O] Best diagram, image software?

2016-10-07 Thread Robert Klein
Hi,

I'm using the following header, which lets me export to PDF and HTML,
both (basically from here:
http://orgmode.org/worg/org-contrib/babel/languages/ob-doc-LaTeX.html).



#+header: :exports results :file fsa.png
#+header: :imagemagick yes :iminoptions -density 600 :imoutoptions
-geometry 1200 
#+header: :fit yes :noweb yes :headers '("\\usepackage{tikz}") 
#+begin_src latex :exports results :results raw :file fsa.png


(and no #+Results line, but I don't know if this matters)


Also, regarding the babel I use the following to map source blocks to
"supported" LaTeX listings languages:


Add “text” and “conf” to =latex-listings-langs= with empty (space as a
trick) language name to be used in the LaTeX listings package.

#+begin_src emacs-lisp
  (add-to-list 'org-latex-listings-langs
   '(text " "))
  (add-to-list 'org-latex-listings-langs
   '(conf " "))
  (add-to-list 'org-latex-listings-langs
   '(nxml "XML"))
  (add-to-list 'org-latex-listings-langs
   '(org " "))


Best regards

 On Thu, 06 Oct 2016 12:48:52 -0400
Peter Davis  wrote:

> Since several people recommended TikZ, I decided to take a look at it.
> It seems very powerful, but I'm unable to get any example to work. For
> example, using the example here: 
> 
> http://doblogit.com/posts/2015-10-23-org-graphics.html
> 
> #+begin_src latex :exports results :results output raw :file
> images/fsa.png
> % Define block styles
> \usetikzlibrary{shapes,arrows}
> \tikzstyle{astate} = [circle, draw, text centered, font=\footnotesize,
> fill=blue!25]
> \tikzstyle{rstate} = [circle, draw, text centered, font=\footnotesize,
> fill=red!25]
> 
> \begin{tikzpicture}[->,>=stealth', shorten >=1pt, auto, node
> distance=2.8cm, semithick]
> \node [astate] (1) at (0,0) {1};
> \node [astate] (2) at (1,0) {2};
> \node [rstate] (3) at (2,0) {3};
> \path (1) edge [bend left] node {b} (2)
> (2) edge node {b} (3)
> (2) edge [bend left] node {a} (1)
> (3) edge [loop above] node {(a, b)} (3);
> \end{tikzpicture}
> #+end_src
> 
> 
> I get:
> 
> org-babel-exp process latex at line 6...
> executing Latex code block...
> org-latex-compile: PDF file
> c:/Users/pdavis/AppData/Local/Temp/orgtex5448hGP.pdf wasn’t produced
> 
> I've got ImageMagick installed. I don't know how to debug this.
> 
> 




Re: [O] Something happened in git server

2016-09-04 Thread Robert Klein
Hi,

http access seemed to be Ok, but there was something fishy about git.
I restarted all services, so everything should be Ok, now.

Best regards
Robert


On Mon, 5 Sep 2016 00:51:22 +0900
Ishikawa Takaaki  wrote:

> Many thanks to your reports. Unfortunately, it’s not working even
> now. I don’t know who is in charge of doing something to the server
> but I think we should contact ASAP.
> 
> Best,
> Takaaki
> 
> 
> > Sep 3, 2016 23:12、Charles Millar  のメール:
> > 
> > On 09/03/2016 09:36 AM, Colin Baxter wrote:  
> >> On Sat, Sep 03 2016, Takaaki Ishikawa wrote:
> >>   
> >>> Hi all,
> >>> 
> >>> I've received an error message like `fatal: read error: Connection
> >>> reset by peer` from the git server of orgmode when I ran fetch and
> >>> also pull command. Does anybody have the same problem now?
> >>> 
> >>> Best,
> >>> Takaaki  
> >> Yes, the org-mode git server appears to be not working.
> >>   
> > Yesterday morning around 8:00 EDT I tried it and it was not working
> > then. 
> 
> 




Re: [O] [PATCH] Re: links-9.0 v3

2016-08-07 Thread Robert Klein
Hi,

attached are Patches for contrib except ox-bibtex.el and
org-velocity.el.

Some files are spitting out errors during compile, some of those
probably vanish if you require the stuff they depend on.

I modified Matt's patch to also open eww links with eww (but this could
also be something with `browse-url').

The last patch also updates the replacement for org-add-link-type in
org-compat.el.

Best regards
Robert

On Sun, 07 Aug 2016 20:12:21 -0400
John Kitchin <jkitc...@andrew.cmu.edu> wrote:

> That looks like the correct fix for org-eww.el.
> 
> What is the protocol for fixing the contrib packages? I can take a
> pass at doing it if it is ok.
> 
> 
> 
> Matt Lundin writes:
> 
> > Thanks, John, for improving link functionality in org-mode!
> >
> > I just discovered that this change breaks the contrib files that use
> > org-store-link-functions and org-add-link-type.
> >
> > I'm not familiar enough with the details of org-link-set-parameters
> > to fix all of the contrib files, but I am including a simple patch
> > to update a contrib file that I use regularly: org-eww.el.
> >
> > Thanks,
> > Matt  
> 
> 

>From 5c56aab31caff84241856cb019d496bee2376937 Mon Sep 17 00:00:00 2001
From: Robert Klein <rokl...@roklein.de>
Date: Mon, 8 Aug 2016 03:24:09 +0200
Subject: [PATCH 01/14] Update bookmark link definition

* contrib/lisp/org-bookmark.el ("bookmark"):

Update to use org-link-set-parameters.
---
 contrib/lisp/org-bookmark.el | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/contrib/lisp/org-bookmark.el b/contrib/lisp/org-bookmark.el
index 40c7cd0..f042467 100644
--- a/contrib/lisp/org-bookmark.el
+++ b/contrib/lisp/org-bookmark.el
@@ -47,8 +47,9 @@ Otherwise prompt the user for the right bookmark to use."
   :group 'org-bookmark
   :type 'boolean)
 
-(org-add-link-type "bookmark" 'org-bookmark-open)
-(add-hook 'org-store-link-functions 'org-bookmark-store-link)
+(org-link-set-parameters "bookmark"
+			 :follow #'org-bookmark-open
+			 :store #'org-bookmark-store-link)
 
 (defun org-bookmark-open (bookmark)
   "Visit the bookmark BOOKMARK."
-- 
2.9.2

>From 76518d2668e274b48c5b67ad698cb6c5d1659627 Mon Sep 17 00:00:00 2001
From: Robert Klein <rokl...@roklein.de>
Date: Mon, 8 Aug 2016 03:24:23 +0200
Subject: [PATCH 02/14] Update tel link definition

* contrib/lisp/org-contacts.el ("contacts"):

Update to use org-link-set-parameters.
---
 contrib/lisp/org-contacts.el | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/contrib/lisp/org-contacts.el b/contrib/lisp/org-contacts.el
index 309b9b9..2cadd1d 100644
--- a/contrib/lisp/org-contacts.el
+++ b/contrib/lisp/org-contacts.el
@@ -1107,8 +1107,7 @@ link string and return the pure link target."
 
 ;; Add the link type supported by org-contacts-strip-link
 ;; so everything is in order for its use in Org files
-(org-add-link-type "tel")
-
+(org-link-set-parameters "tel")
 
 (defun org-contacts-split-property (string  separators omit-nulls)
   "Custom version of `split-string'.
-- 
2.9.2

>From a1d89751290a6594d559dd3ccf5ac957f31c30e0 Mon Sep 17 00:00:00 2001
From: Robert Klein <rokl...@roklein.de>
Date: Mon, 8 Aug 2016 03:24:23 +0200
Subject: [PATCH 03/14] Update ebib link definition

* contrib/lisp/org-ebib.el ("ebib"):

Update to use org-link-set-parameters.
---
 contrib/lisp/org-ebib.el | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/contrib/lisp/org-ebib.el b/contrib/lisp/org-ebib.el
index 2136a13..4ed5e50 100644
--- a/contrib/lisp/org-ebib.el
+++ b/contrib/lisp/org-ebib.el
@@ -22,9 +22,9 @@
 
 (require 'org)
 
-(org-add-link-type "ebib" 'org-ebib-open)
-
-(add-hook 'org-store-link-functions 'org-ebib-store-link)
+(org-link-set-parameters "ebib"
+			 :follow #'org-ebib-open
+			 :store #'org-ebib-store-link)
 
 (defun org-ebib-open (key)
   "Open Ebib and jump to KEY."
-- 
2.9.2

>From aafd21ba551dd87959eba47e89b402ef7e53826f Mon Sep 17 00:00:00 2001
From: Robert Klein <rokl...@roklein.de>
Date: Mon, 8 Aug 2016 03:24:23 +0200
Subject: [PATCH 04/14] Update elisp-symbol link definition

* contrib/lisp/org-elisp-symbol.el ("elisp-symbol"):

Update to use org-link-set-parameters.
---
 contrib/lisp/org-elisp-symbol.el | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/contrib/lisp/org-elisp-symbol.el b/contrib/lisp/org-elisp-symbol.el
index cdf868b..7c98962 100644
--- a/contrib/lisp/org-elisp-symbol.el
+++ b/contrib/lisp/org-elisp-symbol.el
@@ -78,8 +78,9 @@
 
 (require 'org)
 
-(org-add-link-type "elisp-symbol" 'org-elisp-symbol-open)
-(add-hook 'org-store-link-functions 'org-elisp-symbol-store-link)
+(org-link-set-parameters "elisp-symbol"
+			 :follow #'org-elisp-symbol-open
+

Re: [O] pagebreak

2016-07-25 Thread Robert Klein
Hi,

On Mon, 25 Jul 2016 18:59:46 +
Uwe Brauer  wrote:

> Hi
> 
> I would like to write an org document export it to odt, and break
> pages manually. How can I achieve that?
> 

#+ODT: 

See http://orgmode.org/manual/Creating-one_002doff-styles.html in the
manual.

Best regards
Robert




Re: [O] #+BEGIN_html/#+END_html tags not exporting literally to html anymore?

2016-07-22 Thread Robert Klein
Hi,
On Fri, 22 Jul 2016 15:33:53 -0400
Adam Aviv  wrote:

> On Fri, Jul 22, 2016 at 12:38 PM, Charles C. Berry 
> wrote:
> 
> > It is updated. For example, see
> >
> > (info "(org) Special blocks")
> > and
> > (info "(org) results")
> >
> > and in ORG-NEWS.
> >  
> 
> I see that now, but the online documentation is still out dated:
> 
> http://orgmode.org/manual/Quoting-HTML-tags.html
> 
> Is there a push cycle to keep the online documents up to date with the
> source documentation? Or is that controlled differently?

The online documentation is for the released version and its
maintenance (i.e. git release `8.3.5' and git branch `maint').

Your org version is from the development branch `master'.  It is
documented in the doc/ directory.  To create the HTML manual run `gmake
html' in the top directory of the source; for a printable PDF run
`gmake pdf'.  The final manual will also be in the doc/ directory.

Best regards
Robert



Re: [O] Tuning the layout of published html

2016-07-19 Thread Robert Klein
Hi,
Jarmo Hurri <jarmo.hu...@iki.fi> wrote:

> 
> Robert Klein <rokl...@roklein.de> writes:
> 
> > You can use the preamble and postamble features for this.
> >
> > You'd have to edit the navigation bar manually, though.
> >
> > Example preamble (file: html/preamble.html):
> > ...
> > Does this help a bit?
> 
> Yes it does, but it is impossible for me to tell which parts of these
> files are really necessary to achieve the desired result. But I will
> start experimenting.


I'll try to put together something more cohesive...

Best regards
Robert





Re: [O] Tuning the layout of published html

2016-07-19 Thread Robert Klein
Hi,
Jarmo Hurri <jarmo.hu...@iki.fi> wrote:

> I am writing teaching material (for programming) using Org. All the
> material (text, figures, code, program outputs) are written using Org
> and Babel-supported languages. Publishing to html works just fine.
> What I would like to do, however, is to add some layout structure to
> the produced html.
> 
> More specifically, I would like to add, on all pages, a navigation bar
> on the left-hand side and a title bar with no functionality on the top
> of each page.
> 
> What options do I have to accomplish this? Searches led me to "derived
> backends," but they sound like an overkill for a task that is this
> simple. Or?

You can use the preamble and postamble features for this.

You'd have to edit the navigation bar manually, though.

Example preamble (file: html/preamble.html):
--- snip ---

  Home
  Imprint
  

  

  


 
--- snip ---

Example postamble file:

 

  

   
  

Contents

  main page
  Heading
  imprint
 -->
    
      
  
  
  

  

   20122015 Robert Klein

 
--- snip ---


Preamble and postamble functiond in .emacs:
--- snip ---
;; pre- and postamble for html export
(defun my-preamble (options)
  (with-temp-buffer
(insert-file-contents "~/projects/myprj/html/preamble.html")
(buffer-string)))

(defun xyzzys-postamble (options)
  (with-temp-buffer
(insert-file-contents "~/projects/myprj/html/postamble.html")
(buffer-string)))
--- snip ---

project-alist excerpt(in .emacs, too):
--- snip ---
(add-to-list 'org-publish-project-alist
 '("myprj-html"
   :base-directory "~/projects/myprj"
   :base-extension "org"
   :publishing-directory "~/public_html/myprj"
   :publishing-function org-html-publish-to-html
   :html-head "" :html-head-include-default-style nil
   :html-head-include-scripts nil
   :html-preamble my-preamble
   :html-postamble my-postamble
--- snip ---


A lot depends on the CSS.  I'm dumping one here, not a very good one...

---snip---
/* 
  a lot of stuff is from Matthew James Taylor's ultimate 2 column
  left menu layout.
  */

body {
margin: 0 auto;
padding: 0; /* 0 5em 0; */
/* padding for the footer is in colmask */
/* border: 0; */
width: 100%;
/* max-width: 40em; */
/* line-height: 1.4; */
/* background: #fff; */
background: #fffaf0; /* floralwhite */ /* whitesmoke; #f5f5f5 */
font-size:100%;
color: #000;
text-align: justify;
/* font-family: "Linux Libertine", Georgia, serif; */
font-family: wfSourceSansPro, serif;
display: block;
}

code {
font-family: wfSourceCodePro, monospace;
font-size: 90%;
}


/* if i use a breadcrumb again */
#breadcrumb {
float:left;
width:100%;
padding:.1em 0 ;
margin:0;
background-color: #eee;
font-size: small;
/* border-bottom: 4px solid #75A838; */
}
#breadcrumb p {
padding:0;
margin:0;
}

#preamble {
clear: both;/* nothing to the left or right of the header */
float: none;/* essentially the same */
width: 100%;
margin: 0;
padding: 0;
background-color: mintcream;
font-size: small;
border-bottom:1px solid gainsboro; /* #7ca6a6; */ /* solid #000; */
/* Fixed header at the top of the screen. */
position: fixed;
top: 0;
left: 0;
z-index: 999;
height: 1.5em;
/* letter-spacing: 0.1em; */
/* background: none repeat scroll 0 0; */
/*border-bottom: 1px dotted #7ca6a6; */
}


#preamble p {
margin:0;
padding: .2em 1em .2em 1em;
/* space above text and below letters g and y. */
}

.alignright { float: right; }
.alignleft { float: left; }

/* Here begins Matthew James Taylor's 2 ultimate 2 column layout.  I
   removed anything left over from the other layouts as well as stuff
   which would allow me to reuse the components (that is, I can use
   only one liquid layer per page) */


/* column container */
/* I use only colmask instead of colmask and leftmenu. Doesn't make
   a difference if I use only this 2-column layout */
.colmask {
position:relative;  /* This fixes the IE7 overflow hidden bug */
clear:both;
float:left;
width:100%; /* width of whole page */
overflow:hidden;/* This chops off any overhanging divs */
/* background color for the fixed (navigation) column.  Note: this
   also requires the color for the main column to be set in
   .colleft, so the main column doesn't get the background of the
   this column. */
background-color: OldLace; /*linen; /* whitesmoke */
padding-top: 1.5em; /* padding for the header/preamble */
padding-bottom: 1.5em; /* padding for the fo

Re: [O] Struggling with setting up ox-koma-letter.el

2016-07-18 Thread Robert Klein
Hi,

On Tue, 28 Jun 2016 10:03:18 -0300
nljlistb...@gmail.com (N. Jackson) wrote:

> At 16:09 -0300 on Sunday 2016-06-26, N. Jackson wrote:
> 
> > I am trying to get ox-koma-letter.el working in my Emacs (25.0.95).
> >
> > I have been following the instructions at
> > http://orgmode.org/worg/exporters/koma-letter-export.html and I am
> > testing with the "A simple letter example"
> > (http://orgmode.org/cgit.cgi/worg.git/plain/exporters/koma-letter-new-example.org).
> >
> > My org and my ox-koma-letter.el are from the Org Elpa
> > org-plus-contrib package (version 20160620) and are located in
> > ~/.emacs.d/elpa/org-plus-contrib-20160620/.
> 
> After the version 20160627 update came down, I no longer get any error
> messages on export, which is great.
> 
> However, the PDF generated by the exporter isn't quite right. Some of
> the problems with it are likely due to my LaTeX setup (page size etc.)
> and I'm investigating those, and some might be flaws in
> koma-letter-new-example.org, but I think I still don't have
> ox-koma-letter.el properly configured yet.
> 
> For example, it seems to not be recognising the "location" headline
> and hence it is treating it as the first undefined headline in the
> file and is using it as the salutation.
> 
> My .PDF output file is attached for comparison with the correct one at
> http://orgmode.org/cgit.cgi/worg.git/plain/exporters/koma-letter-new-example.pdf.
> 
> Any suggestions?

afaik the elpa version is the maintenance version of 8.3.4.

The example looks fine when using the develpoment version of org
(i.e. master branch of the git repository).

Best regards
Robert





[O] PATCH for Re: Bug: src block asterisk escaping doesn't work anymore

2016-07-16 Thread Robert Klein
Hi,

 On Wed, 13 Jul 2016 18:47:58 -0700
"Charles C. Berry" <ccbe...@ucsd.edu> wrote:

> On Wed, 13 Jul 2016, Robert Klein wrote:
> 
> > Hi,
> >
> > When exporting a source block, e.g.
> >
> > --- snip (example org file) ---
> > #+begin_src conf
> >  Test
> >
> >  ,* asterisk in src block
> > #+end_src
> > --- snip ---
> >
> >
> > the escaping of the asterisk does not work.  Instead a headline
> > “asterisk in src block” is created.  
> 
> I don't have `ob-conf', but this:
> 
> --8<---cut here---start->8---
> 
> #+begin_src emacs-lisp :exports both
>"Test
> 
>,* asterisk in src block"
> #+end_src
> 
> --8<---cut here---end--->8---
> 
> shows the issue. Also, the #+[BEGIN|END]_SRC parts of the src block 
> are showing up in the export.
> 
> Putting `org-escape-code-in-string' back in `org-babel-exp-code' here
> 
> :  ("body"  . ,(org-escape-code-in-string (nth 1 info)))
> 
> seems to fix this as long as there is a newline after the last
> #+END_SRC in the buffer.

Thanks for the confirmation.  I also have issues exporting
http://orgmode.org/worg/dev/org-element-api.org -- while the error
message is "Unable to resolve code reference: end" bisecting leads to
the same commit; reverting the commit solves the issue.  I reckon the
line(s) beginning with #+ in the src block above confuse the exporter
in the same way.

I attached a tentative patch.

Best regards
Robert
>From ceecd352546453eb0215628c093faf13bca16b97 Mon Sep 17 00:00:00 2001
From: Robert Klein <rokl...@roklein.de>
Date: Sat, 16 Jul 2016 20:50:01 +0200
Subject: [PATCH] Revert "ob-exp: Remove spurious comma un-escaping"

This reverts commit 0279d84cd7f857535342b4ec3c2e70ac76c1ee27.

The original commit breaks exports containing lines beginning
with "* "  or "#+" in src blocks.
---
 lisp/ob-exp.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lisp/ob-exp.el b/lisp/ob-exp.el
index e824992..a1a945f 100644
--- a/lisp/ob-exp.el
+++ b/lisp/ob-exp.el
@@ -48,6 +48,7 @@
 (declare-function org-element-property "org-element" (property element))
 (declare-function org-element-type "org-element" (element))
 (declare-function org-id-get "org-id" ( pom create prefix))
+(declare-function org-escape-code-in-string "org-src" (s))
 
 (defcustom org-export-babel-evaluate t
   "Switch controlling code evaluation during export.
@@ -385,7 +386,7 @@ replaced with its value."
org-babel-exp-inline-code-template
org-babel-exp-code-template)
`(("lang"  . ,(nth 0 info))
- ("body"  . ,(nth 1 info))
+ ("body"  . ,(org-escape-code-in-string (nth 1 info)))
  ("switches" . ,(let ((f (nth 3 info)))
 		  (and (org-string-nw-p f) (concat " " f
  ("flags" . ,(let ((f (assq :flags (nth 2 info
-- 
2.9.0



[O] Bug: src block asterisk escaping doesn't work anymore

2016-07-13 Thread Robert Klein
Hi,

When exporting a source block, e.g. 

--- snip (example org file) ---
#+begin_src conf
  Test

  ,* asterisk in src block
#+end_src
--- snip ---


the escaping of the asterisk does not work.  Instead a headline
“asterisk in src block” is created.

Adding a second comma works but that doesn't work well with C-' source
editing (I didn't test tangling).


Git bisect leads me to this commit:

0279d84cd7f857535342b4ec3c2e70ac76c1ee27 is the first bad commit
commit 0279d84cd7f857535342b4ec3c2e70ac76c1ee27
Author: Nicolas Goaziou 
Date:   Fri Jun 17 14:16:39 2016 +0200

ob-exp: Remove spurious comma un-escaping

* lisp/ob-exp.el (org-babel-exp-code): Remove spurious comma
  un-escaping.

:04 04 d9b76ef4148894bc257394a3fe2bb3c970194f14
a8c9ca31e9ebed5b4d5e634193e8e1e1755faea8 M  lisp


PS: I'm using maint, but I also saw this on a recent master

Best regards
Robert



Re: [O] [ox-publish, patch] More flexible sitemaps

2016-07-05 Thread Robert Klein
Hi,

are those Patches still being worked on?

Thanks and best regards
Robert



On Wed, 01 Jun 2016 17:34:56 +0200
Nicolas Goaziou  wrote:

> Hello,
> 
> Rasmus  writes:
> 
> > This was by far the hardest part...  
> 
> Thank you. Some comments follow.
> 
> > +(defun org-publish-find-property (file property  reset)
> > +  "Find the PROPERTY of FILE in project.
> > +PROPERTY can be a string or a symbol-property."  
> 
> Could you also document RESET argument?
> 

[rest deleted from reply]



Re: [O] Why no secure code retrieval

2016-07-03 Thread Robert Klein
Hi,

I haven't been as active as I'd have liked in this matter...

Bastien Guerry  wrote:

> Hi Ian,
> 
> Ian Barton  writes:
> 
> > Not heard of Gogs before, although it looks nice. Another possiblity
> > would be gitolite with cgit. Gitolite is very flexible and as a
> > consequence can be hard to set up initially. The documentation is
> > very comprehensive. It supports mirroring of repos.
> 
> I have no experience with gitolite.

gitolite is easy.  Configuration is one directory with a configuration
file, one directory with ssh keys;

Configuration looks like this:

#+begin_src conf
repo orgmode
RW+ = kleinrob
R = @all
config gitweb.url = g...@example.org:orgmode
config gitweb.description = "orgmode test"
config receive.denyNonFastforwards = true
config receive.denyDeletes = true

repo testing
RW+ =   @all
R = daemon
config gitweb.url = g...@example.org:testing
config receive.denyNonFastforwards = true
config receive.denyDeletes = true
#+end_src

I have ~35 lines of script, another 35 lines of instructions plus the
apache configuration to get gitolite running on a SLES server.  Doesn't
need cgit.

> 
> I encourage you to try gogs, it is very easy to install and maintain,
> and its interface is very engaging.  The more gogs users and potential
> admins out there, the more comfortable I'll feel making the switch.


For Gogs installation on Debian Jessie I have a ~20 line
script (plus ~10 lines for postgresql; some more for MySQL). I'm using
only the gogs web server (no apache and/or nginx front-end). Have to be
careful copy- and pasting the script though, as I have to enter
passwords.

Current git versions now also supports http-urls, so this shouldn'nt be
an issue for both gits vs gitolite.


Gogs requires users to be created for current contributors...

No preference from my side, though I have some emotional distance to
gogs...


Best
Robert





Re: [O] How to setup a development for org-mode?

2016-06-08 Thread Robert Klein
Hi,

On Wed, 08 Jun 2016 06:55:08 +
Xi Shen  wrote:

> Tried that at first, but got:
> 
> Symbol's function definition is void: org-babel--get-vars
> 
> Maybe it is because I am in cygwin environment, so Emacs eval buffers
> differently?

You are using org-mode 8.3.4 from then maint branch (or earlier) which
hasn't org-babel--get-vars.  The version of ob-sql.el you are editing
is from the master branch.

Best regards
Robert


> 
> 
> Thanks,
> David
> 
> 
> On Wed, Jun 8, 2016 at 2:42 PM Rasmus  wrote:
> 
> > Xi Shen  writes:
> >
> > > Hi,
> > >
> > > I want to make some change to the ob-sql.el file. But I don't
> > > want to
> > "make
> > > install" every time I change something. I tried to use
> > > “load-file" to reload the file I changed, but I got symbol not
> > > found error.
> >
> > Open the file you've edited and do,
> >
> > M-x eval-buffer RET
> >
> > Hope it helps,
> > Rasmus
> >
> >
> > --
> > Hvor meget poesi tror De kommer ud af et glas isvand?
> >
> >
> > --
> 
> Thanks,
> David S.




Re: [O] org-mode command in a bash script?

2016-06-03 Thread Robert Klein
Hi,

On Fri, 03 Jun 2016 06:36:12 +0100
Sharon Kimble  wrote:

> 
> How can I run an org-mode command in a bash script please?
> 
> Specifically 'org-latex-export-to-latex'?
> 
> I'm developing my own modular script to choose between, at present, 3
> tex files which have been pre-exported from org-mode. I'm now
> wondering if its possible to export from the org-mode file as part of
> another module in the script.
> 
> Can it be done, and if so, how please?


I'm using this shell function for exporting certain documents to pdf:


orgexp()
{
emacs  --batch -l ~/.emacs --eval \
   "(progn
 (setq org-latex-image-default-width \".4cm\"
   org-export-allow-bind-keywords t
   org-confirm-babel-evaluate nil)
 (find-file \"$1\")
 (org-latex-export-to-pdf))"
}


You probably don't want to set the variables, so for export to latex
this might work (i.e. I didn't test it):


org2latex()
{
emacs  --batch -l ~/.emacs --eval \
   "(progn
 (find-file \"$1\")
 (org-latex-export-to-latex))"
}


If you put this in your .bashrc you can just use
org2latex myfile.org
to export myfile.org to latex.

Best regards
Robert



Re: [O] PATCH: programming language indicators in HTML export

2016-05-10 Thread Robert Klein
Hi,

Rasmus <ras...@gmx.us> wrote:

> Robert Klein <rokl...@roklein.de> writes:
> 
> > Hi,
> >
> > Nicolas Goaziou <m...@nicolasgoaziou.fr> wrote:
> >
> >> Hello,
> >> 
> >> Robert Klein <rokl...@roklein.de> writes:
> >> 
> >> > anyone willing to commit this patch I sent back in march?
> >> 
> >> This patch actually felt through the cracks. Sorry about that.
> >> Would you mind sending it again, using git format-patch so I can
> >> apply it?
> >> 
> >
> > Please find the patch attached.
> 
> I wonder if it would be possible (or even desirable) to build this
> part of the css header automatically?  It may be too prone to
> unexpected bugs.
> 

basically same answer I gave last time;  when you want JS to create the
CSS you still have to map the source block identifier to ``readable''
text elsewhere.  You'd just move the static from org-modes basic CSS
into org-mode.

I think the patch is a bonus for those, that don't roll their own CSS
(e.g. Tianxian Xiong, who first gave me the idea).

Any automated solution would be error-prone, too, and depend on:
- what's the Emacs mode for editing (or is there one at all)?
- is there an ob- module for running the code?
- for LaTeX export: is the language supported by
  - the LaTeX listings package (and what is its name there?)?
  - or the pygments library (for those using the LaTeX minted package)?

One example I use for documentation is `conf' source blocks for
`generic' configuration files.  For LaTeX export I have to add 
   (add-to-list 'org-latex-listings-langs '(conf " "))
to my .emacs, as the listings package doesn't support a `configuration'
language.

It's a hack, but it works.  I don't see a general solution (even if
restricted to the CSS header).

I see my patch as a `best effort' for getting things working out of the
box.  Anyone rolling his own CSS will probably pick his 2 to 5
languages and be happy with them.


Best regards
Robert




Re: [O] PATCH: programming language indicators in HTML export

2016-05-09 Thread Robert Klein
Hi,

Nicolas Goaziou <m...@nicolasgoaziou.fr> wrote:

> Hello,
> 
> Robert Klein <rokl...@roklein.de> writes:
> 
> > anyone willing to commit this patch I sent back in march?
> 
> This patch actually felt through the cracks. Sorry about that. Would
> you mind sending it again, using git format-patch so I can apply it?
> 

Please find the patch attached.

Thank you very much.

Best regards
Robert


>From ccedae3c29077c56b9c7325a3911a841c11add2d Mon Sep 17 00:00:00 2001
From: Robert Klein <rokl...@roklein.de>
Date: Mon, 14 Mar 2016 14:43:46 +0100
Subject: [PATCH] support more programming languages in CSS

The standard CSS for HTML export only supported a couple of
programming languages to have a language name "hover" on src
blocks.  This patch adds all languages supported per Org
manual, those from org.el's org-babel-load-languages-alist,
additional language identifiers in ob-*.el and languages
which have a) an emacs mode and b) are supported by the LaTeX
listings package.  Additional a language "conf" is supported
for generic configuraiton files; an emacs mode exists for
this, but for LaTeX listings a language " " has to be faked.
As this patch is for HTML, this is no impediment.

Thanks for reporting the missing support to Tianxian XIONG.
---
 lisp/ox-html.el | 95 +
 1 file changed, 89 insertions(+), 6 deletions(-)

diff --git a/lisp/ox-html.el b/lisp/ox-html.el
index a05fa2d..7653c43 100644
--- a/lisp/ox-html.el
+++ b/lisp/ox-html.el
@@ -314,13 +314,96 @@ for the JavaScript code in this tag.
 border: 1px solid black;
   }
   pre.src:hover:before { display: inline;}
-  pre.src-sh:before{ content: 'sh'; }
-  pre.src-bash:before  { content: 'sh'; }
+  /* Languages per Org manual */
+  pre.src-asymptote:before { content: 'Asymptote'; }
+  pre.src-awk:before { content: 'Awk'; }
+  pre.src-C:before { content: 'C'; }
+  /* pre.src-C++ doesn't work in CSS */
+  pre.src-clojure:before { content: 'Clojure'; }
+  pre.src-css:before { content: 'CSS'; }
+  pre.src-D:before { content: 'D'; }
+  pre.src-ditaa:before { content: 'ditaa'; }
+  pre.src-dot:before { content: 'Graphviz'; }
+  pre.src-calc:before { content: 'Emacs Calc'; }
   pre.src-emacs-lisp:before { content: 'Emacs Lisp'; }
-  pre.src-R:before { content: 'R'; }
-  pre.src-perl:before  { content: 'Perl'; }
-  pre.src-java:before  { content: 'Java'; }
-  pre.src-sql:before   { content: 'SQL'; }
+  pre.src-fortran:before { content: 'Fortran'; }
+  pre.src-gnuplot:before { content: 'gnuplot'; }
+  pre.src-haskell:before { content: 'Haskell'; }
+  pre.src-java:before { content: 'Java'; }
+  pre.src-js:before { content: 'Javascript'; }
+  pre.src-latex:before { content: 'LaTeX'; }
+  pre.src-ledger:before { content: 'Ledger'; }
+  pre.src-lisp:before { content: 'Lisp'; }
+  pre.src-lilypond:before { content: 'Lilypond'; }
+  pre.src-matlab:before { content: 'MATLAB'; }
+  pre.src-mscgen:before { content: 'Mscgen'; }
+  pre.src-ocaml:before { content: 'Objective Caml'; }
+  pre.src-octave:before { content: 'Octave'; }
+  pre.src-org:before { content: 'Org mode'; }
+  pre.src-oz:before { content: 'OZ'; }
+  pre.src-plantuml:before { content: 'Plantuml'; }
+  pre.src-processing:before { content: 'Processing.js'; }
+  pre.src-python:before { content: 'Python'; }
+  pre.src-R:before { content: 'R'; }
+  pre.src-ruby:before { content: 'Ruby'; }
+  pre.src-sass:before { content: 'Sass'; }
+  pre.src-scheme:before { content: 'Scheme'; }
+  pre.src-screen:before { content: 'Gnu Screen'; }
+  pre.src-sed:before { content: 'Sed'; }
+  pre.src-sh:before { content: 'shell'; }
+  pre.src-sql:before { content: 'SQL'; }
+  pre.src-sqlite:before { content: 'SQLite'; }
+  /* additional languages in org.el's org-babel-load-languages alist */
+  pre.src-forth:before { content: 'Forth'; }
+  pre.src-io:before { content: 'IO'; }
+  pre.src-J:before { content: 'J'; }
+  pre.src-makefile:before { content: 'Makefile'; }
+  pre.src-maxima:before { content: 'Maxima'; }
+  pre.src-perl:before { content: 'Perl'; }
+  pre.src-picolisp:before { content: 'Pico Lisp'; }
+  pre.src-scala:before { content: 'Scala'; }
+  pre.src-shell:before { content: 'Shell Script'; }
+  pre.src-ebnf2ps:before { content: 'ebfn2ps'; }
+  /* additional language identifiers per \"defun org-babel-execute\"
+   in ob-*.el */
+  pre.src-cpp:before  { content: 'C++'; }
+  pre.src-abc:before  { content: 'ABC'; }
+  pre.src-coq:before  { content: 'Coq'; }
+  pre.src-groovy:before  { content: 'Groovy'; }
+  /* additional language identifiers from org-babel-shell-names in
+ ob-shell.el: ob-shell is the only babel language using a lambda to put
+ the execution function name together. */
+  pre.src-bash:before  { content: 'bash'; }
+  pre.src-csh:before  { content: 'csh'; }
+  pre.src-ash:before  { content: 'ash'; }
+  pre.src-dash:before  { content: 'd

Re: [O] PATCH: programming language indicators in HTML export

2016-05-09 Thread Robert Klein
Hi,

anyone willing to commit this patch I sent back in march?

Best regards
Robert


On Mon, 14 Mar 2016 15:16:05 +0100
Robert Klein <rokl...@roklein.de> wrote:

> 
> Author: Robert Klein <rokl...@roklein.de>  2016-03-14 14:43:46
> Committer: Robert Klein <rokl...@roklein.de>  2016-03-14 14:43:46
> Parent: dd9be3a6ea4ff561248b1f6658194fd153b5821c (Fix docstring typo)
> Branch: maint
> Follows: release_8.3.4
> Precedes:
> 
> support more programming languages in CSS
> 
> The standard CSS for HTML export only supported a couple of
> programming languages to have a language name "hover" on src
> blocks.  This patch adds all languages supported per Org
> manual, those from org.el's org-babel-load-languages-alist,
> additional language identifiers in ob-*.el and languages
> which have a) an emacs mode and b) are supported by the LaTeX
> listings package.  Additional a language "conf" is supported
> for generic configuraiton files; an emacs mode exists for
> this, but for LaTeX listings a language " " has to be faked.
> As this patch is for HTML, this is no impediment.
> 
> Thanks for reporting the missing support to Tianxian XIONG.
> 
> --- lisp/ox-html.el
> --- index de2e5d9..e4a4c38 100644
> @@ -314,13 +314,96 @@ for the JavaScript code in this tag.
>  border: 1px solid black;
>}
>pre.src:hover:before { display: inline;}
> -  pre.src-sh:before{ content: 'sh'; }
> -  pre.src-bash:before  { content: 'sh'; }
> +  /* Languages per Org manual */
> +  pre.src-asymptote:before { content: 'Asymptote'; }
> +  pre.src-awk:before { content: 'Awk'; }
> +  pre.src-C:before { content: 'C'; }
> +  /* pre.src-C++ doesn't work in CSS */
> +  pre.src-clojure:before { content: 'Clojure'; }
> +  pre.src-css:before { content: 'CSS'; }
> +  pre.src-D:before { content: 'D'; }
> +  pre.src-ditaa:before { content: 'ditaa'; }
> +  pre.src-dot:before { content: 'Graphviz'; }
> +  pre.src-calc:before { content: 'Emacs Calc'; }
>pre.src-emacs-lisp:before { content: 'Emacs Lisp'; }
> -  pre.src-R:before { content: 'R'; }
> -  pre.src-perl:before  { content: 'Perl'; }
> -  pre.src-java:before  { content: 'Java'; }
> -  pre.src-sql:before   { content: 'SQL'; }
> +  pre.src-fortran:before { content: 'Fortran'; }
> +  pre.src-gnuplot:before { content: 'gnuplot'; }
> +  pre.src-haskell:before { content: 'Haskell'; }
> +  pre.src-java:before { content: 'Java'; }
> +  pre.src-js:before { content: 'Javascript'; }
> +  pre.src-latex:before { content: 'LaTeX'; }
> +  pre.src-ledger:before { content: 'Ledger'; }
> +  pre.src-lisp:before { content: 'Lisp'; }
> +  pre.src-lilypond:before { content: 'Lilypond'; }
> +  pre.src-matlab:before { content: 'MATLAB'; }
> +  pre.src-mscgen:before { content: 'Mscgen'; }
> +  pre.src-ocaml:before { content: 'Objective Caml'; }
> +  pre.src-octave:before { content: 'Octave'; }
> +  pre.src-org:before { content: 'Org mode'; }
> +  pre.src-oz:before { content: 'OZ'; }
> +  pre.src-plantuml:before { content: 'Plantuml'; }
> +  pre.src-processing:before { content: 'Processing.js'; }
> +  pre.src-python:before { content: 'Python'; }
> +  pre.src-R:before { content: 'R'; }
> +  pre.src-ruby:before { content: 'Ruby'; }
> +  pre.src-sass:before { content: 'Sass'; }
> +  pre.src-scheme:before { content: 'Scheme'; }
> +  pre.src-screen:before { content: 'Gnu Screen'; }
> +  pre.src-sed:before { content: 'Sed'; }
> +  pre.src-sh:before { content: 'shell'; }
> +  pre.src-sql:before { content: 'SQL'; }
> +  pre.src-sqlite:before { content: 'SQLite'; }
> +  /* additional languages in org.el's org-babel-load-languages alist
> */
> +  pre.src-forth:before { content: 'Forth'; }
> +  pre.src-io:before { content: 'IO'; }
> +  pre.src-J:before { content: 'J'; }
> +  pre.src-makefile:before { content: 'Makefile'; }
> +  pre.src-maxima:before { content: 'Maxima'; }
> +  pre.src-perl:before { content: 'Perl'; }
> +  pre.src-picolisp:before { content: 'Pico Lisp'; }
> +  pre.src-scala:before { content: 'Scala'; }
> +  pre.src-shell:before { content: 'Shell Script'; }
> +  pre.src-ebnf2ps:before { content: 'ebfn2ps'; }
> +  /* additional language identifiers per \"defun org-babel-execute\"
> +   in ob-*.el */
> +  pre.src-cpp:before  { content: 'C++'; }
> +  pre.src-abc:before  { content: 'ABC'; }
> +  pre.src-coq:before  { content: 'Coq'; }
> +  pre.src-groovy:before  { content: 'Groovy'; }
> +  /* additional language identifiers from org-babel-shell-names in
> + ob-shell.el: ob-shell is the only babel language using a lambda
> to put
> + the execution

Re: [O] dotfile managment with #+BEGIN_SRC conf code blocks?

2016-04-22 Thread Robert Klein
Hi,

Xebar Saram  wrote:

> hi all
> 
> im looking at this link
> https://expoundite.net/guides/dotfile-management
> 
> this sound very nice. yet it says there to put your conf in org
> blocks with :  #+BEGIN_SRC conf
> 
> yet i cant see this in the org-babel-load-languages or in any contrib
> files.
> how does one enable the conf code blocks, any clue?

Afaik you need babel only for stuff you want to be executed.

I use ``#+begin_src conf'' all the time and the only thing I do is to
assign a language name for LaTeX export (using the listings package)
-- also for ``text'' and ``org'':

;; add "text" and "conf" to latex-listings-langs with empty (space as
;; trick) language name to be used in the LaTeX listings package.
(add-to-list 'org-latex-listings-langs
 '(text " "))
(add-to-list 'org-latex-listings-langs
 '(conf " "))
(add-to-list 'org-latex-listings-langs
 '(nxml "XML"))
(add-to-list 'org-latex-listings-langs
 '(org " "))


Best regards
Robert



Re: [O] scheme SRC blocks

2016-03-21 Thread Robert Klein
Hi,
Arun Isaac  wrote:

> 
> I have an org file with scheme SRC blocks like so.
> 
> #+BEGIN_SRC scheme
>   (some-code-here)
> #+END_SRC
> 
> Every time, I open the org file, I get prompted for the "Scheme
> implementation" and I need to choose an implementation (guile, in my
> case) before continuing. Similarly, I am also prompted for the same
> when publishing the org file, or opening up the SRC block using
> org-edit-special (C-c ') for editing. This happens because of the
> behaviour of the command "scheme-mode" which prompts for the required
> scheme implementation.
> 
> Manually choosing the scheme implementation every time is tedious and
> annoying. Is there some way to circumvent this issue?

In addition to requiring 'geiser-install you have to set the
geiser-active-implementations variable, e.g.:

#+begin_src emacs-lisp
  (require 'geiser-install)
  (setq geiser-active-implementations '(guile))
#+end_src

See also http://www.nongnu.org/geiser/geiser_3.html#choosing_002dimpl
in the Geiser manual.

Best regards
Robert




Re: [O] PATCH: programming language indicators in HTML export

2016-03-15 Thread Robert Klein
Hi Rasmus,


On Tue, 15 Mar 2016 15:24:00 +0100
Rasmus  wrote:

[rest deleted]

> Robert, do you have a copyright assignment of changes to Emacs?  I
> think the change is too long (in line count) for a TINYCHANGE.

I signed the FSF papers in April 2015. On top of the sheet there is the
number "RT: 1006989".

Do you need a copy of the PDF?

Thanks and best regards,
Robert



Re: [O] PATCH: programming language indicators in HTML export

2016-03-14 Thread Robert Klein
Hi Rasmus,

Rasmus <ras...@gmx.us> wrote:

> Hi Robert,
> 
> Thanks for the patch.
> 
> Robert Klein <rokl...@roklein.de> writes:
> 
> > any thoughts about this?
> 
> Remind me, would this only show up when hovering above the block with
> the mouse when using this setup?

Yes.

> 
> The patch would make the default html header a bit longer, which may
> or may not be an issue.  Perhaps more importantly, it also does not
> deal with new languages.  Maybe it would be possible to add a bit of
> JS that would look up the language based on the class of the block in
> question?
> 
> E.g. the block
> 
>  #+BEGIN_SRC rsgrs
> 
>  #+END_SRC
> 
> would have class "src-rsgrs".

This happens already, but the JS would also have to create the
corresponding CSS code (that's what I hardcoded in the patch).

However you'd still need a mapping from src block identifier to
pleasantly readable text, e.g. js -> "Javascript", sql -> "SQL",
emacs-lisp -> "Emacs Lisp", ps -> "PostScript" etc.  When you have all
those it's not that much different from static CSS anymore...

There's no perfect solution, unfortunately, but src blocks have a lot
of limits for each language:
- is there an Emacs mode for editing?
- is there org-babel code for executing?
- is the language supported by the LaTeX listings package?
- or by the pygments library (for the LaTeX minted package)?


Anyway, my patch is basically for those who don't roll their own CSS to
have things mostly working out of the box. 


Best regards
Robert


> 
> Thanks,
> Rasmus
> 




[O] PATCH: programming language indicators in HTML export

2016-03-14 Thread Robert Klein
Hi,

any thoughts about this?

Best regards
Robert


Author: Robert Klein <rokl...@roklein.de>  2016-03-14 14:43:46
Committer: Robert Klein <rokl...@roklein.de>  2016-03-14 14:43:46
Parent: dd9be3a6ea4ff561248b1f6658194fd153b5821c (Fix docstring typo)
Branch: maint
Follows: release_8.3.4
Precedes:

support more programming languages in CSS

The standard CSS for HTML export only supported a couple of
programming languages to have a language name "hover" on src
blocks.  This patch adds all languages supported per Org
manual, those from org.el's org-babel-load-languages-alist,
additional language identifiers in ob-*.el and languages
which have a) an emacs mode and b) are supported by the LaTeX
listings package.  Additional a language "conf" is supported
for generic configuraiton files; an emacs mode exists for
this, but for LaTeX listings a language " " has to be faked.
As this patch is for HTML, this is no impediment.

Thanks for reporting the missing support to Tianxian XIONG.

--- lisp/ox-html.el
--- index de2e5d9..e4a4c38 100644
@@ -314,13 +314,96 @@ for the JavaScript code in this tag.
 border: 1px solid black;
   }
   pre.src:hover:before { display: inline;}
-  pre.src-sh:before{ content: 'sh'; }
-  pre.src-bash:before  { content: 'sh'; }
+  /* Languages per Org manual */
+  pre.src-asymptote:before { content: 'Asymptote'; }
+  pre.src-awk:before { content: 'Awk'; }
+  pre.src-C:before { content: 'C'; }
+  /* pre.src-C++ doesn't work in CSS */
+  pre.src-clojure:before { content: 'Clojure'; }
+  pre.src-css:before { content: 'CSS'; }
+  pre.src-D:before { content: 'D'; }
+  pre.src-ditaa:before { content: 'ditaa'; }
+  pre.src-dot:before { content: 'Graphviz'; }
+  pre.src-calc:before { content: 'Emacs Calc'; }
   pre.src-emacs-lisp:before { content: 'Emacs Lisp'; }
-  pre.src-R:before { content: 'R'; }
-  pre.src-perl:before  { content: 'Perl'; }
-  pre.src-java:before  { content: 'Java'; }
-  pre.src-sql:before   { content: 'SQL'; }
+  pre.src-fortran:before { content: 'Fortran'; }
+  pre.src-gnuplot:before { content: 'gnuplot'; }
+  pre.src-haskell:before { content: 'Haskell'; }
+  pre.src-java:before { content: 'Java'; }
+  pre.src-js:before { content: 'Javascript'; }
+  pre.src-latex:before { content: 'LaTeX'; }
+  pre.src-ledger:before { content: 'Ledger'; }
+  pre.src-lisp:before { content: 'Lisp'; }
+  pre.src-lilypond:before { content: 'Lilypond'; }
+  pre.src-matlab:before { content: 'MATLAB'; }
+  pre.src-mscgen:before { content: 'Mscgen'; }
+  pre.src-ocaml:before { content: 'Objective Caml'; }
+  pre.src-octave:before { content: 'Octave'; }
+  pre.src-org:before { content: 'Org mode'; }
+  pre.src-oz:before { content: 'OZ'; }
+  pre.src-plantuml:before { content: 'Plantuml'; }
+  pre.src-processing:before { content: 'Processing.js'; }
+  pre.src-python:before { content: 'Python'; }
+  pre.src-R:before { content: 'R'; }
+  pre.src-ruby:before { content: 'Ruby'; }
+  pre.src-sass:before { content: 'Sass'; }
+  pre.src-scheme:before { content: 'Scheme'; }
+  pre.src-screen:before { content: 'Gnu Screen'; }
+  pre.src-sed:before { content: 'Sed'; }
+  pre.src-sh:before { content: 'shell'; }
+  pre.src-sql:before { content: 'SQL'; }
+  pre.src-sqlite:before { content: 'SQLite'; }
+  /* additional languages in org.el's org-babel-load-languages alist */
+  pre.src-forth:before { content: 'Forth'; }
+  pre.src-io:before { content: 'IO'; }
+  pre.src-J:before { content: 'J'; }
+  pre.src-makefile:before { content: 'Makefile'; }
+  pre.src-maxima:before { content: 'Maxima'; }
+  pre.src-perl:before { content: 'Perl'; }
+  pre.src-picolisp:before { content: 'Pico Lisp'; }
+  pre.src-scala:before { content: 'Scala'; }
+  pre.src-shell:before { content: 'Shell Script'; }
+  pre.src-ebnf2ps:before { content: 'ebfn2ps'; }
+  /* additional language identifiers per \"defun org-babel-execute\"
+   in ob-*.el */
+  pre.src-cpp:before  { content: 'C++'; }
+  pre.src-abc:before  { content: 'ABC'; }
+  pre.src-coq:before  { content: 'Coq'; }
+  pre.src-groovy:before  { content: 'Groovy'; }
+  /* additional language identifiers from org-babel-shell-names in
+ ob-shell.el: ob-shell is the only babel language using a lambda
to put
+ the execution function name together. */
+  pre.src-bash:before  { content: 'bash'; }
+  pre.src-csh:before  { content: 'csh'; }
+  pre.src-ash:before  { content: 'ash'; }
+  pre.src-dash:before  { content: 'dash'; }
+  pre.src-ksh:before  { content: 'ksh'; }
+  pre.src-mksh:before  { content: 'mksh'; }
+  pre.src-posh:before  { content: 'posh'; }
+  /* Additional Emacs modes also supported by the LaTeX listings
package */
+  pre.src-ada:before { content: 'Ada'; }
+  pre.src-asm:before { content: 'Assembler'; }
+  pre.src-caml:before { content: 'Caml'; }
+  pre.src-delphi:before { content: 'Delphi'; }
+ 

Re: [O] Bug: ox-html.el does not indicate enough languages [8.2.10 (release_8.2.10 @ c:/Users/txiong/emacs-24.5/share/emacs/24.5/lisp/org/)]

2016-03-12 Thread Robert Klein
Hi,


thanks for the report.

I already began looking into this after my answer on stackexchange.
I'll try to make a patch in the next couple of days.  I want to run
some tests before submitting a patch.  You can expect a patch around
Tuesday/Wednesday.

Best regards
Robert



Tianxiang Xiong  wrote:

> 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.
> 
> 
> 
> 
> 
> In the file "ox-html.el", the following bit of CSS displays the source
> 
> code block language's name on hover:
> 
> 
> 
>   pre.src:hover:before { display: inline;}
> 
>   pre.src-sh:before{ content: 'sh'; }
> 
>   pre.src-bash:before  { content: 'sh'; }
> 
>   pre.src-emacs-lisp:before { content: 'Emacs Lisp'; }
> 
>   pre.src-R:before { content: 'R'; }
> 
>   pre.src-perl:before  { content: 'Perl'; }
> 
>   pre.src-java:before  { content: 'Java'; }
> 
>   pre.src-sql:before   { content: 'SQL'; }
> 
> 
> 
> Org supports far more languages than this. In Section 14.7 of the Org
> 
> manual, the following languages are listed (formatting is screwed up):
> 
> 
> 
>   Language Identifier Language
> Identifier
> 
>   Asymptote  asymptote  Awk  awk
> 
>   Emacs Calc   calc   CC
> 
>   C++  C++Clojure  clojure
> 
>   CSS  cssditaaditaa
> 
>   Graphviz dotEmacs Lisp
> emacs-lisp
> 
>   gnuplot  gnuplotHaskell  haskell
> 
>   Java java
> 
>   Javascript   js LaTeXlatex
> 
>   Ledger   ledger Lisp lisp
> 
>   Lilypond lilypond   MATLAB   matlab
> 
>   Mscgen   mscgen Objective Caml   ocaml
> 
>   Octave   octave Org mode org
> 
>   Oz   oz Perl perl
> 
>   Plantuml plantuml   Python   python
> 
>   RR  Ruby ruby
> 
>   Sass sass   Scheme   scheme
> 
>   GNU Screen   screen shellsh
> 
>   SQL  sqlSQLite   sqlite
> 
> 
> 
> "ox-html.el" should support at least all the languages that Org mode
> supports by default.
> 
> 
> 
> Emacs  : GNU Emacs 24.5.1 (i686-pc-mingw32)
> 
>  of 2015-04-11 on LEG570
> 
> Package: Org-mode version 8.2.10 (release_8.2.10 @
> c:/Users/txiong/emacs-24=
> 
> .5/share/emacs/24.5/lisp/org/)




Re: [O] "atomic knowledge" modeling tool

2016-02-01 Thread Robert Klein
Hi,

luke call  wrote:

> There's a program that org-mode users (as I have been) specifically 
> might be interested in, a personal "knowledge manager"/list 
> manager/organizer/etc called OneModel (Free/AGPL).  Instead of
> storing data as text, it puts *everything* in a single object model
> backed by postgresql, but text import/export are available.
> Everything one needs to know at any given time is always on the
> screen, and it is *highly* efficient to navigate (so far
> keyboard-only).  Current strengths, limitations, and future plans are
> at: http://onemodel.org
> 
> Pls forgive & spare the flames, I'll probably go quiet unless to
> answer good-faith questions.  Details & discussion at
> http://onemodel.org site/lists if desired.


So I have to actually pay for export (C-c C-e in org-mode and more
formats to export to), searching (C-s and C-r in emacs,
probably more in org-mode) and /maybe/ recent bugfixes? And probably no
Emacs shortcut keys.

You've been told not to advertise on openbsd-misc.  As your 'product' is
not relevant to org-mode, I suggest the same applies to the org-mode
list, too.

If you have to offer a exporter for org-mode exporting stuff to your
product you're very welcome to present it here.


Best regards
Robert



Re: [O] Org-mode on Github

2016-01-28 Thread Robert Klein
Hi,

gongzhitaao  wrote:

> Hi Awesome Orgmode,
> 
> I got a quick question: why not put org-mode on github?

because we have all those, too

> 
> 1. Everyone can see the development process clearly.  While currently
>we can still do it but github makes it much more easier.

git repository on orgmode.org

> 2. We can choose whichever version we want to use (most of the time,
>the latest of course, but just in case of an wierd bugs).

same as 1.  Just check out a commit or release you like and use it.

> 3. Github makes collaboration easier, e.g., everyone may submit a PR
>for a quick fix.

Org development happens on this mailing list, not i some bug tracker.
Send your git-diff to the list.

Best regards
Robert




Re: [O] Unable to resolve info links during publishing

2015-12-23 Thread Robert Klein
Hi,

On 12/22/2015 01:49 PM, Nicolas Goaziou wrote:
> Hello,
> 
> Robert Klein <rokl...@roklein.de> writes:
> 
>> when publishing a org document (to HTML), info links, e.g.
>> "info:org#Formula syntax for Lisp" throw errors, e.g.:
>>
>>   Unable to resolve link "info:org#Formula syntax for Lisp"
>>
>>
>> The link exists and can be followed in the org document by pressing
>> the keys C-c C-o.
> 
> FWIW, I cannot reproduce it on development version.

Thank you very much.  In trying to make an ECM I encountered a
custom-set-variable

   '(org-modules (quote (org-jsinfo)))

left over from pre-8.0 times.

I now commented it out in worg's .emacs-custom.el

Best regards
Robert




Re: [O] Bug in org-lob: Function call adds space to argument string with parenthesis

2015-12-22 Thread Robert Klein

Hi,

Nicolas Goaziou  wrote:

> Hello,
> 
> Tobias Zawada  writes:
> 
>> I cannot clone the git-repository as non-developer (permission
>> denied). So, trying out the development version is a bit difficult for
>> me.
> 
>   git clone git://orgmode.org/org-mode.git
> 
> gives access to non-developers, doesn't it?

Yes, it does.  If you're behind a firewall blocking git, you can also use

git clone http://orgmode.org/org-mode.git

Best regards
Robert



[O] Unable to resolve info links during publishing

2015-12-22 Thread Robert Klein
Hi,

when publishing a org document (to HTML), info links, e.g.
"info:org#Formula syntax for Lisp" throw errors, e.g.:

  Unable to resolve link "info:org#Formula syntax for Lisp"


The link exists and can be followed in the org document by pressing
the keys C-c C-o.

Org version is 8.3.2 maint.  I did a little bisection and ended up
with this commit:

dc08e98885015c27196843aeb62bde287da84873 is the first bad commit
commit dc08e98885015c27196843aeb62bde287da84873
Author: Jacob Gerlach 
Date:   Wed Mar 11 22:39:11 2015 -0400

ox.el: Issue error for unresolved fuzzy link

* lisp/ox.el (org-export-resolve-fuzzy-link): Throw an error instead
  of returning nil when link can't be resolved.

* testing/lisp/test-ox.el (test-org-export/resolve-fuzzy-link): Change
  last test from should-not to should-error

In addition to throwing an error, don't store the failed match in the
link cache.

TINYCHANGE

:04 04 3151cb8e3a5da171e93278c7fa5fd7aa82012e81 
7ff2fffd50ed0587acf5ddb498493a7a16f6b549 M  lisp
:04 04 e362c6fb9e260a6d9b0212daac3c89cf12393642 
b08d87de16cabd3416d8eefae2033e3081159218 M  testing


In fact I agree with the commit, but I don't understand why org can't
resolve the link...

Any help is very much appreciated.

Thanks and best regards
Robert



Re: [O] Bug: html-preamble doesn't work with a function [8.3.2 (8.3.2-39-gd537a3-elpa /home/pillow/.emacs.d/elpa/org-20151123/)]

2015-12-20 Thread Robert Klein
Hi,

On 12/20/2015 11:06 AM, Pillow Kuda Sai wrote:
> Nicolas Goaziou  nicolasgoaziou.fr> writes:
> 
>> You may try
>>
>>   (org-file-contents "~/Blog/html/preamble.html")
> 
> That worked! Should have figured out that insert-file-contents does not 
> return a string. Thanks for the help Nicolas!
> 
> Happy holidays,
> 
> pillow.
> 


ah, I'll try that, too.

My current solution is a function like


(defun my-html-preamble (options)
  (with-temp-buffer
(insert-file-contents "~/Documents/myproject/html/preamble.html")
(buffer-string)))


Best regards
Robert




Re: [O] Bug: html-preamble doesn't work with a function [8.3.2 (8.3.2-39-gd537a3-elpa @ /home/pillow/.emacs.d/elpa/org-20151123/)]

2015-12-15 Thread Robert Klein
Hi,

I only use a function name, e.g.

(defun my-html-preamble (options)
"my preamble")

and

(setq org-publish-project-alist
  '(
("org-notes"
 :base-directory "~/org/"
 :base-extension "org"
 :publishing-directory "~/public_html/"
 :recursive t
 :publishing-function org-html-publish-to-html
 :html-preamble my-html-preamble)))

Does this work for you?

Best regards
Robert


On 12/12/2015 08:26 PM, Pillow Kuda Sai wrote:
> My setup:
> ;;; Minimal setup to load latest 'org-mode'
> ;; activate debugging
> (setq debug-on-error t
>   debug-on-signal nil
>   debug-on-quit nil)
> 
> ;; add latest org-mode to load path
> (add-to-list 'load-path (expand-file-name "~/.emacs.d/elpa/org-20151123/"))
> (add-to-list 'load-path (expand-file-name
> "~/.emacs.d/elpa/org-20151123/" t))
> 
> What I did:
> (require 'ox-publish)
> (setq org-publish-project-alist
>   '(
>   ("org-notes"
>:base-directory "~/org/"
>:base-extension "org"
>:publishing-directory "~/public_html/"
>:recursive t
>:publishing-function org-html-publish-to-html
>:headline-levels 4 ; Just the default for this project.
>:auto-preamble t
>;; :html-preamble "Howdy" ; does work
>:html-preamble (concat "Howdy")
>)
>   ("org-static"
>:base-directory "~/org/"
>:base-extension "css\\|js\\|png\\|jpg\\|gif\\|pdf\\|mp3\\|ogg\\|swf"
>:publishing-directory "~/public_html/"
>:recursive t
>:publishing-function org-publish-attachment
>)
>   ("org" :components ("org-notes" "org-static"
> 
> What I expected: All off the above code is from
> http://orgmode.org/worg/org-tutorials/org-publish-html-tutorial.html
> except for the :html-preamble part. I want to add my own preamble by
> using a function. :html-preamble sets org-html-preamble (the options
> are: nil, t, string, function that must return a string). When using a
> string (:html-preamble "Howdy") it works. When using a function that
> returns a string (:html-preamble (concat "Howdy")) it doesn't work.
> 
> I'm not entirely sure if this is a bug or if I'm missing something but
> hopefully the mailing-list can help me out :)
> 
> Thanks in advance, Pillow
> 
> 
> 
> 
> Emacs  : GNU Emacs 25.0.50.2 (x86_64-unknown-linux-gnu, GTK+ Version 3.14.5)
>  of 2015-10-09
> Package: Org-mode version 8.3.2 (8.3.2-39-gd537a3-elpa @
> /home/pillow/.emacs.d/elpa/org-20151123/)
> 
> current state:
> ==
> (setq
>  org-src-lang-modes '(("ocaml" . tuareg) ("elisp" . emacs-lisp) ("ditaa"
> . artist) ("asymptote" . asy)
> ("dot" . fundamental) ("sqlite" . sql) ("calc" . 
> fundamental)
> ("C" . c) ("cpp" . c++)
> ("C++" . c++) ("screen" . shell-script))
>  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-sparse-tree-default-date-type 'scheduled-or-deadline
>  org-latex-default-packages-alist '(("AUTO" "inputenc" t) ("T1"
> "fontenc" t) ("" "fixltx2e" nil) ("" "graphicx" t)
>   ("" "longtable" nil) ("" "float" nil) ("" 
> "wrapfig" nil) (""
> "rotating" nil)
>   ("normalem" "ulem" t) ("" "amsmath" t) ("" 
> "textcomp" t) (""
> "marvosym" t)
>   ("" "wasysym" t) ("" "amssymb" t) ("" 
> "hyperref" nil)
> "\\tolerance=1000")
>  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-clock-into-drawer nil
>  org-latex-format-inlinetask-function 'ignore
>  org-confirm-shell-link-function 'yes-or-no-p
>  org-ascii-format-inlinetask-function 'org-ascii-format-inlinetask-default
>  org-latex-text-markup-alist '((bold . "\\textbf{%s}") (code . verb)
> (italic . "\\emph{%s}")
>  (strike-through . "\\sout{%s}") (underline . 
> "\\uline{%s}")
>  (verbatim . protectedtexttt))
>  org-latex-format-headline-function
> 'org-latex-format-headline-default-function
>  org-after-todo-state-change-hook '(org-clock-out-if-current)
>  org-latex-format-drawer-function '(lambda (name contents) contents)
>  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-html-allow-name-attribute-in-anchors t
>  org-latex-logfiles-extensions '("aux" "idx" "log" "out" "toc" "nav"
> "snm" "vrb")
>  org-export-copy-to-kill-ring 'if-interactive
>  org-mode-hook '(#[nil 

Re: [O] Wrapping section within LaTeX environment

2015-12-15 Thread Robert Klein
Hi

On 12/13/2015 03:00 PM, Xavier Garrido wrote:
> Dear orgers,
> 
> I would like to wrap a given org section between =\begin,\end= LaTeX
> environment. These sections are identified by a special tag :correction:
> and to initiate the =\begin= flag I have basically no problem by using
> the  org-export-filter-headline-function filter. The problem comes when
> I want to close the environment i.e. when another section starts. I have
> try this piece of code
> 
> #+BEGIN_SRC emacs-lisp
>   (setq correction-flag nil)
>   (defun cpp-correction-headline (contents backend info)
> (if (and (org-export-derived-backend-p backend 'latex) 
>(string-match "\\`.*correction.*\n" (downcase contents)))
> (progn
>   (setq correction-flag t)
>   (replace-match "begin{correction}" nil nil contents)
>   )
>   (when correction-flag
> (setq correction-flag nil)
> (concat "\\end{correction}" contents))
>   )
> )
>   (add-to-list 'org-export-filter-headline-functions
> 'cpp-correction-headline)
> #+END_SRC

If I read this right, you are writing the \end{correction} when the
headline function is called for the /following/ headline.

Then the (when...) should be outside the (if..) (because the
string-match condition isn't valid anymore).

Of course you still get issues when two consecutive sections are tagged
for correction -- and there has to be a follow-up heading to the one
tagged for correction.

Your code from your second mail does the job perfectly, but I've been
intrigued in figuring this one out :)

Best regards
Robert


> 
> but I get several =\end{correction}= in the produced LaTeX file.
> Actually this is much more a emacs-lisp related question since the
> boolean =correction-flag= seems not to work and I don't know why (of
> course I have very little knowledge in lisp). Can some emacs-lisp
> experts helps me understand why the above code just does not work.
> 
> Thanks a lot,
> Xavier
> 



Re: [O] orgmode.org is down?

2015-11-29 Thread Robert Klein
Hi,

Bastien apparently already restarted it.

Thanks a lot, Bastien!

Best regards
Robert


On 11/29/2015 01:40 AM, Ishikawa Takaaki wrote:
> Dear Bastien and all,
> 
> @rafiks  reported me the official website is
> down now.
> Port 22 is open, but 80 is filtered.
> Please restart httpd :-)
> 
> 
> Best,
> Takaaki
> 
> --
> tak...@ieee.org 



Re: [O] small caps

2015-10-29 Thread Robert Klein
Hi,

Matt Price wrote:
> do we have a syntax for the "small caps" text attribute in Org? If not,
> should we? It is available in odt, html, and latex, and is used in some
> bibliographic styles. 


You can add a link type, e.g.:

#+begin_src emacs-lisp
  (org-add-link-type
   "fm" nil
   (lambda (path desc format)
 (cond
  ((eq format 'html)
   (cond
((equal path "sc")
 (format "%s"
 desc))
((equal path "it")
 (format "%s" desc))
((equal path "bf")
 (format "%s" desc))
((equal path "tt")
 (format "%s" desc))
(t (format "%s" desc
  ;; "" )))
  ((eq format 'latex)
   (format "\\text%s{%s}" path desc))
  ((eq format 'odt)
   (cond
((equal path "sc")
 (format "hello" desc))
;; more code for it, bf, tt etc.
))
  (t Y
#+end_src

The odt stuff I typed right into this mail, so it probably doesn't
word out of the box. (don't ask me about the "(t Y)" at the end; don't
know...)

Anyway, now you can use small capitals as [[fm:sc][ad]] and you get
"ad" in small caps.

For my documents I set the following macros for small capitals and
teletype:

#+Macro: sc [[fm:sc][$1]]
#+Macro: tt [[fm:tt][$1]]

Now you can use the macros like {{{sc(ad)}}} or {{{sc(Text in Small
Caps)}}}. Note, the uppercase letters will remain uppercase.

Best regards
Robert



Re: [O] org export outcomes differ from one attempt to the next

2015-09-29 Thread Robert Klein
Hi,

Nicolas Goaziou  wrote:

> Hello,
> 
> Eric S Fraga  writes:
> 
> > Actually, my settings are at the end of the whole 4000+ line file
> > so I am not sure what you are suggesting I try.  If I delete the
> > whole settings subtree, the exports all result in the same LaTeX.
> > However, that is of no use to me, obviously.  I guess I can try to
> > add one line at a time to see when the export breaks.  I may try
> > that tomorrow.
> 
> Providing a shorter test file would be helpful, no matter how much
> settings you have.
> 
> > I guess I would like some insight into how the latex_header lines
> > are parsed by org, maybe in org-element?
> 
> They are collected in `org-export--get-inbuffer-options' which is
> called by `org-export-get-environment'.
> 
> IIRC, Robert Klein's problem was due to an explicit call to
> `org-export-get-environment' at Babel evaluation time, before the
> buffer was correctly prepared for export. If you call
> `org-export-get-environment' within your settings, it may be related.

is there another way to get property values during export (i use them
in #+LaTeX_Header: lines).

Thanks and best regards
Robert




Re: [O] http address for cloning org-mode git

2015-09-23 Thread Robert Klein
Hi,

Kaushal Modi  wrote:

> Just to clarify,
> 
> git clone http://orgmode.org/org-mode.git org-mode
> 
> gets stuck at "Cloning into 'org-mode' ..."


That's the point where it typically take a couple of minutes to
complete for me.

Best regards
Robert

> 
> But git cloning the mirror http repo works fine.
> 
> 
> 
> --
> Kaushal Modi
> 
> On Wed, Sep 23, 2015 at 3:29 PM, Achim Gratz 
> wrote:
> 
> > Suvayu Ali writes:
> > > On Wed, Sep 23, 2015 at 03:03:42PM -0400, Kaushal Modi wrote:
> > >> I cannot access the git: repo address and so had been using the
> > >> http: version till now ( http://repo.or.cz/r/org-mode.git/ ).
> > >
> > > That is a mirror, a relic from the old days when that used to be
> > > the official repo.  Maybe try:  http://orgmode.org/org-mode.git
> >
> > No, that never was the official repo.  I've set up that mirror.
> >
> >
> > Regards,
> > Achim.
> > --
> > +<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+
> >
> > Samples for the Waldorf Blofeld:
> > http://Synth.Stromeko.net/Downloads.html#BlofeldSamplesExtra
> >
> >
> >




Re: [O] org export outcomes differ from one attempt to the next

2015-09-21 Thread Robert Klein
Hi,

Eric S Fraga  wrote:

> Following up on my own post, I thought I would illustrate what I get.
> 
> I've attached three screenshots:
> 
> 1. a snippet from the org file where I have a number of latex_header
> lines.

two things:

- if your org version is the one stated in your mail footer
  (release_8.3.1-234-g8c85c9), then it is 11 days old :)

- anyway, this sounds similar to my issues in thread
  http://article.gmane.org/gmane.emacs.orgmode/98428  (resolved, but
  it wasn't really clear, /why/ the patch worked...)  Does your
  issue also happen, when you take only the beginning of your file up
  to the first paragraph of the first heading (not marked
  as :noexport:)?  This is not a /minimal/ minimal example, but if
  you can post this plus the relevant parts of your setup, there is a
  chance to reproduce and solve the issue.

Best regards
Robert



Re: [O] Agenda Tag filtering - has the behaviour changed?

2015-09-17 Thread Robert Klein
Hi,

Bernt Hansen  wrote:

> Hi,
> 
> I am a long-time user of org-mode and am currently using the
> maintenance release 8.3.1
> 
> I noticed that in the agenda the '//' key to filter by tag now adds
> tags when used multiple times.  This breaks my normal workflow for
> quickly filtering by a specific tag.
> 
> In the past I would do:
> 
> / P to filter items for PRODUCTION then
> / D to filter items by DEV
> 
> But now the behaviour is
> 
> / P to filter items by PRODUCTION
> / D adds DEV to filtering by PRODUCTION+DEV which returns no items.
> 
> Now I have to do // to clear the tag list between filters.
> 
> Is this intended behaviour and did I miss the NEWS update on this?
> 
> Thanks,
> Bernt
> 

Looking through the commit messages this may come from commit
6c6ae990c10dbe7f96b24fccf840fe9f6d81a3b8

Sorry, I don't use the agenda, so I can't help you more at the moment.

Best regards
Robert





Re: [O] babel stopping export after updating to org 8.3

2015-09-15 Thread Robert Klein
Hi

Aviv wrote:
> Robert Klein  roklein.de> writes:
> 
>>
>> Hi
>>
>> Aviv wrote:
>>
>>> Hi! 
>>>
>>> I just upgraded to org 8.3 and am stuck with an export issue.
>>>
>>> When I try to export a file with just "#+begin_src" and " "#+end_src" as 
>>> the 
>>> only lines, I get the error 
>>> "user-error: No language for src block: (unnamed)". 
>>>
>>> It seems like it is calling org-babel-exp-process-buffer -- but there is no 
>>> reason that I can tell that is being called.  (org-export-babel-evaluate is 
>>> definitely nil, thought other testing seems to indicate that shouldn't even 
>>> matter)
>>>
>>> I've tried this in a clean "emacs -q" emacs and there is no issue -- but I 
>>> still have the issue with an empty init.el! 
>>>
>>> Any idea what could be wrong?  Thanks!
>>>
>>>
>>
>> You need to specify a language, e.g.
>>
>> #+begin_src foo
>> #+end_src
>>
>> You can use any string for language.  However, if you export to latex
>> you want to either
>>
> 
> Sorry, I should have clarified. I know that the error is a result of not 
> specifying a language. But it wasn't necessary to specify one before, and it 
> seems like it's better for it not to actually be required now either, unless 
> I'm missing something -- should I also specify "pseudocode"? 
> 
> Also, if that was correct behavior, it should be described as a breaking 
> change from 8.2 to 8.3, and it's not at http://orgmode.org/Changes.html .

For me org version 7.9.3f (came with emacs 24.3) a source block without
language also fails with °Source block missing language specification"
as soon as the source block isn't empty -- on 8.3.1 it also fails on
empty source blocks, too.

Afaik only begin_example and end_example don't need a language
specification.

Note: I get fooled by the language specification regularly; either I
forget to specify the language on the begin_src line (where I think it
is Ok to get an error -- I might want to have syntax highlighting or
even get the code executed)  or I put the language on the end_src line,
too, which imho should be ignored by the exporter :)



> 
> --
> 
> So, I just checked the manual and it seems like "#+begin_src" does (now?) 
> require a language block, but given that up until now this sort of export did 
> not cause errors, it seems odd to require that all the sudden and break all 
> exports that depend on it without alerting users. 
> 
> That said, I figured out the distinction between "emacs -q" and just using an
> empty init.el file. It turns out that "-q" actually loads org version 8.2.10!
> (while an empty init.el load 8.3.1) Though I'm not sure why that is either...

Do you have a ~/.emacs or ~/_emacs.el file?  See
http://www.gnu.org/software/emacs/manual/html_node/emacs/Find-Init.html#Find-Init
and
http://www.gnu.org/software/emacs/manual/html_node/emacs/Init-File.html
for the details of emacs initialization.

Best regards
Robert



Re: [O] babel stopping export after updating to org 8.3

2015-09-14 Thread Robert Klein
Hi

Aviv wrote:

> Hi! 
> 
> I just upgraded to org 8.3 and am stuck with an export issue.
> 
> When I try to export a file with just "#+begin_src" and " "#+end_src" as the 
> only lines, I get the error 
> "user-error: No language for src block: (unnamed)". 
> 
> It seems like it is calling org-babel-exp-process-buffer -- but there is no 
> reason that I can tell that is being called.  (org-export-babel-evaluate is 
> definitely nil, thought other testing seems to indicate that shouldn't even 
> matter)
> 
> I've tried this in a clean "emacs -q" emacs and there is no issue -- but I 
> still have the issue with an empty init.el! 
> 
> Any idea what could be wrong?  Thanks!
> 
> 

You need to specify a language, e.g.

#+begin_src foo
#+end_src

You can use any string for language.  However, if you export to latex
you want to either

a) use a language the LaTeX `listings' package knows about or

b) map your language string to a language existing in the `listings'
package.


I like to put configuration files in src blocks as language `conf', so I
added the following to my .emacs file:

(add-to-list 'org-latex-listings-langs
   '(conf " "))

That is, I set the `listings' packages language to a blank (empty string
doesn't work) and only generic settings (i.e. no specific language
settings) are used when I tex the file.

HTH

Best regards
Robert



Re: [O] Merge branch 'maint'

2015-09-10 Thread Robert Klein
Hi,

Oleh Krehel  wrote:

> Kyle Meyer  writes:
> 
> > Hello,
> >
> > Oleh Krehel  writes:
> >
> >> Hi all,
> >>
> >> Was the issue of abundant "Merge branch 'maint'" commit messages
> >> discussed before? I couldn't find a reference...
> >>
> >> It's not a big deal, really, but I personally prefer to have linear
> >> history with commits that actually do stuff. And it should be easy
> >> to switch to this style: just use the "rebase" instead of the
> >> "merge" command.
> >>
> >> Anyway, it's a small thing, and if Nicolas or Bastien strongly
> >> like the merge method I won't bring it up again. But if they don't
> >> care either way, I think it's better to start rebasing.
> >
> > While I'm all for rebasing unpushed commits, short-lived feature
> > branches, and throw-away integration branches, your suggestion would
> > frequently rewrite the history of a long-lived public branch.
> 
> Why not just cherry-pick the commits from master onto maint, or the
> other way around? That would result in no merge commits.
> 
> I think it should be possible to rebase two branches without having to
> rewrite the public history. As far as I understood, maint is a subset
> of master, i.e. all commits that are in maint are in master as well.
> Is that correct?

No.

I agree, the many merge commits in August/September look ugly right
after the 8.3/8.3.1 release. Maint and master will surely diverge more,
now...

Best regards
Robert




Re: [O] Exporting multilingual documents (with Japanese) to PDF

2015-09-07 Thread Robert Klein
Hi,

On Mon, 07 Sep 2015 19:18:02 -0500
Luis Felipe López Acevedo  wrote:

> Hi,
> 
> I'm using Emacs 24.4.1 on Debian 8. I currently can export to PDF 
> documents that mix English and Spanish, but a simple document like
> the following produces a PDF with no Japanese characters at all. Only
> the English and Spanish text is visible.
> 
>  #+TITLE: Notes on Japanese
>  #+DATE: 2015-09-07
> 
> 
>  * 2015年9月7日
> 
>  - おはようございます!
>  - Good morning!
>  - ¡Buenos días!
> 
> The "Org PDF LaTeX Output" shows several errors like this one:
> 
>  ! Package inputenc Error: Unicode char \u8:年 not set up for use
> with LaTeX.
> 
> The complete log: 
> https://bitbucket.org/sirgazil/dnd/downloads/nihongo.log
> 
> Searching for a solution on the Web I found this post 
> http://blogs.fsfe.org/ciaran/?p=150. When I use "pdflatex JIS.tex" as 
> indicated there, I get a good PDF with Japanese characters.
> 
> So I'm wondering how to get this working on Org mode...
> 

like Thomas Dye showed in his mail, you have to encapsulate the
Japanese text in LaTeX with \begin{CJK} and \end{CJK}.

You can also use links or macros (using links).  An example (for
Chinese, but Japanese is basically the same, except the fonts):

Put the following in your .emacs:

#+begin_src elisp
  (org-add-link-type
   "zh" nil
   (lambda (path desc format)
 (cond
  ((eq format 'html)
   (format "%s" desc))
  ((eq format 'latex)
   (format "\\zh{%s}" desc)
#+end_src

Put the following in the head of your org file:

#+begin_src org
  #+LaTeX_HEADER: %% CJK stuff
  #+LaTeX_HEADER: \usepackage[encapsulated]{CJK}
  #+LaTeX_HEADER: \usepackage[CJK, overlap]{ruby}
  #+LaTeX_HEADER: \usepackage{pinyin}

  #+LaTeX_HEADER: \newcommand{\zh}[1]{\begin{CJK}{UTF8}{gkai}\Large
#1\end{CJK}} % gb2312 kai #+LaTeX_HEADER: \renewcommand{\rubysize}{0.5}

  #+LaTeX_HEADER: %% pinyin 1st and 3rd tone (shortened)
  #+LaTeX_HEADER: \usepackage{newunicodechar}
  #+LaTeX_HEADER: \newunicodechar{ǎ}{\v{a}}
  #+LaTeX_HEADER: \newunicodechar{ǐ}{\v{\i}}

  #+Macro: zh [[zh:][$1]]
#+end_src org 


Then use CJK in your org file like this:

#+begin_src org
  Now you can user CJK characters like {{{zh(你好!)}}} (Nǐ hǎo) or
  [[zh:][你好!]].
#+end_src

Best regards
Robert




Re: [O] gnuplot: plotting students' progress of grades

2015-09-01 Thread Robert Klein
Hi,

Tobias Frischholz  wrote:

> Hi List,
> 
> I have a table in org which looks like this (student’s grades):
> 
  [s.d.]
> I would like to use gnuplot to show me a line graph of each student’s
> single grades in order to resemble their progress during the school
> year. Can this be achieved with it?
> 

You can use something like this:

#+Name: grades
|---+++++--|
|   | Schüler| 1-fach | 1-fach | 1-fach | note |
|---+++++--|
| # | Wurm, Hans |  4 |  3 |  2 | 3.18 |
| # | Igel, Sepp |  1 |  2 |  3 | 3.28 |
|---+++++--|
| # | \o |   2.50 |   2.50 |   2.50 | 3.23 |
|---+++++--|

#+begin_src gnuplot :var data=grades :file noten.png
  put your gnuplot code here
#+end_src

Please see the worg page
http://orgmode.org/worg/org-contrib/babel/languages/ob-doc-gnuplot.html
for more information.

Best regards
Robert



> Best regards,
> Tobias Frischholz
> 
> PGP PUBLIC KEY:
> http://pgp.mit.edu/pks/lookup?search=0xCD463AC1=index
> 




Re: [O] Worg isn't publishing

2015-08-31 Thread Robert Klein
Hello,

Nicolas Goaziou <m...@nicolasgoaziou.fr> wrote:

> Hello,
> 
> Robert Klein <rokl...@roklein.de> writes:
> 
> 
> FYI <http://permalink.gmane.org/gmane.emacs.orgmode/100625> may be
> related.
> 


Yes, something like that.  What actually happens is, the
org-mode repository clone for worg publications is also used to create
the daily snapshots for download.  So once daily the repository
switches to the master branch and back.  When switching back to maint
there were autoloads created, but the remnants of the master branch not
cleaned.

I added a 'make cleanall' after checking out maint (just as there
already was for checking out the master branch).

When I'm more familiar with the different scripts, cronjobs etc. on the
org-mode server I'll think about using different org-mode clones.

Best regards
Robert






Re: [O] Worg isn't publishing

2015-08-31 Thread Robert Klein
Hi,

Sebastien Vauban <sva-n...@mygooglest.com> wrote:

> Robert Klein <rokl...@roklein.de> writes:
> > Thomas S. Dye <t...@tsdye.com> wrote:
> >> Robert Klein <rokl...@roklein.de> writes:
> >>> Kyle Meyer <k...@kyleam.com> wrote:
> >>>> Thomas S. Dye <t...@tsdye.com> writes:
> >>>> >
> >>>> > Worg hasn't published for several days.
> >>>> >
> >>>> > All the best,
> >>>> > Tom
> >>>> 
> >>>> I pushed to Worg last night and noticed that it did not update.
> >>>> I recorded the message below but hadn't got around to emailing
> >>>> the list.
> >>>
> >>> I saw two updates on worg from yesterday, so probably everything
> >>> is Ok again.
> >> 
> >> I'm not seeing my changes to
> >> http://orgmode.org/worg/org-contrib/babel/languages.html
> >
> > I fixed the build.  Your changes now show up.
> 
> Could you tell us what had to be fixed, so that we can lear as well?
> Thanks!

Basically I ran the following five commands on the org-mode server:

cd ~emacs/git/org-mode
sudo -u emacs make clean
sudo -u emacs make

cd ~worg/worg.git/hooks/
sudo -u worg ./post-update


However, I saw the invalid function 41 again, so I still have to dig
deeper.  I know one script that causes this already.  Probably I can
tell more later, today.


Best regards
Robert


> 
> Best regards,
>   Seb
> 




Re: [O] Worg isn't publishing

2015-08-30 Thread Robert Klein
Hi,


Thomas S. Dye t...@tsdye.com wrote:

 
 Robert Klein rokl...@roklein.de writes:
 
  Hi,
 
  Kyle Meyer k...@kyleam.com wrote:
 
  Thomas S. Dye t...@tsdye.com writes:
  
   Aloha all,
  
   Worg hasn't published for several days.
  
   All the best,
   Tom
  
  I pushed to Worg last night and noticed that it did not update.  I
  recorded the message below but hadn't got around to emailing the
  list.
 
  I saw two updates on worg from yesterday, so probably everything is
  Ok again.
 
 I'm not seeing my changes to
 http://orgmode.org/worg/org-contrib/babel/languages.html
 
 All the best,
 Tom
 



I fixed the build.  Your changes now show up.

Best regards
Robert



Re: [O] Worg isn't publishing

2015-08-29 Thread Robert Klein
Hi,

On Fri, 28 Aug 2015 12:38:57 -0400
Kyle Meyer k...@kyleam.com wrote:

 Thomas S. Dye t...@tsdye.com writes:
 
  Aloha all,
 
  Worg hasn't published for several days.
 
  All the best,
  Tom
 
 I pushed to Worg last night and noticed that it did not update.  I
 recorded the message below but hadn't got around to emailing the list.

I saw two updates on worg from yesterday, so probably everything is Ok
again.

Please give me a note, when you still see invalid function 41 or so,
then I'll clean up the org used for publishing worg manually.

Best regards
Robert




Re: [O] current head croaks on export since commit Backport commit 3a5f751 from Emacs master branch

2015-08-11 Thread Robert Klein
On Mon, 10 Aug 2015 12:26:00 -0400
Kyle Meyer k...@kyleam.com wrote:

 Kyle Meyer k...@kyleam.com wrote:
 [...]
  The backport changed a '(while (setq VAR (pop LIST)))' to
  '(dolist (VAR LIST))', which exposes this, but '(nil)' should not be
  passed as a list of files in the first place.
 
 Fixed in 44c8cd7.
 

Confirmed.  It works again.  Thank you very much!

Best regards
Robert



[O] current head croaks on export since commit Backport commit 3a5f751 from Emacs master branch

2015-08-10 Thread Robert Klein
Hi,

when I export a file with current org main I get the following error
(git-bisect-identified commit below):


Debugger entered--Lisp error: (wrong-type-argument stringp nil)
  file-exists-p(nil)
  org-check-agenda-file(nil)
  byte-code(\306!\203\f..   [can't paste]   .b\207 [file pos
org-agenda-ignore-properties org-todo-keywords-for-agenda
org-todo-keywords-1 org-done-keywords-for-agenda bufferp
org-check-agenda-file org-get-agenda-file-buffer
org-set-regexps-and-options tags-only category
org-refresh-category-properties stats org-refresh-stats-properties
effort org-refresh-effort-properties appt org-refresh-properties
APPT_WARNTIME org-appt-warntime append copy-sequence delete-dups
org-uniquify-alist buffer-modified-p t nil ((byte-code  [modified
restore-buffer-modified-p nil] 2)) remove-text-properties
re-search-forward org-at-heading-p add-text-properties point-at-bol
org-end-of-subtree format ^\\* .*\\%s\\ match-data ((byte-code
... [save-match-data-internal set-match-data evaporate] 3))
org-in-commented-heading-p 0 org-done-keywords
org-todo-keyword-alist-for-agenda org-todo-key-alist
org-tag-alist-for-agenda org-tag-alist org-tag-persistent-alist list
res org-group-tags ...] 5)
 org-agenda-prepare-buffers((nil))
  org-map-entries(#[nil \300\301 !\207 [org-reduced-level
 org-current-level] 2])
 
org-export--prepare-file-contents(/home/theorie/kleinrob/Documents/mpipdocs/sysdoc/include/mpip-akte.org
 nil 0 1 1 #s(hash-table size 65 test equal rehash-size 1.5
 rehash-threshold 0.8 data ( ...))) org-export-expand-include-keyword()
 org-export-as(latex nil nil nil (:output-file ./nmrfiler.tex))
 org-export-to-file(latex ./nmrfiler.tex nil nil nil nil nil #[(file)
 \301!\207 [file org-latex-compile] 2]) org-latex-export-to-pdf(nil
 nil nil nil) org-export-dispatch(nil)
 call-interactively(org-export-dispatch nil nil)
 command-execute(org-export-dispatch)

it worked on friday morning; git bisect identifiesd the following
commit:

 git bisect bad
ef9637030456b153fd834f4c9202a9264d5ef18d is the first bad commit
commit ef9637030456b153fd834f4c9202a9264d5ef18d
Author: Stefan Monnier monn...@iro.umontreal.ca
Date:   Sat Aug 8 19:41:57 2015 -0400

Backport commit 3a5f751 from Emacs master branch

* lisp/org.el (org-goto-map, org-assign-fast-keys)
(org-contextualize-keys, org-contextualize-validate-key)
(org-notes-order-reversed-p, org-local-logging, org-map-entries)
(org-find-olp, org-find-exact-heading-in-directory)
(org-cycle-agenda-files, org-release-buffers, org-fill-template)
(org-agenda-prepare-buffers, org-occur-in-agenda-files)
(org-replace-escapes): Use dolist.
(org-mode): Optimize away XEmacs-only code.
(org-refile-get-targets): Remove unused var `f'.
(org-fast-todo-selection): Remove unused var `e'.
(org-make-tags-matcher): Use dolist.  Remove unused var `term'.
(org-fast-tag-selection): Use dolist.  Remove unused var `e'.
(org-format-latex): Use dolist.  Remove unused var `e'.
(org-backward-sentence, org-forward-sentence, org-meta-return)
(org-kill-line): Mark arg as unused.
(org-submit-bug-report): Silence compiler warning.
(org-occur-in-agenda-files): Don't use add-to-list on local vars.
(org-get-cursor-date): Remove unused var `tm'.
(org-comment-or-uncomment-region): Use standard name `_'.
(reftex-docstruct-symbol, reftex-cite-format): Declare to
silence byte-compiler.
(org-reftex-citation): Add `org--' prefix to dynamically scoped
`rds' var.

org.el: Fix up some lexical scoping warnings, and use dolist
3a5f75193ed10ee5fb458e9879340947f31d5e12
Stefan Monnier
Sat Aug 8 19:41:57 2015 -0400

:04 04 19e9e2191b96b7139dd54e2b6682783bfaabb2c4
75f021c6d8d6e92c803e0a2723cd22de5aa2c130 M  lisp


If the changes in the commit are Ok, there should perhaps be a check in
org-check-agenda-file:

(defun org-check-agenda-file (file)
  Make sure FILE exists.  If not, ask user what to do.
  (when (not (string-p file))
  do something else...


Any help is very much apprecieated.

Thank you very much!

Best regards
Robert



Re: [O] [DEV] Bump Emacs requirement to 24.4?

2015-08-06 Thread Robert Klein
On Thu, 06 Aug 2015 10:03:17 +0200
Nicolas Goaziou m...@nicolasgoaziou.fr wrote:

 Robert Klein rokl...@roklein.de writes:
 
  On Wed, 05 Aug 2015 23:51:32 +0200
  Rasmus ras...@gmx.us wrote:
 
  Nicolas Goaziou m...@nicolasgoaziou.fr writes:
  
   Just to be sure, can we require Emacs 24.4 for development
   version (a.k.a. Org 8.4)? As a data point, Debian stable
   provides it.
  
  
  Are the any differences between 24.4 and 24.5 that we care about?
  
  wrt the distros I care about:
  
  - Arch and Fedora are on both on 24.5.
  - CentOS7 is still 24.3.  So is Slackware.
 
   SUSE Linux Enterprise 12 and openSUSE 13.2 also have 24.3.  The
   package for future openSUSE:42 is 24.3, too.
 
 Bumping requirements to Emacs 24.3 instead of 24.4 is no biggie. 24.4
 is just icing on the cake.


On second thought, go for it.  Org 8.3 runs on Emacs 24.3 and if I want
a newer Org I can also install my own Emacs.  (Just checked: I already
do so, though I forgot the reason. )

Best regards
Robert



Re: [O] [DEV] Bump Emacs requirement to 24.4?

2015-08-05 Thread Robert Klein
On Wed, 05 Aug 2015 23:51:32 +0200
Rasmus ras...@gmx.us wrote:

 Nicolas Goaziou m...@nicolasgoaziou.fr writes:
 
  Just to be sure, can we require Emacs 24.4 for development version
  (a.k.a. Org 8.4)? As a data point, Debian stable provides it.
 
 
 Are the any differences between 24.4 and 24.5 that we care about?
 
 wrt the distros I care about:
 
 - Arch and Fedora are on both on 24.5.
 - CentOS7 is still 24.3.  So is Slackware.

 SUSE Linux Enterprise 12 and openSUSE 13.2 also have 24.3.  The
 package for future openSUSE:42 is 24.3, too.

Best regards
Robert



Re: [O] Org-mode exporters licensing

2015-07-28 Thread Robert Klein
On Mon, 27 Jul 2015 20:49:05 +0200
Marcin Borkowski mb...@mbork.pl wrote:

 
 On 2015-07-27, at 20:30, Daniele Nicolodi dani...@grinta.net wrote:
 
  On 27/07/15 20:20, Marcin Borkowski wrote:
  
  On 2015-07-27, at 20:02, Daniele Nicolodi dani...@grinta.net
  wrote:
  
  On 27/07/15 19:42, Marcin Borkowski wrote:
  That I've already learned.  OTOH, one of the reasons to use PD
  might be that I explicitly state that I object the legal system
  I live in.  (Mind you: I'm not an anarchist, and I'm very far
  from that.  But this system is almost unbearable.)
 
  This statement confirms that you do not really understand what
  you are talking about: as you cannot renounce your copy rights,
  you cannot place something in the public domain. If you do not
  release your work with an explicit license, the default copyright
  protection law applies and this means (in all jurisdictions I
  know about) that you reserve all rights to yourself: none can use
  your code, and probably not even look at it.
  
  I do understand (at least I think so).  And I do understand that my
  declaration of putting something in PD would be technically void.
  I just don't care about it, if the declaration of intent is clear.
 
  If you do not care about the terms in which who receives your work
  is able to use it, why all the discussion?
 
  I thought that you were arguing that a less strict license than the
  GPL is better for the content of a possible tutorial and you were
  inquiring if you could release your code derived or inspired from
  GPL code with another license. Now you say that you do not care, or
  better you say that you do not want to give any rights to who
  receives your code.
 
  I think you are confused.
 
 I was unclear again, sorry.
 
 1. As for my planned tutorial: I am reconciled with the idea that it
 might have to be GPL'd.  Though I still maintain that GPL is not an
 optimal license for such work.
 
 2. As for other code I might write and publish: I'm tempted to use the
 Unlicense (which is basically more or less putting it into the PD),
 even though it might (technically) be void.
 
  Cheers,
  Daniele

FWIW, what Richard Lawrence posted in the other threat sounds good.  

Please feel free to use my material I posted to the list
(see
http://lists.gnu.org/archive/html/emacs-orgmode/2015-06/msg00160.html)
I mostly copied the export function in the example from org-mode, but
the rest you may use as you like.

Best regards
Robert




Re: [O] ox-latex: default packages cleaning

2015-07-11 Thread Robert Klein
Hi Rasmus,

On Sat, 11 Jul 2015 12:48:06 +0200
Rasmus ras...@gmx.us wrote:

 Hi Robert,
 
 Robert Klein rokl...@roklein.de writes:
 
  * Fixltx2e
  
  This packages is depreciated with TL2015 cf. LaTeX News 22.  We can
  use \RequirePackage[current]{latexrelease} but there's no point in
  that AFAIK latexrelease only useful for backwards
  compatibility.
 
  Leaving this out probably doesn't break texing with older
  texlive versions.
 
  Please try to keep export compatible to older versions.  I have a
  couple of computers where I can use new versions of org-mode (and an
  appropriate version of emacs), where it is not feasible to install a
  newer version of texlive.
 
 The target of Org 8.3 is 24.3.  I don't know if there's a policy wrt
 targeting older versions of auxiliary software.
 
 In the case of fixltx2 it's reasonable to only remove it from the
 default packages after the release of Org 8.3.  Extrapolating, users
 of org-stable will only see that change 1-2 years from now.

Forget what I said.  You are right.

LaTeX will also work without fixltx2e and org latex export probably
doesn't need it anyway.

Sorry about that.

Best regards
Robert



  1   2   3   >