[O] org-review is on melpa

2016-09-06 Thread Alan Schmitt
Hello,

After using this for a couple of years, I’ve finally taken the time to
put it on Melpa. Org-review (https://melpa.org/#/org-review) is a set of
functions to maintain review dates for entries, so that you may generate
agenda view of things to review. I use it every Friday during my weekly
review to review projects and single tasks.

Best,

Alan

-- 
OpenPGP Key ID : 040D0A3B4ED2E5C7
Monthly Athmospheric CO₂, Mauna Loa Obs. 2015-07: 401.31, 2016-07: 404.39


signature.asc
Description: PGP signature


[O] Why does Helm break org-contact group add?

2016-09-06 Thread Tory S. Anderson
I thoroughly enjoy Org Contact for managing my contacts. One of 
its features is the ability to enter + and have an 
entire group of contacts added to the To: or Cc: . Unfortunately, 
when global-helm-mode is enabled, it doesn't work; when `+ 
TAB` is entered, an error occurs:


Lisp error: (wrong-type-argument sequencep 65)

I'm new enough to debugging elisp that the lengthy error trail 
isn't very decipherable. Can anyone give me a hand on how to get 
the TAB working with the contact-fill? 



Re: [O] Multiple bibliography files with ox-bibtex and html export

2016-09-06 Thread Clément Pit--Claudel
On 2016-09-06 23:46, Thibault Marin wrote:
>>> I am attaching a patch which allows me to use multiple files with html
>>> export.  It creates a combined bibliography file and call bibtex2html on
>>> it.  I am not sure this is the best way to address this, so any
>>> suggestion would be welcome.

Sorry for the late comment.  bibtex2html can read from standard input; maybe 
that would be cleaner?

Clément.



signature.asc
Description: OpenPGP digital signature


Re: [O] Multiple bibliography files with ox-bibtex and html export

2016-09-06 Thread Thibault Marin

Nicolas Goaziou writes:

> Hello,
>
> Thibault Marin  writes:
>
>> I would like to use ox-bibtex to export a bibliography to html with
>> multiple bibliography files, as follows:
>>
>> #+BIBLIOGRAPHY: bibtex_1.bib,bibtex_2.bib plain option:-d option:-noabstract 
>> limit:t
>>
>> This works with latex export but not with html (I get a "Executing
>> bibtex2html failed").  It appears that bibtex2html can only process a
>> single file.
>>
>> I am attaching a patch which allows me to use multiple files with html
>> export.  It creates a combined bibliography file and call bibtex2html on
>> it.  I am not sure this is the best way to address this, so any
>> suggestion would be welcome.
>>
>> Does this look like something that could be merged?
>
> Apparently no objection was raised, so I think this can be merged. Some
> minor comments below.
>
>> +(let ((files (org-split-string file ",")))
>
> I think `split-string' is sufficient here.
>
>> +  (when (< 1 (length files))
>> +(let ((combined-bib-file
>> +   (concat
>> +(file-name-sans-extension
>> + (file-name-nondirectory
>> +  (buffer-file-name))) "-combined.bib")))
>> +  (with-temp-file combined-bib-file
>> +(dolist (bib files)
>> +  (insert-file-contents
>> +   (if (equal (file-name-extension bib) "bib")
>> +   bib
>> + (concat bib ".bib")
>> + )
>> +   )
>> +  )
>> +)
>> +  (setq file combined-bib-file)
>> +  )
>> +)
>> +  )
>
> There should be no dangling parenthesis in Lisp.
>
> Could you send an updated patch?
>
> Thank you.
>
>
> Regards,

Thanks for the review, here is an updated patch.

Best,

thibault
>From cb07ff936587a456f1e6599d216efe9463431d3f Mon Sep 17 00:00:00 2001
From: thibault 
Date: Tue, 6 Sep 2016 22:42:39 -0500
Subject: [PATCH] * contrib/lisp/ox-bibtex.el (org-bibtex-process-bib-files):
 Add support for multiple bibliography files with html export.

Combine comma-separated bibliography files into a single one and process
it using bibtex2html.  This matches the behavior already present for
latex export.
---
 contrib/lisp/ox-bibtex.el | 18 --
 1 file changed, 16 insertions(+), 2 deletions(-)

