Re: [O] Bug: exporter bug [8.3.1 (8.3.1-elpaplus /home/dfeich/.emacs.d/elpa/org-plus-contrib-20150805/)]

2015-12-18 Thread Ilya Yanok
Hello, thanks for your reply.

On Thu, Dec 17, 2015 at 6:03 PM Nicolas Goaziou 
wrote:

> Since cd439bc5138fc22a4f2532f90c87629c1deec3e3 (committed 2 years ago),
> `org-element-set-element' can handle strings fine.
>

Yes, you are right. I got confused by the indentation.


> Also, I cannot reproduce your problem in current stable release of Org.
> You may want to update it.
>

It's a clean Spacemacs installation, it get's fresh Org from ELPA and
compiles it. I found out that removing the *.elc files helps... weird. It
might be a Spacemacs-related issue or a general Emacs issue but looks like
Org-mode is fine :)

Thanks for your help!

Regards, Ilya.


Re: [O] evaluation issue with ocaml code (due to changes to org-babel-comint-with-output)

2015-12-18 Thread Alan Schmitt
Hello,

Can I push this?

Thanks,

Alan

On 2015-12-16 21:29, Alan Schmitt  writes:

> Hello,
>
> I finally found the issue (using the plain debugger): the call to
> org-babel-comint-with-output was set to remove the echo, but the only
> time there is an echo of the full body is when a single line function
> has an error, and this echo is useful to show where the error is. Here
> is a patch that makes sure the echo is kept.
>
> From 59e6912e6bf769fff2f48b6c2af95bda918d0cd9 Mon Sep 17 00:00:00 2001
> From: Alan Schmitt 
> Date: Wed, 16 Dec 2015 21:19:23 +0100
> Subject: [PATCH] ob-ocaml.el: Keep echo to display ocaml errors
>
> * ob-ocaml.el (org-babel-execute:ocaml): call
> `org-babel-comint-with-output' with nil `remove-echo' argument.
> ---
>  lisp/ob-ocaml.el | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/lisp/ob-ocaml.el b/lisp/ob-ocaml.el
> index 48f8aba..68ac859 100644
> --- a/lisp/ob-ocaml.el
> +++ b/lisp/ob-ocaml.el
> @@ -66,7 +66,7 @@
>   (session (org-babel-prep-session:ocaml
>  (cdr (assoc :session params)) params))
>   (raw (org-babel-comint-with-output
> -   (session org-babel-ocaml-eoe-output t full-body)
> +   (session org-babel-ocaml-eoe-output nil full-body)
>   (insert
>(concat
> (org-babel-chomp full-body) ";;\n"
> -- 
> 2.6.4
>
>
> For the record, the problem I wanted to fix.
>
> On 2015-12-14 13:04, Alan Schmitt  writes:
>
>>> I have found that commit f0bf77e82a3d37ba7548aa40198bc982e9875f1b breaks
>>> evaluation of ocaml code. With the following init file (the
>>> `package-initialize' is there for tuareg to be available):
>>>
>>> #+begin_src emacs-lisp
>>> (add-to-list 'load-path "/Users/schmitta/projets/org-mode/lisp")
>>>
>>> (require 'org)
>>>
>>> (package-initialize)
>>>
>>> (org-babel-do-load-languages
>>>  'org-babel-load-languages
>>>  '((ocaml . t)))
>>> #+end_src
>>>
>>> When I evaluate this block I get this result:
>>>
>>> #+BEGIN_SRC ocaml :results code verbatim :exports results
>>> 1 + "toto";;
>>> #+END_SRC
>>>
>>> #+results:
>>> #+BEGIN_SRC ocaml
>>> Characters 4-10:
>>>   1 + "toto"
>>>   ^^
>>> Error: This expression has type string but an expression was expected of 
>>> type
>>>  int
>>> #+END_SRC
>>>
>>> After commit f0bf77e82a3d37ba7548aa40198bc982e9875f1b I get this:
>>>
>>> #+results:
>>> #+BEGIN_SRC ocaml
>>> ;;
>>>   ^^
>>> Error: This expression has type string but an expression was expected of 
>>> type
>>>  int
>>> #+END_SRC
>
> Best,
>
> Alan

-- 
OpenPGP Key ID : 040D0A3B4ED2E5C7
Athmospheric CO₂ (Updated December 13, 2015, Mauna Loa Obs.): 401.31 ppm


signature.asc
Description: PGP signature


[O] [PATCH] ob-sql.el: Add support for Oracle via sqlplus

2015-12-18 Thread Peter Feigl
* lisp/ob-sql.el: Add a database type 'oracle that uses sqlplus to
support running SQL blocks against an Oracle database.

Use with properties like this (all mandatory):
 :engine oracle :dbhost  :dbport <1521> :dbuser 
 :database  :dbpassword 

TINYCHANGE
---
 lisp/ob-sql.el | 22 ++
 1 file changed, 22 insertions(+)

diff --git a/lisp/ob-sql.el b/lisp/ob-sql.el
index 955adc0..a909298 100644
--- a/lisp/ob-sql.el
+++ b/lisp/ob-sql.el
@@ -99,6 +99,10 @@ Pass nil to omit that arg."
   (when user (concat "-U" user))
   (when database (concat "-d" database))
 
+(defun org-babel-sql-dbstring-oracle (host port user password database)
+  "Make Oracle command line args for database connection."
+  (format "%s/%s@%s:%s/%s" user password host port database))
+
 (defun org-babel-execute:sql (body params)
   "Execute a block of Sql code with Babel.
 This function is called by `org-babel-execute-src-block'."
@@ -143,11 +147,29 @@ This function is called by `org-babel-execute-src-block'."
  (org-babel-process-file-name in-file)
  (org-babel-process-file-name out-file)
  (or cmdline "")))
+('oracle (format
+  "sqlplus -s %s < %s > %s"
+  (org-babel-sql-dbstring-oracle dbhost dbport 
dbuser dbpassword database)
+  (org-babel-process-file-name in-file)
+ (org-babel-process-file-name out-file)))
 (t (error "No support for the %s SQL engine" engine)
 (with-temp-file in-file
   (insert
(case (intern engine)
 ('dbi "/format partbox\n")
+ ('oracle "SET PAGESIZE 5
+SET NEWPAGE 0
+SET TAB OFF
+SET SPACE 0
+SET LINESIZE 
+SET ECHO OFF
+SET FEEDBACK OFF
+SET VERIFY OFF
+SET HEADING ON
+SET MARKUP HTML OFF SPOOL OFF
+SET COLSEP '|'
+
+")
 (t ""))
(org-babel-expand-body:sql body params)))
 (message command)
-- 
2.6.2




Re: [O] [PATCH] - Org Mac Outlook - Fix Call to Outlook in some cases

2015-12-18 Thread Alan Schmitt
On 2015-12-14 18:12, Mike McLean  writes:

> Updated to fix a typo in the defcustom’s documentation string.

Applied and pushed, thanks.

Alan

-- 
OpenPGP Key ID : 040D0A3B4ED2E5C7
Athmospheric CO₂ (Updated December 13, 2015, Mauna Loa Obs.): 401.31 ppm


signature.asc
Description: PGP signature


Re: [O] [PATCH] Add Support for Evernote in Org-Mac Link

2015-12-18 Thread Alan Schmitt
On 2015-12-14 19:08, Mike McLean  writes:

> The attached patch adds support for Evernote Note links in
> contrib/org-mac-link.el

Pushed, thanks.

Alan

-- 
OpenPGP Key ID : 040D0A3B4ED2E5C7
Athmospheric CO₂ (Updated December 13, 2015, Mauna Loa Obs.): 401.31 ppm


signature.asc
Description: PGP signature


[O] Need some help in customizing ox-texinfo

2015-12-18 Thread Oleh Krehel
Hello,

I'm exporting an Org-mode document to Texinfo currently, but I'm having
an inconvenience with production of @subsubheading items.

What I'm doing right now:

#+BEGIN_TEXINFO
@subsubheading 
#+END_TEXINFO


What I would like to have instead:

* :@subsubheading


And have it export to the same thing. I didn't find an easy way to do
it, since this requires embedding the content of a headline into the
parent headline. What I've got so far is adding this code to
`org-texinfo--normalize-headlines':

(org-element-map tree 'headline
(lambda (hl)
  (when (member "@subsubheading" (org-element-property :tags hl))
(setcar (nthcdr (cl-position hl (org-element-property :parent hl))
(org-element-property :parent hl))
(cons `(paragraph
()
,(format
  "@subsubheading %s"
  (org-element-property
   :raw-value hl)))
  (org-element-contents hl)
info)

It almost works, the only issue is that "@" is escaped later on and I
get "@@subsubheading" in the end. How can I fix that? Is there an easier
way to do this in general?

regards,
Oleh



Re: [O] Bug in table formular - last column specifier broken

2015-12-18 Thread Nick Dokos
Stefan Nobis  writes:

> Hi.
>
> With the last update to Org-mode version 8.3.2
> (8.3.2-48-g700b8e-elpaplus) the following table formular breaks:
>
>
>   | |  Mon |  Tue |  Wed | Thu | Fri | Sat | Sun |  Sum |
>   |-+--+--+--+-+-+-+-+--|
>   | |  | 1:30 | 2:00 | | | | | 03:30:00 |
>   |-+--+--+--+-+-+-+-+--|
>   | Sum |  |  |  | | | | | 00:00:00 |
>   #+TBLFM: $>=vsum($<<..$>>);T
>
>
> The error message is: Invalid table range specifier `9'.
>
> When I change the "$>" to "$9" the formula works as expected.

In case it helps, I bisected this to the following commit:

c651e150cc8fb230fca99dfff27caedfddced8ff is the first bad commit
commit c651e150cc8fb230fca99dfff27caedfddced8ff
Author: Nicolas Goaziou 
Date:   Thu Nov 12 23:12:18 2015 +0100

org-table: Fix `org-table-get-range' with column formulas

* lisp/org-table.el (org-table-get-stored-formulas): Store complete
  column formulas including the "$" sign.  Remove interactive status.
(org-table-get-range): Handle nicely "$n..$m" ranges.  Apply
changes to `org-table-get-stored-formulas'.  Rename some bindings for
clarity.
(org-table-expand-lhs-ranges): Ignore column formalas.
(org-table-remote-reference-indirection): Refactor function.

Reported-by: Junpeng Qiu 


--
Nick




Re: [O] Problem with org-export--delete-comments

2015-12-18 Thread Nicolas Goaziou
Hello,

Ethan Ligon  writes:

> It seems odd that a comment ends a paragraph, but does not end
> a footnote!

Not really, paragraphs and footnote definitions are different beast,
since the latter can contain the former.

Regards,

-- 
Nicolas Goaziou



Re: [O] [RFC] Removal of [1]-like footnotes

2015-12-18 Thread Nicolas Goaziou
Hello,

Rasmus  writes:

> Can I now write:
>
> X[fn:1]
>
> [1] foot

Uh? No.

> If so, why the need for the fanciness?  Why not just require label and
> reference to be the same?  I doesn’t sound like something that would be
> nice to have to explain to an Org newcomer.

I just mean that, internally, 

  (org-element-property :label reference) => "1"

not "fn:1" anymore. In the buffer, "fn:" is part of the syntax and, as
such, always present:

  X[fn:1]

  [fn:1] foot

Thanks for the feedback.


Regards,

-- 
Nicolas Goaziou



Re: [O] [RFC] Removal of [1]-like footnotes

2015-12-18 Thread Rasmus
Nicolas Goaziou  writes:

> Hello,
>
> Rasmus  writes:
>
>> Can I now write:
>>
>> X[fn:1]
>>
>> [1] foot
>
> Uh? No.
> [...]

Very good!  Thanks for clarifying.

Rasmus

-- 
A page of history is worth a volume of logic



[O] capture template for .ics invitation in vm

2015-12-18 Thread prayner
In reality probably an embarrassing emacs-lisp error on my part.

I'm trying to make a capture template for turning the very frequent
invitations I get in .ics format (I think) into org agenda items.
The basis is the ical2org awk script maintained by Eric Fraga.
My template is defined as follows:
("i" "invite" entry (file+headline "~/.org/todo.org" "Tasks")
 "* TODO %(org-capture-vm-invite)\n" :immediate-finish t)

And org-capture-vm-invite is defined as

(defun org-capture-vm-invite ()
  (interactive)
  (with-temp-buffer
(insert-buffer (org-capture-get :original-buffer 1))
(shell-command-on-region (point-min) (point-max) "ical2org" nil t)
(buffer-substring-no-properties (point-min) (point-max

A problem seems to be the line
(insert-buffer (org-capture-get :original-buffer 1))
since :original-buffer doesn't seem to be defined in
org-capture-plist. I've verified that by printing it.
It's likely I'm going about this completely the wrong way so does
anyone have the right way to get information from the buffer where
capture was called during an embedded sexp?
Please reply directly as well as to the list since I'm a loong way
behind on reading.
Thanks in advance
Peter


-- 
Peter Rayner
Leader, Clean Air and Urban Landscapes NESP hub 
room 343 
School of Earth Sciences, University of Melbourne, 3010, Vic, Australia
tel: work: +61 (0)3 8344 9708; fax: +61 (0)3 8344 7761 
mobile +61 402 752 379, skype: petermorag 
mail-to: pray...@unimelb.edu.au TWITTER: @raynerstrings
google scholar profile 




Re: [O] Bug in table formular - last column specifier broken

2015-12-18 Thread Nicolas Goaziou
Hello,

Stefan Nobis  writes:

> With the last update to Org-mode version 8.3.2
> (8.3.2-48-g700b8e-elpaplus) the following table formular breaks:
>
>
>   | |  Mon |  Tue |  Wed | Thu | Fri | Sat | Sun |  Sum |
>   |-+--+--+--+-+-+-+-+--|
>   | |  | 1:30 | 2:00 | | | | | 03:30:00 |
>   |-+--+--+--+-+-+-+-+--|
>   | Sum |  |  |  | | | | | 00:00:00 |
>   #+TBLFM: $>=vsum($<<..$>>);T
>
>
> The error message is: Invalid table range specifier `9'.
>
> When I change the "$>" to "$9" the formula works as expected.

Fixed. Thank you.


Regards,

-- 
Nicolas Goaziou



Re: [O] Need some help in customizing ox-texinfo

2015-12-18 Thread Nicolas Goaziou
Hello,

Oleh Krehel  writes:

> I'm exporting an Org-mode document to Texinfo currently, but I'm having
> an inconvenience with production of @subsubheading items.
>
> What I'm doing right now:
>
> #+BEGIN_TEXINFO
> @subsubheading 
> #+END_TEXINFO
> 
>
> What I would like to have instead:
>
> * :@subsubheading
> 
>
> And have it export to the same thing. I didn't find an easy way to do
> it, since this requires embedding the content of a headline into the
> parent headline. What I've got so far is adding this code to
> `org-texinfo--normalize-headlines':
>
> (org-element-map tree 'headline
> (lambda (hl)
>   (when (member "@subsubheading" (org-element-property :tags hl))
> (setcar (nthcdr (cl-position hl (org-element-property :parent hl))
> (org-element-property :parent hl))
> (cons `(paragraph
> ()
> ,(format
>   "@subsubheading %s"
>   (org-element-property
>:raw-value hl)))
>   (org-element-contents hl)
> info)
>
> It almost works, the only issue is that "@" is escaped later on and I
> get "@@subsubheading" in the end. How can I fix that? Is there an easier
> way to do this in general?

I'm not sure to understand your use case, but couldn't you customize
`org-texinfo-classes'? In particular, see the last paragraph in its
docstring.


Regards,

-- 
Nicolas Goaziou



Re: [O] evaluation issue with ocaml code (due to changes to org-babel-comint-with-output)

2015-12-18 Thread Nicolas Goaziou
Hello,

Alan Schmitt  writes:

> Can I push this?

I have no objection.


Regards,

-- 
Nicolas Goaziou



Re: [O] proposed change of org-gnus-store-link for nnir groups

2015-12-18 Thread Nicolas Goaziou
Hello,

Thomas Alexander Gerds  writes:

> yes, I now found the "how to contribute" page :) the updated patch is
> attached. thanks!

Applied. Thank you.


Regards,

-- 
Nicolas Goaziou



Re: [O] [PATCH] org-protocol: Allow key=val&key2=value2-style URLs

2015-12-18 Thread Sacha Chua
Sacha Chua  writes:

Hello, all!

> On second thought, your suggestion for always unhexifying makes the
> calls from the other handlers simpler, so I've attached a corrected patch.

Following up on this patch. Do you need anything else from me before you
merge this? What happens next? =)

Sacha




[O] How to display full paths in agenda?

2015-12-18 Thread Marcin Borkowski
Hi all,

I'm pretty sure I read somewhere about a possibility to display not only
the headlines, but the full paths in the agenda, so that

* aaa
** bbb

is displayed as `aaa/bbb' and not as `aaa' (or something like that).
I can't find it anywhere, though.  Any hints?

TIA,

-- 
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Faculty of Mathematics and Computer Science
Adam Mickiewicz University



Re: [O] How to display full paths in agenda?

2015-12-18 Thread Nick Dokos
Marcin Borkowski  writes:

> Hi all,
>
> I'm pretty sure I read somewhere about a possibility to display not only
> the headlines, but the full paths in the agenda, so that
>
> * aaa
> ** bbb
>
> is displayed as `aaa/bbb' and not as `aaa' (or something like that).
> I can't find it anywhere, though.  Any hints?
>

Probably %b in org-agenda-prefix-format.

--
Nick




[O] CDlatex

2015-12-18 Thread Doyley, Marvin M.
Hi there,
I just upgrade my org-mode, and it seems that the function turn-on-org-cdlatex 
is no longer available, or maybe I am messing something.
M
---


Re: [O] CDlatex

2015-12-18 Thread Nick Dokos
"Doyley, Marvin M."  writes:

> I just upgrade my org-mode, and it seems that the function
> turn-on-org-cdlatex is no longer available, or maybe I am messing
> something.

It's still there in org.el, line 18812 or thereabouts.

-- 
Nick




Re: [O] How to display full paths in agenda?

2015-12-18 Thread Eric Abrahamsen
Marcin Borkowski  writes:

> Hi all,
>
> I'm pretty sure I read somewhere about a possibility to display not only
> the headlines, but the full paths in the agenda, so that
>
> * aaa
> ** bbb
>
> is displayed as `aaa/bbb' and not as `aaa' (or something like that).
> I can't find it anywhere, though.  Any hints?
>
> TIA,

You can set org-agenda-show-outline-path' to show the path in the echo
area.