diff --git a/contrib/lisp/ox-bibtex.el b/contrib/lisp/ox-bibtex.el
index 56dec38..b46cb76 100644
--- a/contrib/lisp/ox-bibtex.el
+++ b/contrib/lisp/ox-bibtex.el
@@ -191,13 +191,27 @@ Return new parse tree."
 		(file (org-bibtex-get-file keyword))
 		temp-file
 		out-file)
+	(let ((files (split-string file ",")))
+	  (when (< 1 (length files))
+		(let ((combined-bib-file
+		   (concat
+			(file-name-sans-extension
+			 (file-name-nondirectory
+			  (buffer-file-name))) "-combined.bib")))
+		  (with-temp-file combined-bib-file
+		(dolist (bib files)
+		  (insert-file-contents
+		   (if (equal (file-name-extension bib) "bib")
+			   bib
+			 (concat bib ".bib")
+		  (setq file combined-bib-file
 	;; Test if filename is given with .bib-extension and strip
 	;; it off. Filenames with another extensions will be
 	;; untouched and will finally rise an error in bibtex2html.
 	(setq file (if (equal (file-name-extension file) "bib")
 			   (file-name-sans-extension file) file))
-	;; Outpufiles of bibtex2html will be put into current working directory
-	;; so define a variable for this.
+	;; Output files of bibtex2html will be put into current
+	;; working directory so define a variable for this.
 	(setq out-file (file-name-sans-extension
 			(file-name-nondirectory file)))
 	;; limit is set: collect citations throughout the document
-- 
2.8.1



Re: [O] table alignment with org-pretty-entities turned on

2016-09-06 Thread s j
It was solved. I just report it here in case it is useful to others.

It turned out to be a problem with the language environment.

  

Previously, the language environment was detected to be Chinese although my
system-default language is English. The preferred charset for Greek letters
was then set to a Chinese charset, which leads to wrong widths I guess. After
I set the language environment to utf8 in the init file, everything works
fine.

  

PS: sorry for duplicated emails, forgot to "reply all" in the first reply.

  

Jiang

  

  
On Sep 5 2016, at 11:06 pm, Nicolas Goaziou  wrote:  

> Hello,

>

> jsj  writes:

>

> > To make it clear, the behavior I reported can be reproduced with a clean
init file with just org loaded.  
>  
> I put the table  
>  
> | a | b | c |  
> |+---+---|  
> | \alpha | | |  
>  
> in an org file, toggle pretty entities by C-c C-x \, then C-c C-c to realign
the table. The result I get is  
>  
> | a | b | c |  
> |+---+---|  
> | α | | |  
>  
>  
> If I try the same thing for  
>  
> | a | b | c |  
> |--+---+---|  
> | \alpha \beta | | |  
>  
> I get  
>  
> | a | b | c |  
> |---+---+---|  
> | α β | | |  
>  
> Is it just me or you can reproduce the same behavior?

>

> I cannot reproduce it.

>

> However, I fixed an alignment bug in tables recently. Does updating Org  
solve your issue?

>

> Regards,

>

> \--  
Nicolas Goaziou



Re: [O] Modules, libraries, eggs, etc.

2016-09-06 Thread John Kitchin
It sounds like you should incorporate some tangling prior to running some
blocks so that the external files would exist when required.

The only other approach is something like a :session. I don't know if that
is setup for scheme/racket though.

John

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


On Tue, Sep 6, 2016 at 3:17 PM, Lawrence Bottorff  wrote:

> Racket has a nice module system whereby a module is kept in a plain text
> .rkt file. For example,
>
> #lang racket
> (provide print-cake)
> ; draws a cake with n candles
> (define (print-cake n)
>   (show "   ~a   " n #\.)
>   (show " .-~a-. " n #\|)
>   (show " | ~a | " n #\space)
>   (show "---~a---" n #\-))
>
> (define (show fmt n ch)
>   (printf fmt (make-string n ch))
>   (newline))
>
> is in cake.rkt so that
>
> #+begin_src scheme :session ch2
> (require "cake.rkt")
> (print-cake (random 30))
> #+end_src
>
> produces the actual ascii -- albeit in the *Geiser dbg* buffer (or run
> from the associated REPL ch2):
>
> ; -*- geiser-scheme-implementation: racket -*-
> (require "cake.rkt")
> (print-cake (random 30))
>
>
> => #
>
>...
>  .-|||-.
>  | |
> -
>
> So, this means I can do some Racket in org-mode, but the module side has
> to be outside. This seems not so elegant. Is there a babel language where
> the entire ecosystem is inside Emacs/org-mode? I'd like to have the module
> paradigm and have it all inside Emacs/org-mode.
>
> LB
>


Re: [O] fill paragraph: break after sentence.

2016-09-06 Thread Uwe Brauer
>>> "Nicolas" == Nicolas Goaziou  writes:

   > Hello,
   > Uwe Brauer  writes:

   >> IMHO should be included somehow in vanilla org,

   > It seems only remotely related to Org. If robust enough, I might go to
   > something like "fill.el" instead.

There are org related lines such as

(cl-pushnew '(org-caption org-caption)
  filladapt-token-match-table :test #'equal)
  (cl-pushnew '(org-caption . exact)

But you are right, these are fews. @Aaron I think such a function would
be appreciated in general. I have a particular solution for auctex
provide to me by 
Ingo Lohmar
http://pleasefindattached.blogspot.com/2011/12/emacsauctex-sentence-fill-greatly.html

But your code seems much more general. May I suggest to present that
code in GNU emacs devel?

Uwe 




Re: [O] Restrict include to some backend

2016-09-06 Thread Nicolas Goaziou
Hello,

Clément Pit--Claudel  writes:

> Do you think so? Wouldn't BEGIN_ONLY … END_ONLY work? It would be similar to 
> BEGIN_EXPORT, right?
> Or it could even be an option to begin_export?

No, it wouldn't. 

INCLUDE keywords are expanded way before the document is parsed.
Included file can contain, e.g., headlines, and those blocks would
explode without a special treatment.

Regards,

-- 
Nicolas Goaziou



Re: [O] Restrict include to some backend

2016-09-06 Thread Fabrice Popineau
2016-09-06 15:59 GMT+02:00 Clément Pit--Claudel :

> Hi Fabrice,
>
> I've run into this issue recently (while writing my first large document
> in Org).  I couldn't find a good natice solution, so I used a rather
> unpleasant trick, and I've been meaning to write emacs-orgmode about it
> since then.
>
> In my documents I have a BEGIN_ONLY environment that I use like this:
>
>
Ok, I understand. I think I know how to preprocess the file (but thanks for
your offer)

Overall, I think that it would be nice to be able to select parts of the
org file
for some backends only.

Thanks everybody,

Fabrice


[O] Modules, libraries, eggs, etc.

2016-09-06 Thread Lawrence Bottorff
Racket has a nice module system whereby a module is kept in a plain text
.rkt file. For example,

#lang racket
(provide print-cake)
; draws a cake with n candles
(define (print-cake n)
  (show "   ~a   " n #\.)
  (show " .-~a-. " n #\|)
  (show " | ~a | " n #\space)
  (show "---~a---" n #\-))

(define (show fmt n ch)
  (printf fmt (make-string n ch))
  (newline))

is in cake.rkt so that

#+begin_src scheme :session ch2
(require "cake.rkt")
(print-cake (random 30))
#+end_src

produces the actual ascii -- albeit in the *Geiser dbg* buffer (or run from
the associated REPL ch2):

; -*- geiser-scheme-implementation: racket -*-
(require "cake.rkt")
(print-cake (random 30))


=> #

   ...
 .-|||-.
 | |
-

So, this means I can do some Racket in org-mode, but the module side has to
be outside. This seems not so elegant. Is there a babel language where the
entire ecosystem is inside Emacs/org-mode? I'd like to have the module
paradigm and have it all inside Emacs/org-mode.

LB


Re: [O] Restrict include to some backend

2016-09-06 Thread Clément Pit--Claudel
On 2016-09-06 11:58, Nicolas Goaziou wrote:
> Besides, we would need to introduce a new syntax to implement this,
> which I find not too appealing.

Do you think so? Wouldn't BEGIN_ONLY … END_ONLY work? It would be similar to 
BEGIN_EXPORT, right?
Or it could even be an option to begin_export?

Clément.



signature.asc
Description: OpenPGP digital signature


[O] adding code before org-babel sql execution (postgres engine)

2016-09-06 Thread dmg
Hi there

I have been using or-sql with postgres backend for a long time.
There has been one annoyance that I finally fixed.

When the SQL command has an error, it simply outputs
and empty table:

#+begin_src sql :engine postgresql :cmdline  imdb
select * from abc
#+end_src

#+RESULTS:

The error is not detected. I read the documentation of psql and the problem
seems to be that psql does not return an error code by default (even with
invalid
commands).

This can be fixed two ways:

1. add to ~/.psqlrc

\set ON_ERROR_STOP on

2. By adding to the command, before it is executed by babel, this line. In
non-interactive mode psql will stop in the first error with an error code
and babel will catch it:

psql:/tmp/babel-51865ab/sql-in-5186Wyu:1: ERROR:  relation "abc" does not
exist
LINE 1: select * from abc
  ^
I am willing to implement #2, but the question is, is there a clean, easy
way
to do this? Any hints on how to do it?

thank you very much,

--daniel




-- 
--dmg

---
Daniel M. German
http://turingmachine.org


Re: [O] Restrict include to some backend

2016-09-06 Thread Nicolas Goaziou
Hello,

Clément Pit--Claudel  writes:

> I remove the blocks based on the current backend using a crude
> pre-processing step in Emacs lisp. I can share the code if you're in
> a hurry, but maybe this idea can also be integrated to Org itself?

I think implementing it in a pre processing hook is the way to go. It
doesn't seem too hard either.

Besides, we would need to introduce a new syntax to implement this,
which I find not too appealing.

Regards,

-- 
Nicolas Goaziou



Re: [O] fill paragraph: break after sentence.

2016-09-06 Thread Nicolas Goaziou
Hello,

Uwe Brauer  writes:

> IMHO should be included somehow in vanilla org,

It seems only remotely related to Org. If robust enough, I might go to
something like "fill.el" instead.

Regards,

-- 
Nicolas Goaziou



[O] Change Org homepage ML search to GNU (was: mailing list search given problems with gmane?)

2016-09-06 Thread Karl Voit
* Grant Rettke  wrote:
> On Mon, Sep 5, 2016 at 10:50 AM, Eric S Fraga  wrote:
>> do we have any alternative means to search the mailing list given the
>> current problems with gmane?
>
> https://lists.gnu.org/archive/html/emacs-orgmode/

Can somebody please update http://orgmode.org/community.html so that
the ML search is using the GNU server?

-- 
mail|git|SVN|photos|postings|SMS|phonecalls|RSS|CSV|XML to Org-mode:
   > get Memacs from https://github.com/novoid/Memacs <

https://github.com/novoid/extract_pdf_annotations_to_orgmode + more on github




Re: [O] Restrict include to some backend

2016-09-06 Thread Clément Pit--Claudel
The examples below should have read begin_only:

> #+begin_only html
> #+include foo.py src python
> #+end_ony
> 
> #+begin_only latex
> This is processed as *regular* ~org-mode~ code, but only when exporting to 
> LaTeX.
> #+end_only

Clément

On 2016-09-06 09:59, Clément Pit--Claudel wrote:
> Hi Fabrice,
> 
> I've run into this issue recently (while writing my first large document in 
> Org).  I couldn't find a good native solution, so I used a rather unpleasant 
> trick, and I've been meaning to write emacs-orgmode about it since then.
> 
> In my documents I have a BEGIN_ONLY environment that I use like this:
> 
> #+begin_only html
> #+include foo.py src python
> #+end_ony
> 
> #+begin_only latex
> This is processed as *regular* ~org-mode~ code, but only when exporting to 
> LaTeX.
> #+end_only
> 
> I remove the blocks based on the current backend using a crude pre-processing 
> step in Emacs lisp. I can share the code if you're in a hurry, but maybe this 
> idea can also be integrated to Org itself?
> 
> For the record, here are places where this was useful:
> 
> * Some complex math was improperly rendered by MathJax; I made SVG images of 
> it and declared a macro that inserted the actual math in LaTeX mode, and the 
> SVG in HTML mode. To get backend-dependent macro definitions, I used 
> BEGIN_ONLY blocks.
> 
> * I wanted to set the TOC depth only for the HTML version; I used 
> #+BEGIN_ONLY html
> #+TOC: headlines 2
> #+END_ONLY html
> 
> * In HTML mode listings are labeled as "listings," but in TeX mode they are 
> listed as "figures"; I used a backend-dependent macro definition to smoothe 
> out the difference.
> 
> * I split a figure in two in HTML, while using two subfigures in LaTeX
> 
> * I included PDF figures in LaTeX and SVG figures in HTML in some places
> 
> * I have my own custom-written citation processor for HTML; I included the "* 
> Bibliography" header only in the HTML, since LaTeX inserted it by itself.
> 
> Cheers,
> Clément.
> 
> On 2016-09-06 01:13, Fabrice Popineau wrote:
>> Hi,
>>
>> Maybe there is an obvious answer but I wonder how to restrict
>> including a file to some backend. The following doesn't work:
>>
>> #+begin_export latex
>> #+include foo.py src python
>> #+end_export
>>
>> (Not that I expected it to actually work, but it shows the goal)
>> Any idea ? Thanks for your help.
>>
>> Fabrice
> 



signature.asc
Description: OpenPGP digital signature


Re: [O] Restrict include to some backend

2016-09-06 Thread Clément Pit--Claudel
Hi Fabrice,

I've run into this issue recently (while writing my first large document in 
Org).  I couldn't find a good natice solution, so I used a rather unpleasant 
trick, and I've been meaning to write emacs-orgmode about it since then.

In my documents I have a BEGIN_ONLY environment that I use like this:

#+begin_export html
#+include foo.py src python
#+end_export

#+begin_export latex
This is processed as *regular* ~org-mode~ code, but only when exporting to 
LaTeX.
#+end_export

I remove the blocks based on the current backend using a crude pre-processing 
step in Emacs lisp. I can share the code if you're in a hurry, but maybe this 
idea can also be integrated to Org itself?

For the record, here are places where this was useful:

* Some complex math was improperly rendered by MathJax; I made SVG images of it 
and declared a macro that inserted the actual math in LaTeX mode, and the SVG 
in HTML mode. To get backend-dependent macro definitions, I used BEGIN_ONLY 
blocks.

* I wanted to set the TOC depth only for the HTML version; I used 
#+BEGIN_ONLY html
#+TOC: headlines 2
#+END_ONLY html

* In HTML mode listings are labeled as "listings," but in TeX mode they are 
listed as "figures"; I used a backend-dependent macro definition to smoothe out 
the difference.

* I split a figure in two in HTML, while using two subfigures in LaTeX

* I included PDF figures in LaTeX and SVG figures in HTML in some places

* I have my own custom-written citation processor for HTML; I included the "* 
Bibliography" header only in the HTML, since LaTeX inserted it by itself.

Cheers,
Clément.

On 2016-09-06 01:13, Fabrice Popineau wrote:
> Hi,
> 
> Maybe there is an obvious answer but I wonder how to restrict
> including a file to some backend. The following doesn't work:
> 
> #+begin_export latex
> #+include foo.py src python
> #+end_export
> 
> (Not that I expected it to actually work, but it shows the goal)
> Any idea ? Thanks for your help.
> 
> Fabrice



signature.asc
Description: OpenPGP digital signature


Re: [O] mailing list search given problems with gmane?

2016-09-06 Thread Eric S Fraga
On Tuesday,  6 Sep 2016 at 11:07, Charles Millar wrote:
> The mail list search has been broken for more than one year (close to
> two). I and others have asked that it be repaired and nothing has
> happened!

Are you sure it's been broken that long?  I don't use it often but I
thought I used it more recently than that.  Oh well, doesn't matter;
just curious.  The key is that it's broken now but at least there are
alternatives.

I'll check out MailArchive, as you indicated in another post to this
list.

Thanks,
eric

-- 
: Eric S Fraga (0xFFFCF67D), Emacs 25.0.94.1, Org release_8.3.5-1070-g190476



Re: [O] fill paragraph: break after sentence.

2016-09-06 Thread Uwe Brauer
>>> "Aaron" == Aaron Ecay  writes:

Hi Aaron
> Hi Uwe,
> The following code is what I use.  It uses filladapt mode, but doesn’t
> work with auto-fill (I manually refill paragraphs with M-q as I’m
> writing).  I wrote the code a long time ago, it works for me, YMMV,
> etc.  Hope it is helpful.

Thanks  a lot. This was precisely what I was looking for.
IMHO should be included somehow in vanilla org, or at least added to
some addon-pkg.


Uwe 




Re: [O] mailing list search given problems with gmane?

2016-09-06 Thread Charles Millar


On 09/05/2016 11:50 AM, Eric S Fraga wrote:

Dear all,

do we have any alternative means to search the mailing list given the
current problems with gmane?


I have been using MailArchive.  A few weeks ago. Lars Magne mentioned 
this as an alternative.


Also, I have added the newsgroup in my Thunderbir. However, I have not 
downloaded the entire 100,000+ messages (only about 1K). Maybe 
downloading headers only and searching through those would help?


gnus is having problems when I attempt to download the 
subscribed/unsubscribed lists.


Charlie Millar



Re: [O] mailing list search given problems with gmane?

2016-09-06 Thread Charles Millar

On 09/06/2016 02:29 AM, Eric S Fraga wrote:

On Tuesday,  6 Sep 2016 at 01:48, Grant Rettke wrote:

On Mon, Sep 5, 2016 at 10:50 AM, Eric S Fraga  wrote:

do we have any alternative means to search the mailing list given the
current problems with gmane?

https://lists.gnu.org/archive/html/emacs-orgmode/

Thanks!
I would be lost without access to the mailing list.
The mail list search has been broken for more than one year (close to 
two). I and others have asked that it be repaired and nothing has happened!


Charlie Millar



Re: [O] fill paragraph: break after sentence.

2016-09-06 Thread Aaron Ecay
Hi Uwe,

The following code is what I use.  It uses filladapt mode, but doesn’t
work with auto-fill (I manually refill paragraphs with M-q as I’m
writing).  I wrote the code a long time ago, it works for me, YMMV,
etc.  Hope it is helpful.

#+BEGIN_SRC emacs-lisp
  (defun awe-org-fill-paragraph-function ( ignore)
(let ((bounds (cons (save-excursion (backward-paragraph) (point))
(save-excursion (forward-paragraph) (point
  beg end end-marker)
  (save-excursion
(goto-char (cdr bounds))
(skip-chars-backward "\n")
(setq end-marker (point-marker))
(setq end (make-marker))
(goto-char (car bounds))
(skip-chars-forward "\n")
(catch 'exit
  (while t
(setq beg (point))
(forward-sentence)
(move-marker end (point))
(save-excursion
  (goto-char beg)
  (when (and fill-prefix
 (not (looking-at-p (regexp-quote fill-prefix
(insert fill-prefix))
  (while (re-search-forward "\n *" end t)
(replace-match " ")))
(setq beg (point))
(skip-chars-forward " \n")
(move-marker end (point))
(when (>= (point) end-marker)
  (throw 'exit t))
(when (/= beg end)
  (delete-region beg end))
(insert "\n"
  (set-marker end-marker nil)
  (set-marker end nil)))

  (defun awe-org-setup-fill-hook ()
(setq-local sentence-end-base
(rx (any ".?!")
(? "[fn:" (+ (any "0-9" "a-f")) "]")
(* (any "]\"'”)}"
(when (featurep 'filladapt)
  (setq-local fill-paragraph-function #'awe-org-fill-paragraph-function)
  (make-local-variable 'filladapt-token-table)
  (make-local-variable 'filladapt-token-match-table)
  (make-local-variable 'filladapt-token-conversion-table)
  (cl-pushnew `(,(rx "#+" (or "caption" "CAPTION") ": ") org-caption)
  filladapt-token-table :test #'equal)
  (cl-pushnew '(org-caption org-caption)
  filladapt-token-match-table :test #'equal)
  (cl-pushnew '(org-caption . exact)
  filladapt-token-conversion-table :test #'equal))
(visual-line-mode 1)
(auto-fill-mode 0))
  (add-hook 'org-mode-hook #'awe-org-setup-fill-hook)
#+END_SRC

-- 
Aaron Ecay



[O] Trouble with capture template and prompt

2016-09-06 Thread Bart Bunting

Hi,

I have the following capture template defined in the customize
interface.

It used to work ok but now gives a cryptic (well at least to me) error:

I've narrowed down the bit that is breaking to the title prompt
definition.

Can anyone point out what I'm doing wrong.

I'm running org-mode from master compiled this morning.

This is not a new problem it's been around for a while I just haven't
tried to chase it down.

Here is the custom definition:

INS DEL Choice: Value Menu Template entry:
Keys   : t
Description: todo
Capture Type   : Value Menu Org entry
Target location: Value Menu File:
Filename   : Value Menu Literal: ~/.org/refile.org
Template   : Value Menu String: * TODO %^{Todo} 
%u
%a
%?
Plist:
[ ] Key: :prepend t
[ ] Key: :immediate-finish t
[ ] Key: :jump-to-captured t
[ ] Key: :empty-lines 1
[ ] Key: :empty-lines-before 1
[ ] Key: :empty-lines-after 1
[X] Key: :clock-in t
[ ] Key: :clock-keep t
[X] Key: :clock-resume t
[ ] Key: :unnarrowed t
[ ] Key: :table-line-pos t
[ ] Key: :kill-buffer t
INS


The error that is shown in the messages buffer is:

Template key: 
Capture abort: (error Key sequence C-c ! starts with non-prefix key C-c) 

Any help would be appreciated.

Kind regards
Bart
-- 

Bart Bunting



Re: [O] There is no line to end here at LaTeX org-ref export

2016-09-06 Thread Eric S Fraga
On Monday,  5 Sep 2016 at 20:55, Florian Lindner wrote:
> Am 02.09.2016 um 15:12 schrieb Eric S Fraga:
>> Can you post an actual org test file as an attachment?  And also the
>> resulting LaTeX file on export?

[...]

> and continues. You have no errors using that snippet? Can you compile

I cannot work with the snippet you gave as I don't have all the
requisite python modules...

I have encountered, in my own files, a similar problem with LaTeX export
when including graphics just before the end of a beamer slide.  I've not
figured out what is causing it nor have I been able to produce a minimal
example to illustrate the problem.  I'm just telling you this so that
you know that you're not the only one with issues with LaTeX export.

I also am not running the absolute latest version of org but I don't
want to upgrade right now as I am preparing my slides for the coming
academic term...

> Ok, after some debugging and bisecting my .emacs,
> org-export-preserve-breaks t seems to cause the faulty export.

Interesting.

-- 
: Eric S Fraga (0xFFFCF67D), Emacs 25.0.94.1, Org release_8.3.5-1070-g190476



Re: [O] Multiple bibliography files with ox-bibtex and html export

2016-09-06 Thread Nicolas Goaziou
Hello,

Thibault Marin  writes:

> I would like to use ox-bibtex to export a bibliography to html with
> multiple bibliography files, as follows:
>
> #+BIBLIOGRAPHY: bibtex_1.bib,bibtex_2.bib plain option:-d option:-noabstract 
> limit:t
>
> This works with latex export but not with html (I get a "Executing
> bibtex2html failed").  It appears that bibtex2html can only process a
> single file.
>
> I am attaching a patch which allows me to use multiple files with html
> export.  It creates a combined bibliography file and call bibtex2html on
> it.  I am not sure this is the best way to address this, so any
> suggestion would be welcome.
>
> Does this look like something that could be merged?

Apparently no objection was raised, so I think this can be merged. Some
minor comments below.

> + (let ((files (org-split-string file ",")))

I think `split-string' is sufficient here.

> +   (when (< 1 (length files))
> + (let ((combined-bib-file
> +(concat
> + (file-name-sans-extension
> +  (file-name-nondirectory
> +   (buffer-file-name))) "-combined.bib")))
> +   (with-temp-file combined-bib-file
> + (dolist (bib files)
> +   (insert-file-contents
> +(if (equal (file-name-extension bib) "bib")
> +bib
> +  (concat bib ".bib")
> +  )
> +)
> +   )
> + )
> +   (setq file combined-bib-file)
> +   )
> + )
> +   )

There should be no dangling parenthesis in Lisp.

Could you send an updated patch?

Thank you.


Regards,

-- 
Nicolas Goaziou



Re: [O] How to add a label in LaTeX export

2016-09-06 Thread Nicolas Goaziou
Hello,

Florian Lindner  writes:

> I have this org mode document:
>
> #+BEGIN_SRC python :exports results :results file
>   import matplotlib.pyplot as plt, numpy as np
>   x = np.linspace(-2, 2, 1000)
>   plt.plot(x, np.exp(-np.power(4*x, 2)), label="shape-parameter=4")
>   plt.plot(x, np.exp(-np.power(2*x, 2)), label="shape-parameter=2")
>   for i in range(-6, 7): plt.axvline(1/6 * i, ymax = 0.1, ls = "-.", 
> color="r")
>   plt.grid()
>   plt.legend()
>   plt.savefig('rbf-gaussian-4.pdf')
>   return "rbf-gaussian-4.pdf"
> #+END_SRC
> #+NAME: fig:GaussianExample
> #+CAPTION: Gaussian Basis functions with vertex distances marked at $n \cdot 
> \frac{1}{6}$.
> #+RESULTS:
> [[file:rbf-gaussian-4.pdf]]
>
>
> which exports to:
>
>
> \begin{document}
>
> \tableofcontents
>
> \begin{figure}[htb]
> \centering
> \includegraphics[width=.9\linewidth]{rbf-gaussian-4.pdf}
> \caption{\label{fig:orgparagraph1}
> Gaussian Basis functions with vertex distances marked at \(n \cdot 
> \frac{1}{6}\).}
> \end{figure}
> \end{document}
>
>
> The #+NAME which I expect to translate to a label is ignored.

It isn't. It is changed into

 \label{fig:orgparagraph1}

See also `org-latex-prefer-user-labels'.

Regards,

-- 
Nicolas Goaziou



[O] How to add a label in LaTeX export

2016-09-06 Thread Florian Lindner
Hello,

I have this org mode document:

#+BEGIN_SRC python :exports results :results file
  import matplotlib.pyplot as plt, numpy as np
  x = np.linspace(-2, 2, 1000)
  plt.plot(x, np.exp(-np.power(4*x, 2)), label="shape-parameter=4")
  plt.plot(x, np.exp(-np.power(2*x, 2)), label="shape-parameter=2")
  for i in range(-6, 7): plt.axvline(1/6 * i, ymax = 0.1, ls = "-.", color="r")
  plt.grid()
  plt.legend()
  plt.savefig('rbf-gaussian-4.pdf')
  return "rbf-gaussian-4.pdf"
#+END_SRC

#+NAME: fig:GaussianExample
#+CAPTION: Gaussian Basis functions with vertex distances marked at $n \cdot 
\frac{1}{6}$.
#+RESULTS:
[[file:rbf-gaussian-4.pdf]]


which exports to:


\begin{document}

\tableofcontents

\begin{figure}[htb]
\centering
\includegraphics[width=.9\linewidth]{rbf-gaussian-4.pdf}
\caption{\label{fig:orgparagraph1}
Gaussian Basis functions with vertex distances marked at \(n \cdot 
\frac{1}{6}\).}
\end{figure}
\end{document}


The #+NAME which I expect to translate to a label is ignored. I also tried 
using #+LABEL or transposing NAME and caption
but same result.

What is wrong there?

Thanks,
Florian




[O] fill paragraph: break after sentence.

2016-09-06 Thread Uwe Brauer
Hello

I would like to modify the auto-fill function such that after every
sentence a new line starts like this

In order to prove our nonlinear instability result, we want to use the
linear growing mode in Proposition to construct small initial data for
the nonlinear problem. 
Since we are involved in the higher-order regularity context, we
cannot simply set the initial data for the nonlinear problem to be a
small constant times the linear growing modes. 

I know about functions doing that for auctex, but does anybody know
about a  similar functionality for orgmode?

Uwe Brauer 



Re: [O] table alignment with org-pretty-entities turned on

2016-09-06 Thread Nicolas Goaziou
Hello,

jsj  writes:

> To make it clear, the behavior I reported can be reproduced with a clean init 
> file with just org loaded.
>
> I put the table
>
> | a  | b | c |
> |+---+---|
> | \alpha |   |   |
>
> in an org file, toggle pretty entities by C-c C-x \, then C-c C-c to realign 
> the table. The result I get is
>
> | a  | b | c |
> |+---+---|
> | α |   |   |
>
>
> If I try the same thing for 
>
> | a| b | c |
> |--+---+---|
> | \alpha \beta |   |   |
>
> I get
>
> | a | b | c |
> |---+---+---|
> | α β |   |   |
>
> Is it just me or you can reproduce the same behavior?

I cannot reproduce it.

However, I fixed an alignment bug in tables recently. Does updating Org
solve your issue?

Regards,

-- 
Nicolas Goaziou



Re: [O] mailing list search given problems with gmane?

2016-09-06 Thread Eric S Fraga
On Tuesday,  6 Sep 2016 at 01:48, Grant Rettke wrote:
> On Mon, Sep 5, 2016 at 10:50 AM, Eric S Fraga  wrote:
>> do we have any alternative means to search the mailing list given the
>> current problems with gmane?
>
> https://lists.gnu.org/archive/html/emacs-orgmode/

Thanks!
I would be lost without access to the mailing list. 
-- 
: Eric S Fraga (0xFFFCF67D), Emacs 25.0.94.1, Org release_8.3.5-1070-g190476



[O] Restrict include to some backend

2016-09-06 Thread Fabrice Popineau
Hi,

Maybe there is an obvious answer but I wonder how to restrict
including a file to some backend. The following doesn't work:

#+begin_export latex
#+include foo.py src python
#+end_export

(Not that I expected it to actually work, but it shows the goal)
Any idea ? Thanks for your help.

Fabrice