[O] A minor problem with exporting to html

2014-03-23 Thread Marcin Borkowski
Hi all,

exporting to HTML messes up with the kill ring (all the exported
content is put on top of the the kill ring).  Am I the only one
experiencing this?  Is it a feature or a bug?

Best,

-- 
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Adam Mickiewicz University



Re: [O] [POLL] Do you need special entities in radio target?

2014-03-23 Thread Christian Moe

Nicolas Goaziou writes:
 Christian Moe ... writes:

 But is this only about special entities, or about all Org syntax,

 the latter.

Thanks for clarifying.

 including subscripts/superscripts, emphasis...? That would be
 limiting. As long as radio targets are visible parts of the text, I'd
 like them to continue supporting such markup.

 So far, radio targets only support entities, subscript and superscript.
 Emphasis is not supported. I don't think it's a limitation, though,
 because radio targets can be contained within emphasis markup.

Sorry, I overlooked that. So both under the status quo and under the
proposed change, emphasis is possible. Mixed emphasis/non-emphasis
within the target (e.g. creation /ex nihilo/) is not supported in
either case, so the change would not further limit use of emphasis.

It would be nice to keep support for subscripts and superscripts,
though. One might want to use, say, CO_2 in a radio target.

But this is not a pressing concern on my part, since I don't rely on
radio targets for anything very important anyway.

Yours,
Christian















Re: [O] A minor problem with exporting to html

2014-03-23 Thread Bastien
Hi Marcin,

Marcin Borkowski mb...@wmi.amu.edu.pl writes:

 exporting to HTML messes up with the kill ring (all the exported
 content is put on top of the the kill ring).  Am I the only one
 experiencing this?  Is it a feature or a bug?

(setq org-export-copy-to-kill-ring nil)

I'm all for using nil as the default value by the way.

Would anyone strongly oppose to this?

-- 
 Bastien



Re: [O] [PATCH] org-mac-link: Improve grabbing behavior for Chrome.

2014-03-23 Thread Bastien
Muchenxuan Tong demon...@gmail.com writes:

 * contrib/lisp/org-mac-link.el (org-as-mac-chrome-get-frontmost-url):
   Improve AppleScript used for grabbing information from Chrome. Now
   it's shorter and doesn't require switching to the app. Also,
   starting and ending quote are trimmed only when necessary.

Applied, thanks!

-- 
 Bastien



Re: [O] preview and default class [8.2.5h (release_8.2.5h-677-g55b0a3 @ /home/youngfrog/sourcetrees/org-mode/lisp/)]

2014-03-23 Thread Bastien
Hi Nicolas,

Nicolas Richard theonewiththeevill...@yahoo.fr writes:

 Ok thanks. For my information, did C-x 4 a work for you in adding the
 section name or did you add it manually ?

It worked from the diff.

I applied your patch with git apply, then went to the modified file,
then C-x v =, then hit `n' to go to the next change and `C-x 4 a' to
create the Changelog.

HTH,

-- 
 Bastien



Re: [O] New headline after no content (empty headline)

2014-03-23 Thread Bastien
Hi Brady,

Brady Trainor algeb...@uw.edu writes:

 Thanks again!

you're welcome---does the Org version that comes from the maint
branch still needs a fix?  If so, can you describe the problem
again?

Here is how to use Org from maint

~$ git clone git://orgmode.org/org-mode.git
~$ git checkout maint
~$ make autoloads

Then update your load-path to use the correct directory.

HTH,

-- 
 Bastien



Re: [O] A minor problem with exporting to html

2014-03-23 Thread Marcin Borkowski
Dnia 2014-03-23, o godz. 09:18:45
Bastien b...@gnu.org napisał(a):

 Hi Marcin,
 
 Marcin Borkowski mb...@wmi.amu.edu.pl writes:
 
  exporting to HTML messes up with the kill ring (all the exported
  content is put on top of the the kill ring).  Am I the only one
  experiencing this?  Is it a feature or a bug?
 
 (setq org-export-copy-to-kill-ring nil)
 
 I'm all for using nil as the default value by the way.
 
 Would anyone strongly oppose to this?
 

Ooops, it's all in the manual...

But I'd strongly suggest making nil the default value.  I find the
current setting strongly unintuitive (unless one read the manual, that
is;)), and not really needed (at least for me).  If I have the export
results in a separate buffer or file, why would I need them in the kill
ring?  Besides, I often want to do something like this: kill a fragment
of my buffer (usually some option, but not necessarily), export the
file, decide that I preferred the previous version, and yank it back.
Obviously, I can use undo - but what about yanking it in another place,
for instance?

Best,

-- 
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Adam Mickiewicz University



Re: [O] A minor problem with exporting to html

2014-03-23 Thread Bastien
Marcin Borkowski mb...@wmi.amu.edu.pl writes:

 But I'd strongly suggest making nil the default value.  I find the
 current setting strongly unintuitive (unless one read the manual, that
 is;)), and not really needed (at least for me).  If I have the export
 results in a separate buffer or file, why would I need them in the kill
 ring?

I guess the default value is a left-over from the time when the HTML
export was just a quick hack, targetting users who want to export
small Org buffer and copy that into another (bigger) HTML file.  Not
sure.

 Besides, I often want to do something like this: kill a fragment
 of my buffer (usually some option, but not necessarily), export the
 file, decide that I preferred the previous version, and yank it back.
 Obviously, I can use undo - but what about yanking it in another place,
 for instance?

I don't know any other place than the kill-ring, but setting
`org-export-copy-to-kill-ring' to nil should solve the problem,
already, no?

-- 
 Bastien



Re: [O] preview and default class [8.2.5h (release_8.2.5h-677-g55b0a3 @ /home/youngfrog/sourcetrees/org-mode/lisp/)]

2014-03-23 Thread Nicolas Richard
Bastien b...@gnu.org writes:
 It worked from the diff.

 I applied your patch with git apply, then went to the modified file,
 then C-x v =, then hit `n' to go to the next change and `C-x 4 a' to
 create the Changelog.

Thanks, I'll try again and hopefully find out what's wrong with what I
did.

Nico.



Re: [O] [RFC] Problem with org-bibtex-read with fields type, key

2014-03-23 Thread Stefan-W. Hahn
Good morning,

this patch series tries to dig with the problem of the double used property
names :key and :type in org-bibtex.

This is just a proposal, because it changes also the API of
`org-bibtex-store-link' and therefore needs a confirmation.

[PATCH 1/5] org-bibtex.el (org-bibtex-read): Split in two functions
[PATCH 2/5] org-bibtex.el: Use `org-bibtex-read-internal' in

 Patch 1 and 2 are somehow unproblematic but resolve a problem not
 mentioned before.

[PATCH 3/5] org-bibtex.el: Replace double used fieldnames :key and

 Patch 3 tries to resolve the original problem.

[PATCH 4/5] org-bibtex.el: Change property names in

 Patch 4 goes a little bit further an renames two porperties in
 `org-bibtex-store-link'. This is an API change which tries to make
 the content behind the properties clearer.

[PATCH 5/5] org-bibtex.el: Clarifying description of

 Patch 5 is just a documentation clarification.


Looking forward of some comments.

With kind regards,
Stefan



[O] [PATCH 1/5] org-bibtex.el (org-bibtex-read): Split in two functions for internal use

2014-03-23 Thread Stefan-W. Hahn
* org-bibtex.el (org-bibtex-read): Organize `org-bibtex-read' function
into two functions, so that it can be used by other functions without
storing the result in `org-bibtex-entries'.

TINY CHANGE

Signed-off-by: Stefan-W. Hahn stefan.h...@s-hahn.de
---
 lisp/org-bibtex.el | 28 
 1 file changed, 16 insertions(+), 12 deletions(-)

diff --git a/lisp/org-bibtex.el b/lisp/org-bibtex.el
index ed645e5..7a12c30 100644
--- a/lisp/org-bibtex.el
+++ b/lisp/org-bibtex.el
@@ -603,10 +603,9 @@ (defun org-bibtex-create-in-current-entry (optional arg)
   (interactive P)
   (org-bibtex-create arg t))
 
-(defun org-bibtex-read ()
+(defun org-bibtex-read-internal ()
   Read a bibtex entry and save to `org-bibtex-entries'.
 This uses `bibtex-parse-entry'.
-  (interactive)
   (let ((keyword (lambda (str) (intern (concat : (downcase str)
(clean-space (lambda (str) (replace-regexp-in-string
[[:space:]\n\r]+   str)))
@@ -617,16 +616,21 @@ (defun org-bibtex-read ()
(= (aref str 0) (car pair))
(= (aref str (1- (length str))) (cdr pair)))
   (setf str (substring str 1 (1- (length str)) str)))
-(push (mapcar
-   (lambda (pair)
- (cons (let ((field (funcall keyword (car pair
- (case field
-   (:=type= :type)
-   (:=key= :key)
-   (otherwise field)))
-   (funcall clean-space (funcall strip-delim (cdr pair)
-   (save-excursion (bibtex-beginning-of-entry) (bibtex-parse-entry)))
-  org-bibtex-entries)))
+(mapcar
+ (lambda (pair)
+   (cons (let ((field (funcall keyword (car pair
+  (case field
+(:=type= :type)
+(:=key= :key)
+(otherwise field)))
+(funcall clean-space (funcall strip-delim (cdr pair)
+ (save-excursion (bibtex-beginning-of-entry) (bibtex-parse-entry)
+
+(defun org-bibtex-read ()
+  Read a bibtex entry and save to `org-bibtex-entries'.
+This uses `bibtex-parse-entry'.
+  (interactive)
+  (push (org-bibtex-read-internal) org-bibtex-entries))
 
 (defun org-bibtex-read-buffer (buffer)
   Read all bibtex entries in BUFFER and save to `org-bibtex-entries'.
-- 
1.8.3.2.733.gf8abaeb




[O] [PATCH 3/5] org-bibtex.el: Replace double used fieldnames :key and :byte.

2014-03-23 Thread Stefan-W. Hahn
* org-bibtex.el (org-bibtex-read-internal): Change property names.

The bibtex parser returns

  =key=  for the key of the bibtex entry
  =type= for the type of the bibtex entry.

These both should not be mixed up with the :key and :type entries of a
bibtex item. So they get renamed to :bibkey and :bibtype respectively.

TINY CHANGE

Signed-off-by: Stefan-W. Hahn stefan.h...@s-hahn.de
---
 lisp/org-bibtex.el | 14 +++---
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/lisp/org-bibtex.el b/lisp/org-bibtex.el
index 4fd1153..b4b707a 100644
--- a/lisp/org-bibtex.el
+++ b/lisp/org-bibtex.el
@@ -456,7 +456,7 @@ (defun org-bibtex-store-link ()
   (entry (org-bibtex-read-internal)))
 
   (org-store-link-props
-   :key (cdr (assoc :key entry))
+   :key (cdr (assoc :bibkey entry))
:author (or (cdr (assoc :author entry)) [no author])
:editor (or (cdr (assoc :editor entry)) [no editor])
:title (or (cdr (assoc :title entry)) [no title])
@@ -473,8 +473,8 @@ (defun org-bibtex-store-link ()
:annote (or (cdr (assoc :annote entry)) [no annotation])
:series (or (cdr (assoc :series entry)) [no series])
:abstract (or (cdr (assoc :abstract entry)) [no abstract])
-   :btype (or (cdr (assoc :type entry)) [no type])
-   :type bibtex
+   :btype (or (cdr (assoc :bibtype entry)) [no bibtype])
+   :type bibtex ; hides bibtex entry :type
:link link
:description org-bibtex-description
 
@@ -614,8 +614,8 @@ (defun org-bibtex-read-internal ()
  (lambda (pair)
(cons (let ((field (funcall keyword (car pair
   (case field
-(:=type= :type)
-(:=key= :key)
+(:=type= :bibtype)
+(:=key= :bibkey)
 (otherwise field)))
 (funcall clean-space (funcall strip-delim (cdr pair)
  (save-excursion (bibtex-beginning-of-entry) (bibtex-parse-entry)
@@ -660,12 +660,12 @@ (defun org-bibtex-write ()
 (insert (funcall val :title))
 (org-bibtex-put TITLE (funcall val :title))
 (org-bibtex-put org-bibtex-type-property-name
-   (downcase (funcall val :type)))
+   (downcase (funcall val :bibtype)))
 (dolist (pair entry)
   (case (car pair)
(:titlenil)
(:type nil)
-   (:key  (org-bibtex-put org-bibtex-key-property (cdr pair)))
+   (:bibkey   (org-bibtex-put org-bibtex-key-property (cdr pair)))
(:keywords (if org-bibtex-tags-are-keywords
   (mapc
(lambda (kw)
-- 
1.8.3.2.733.gf8abaeb




[O] [PATCH 4/5] org-bibtex.el: Change property names in `org-bibtex-store-link' API.

2014-03-23 Thread Stefan-W. Hahn
* org-bibtex.el (org-bibtex-store-link): Change property names in API.

Because it is confusing to have a :key property in
`org-bibtex-store-link' which is not the :key entry of a bibtex entry
but the key of the entry, this should be changed. The new name of the
property is :bibkey.

To be consistent the property :btype is renamed to :bibtype.

TINY CHANGE

Signed-off-by: Stefan-W. Hahn stefan.h...@s-hahn.de
---
 lisp/org-bibtex.el | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/lisp/org-bibtex.el b/lisp/org-bibtex.el
index b4b707a..d8ab649 100644
--- a/lisp/org-bibtex.el
+++ b/lisp/org-bibtex.el
@@ -39,7 +39,7 @@
 ;; :editor:url:number  :journal
 ;; :title :year   :series  :address
 ;; :booktitle :month  :annote  :abstract
-;; :key   :btype
+;; :bibkey:bibtype
 ;;
 ;; Here is an example of a capture template that use some of this
 ;; information (:author :year :title :journal :pages):
@@ -456,7 +456,7 @@ (defun org-bibtex-store-link ()
   (entry (org-bibtex-read-internal)))
 
   (org-store-link-props
-   :key (cdr (assoc :bibkey entry))
+   :bibkey (cdr (assoc :bibkey entry))
:author (or (cdr (assoc :author entry)) [no author])
:editor (or (cdr (assoc :editor entry)) [no editor])
:title (or (cdr (assoc :title entry)) [no title])
@@ -473,7 +473,7 @@ (defun org-bibtex-store-link ()
:annote (or (cdr (assoc :annote entry)) [no annotation])
:series (or (cdr (assoc :series entry)) [no series])
:abstract (or (cdr (assoc :abstract entry)) [no abstract])
-   :btype (or (cdr (assoc :bibtype entry)) [no bibtype])
+   :bibtype (or (cdr (assoc :bibtype entry)) [no bibtype])
:type bibtex ; hides bibtex entry :type
:link link
:description org-bibtex-description
-- 
1.8.3.2.733.gf8abaeb




[O] [PATCH 2/5] org-bibtex.el: Use `org-bibtex-read-internal' in `org-bibtex-store-link'

2014-03-23 Thread Stefan-W. Hahn
* org-bibtex.el (org-bibtex-store-link): To have the same conversion,
especially removing of {{...}}, of a bibtex entry use
`org-bibtex-read-internal' in `org-bibtex-store-link'.

TINY CHANGE

Signed-off-by: Stefan-W. Hahn stefan.h...@s-hahn.de
---
 lisp/org-bibtex.el | 46 --
 1 file changed, 20 insertions(+), 26 deletions(-)

diff --git a/lisp/org-bibtex.el b/lisp/org-bibtex.el
index 7a12c30..4fd1153 100644
--- a/lisp/org-bibtex.el
+++ b/lisp/org-bibtex.el
@@ -453,33 +453,27 @@ (defun org-bibtex-store-link ()
 (let* ((search (org-create-file-search-in-bibtex))
   (link (concat file: (abbreviate-file-name buffer-file-name)
 :: search))
-  (entry (mapcar ; repair strings enclosed in ... or {...}
-  (lambda(c)
-(if (string-match
- ^\\(?:{\\|\\\)\\(.*\\)\\(?:}\\|\\\)$ (cdr c))
-(cons (car c) (match-string 1 (cdr c))) c))
-  (save-excursion
-(bibtex-beginning-of-entry)
-(bibtex-parse-entry)
+  (entry (org-bibtex-read-internal)))
+
   (org-store-link-props
-   :key (cdr (assoc =key= entry))
-   :author (or (cdr (assoc author entry)) [no author])
-   :editor (or (cdr (assoc editor entry)) [no editor])
-   :title (or (cdr (assoc title entry)) [no title])
-   :booktitle (or (cdr (assoc booktitle entry)) [no booktitle])
-   :journal (or (cdr (assoc journal entry)) [no journal])
-   :publisher (or (cdr (assoc publisher entry)) [no publisher])
-   :pages (or (cdr (assoc pages entry)) [no pages])
-   :url (or (cdr (assoc url entry)) [no url])
-   :year (or (cdr (assoc year entry)) [no year])
-   :month (or (cdr (assoc month entry)) [no month])
-   :address (or (cdr (assoc address entry)) [no address])
-   :volume (or (cdr (assoc volume entry)) [no volume])
-   :number (or (cdr (assoc number entry)) [no number])
-   :annote (or (cdr (assoc annote entry)) [no annotation])
-   :series (or (cdr (assoc series entry)) [no series])
-   :abstract (or (cdr (assoc abstract entry)) [no abstract])
-   :btype (or (cdr (assoc =type= entry)) [no type])
+   :key (cdr (assoc :key entry))
+   :author (or (cdr (assoc :author entry)) [no author])
+   :editor (or (cdr (assoc :editor entry)) [no editor])
+   :title (or (cdr (assoc :title entry)) [no title])
+   :booktitle (or (cdr (assoc :booktitle entry)) [no booktitle])
+   :journal (or (cdr (assoc :journal entry)) [no journal])
+   :publisher (or (cdr (assoc :publisher entry)) [no publisher])
+   :pages (or (cdr (assoc :pages entry)) [no pages])
+   :url (or (cdr (assoc :url entry)) [no url])
+   :year (or (cdr (assoc :year entry)) [no year])
+   :month (or (cdr (assoc :month entry)) [no month])
+   :address (or (cdr (assoc :address entry)) [no address])
+   :volume (or (cdr (assoc :volume entry)) [no volume])
+   :number (or (cdr (assoc :number entry)) [no number])
+   :annote (or (cdr (assoc :annote entry)) [no annotation])
+   :series (or (cdr (assoc :series entry)) [no series])
+   :abstract (or (cdr (assoc :abstract entry)) [no abstract])
+   :btype (or (cdr (assoc :type entry)) [no type])
:type bibtex
:link link
:description org-bibtex-description
-- 
1.8.3.2.733.gf8abaeb




[O] encrypting file uses revoked key

2014-03-23 Thread Daniel Krenn
I create a new file test.gpg and write

  # -*- mode:org; epa-file-encrypt-to: (b...@blub.com) -*-

(b...@blub.com replaced by my mail address) as the first line. Then I
save this file and I'm asked

  Select recipents for encryption.
  If no one is selected, symmetric encryption will be performed.
  - `m' to mark a key on the line
  - `u' to unmark a key on the line
  [Cancel][OK]

  list of keys...

from which I select my current key. The file is saved and I can open it
again (inserting my passphrase for my key).

Now, when I change something in the file and then want to save it, I get
the following error:

  byte-code: Opening output file: Encrypt failed: ((exit) (invalid-
  recipient (reason . 0) (requested-recipient . 2A10BC79E59DAB19)))

The key 2A10BC79E59DAB19 is my old key, which has been revoked.

So what goes wrong here?

FYI: Before creating my current gpg key, everything was fine.

Daniel



[O] [PATCH 5/5] org-bibtex.el: Clarifying description of `org-bibtex-type-property-name'.

2014-03-23 Thread Stefan-W. Hahn
* org-bibtex.el: Clarifying description of `org-bibtex-type-property-name'.

TINY CHANGE

Signed-off-by: Stefan-W. Hahn stefan.h...@s-hahn.de
---
 lisp/org-bibtex.el | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/lisp/org-bibtex.el b/lisp/org-bibtex.el
index d8ab649..7e1d8da 100644
--- a/lisp/org-bibtex.el
+++ b/lisp/org-bibtex.el
@@ -285,7 +285,9 @@ (defcustom org-bibtex-no-export-tags nil
   :type '(repeat :tag Tag (string)))
 
 (defcustom org-bibtex-type-property-name btype
-  Property in which to store bibtex entry type (e.g., article).
+  Org property in which to store bibtex entry type (e.g.,
+article) when converting between parsed bibtex entry and org-mode
+property database.
   :group 'org-bibtex
   :version 24.1
   :type 'string)
-- 
1.8.3.2.733.gf8abaeb




Re: [O] A minor problem with exporting to html

2014-03-23 Thread Marcin Borkowski
Dnia 2014-03-23, o godz. 09:50:24
Bastien b...@gnu.org napisał(a):

 Marcin Borkowski mb...@wmi.amu.edu.pl writes:
 
  But I'd strongly suggest making nil the default value.  I find the
  current setting strongly unintuitive (unless one read the manual,
  that is;)), and not really needed (at least for me).  If I have the
  export results in a separate buffer or file, why would I need them
  in the kill ring?
 
 I guess the default value is a left-over from the time when the HTML
 export was just a quick hack, targetting users who want to export
 small Org buffer and copy that into another (bigger) HTML file.  Not
 sure.
 
  Besides, I often want to do something like this: kill a fragment
  of my buffer (usually some option, but not necessarily), export the
  file, decide that I preferred the previous version, and yank it
  back. Obviously, I can use undo - but what about yanking it in
  another place, for instance?
 
 I don't know any other place than the kill-ring, but setting
 `org-export-copy-to-kill-ring' to nil should solve the problem,
 already, no?

Well, yes - it did it for me, at least.  But it required setting the
option.  And I suspect that what the majority of users might
need/expect is having this option set to nil - that was what I meant.

BTW, I also think that Org is awesome.  Thanks a lot!

-- 
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Adam Mickiewicz University



Re: [O] [RFC] Creole-style / Support for **emphasis**__within__**a word**

2014-03-23 Thread Suvayu Ali
On Sun, Mar 23, 2014 at 01:06:35AM +0100, Marcin Borkowski wrote:
 Dnia 2014-03-22, o godz. 16:30:31
 Nicolas Goaziou n.goaz...@gmail.com napisał(a):
 
   Also, there is no backward-compatibility squad, only users who
   care about what they like.
  
  That is what they want us to believe! :)
 
 Ninja'd!
 
 Re: topic: one idea that is maybe not very Org-ish, but seems
 reasonable: Org already uses LaTeX syntax for sub/superscripts, and
 accepts LaTeX snippets etc.  Why not allow \textbf{something} parallel
 to *something*?  Would it break something?  When using the LaTeX
 exporter, currently it seems (from very few simple experiments), that
 \textbf{whatever} copies whatever verbatim to the file (I tried LaTeX
 and HTML exporters).

Often LaTeX users tend to forget (including myself) one of Org's
features is to be able to export to different backends without major
modifications to the source file (.org file).

Your proposal breaks that.

-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] [RFC] Creole-style / Support for **emphasis**__within__**a word**

2014-03-23 Thread Marcin Borkowski
Dnia 2014-03-23, o godz. 12:32:46
Suvayu Ali fatkasuvayu+li...@gmail.com napisał(a):

 On Sun, Mar 23, 2014 at 01:06:35AM +0100, Marcin Borkowski wrote:
  Dnia 2014-03-22, o godz. 16:30:31
  Nicolas Goaziou n.goaz...@gmail.com napisał(a):
  
Also, there is no backward-compatibility squad, only users who
care about what they like.
   
   That is what they want us to believe! :)
  
  Ninja'd!
  
  Re: topic: one idea that is maybe not very Org-ish, but seems
  reasonable: Org already uses LaTeX syntax for sub/superscripts, and
  accepts LaTeX snippets etc.  Why not allow \textbf{something}
  parallel to *something*?  Would it break something?  When using the
  LaTeX exporter, currently it seems (from very few simple
  experiments), that \textbf{whatever} copies whatever verbatim to
  the file (I tried LaTeX and HTML exporters).
 
 Often LaTeX users tend to forget (including myself) one of Org's
 features is to be able to export to different backends without major
 modifications to the source file (.org file).
 
 Your proposal breaks that.

No, it doesn't.  What I meant was to make Org *recognize* the
\textbf{...} etc. syntax and *convert* it to strong ... /strong and
similar things (depending on the backend).  Sorry if I wasn't clear
enough.

Best,

-- 
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Adam Mickiewicz University



[O] org-html5presentation

2014-03-23 Thread Rustom Mody
At this
http://orgmode.org/worg/org-tutorials/non-beamer-presentations.html
it is said that org-html5presentation works

However the code linked claims to need org 7.5

Does it work?
Any easy way of making it work?

Rusi



Re: [O] org-html5presentation

2014-03-23 Thread Bastien
Hi Rustom,

Rustom Mody rustompm...@gmail.com writes:

 However the code linked claims to need org 7.5

 Does it work?

Did you try?

 Any easy way of making it work?

See previous question :)

-- 
 Bastien



Re: [O] org-html5presentation

2014-03-23 Thread Rustom Mody
On Sun, Mar 23, 2014 at 8:33 PM, Bastien b...@gnu.org wrote:
 Hi Rustom,

 Rustom Mody rustompm...@gmail.com writes:

 However the code linked claims to need org 7.5

 Does it work?

 Did you try?

 Any easy way of making it work?

 See previous question :)

I did this much:

(require 'org-html5presentation)
M-x org-export-as-html5presentation

I get (from *Messages*)
org-export-html5presentation-convert-special-strings: Symbol's value
as variable is void: org-export-html-special-string-regexps

I can poke around more
However given the 7.5 requirement I thought I'd ask first


Rusi
-- 
http://www.the-magus.in
http://blog.languager.org



[O] org mode alignment problem

2014-03-23 Thread Guido Van Hoecke
Hi,

Emacs org mode aligns strangely and I wonder whether that could be due
to my setup.

Using a small 5 line input file:

* 1
** capello [ka-PEL-lo]
** cappello [kap-PEL-lo]
** bello [BEL-lo]
** caffè [kaf-FÈ]

I have org-hide-leading-stars set to t so leading stars are displayed
as spaces. I'll use _ to show them hereafter for clarity.

Initially the file shows as expected:

* 1
_* capello [ka-PEL-lo]
_* cappello [kap-PEL-lo]
_* bello [BEL-lo]
_* caffè [kaf-FÈ]

My cursor sits below the last line in the file.

When I put the cusor behind the last character of the last line, the
displayed portion of this line moves one position to the left and the
buffer displays as:

* 1
_* capello [ka-PEL-lo]
_* cappello [kap-PEL-lo]
_* bello [BEL-lo]
* caffè [kaf-FÈ]

When I hit the up arrow, it looks like this:
* 1
_* capello [ka-PEL-lo]
_* cappello [kap-PEL-lo]
* bello [BEL-lo]
_* caffè [kaf-FÈ]

I now hit the down arrow twice, and this is how it looks now:
* 1
_* capello [ka-PEL-lo]
_* cappello [kap-PEL-lo]
* bello [BEL-lo]
* caffè [kaf-FÈ]

Hitting one more down arrow, it reverts to the orignal expected display:
* 1
_* capello [ka-PEL-lo]
_* cappello [kap-PEL-lo]
_* bello [BEL-lo]
_* caffè [kaf-FÈ]

If this works as expected, I would at least like to understand this
behaviour.

But I'm pretty sure this is not normal, so any help or suggestion
would be usefull.

I am using 

Org-mode version 8.2.5h 
(release_8.2.5h-830-gb3a10b @ /Users/guivho/.emacs.d/org-mode/lisp/)

GNU Emacs 24.3.1
(x86_64-apple-darwin, NS apple-appkit-1187.37) of 2013-05-18.

TIA,


Guido

--
The Following Subsume All Physical and Human Laws:

1. You can't push on a string.
2. Ain't no free lunches.
3. Them as has, gets.
4. You can't win them all, but you sure as hell can lose them all.



Re: [O] org-html5presentation

2014-03-23 Thread Rustom Mody
On Sun, Mar 23, 2014 at 8:40 PM, Rustom Mody rustompm...@gmail.com wrote:
 On Sun, Mar 23, 2014 at 8:33 PM, Bastien b...@gnu.org wrote:
 Hi Rustom,

 Rustom Mody rustompm...@gmail.com writes:

 However the code linked claims to need org 7.5

 Does it work?

 Did you try?

 Any easy way of making it work?

 See previous question :)

 I did this much:

 (require 'org-html5presentation)
 M-x org-export-as-html5presentation

 I get (from *Messages*)
 org-export-html5presentation-convert-special-strings: Symbol's value
 as variable is void: org-export-html-special-string-regexps

 I can poke around more
 However given the 7.5 requirement I thought I'd ask first

Just checked with org 7.something (dunno for sure since org-version
does not work -- I had kept around an old directory in case of upgrade
hiccups)

and the above works (with emacs -Q)

That is it exports though there is a small problem with the display --
margins are cut off



[O] [bug] cannot extract just one column of table for use in gnuplot src block

2014-03-23 Thread Eric S Fraga
Hello,

with this simple example,

#+TITLE: examplebug.org
#+AUTHOR:Eric S Fraga

* table references
#+tblname: mytable
|   | A | B | C | D | E | F | G | H | I | Total |
|---+---+---+---+---+---+---+---+---+---+---|
| 1 | 1 | 1 |   |   | 0 |   |   | 1 |   | 3 |
| 2 | 1 |   |   |   | 0 |   |   | 1 |   | 2 |
| 3 |   |   | 2 | 1 | 0 |   |   | 1 |   | 4 |
| 4 |   |   | 2 | 1 |   |   |   | 1 |   | 4 |
| 5 |   |   | 2 |   |   |   |   |   |   | 2 |
| 6 |   |   |   |   |   | 1 |   |   |   | 1 |
| 7 |   |   |   |   |   |   | 0 |   |   | 0 |
| 8 |   |   |   |   |   |   |   |   | 2 | 2 |
|---+---+---+---+---+---+---+---+---+---+---|
#+TBLFM: $1=1+@-1::$11=vsum($2..$10)

#+begin_src gnuplot :var data=mytable[1:-1,10] :file histogram.pdf
set xrange [-0.5:25.5]
set yrange [0:4.2]
plot data with histograms notitle
#+end_src

where I am trying to plot out the last column using a histogram plot in
gnuplot, org fails with an error:

Debugger entered--Lisp error: (wrong-type-argument sequencep 3)

where the last function invoked was orgtbl-format-line(3).

The trace is attached.  This is with org up to date as of a few minutes ago.

The trace shows that the column has been extracted exactly as I
wish.  However, it would appear that the function may expect a sequence
and not just a single element?  If I try to extract more than just one
column, everything is fine (although obviously the gnuplot directives
need to change...).

thanks,
eric

-- 
: Eric S Fraga (0xFFFCF67D), Emacs 24.4.50.2, Org release_8.2.5h-831-gcb9172-git
Debugger entered--Lisp error: (wrong-type-argument sequencep 3)
  mapcar((lambda (f) (setq i (1+ i)) (let* ((efmt (orgtbl-get-fmt *orgtbl-efmt* 
i)) (f (if (and efmt (string-match orgtbl-exp-regexp f)) (orgtbl-apply-fmt efmt 
(match-string 1 f) (match-string 2 f)) f))) (orgtbl-apply-fmt (or 
(orgtbl-get-fmt *orgtbl-fmt* i) *orgtbl-default-fmt*) f))) 3)
  (let* ((i 0) (line (mapcar (function (lambda (f) (setq i (1+ i)) (let* (... 
...) (orgtbl-apply-fmt ... f line))) (setq *orgtbl-rtn* (cons (if 
*orgtbl-lfmt* (apply (function orgtbl-apply-fmt) *orgtbl-lfmt* line) (concat 
(orgtbl-eval-str *orgtbl-lstart*) (mapconcat (quote identity) line 
*orgtbl-sep*) (orgtbl-eval-str *orgtbl-lend*))) *orgtbl-rtn*)))
  (if (eq line (quote hline)) (if *orgtbl-hline* (setq *orgtbl-rtn* (cons 
*orgtbl-hline* *orgtbl-rtn*))) (let* ((i 0) (line (mapcar (function (lambda (f) 
(setq i ...) (let* ... ...))) line))) (setq *orgtbl-rtn* (cons (if 
*orgtbl-lfmt* (apply (function orgtbl-apply-fmt) *orgtbl-lfmt* line) (concat 
(orgtbl-eval-str *orgtbl-lstart*) (mapconcat (quote identity) line 
*orgtbl-sep*) (orgtbl-eval-str *orgtbl-lend*))) *orgtbl-rtn*
  orgtbl-format-line(3)
  (if prevline (orgtbl-format-line prevline))
  (while (not (eq (car *orgtbl-table*) section-stopper)) (if prevline 
(orgtbl-format-line prevline)) (setq prevline (car-safe (prog1 *orgtbl-table* 
(setq *orgtbl-table* (cdr *orgtbl-table*))
  (progn (while (not (eq (car *orgtbl-table*) section-stopper)) (if prevline 
(orgtbl-format-line prevline)) (setq prevline (car-safe (prog1 *orgtbl-table* 
(setq *orgtbl-table* (cdr *orgtbl-table*)) (if prevline (let 
((*orgtbl-lstart* *orgtbl-llstart*) (*orgtbl-lend* *orgtbl-llend*) 
(*orgtbl-lfmt* *orgtbl-llfmt*)) (orgtbl-format-line prevline
  (let (prevline) (progn (while (not (eq (car *orgtbl-table*) section-stopper)) 
(if prevline (orgtbl-format-line prevline)) (setq prevline (car-safe (prog1 
*orgtbl-table* (setq *orgtbl-table* (cdr *orgtbl-table*)) (if prevline (let 
((*orgtbl-lstart* *orgtbl-llstart*) (*orgtbl-lend* *orgtbl-llend*) 
(*orgtbl-lfmt* *orgtbl-llfmt*)) (orgtbl-format-line prevline)
  orgtbl-format-section(nil)
  (let* ((splicep (plist-get params :splice)) (hline (plist-get params :hline)) 
(skipheadrule (plist-get params :skipheadrule)) (remove-nil-linesp (plist-get 
params :remove-nil-lines)) (remove-newlines (plist-get params 
:remove-newlines)) (*orgtbl-hline* hline) (*orgtbl-table* table) (*orgtbl-sep* 
(plist-get params :sep)) (*orgtbl-efmt* (plist-get params :efmt)) 
(*orgtbl-lstart* (plist-get params :lstart)) (*orgtbl-llstart* (or (plist-get 
params :llstart) *orgtbl-lstart*)) (*orgtbl-lend* (plist-get params :lend)) 
(*orgtbl-llend* (or (plist-get params :llend) *orgtbl-lend*)) (*orgtbl-lfmt* 
(plist-get params :lfmt)) (*orgtbl-llfmt* (or (plist-get params :llfmt) 
*orgtbl-lfmt*)) (*orgtbl-fmt* (plist-get params :fmt)) *orgtbl-rtn*) (if 
backend (progn (setq *orgtbl-table* (mapcar (function (lambda (r) (if ... ... 
r))) *orgtbl-table* (if splicep nil (if (plist-member params :tstart) 
(progn (let ((tstart (orgtbl-eval-str ...))) (if tstart (setq *orgtbl-rtn* 
(cons tstart *orgtbl-rtn*))) (if (and (not splicep) (or (consp (car 
*orgtbl-table*)) (consp (nth 1 *orgtbl-table*))) (memq (quote hline) (cdr 
*orgtbl-table*))) (progn (if (eq (quote hline) (car *orgtbl-table*)) (progn 
(and hline (setq *orgtbl-rtn* (cons 

Re: [O] Radio targets with mixed capitalisation do not work in HTML export

2014-03-23 Thread Nicolas Goaziou
Hello,

Bastien b...@gnu.org writes:

 Nicolas Goaziou n.goaz...@gmail.com writes:

 For example, `org-make-target-link-regexp' generates a regexp enclosed
 within \\...\\. Unfortunately, that will not match a radio link
 starting with an entity, e.g., \alpha-test \alpha-test. It is
 probably due to the fact that radio targets were initially meant to
 contain only plain text, not Org syntax.

 FWIW, I'd be fine to only allow plain text in radio targets, instead
 of the full syntax.  Your take.

 It's one of the last thing I want to get fixed before we release Org
 8.2.3.

 If you don't mind, I need a bit more time (around a week) for 8.2.3. In
 particular, there are speed issues in `org-element-context' that I would
 like to fix first.

 Sure -- there is absolutely no rush, and I have my own share of things
 I need to fix too, so let's no hurry at all.  I was mentioning 8.2.3
 because Stefan created the emacs-24 branch, which means that the move
 toward Emacs 24.4 is accelerating now, but there is no deadline that
 I'm aware of.

Here are 3 patches (for maint) fixing radio-target behaviour.

Feedback welcome.


Regards,

-- 
Nicolas Goaziou
From a55057e99d72241d039a1f8d57ced3cbb5dcb68d Mon Sep 17 00:00:00 2001
From: Nicolas Goaziou n.goaz...@gmail.com
Date: Sun, 23 Mar 2014 11:23:08 +0100
Subject: [PATCH 1/3] Change \ and ~ syntax to symbol

* lisp/org.el (org-mode): Change \ and ~ characters syntax from
  `punctuation' to `symbol' so they are on par with other characters used
  in Org syntax (e.g., /, *...).

This change is needed to correctly find radio links starting with an
entity:

  \alpha-test \alpha-test
---
 lisp/org.el | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lisp/org.el b/lisp/org.el
index 70bf19e..56ae096 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -5341,6 +5341,8 @@ The following commands are available:
   ;; Modify a few syntax entries
   (modify-syntax-entry ?@ w)
   (modify-syntax-entry ?\ \)
+  (modify-syntax-entry ?\\ _)
+  (modify-syntax-entry ?~ _)
   (if org-startup-truncated (setq truncate-lines t))
   (when org-startup-indented (require 'org-indent) (org-indent-mode 1))
   (org-set-local 'font-lock-unfontify-region-function
-- 
1.9.1

From 2f46aae4d602402f201c8d3291a985de374d7593 Mon Sep 17 00:00:00 2001
From: Nicolas Goaziou n.goaz...@gmail.com
Date: Sun, 23 Mar 2014 11:28:26 +0100
Subject: [PATCH 2/3] Fix radio target parsing

* lisp/org-element.el (org-element-all-successors,
  org-element-object-restrictions): Prioritize `link' over other
  successors in order to find radio links starting with another syntax
  object (e.g., an entity).  Also allow text markup within radio
  targets.
(org-element-link-parser): Add contents to radio targets.

* lisp/org.el (org-make-target-link-regexp): Fix regexp so it can
  match targets starting with an Org object (i.e., an entity).
(org-ctrl-c-ctrl-c): Fix function when applied on an object contained
within a radio target.

* testing/lisp/test-org-element.el (test-org-element/radio-target-parser): Add test.
* testing/lisp/test-ox.el (test-org-export/resolve-radio-link): Add test.
---
 lisp/org-element.el  | 19 +++
 lisp/org.el  | 10 ++
 testing/lisp/test-org-element.el | 15 +++
 testing/lisp/test-ox.el  |  9 +
 4 files changed, 37 insertions(+), 16 deletions(-)

diff --git a/lisp/org-element.el b/lisp/org-element.el
index 9bb7944..9589714 100644
--- a/lisp/org-element.el
+++ b/lisp/org-element.el
@@ -187,10 +187,10 @@ is not sufficient to know if point is at a paragraph ending.  See
   List of recursive element types aka Greater Elements.)
 
 (defconst org-element-all-successors
-  '(export-snippet footnote-reference inline-babel-call inline-src-block
-		   latex-or-entity line-break link macro plain-link radio-target
-		   statistics-cookie sub/superscript table-cell target
-		   text-markup timestamp)
+  '(link export-snippet footnote-reference inline-babel-call
+	 inline-src-block latex-or-entity line-break macro plain-link
+	 radio-target statistics-cookie sub/superscript table-cell target
+	 text-markup timestamp)
   Complete list of successors.)
 
 (defconst org-element-object-successor-alist
@@ -328,13 +328,13 @@ Don't modify it, set `org-element-affiliated-keywords' instead.)
   (paragraph ,@standard-set)
   ;; Remove any variable object from radio target as it would
   ;; prevent it from being properly recognized.
-  (radio-target latex-or-entity sub/superscript)
+  (radio-target latex-or-entity sub/superscript text-markup)
   (strike-through ,@standard-set)
   (subscript ,@standard-set)
   (superscript ,@standard-set)
   ;; Ignore inline babel call and inline src block as formulas are
   ;; possible.  Also ignore line breaks and statistics cookies.
-  (table-cell export-snippet footnote-reference latex-or-entity link macro
+  (table-cell link export-snippet footnote-reference 

Re: [O] Radio targets with mixed capitalisation do not work in HTML export

2014-03-23 Thread Bastien
Hi Nicolas,

Nicolas Goaziou n.goaz...@gmail.com writes:

 Here are 3 patches (for maint) fixing radio-target behaviour.

It looks perfect.  I tested* the HTML and LaTeX backend and they do
exactly what's expected.  Thanks a lot for putting this together!

* With quite a complex radio link like the one in the attached
file.



a.org
Description: Lotus Organizer

-- 
 Bastien


Re: [O] [bug] cannot extract just one column of table for use in gnuplot src block

2014-03-23 Thread Achim Gratz
Eric S Fraga writes:
 The trace shows that the column has been extracted exactly as I
 wish.

No, the column has been extracted as a vector, not a table.

 However, it would appear that the function may expect a sequence
 and not just a single element?

A table line is a list or a symbol, at the point of the error only a
list may be present.  However, due to data being a vector, you'll get
a number.  That's easy enough to guard for in that function, but the bug
is much further up the call chain, most likely in
org-babel-gnuplot-process-vars.  Something along the line of the
following patch might be in order:

diff --git a/lisp/ob-gnuplot.el b/lisp/ob-gnuplot.el
index 6783706..7d7db2a 100644
--- a/lisp/ob-gnuplot.el
+++ b/lisp/ob-gnuplot.el
@@ -85,10 +85,15 @@ (defun org-babel-gnuplot-process-vars (params)
  (lambda (pair)
(cons
(car pair) ;; variable name
-   (if (listp (cdr pair)) ;; variable value
-   (org-babel-gnuplot-table-to-data
-(cdr pair) (org-babel-temp-file gnuplot-) params)
- (cdr pair
+   (let* ((val (cdr pair)) ;; variable value
+  (lp  (listp val)))
+ (if lp
+ (org-babel-gnuplot-table-to-data
+  (let* ((first  (car val))
+ (tablep (or (listp first) (symbolp first
+(if tablep val (mapcar 'list val)))
+  (org-babel-temp-file gnuplot-) params)
+ val
  (mapcar #'cdr (org-babel-get-header params :var)


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

SD adaptation for Waldorf Blofeld V1.15B11:
http://Synth.Stromeko.net/Downloads.html#WaldorfSDada




Re: [O] org-html5presentation

2014-03-23 Thread Bastien
Rustom Mody rustompm...@gmail.com writes:

 Just checked with org 7.something (dunno for sure since org-version
 does not work -- I had kept around an old directory in case of upgrade
 hiccups)

 and the above works (with emacs -Q)

 That is it exports though there is a small problem with the display --
 margins are cut off

So you get the answer: it works with 7.5 but not with recent Org.
I suggest to ping the author to let him know he needs to update
the code.

-- 
 Bastien



Re: [O] org mode alignment problem

2014-03-23 Thread Bastien
Hi Guido,

Guido Van Hoecke gui...@gmail.com writes:

 But I'm pretty sure this is not normal, so any help or suggestion
 would be usefull.

Yes, this is not normal.  Can you try

M-x global-font-lock-mode RET

to prevent the hiding of leading stars and

M-x visible-mode RET

to prevent invisibility properties?

This will help figure out what's wrong.

Thanks,

-- 
 Bastien



Re: [O] org-html5presentation

2014-03-23 Thread Marcin Borkowski
Dnia 2014-03-23, o godz. 18:52:35
Bastien b...@gnu.org napisał(a):

 Rustom Mody rustompm...@gmail.com writes:
 
  Just checked with org 7.something (dunno for sure since org-version
  does not work -- I had kept around an old directory in case of
  upgrade hiccups)
 
  and the above works (with emacs -Q)
 
  That is it exports though there is a small problem with the display
  -- margins are cut off
 
 So you get the answer: it works with 7.5 but not with recent Org.
 I suggest to ping the author to let him know he needs to update
 the code.
 

Just my 2 cents: I've just tried org-reveal and it works like a charm.

Hth,

-- 
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Adam Mickiewicz University



Re: [O] [PATCH] org-plot: Handle explicit date/time index

2014-03-23 Thread Bastien
Hi Yasushi,

Yasushi SHOJI ya...@atmark-techno.com writes:

 * lisp/org-plot.el (org-plot-quote-tsv-field): Dump data as is when
   `timeind' is set.

This change produces a compiler warning:

In org-plot-quote-tsv-field:
org-plot.el:113:22:Warning: reference to free variable `params'

Can you check and fix this?

Thanks in advance,

-- 
 Bastien



Re: [O] org mode alignment problem

2014-03-23 Thread Guido Van Hoecke
Hi Bastien,

Bastien b...@gnu.org writes:

 Hi Guido,

 Guido Van Hoecke gui...@gmail.com writes:

 But I'm pretty sure this is not normal, so any help or suggestion
 would be usefull.

 Yes, this is not normal.  Can you try

 M-x global-font-lock-mode RET

 to prevent the hiding of leading stars and

 M-x visible-mode RET

 to prevent invisibility properties?

 This will help figure out what's wrong.


Basically it's the same behaviour. The level 2 lines display as

_** text

or

** text

FWIW, I'am pretty sure it is related to the presence of bracket
pairs.

The problem remains if I replace '[' and ']' with either '{' and
'}' or '(' and ')'.

It disappears if I replace them by e.g. '#' and '+'.

HTH,


Guido

--
Everything should be made as simple as possible, but not simpler.
-- Albert Einstein



Re: [O] org-html5presentation

2014-03-23 Thread Rick Frankel
On Sun, Mar 23, 2014 at 07:00:17PM +0100, Marcin Borkowski wrote:
 Dnia 2014-03-23, o godz. 18:52:35
 Bastien b...@gnu.org napisał(a):
 
  Rustom Mody rustompm...@gmail.com writes:
  
   Just checked with org 7.something (dunno for sure since org-version
   does not work -- I had kept around an old directory in case of
   upgrade hiccups)

  So you get the answer: it works with 7.5 but not with recent Org.
  I suggest to ping the author to let him know he needs to update
  the code.
  
 
 Just my 2 cents: I've just tried org-reveal and it works like a charm.

There are also s5 (ox-s5) and deck.js (ox-deck) exporters in contrib ;).

rick



Re: [O] org mode alignment problem

2014-03-23 Thread Guido Van Hoecke
Hi Bastien,

Guido Van Hoecke gui...@gmail.com writes:

 Hi Bastien,

 Bastien b...@gnu.org writes:

 Hi Guido,

 Guido Van Hoecke gui...@gmail.com writes:

 But I'm pretty sure this is not normal, so any help or suggestion
 would be usefull.

 Yes, this is not normal.  Can you try

 M-x global-font-lock-mode RET

 to prevent the hiding of leading stars and

 M-x visible-mode RET

 to prevent invisibility properties?

 This will help figure out what's wrong.


 Basically it's the same behaviour. The level 2 lines display as

 _** text

 or

 ** text

 FWIW, I'am pretty sure it is related to the presence of bracket
 pairs.

 The problem remains if I replace '[' and ']' with either '{' and
 '}' or '(' and ')'.

 It disappears if I replace them by e.g. '#' and '+'.

This me be a hasty conclusion. Let's stick with 'far less frequent' as I
am also experiencing the problem very sporadically with a file that has
no brackets.


Guido

--
Populus vult decipi.
[The people like to be deceived.]



Re: [O] org mode alignment problem

2014-03-23 Thread Bastien
Hi Guido,

Guido Van Hoecke gui...@gmail.com writes:

 The problem remains if I replace '[' and ']' with either '{' and
 '}' or '(' and ')'.

 It disappears if I replace them by e.g. '#' and '+'.

I smell a bad interaction with some other package.

Can you reproduce the problem with emacs -q (loading Org
from master, since you're using this Org version)?

If the problem disappear when you don't load your emacs.el,
then maybe you can bisect and see what's wrong there.

Best,

-- 
 Bastien



[O] A problem with publishing

2014-03-23 Thread Marcin Borkowski
Hi list,

publishing doesn't work.  I guess that I broke something;).  May the
source and publishing directories be the same?  I have this in my
init.el:

(setq org-publish-project-alist
  '((fnis2014
:base-directory ~/directory
:publishing-directory ~/directory
:base-extension org\\|css\\|jpg\\|png
:publishing-function org-reveal-export-to-html
:completion-function (lambda () (compile make install)

The make install means just rsync'ing to a remote server.

When I export (C-c C-e R R) and then publish (C-c C-e P x) (or
M-x compile), everything is ok.  When I just publish, changes seem
not to be pushed to the remote server, and I'm left with some *Org
export* process buffers.

I know that I didn't give much details, but my suspicion is that I'm
doing something obviously wrong.  If this is not the case, I'll try to
isolate the problem and prepare an ECM.

Best,

-- 
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Adam Mickiewicz University



Re: [O] Relative Remote Reference (column-row)

2014-03-23 Thread Volker Strobel
Thanks, Michael, for this helpful workaround!


On Fri, Mar 21, 2014 at 8:19 AM, Michael Brand
michael.ch.br...@gmail.comwrote:

 Hi Volker

 On Fri, Mar 21, 2014 at 1:31 AM, Volker Strobel
 volker.strobe...@gmail.com wrote:
  My problem is, that this remote reference starts in row 3 (because of
 @$#),
  however, I'd like to start in row 2 (that means @$#-1). However, this
  relative reference does not seem to work here.

 Calculation within the field reference of Org is not supported but
 subscr of Calc can be used to pick calculated references from a range:

 #+NAME: my-table
 | Header1 | Header2 |
 |-+-|
 | a   |  23 |
 | b   |   7 |
 | c   |  13 |
 | d   |  66 |
 | e   |   5 |
 |-+-|
 | Result  |  42 |

 | x | y | 23 | 7 | 13 | 66 | 5 |
 #+TBLFM: @1$3..@1$7 = subscr(remote(my-table, @2$2..6$2), $# - 2)

 (To show the intermediade step:
 | x | y | [23, 7, 13, 66, 5] | [23, 7, 13, 66, 5] |
 #+TBLFM: @1$3..@1$4 = remote(my-table, @2$2..6$2)
 )

 Michael



Re: [O] org-export-latex-hyperref-options-format

2014-03-23 Thread Thomas S. Dye
t...@tsdye.com (Thomas S. Dye) writes:

 The template is set up to produce two pdf files, one with hyperref and
 the other without.  I suspect this is the root of the problem I'm
 having.

Nope. The asynchronous process had to allow bind keywords.

All is well.

Tom

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



Re: [O] org mode alignment problem

2014-03-23 Thread Guido Van Hoecke
Hi Bastien,

Bastien b...@gnu.org writes:

 Hi Guido,

 Guido Van Hoecke gui...@gmail.com writes:

 The problem remains if I replace '[' and ']' with either '{' and
 '}' or '(' and ')'.

 It disappears if I replace them by e.g. '#' and '+'.

 I smell a bad interaction with some other package.

 Can you reproduce the problem with emacs -q (loading Org
 from master, since you're using this Org version)?

Nope.

 If the problem disappear when you don't load your emacs.el,
 then maybe you can bisect and see what's wrong there.

I'll investigate this tomorrow and report back with the name of the
culprit :)


Guido

--
The government has just completed work on a missile that turned out
to be a bit of a boondoggle; nicknamed Civil Servant, it won't work
and they can't fire it.



Re: [O] Context of interaction vs. literal syntactic interpretation

2014-03-23 Thread Bastien
Hi Nicolas,

Nicolas Goaziou n.goaz...@gmail.com writes:

 let's finally close this thread, thanks all for your inputs.

 I'm still waiting for Carsten's input, as I need to know whether
 introducing the parser in core functions is a goal for Org or not.

In the meantime, what do you think about the solution I propose?

-- 
 Bastien



[O] ox-rss.el custom headlines

2014-03-23 Thread steckerhalter
I have a question about the function org-rss-headline. in my blog I'm using
titles with links so the generated XML contains some ugly org syntax as
titles (http://steckerhalter.co.vu/index.xml). does anyone see a good way
to make this customizable?

if not what would be the proper way to override that function in my project?

the full code is available here:
https://github.com/steckerhalter/org-mode-blog

cheers
steckerhalter


Re: [O] Custom babel execute command with existing syntax highlighting

2014-03-23 Thread Eric Schulte
Andrey Tykhonov atykho...@gmail.com writes:

 Hi all!

 I have such block:

 #+BEGIN_SRC my-python
 import sys
 sys.platform
 #+END_SRC

 I want it to be with syntax highlighting, so it will looks like (in a
 org-file) exactly as:

 #+BEGIN_SRC python
 import sys
 sys.platform
 #+END_SRC

 (of course the value of org-src-fontify-natively is t).

 but in the same time I would like that that block will be executed by means
 of custom org-babel-execute:my-python command.

 How can I achieve that?


It sounds like you already know how to define a custom execution
function.  To specify the mode used to highlight a code block, add an
element to the `org-src-lang-modes' variable.  E.g.,

  (my-python . python)

Best,




 Andrey


-- 
Eric Schulte
https://cs.unm.edu/~eschulte
PGP: 0x614CA05D



Re: [O] I need help extending ob-ocaml to support :results output

2014-03-23 Thread Eric Schulte
Alan Schmitt alan.schm...@polytechnique.org writes:

 Hello,

 It seems that ob-ocaml does not support :results output. For instance,
 evaluating the following block:

 #+begin_src ocaml :results output
 Printf.printf foo\nbar\n;;
 #+end_src

 Does not result in the two lines foo and bar but in the value being
 returned.

 Unfortunately I don't know enough of babel and emacs-lisp to extend
 ob-ocaml to support this. Would someone be willing to guide me through
 the `org-babel-execute:ocaml' function in ob-ocaml.el so that I can add
 this functionality?


You can step through the execution of `org-babel-execute:ocaml' by first
evaluating the function with a prefix argument (meaning with the cursor
within the function body press C-u C-A-x) which will edebug [1] the
function.

You can then evaluate an OCaml code block and when execution hits the
`org-babel-execute:ocaml' it will pause, and you can step through the
function by continuously pressing space bar.  In this way you can see
how the code is executed, and you can interactively look at the OCaml
session buffer to see where output is printed.  Pay special attention to
the `org-babel-comint-with-output' function, which is probably where
you'll need to make changes when the following holds.

  (member output (cdr (assoc :result-params params)))

You can also look for the string output in other ob-*.el language
files to see how output results are collected.

Hope this helps,


 Thanks,

 Alan



Footnotes: 
[1]  see (info (elisp)Edebug)

-- 
Eric Schulte
https://cs.unm.edu/~eschulte
PGP: 0x614CA05D



Re: [O] [BABEL] BUG Re: Omitting try/catch blocks from tangled R code?

2014-03-23 Thread Eric Schulte
Rainer M Krug rai...@krugs.de writes:

 Eric Schulte schulte.e...@gmail.com writes:

 Charles Berry ccbe...@ucsd.edu writes:

 John Hendy jw.hendy at gmail.com writes:

 [deleted]
 
  I think the default behavior should be reverted, as tangling and
  exporting are two different things. When I tangle, I want to see the
  code blocks as they are in the org document (with possible variables and
  expansions) but not to create files where I do not put it explicitly
  into a code block. These wrappers have nothing to do with the code, and
  are only there for the exported engine. So I would either revert to the
  original behavior, or, introduce a new header argument,
  e.g. :include-wrappers, which would, if set to t, include the export
  wrappers in the tangled file. This might be useful for debugging
  exporting of code block results, but not for general tangling.
 
 Thanks for chiming in. This was my gut reaction to the default
 behavior. I guess we're still only a sample size of 2, but
 intuitively, I would think that tangling would be a separate beast in
 most cases from exporting. Just to have it on the record, if I tangle,
 it's usually to take the code I've used in something like a Beamer
 presentation or document and combine it into a single .R file so
 someone can run it without needing Org-mode.

 [deleted]

 Sorry to be late to add my $0.02...

 I never want the try/catch wrappers.

 But noweb is indispensable.

 I use noweb a lot to organize and collect blocks. In some cases, I export
 them and in others I just tangle them.

 I hope that the revised code will allow me to turn off try/catch wrapping
 and still be able to use noweb when tangling or exporting.


 In addition to noweb, there are cases where variable expansion is useful
 in tangled code.

 The simplest option is to move things like try/catch blocks out of the
 code block expansion function, and into the execution function.  Then if
 other language present similar constructs (which we want to add to
 execution by default but never want to tangle), we can think about
 abstracting this out into some new level of code block expansion.

 Thoughts?

 Makes perfect sense to me, and would definitely be the better place to
 add them.

 If one wants enclosing code in the tangling, there is always
 the :epilogue and :prologue header arguments, and the try/catch should
 be considered as internal to the execution.


Great, how's this patch work?  If it looks good I'll apply it.

Thanks,

From 838f26c35867e7af0dc46698db41d4df13dfb890 Mon Sep 17 00:00:00 2001
From: Eric Schulte schulte.e...@gmail.com
Date: Sun, 23 Mar 2014 20:01:37 -0600
Subject: [PATCH] only wrap R code graphics-file on execution

  Move this out of the expand-body function so that it is *never*
  applied to tangled code.
---
 lisp/ob-R.el | 39 ---
 1 file changed, 20 insertions(+), 19 deletions(-)

diff --git a/lisp/ob-R.el b/lisp/ob-R.el
index 62aa7f2..bf7029c 100644
--- a/lisp/ob-R.el
+++ b/lisp/ob-R.el
@@ -97,24 +97,15 @@ this variable.)
   Expand BODY according to PARAMS, return the expanded body.
   (let ((graphics-file
 	 (or graphics-file (org-babel-R-graphical-output-file params
-(mapconcat
- #'identity
- (let ((inside
-(append
- (when (cdr (assoc :prologue params))
-   (list (cdr (assoc :prologue params
- (org-babel-variable-assignments:R params)
- (list body)
- (when (cdr (assoc :epilogue params))
-   (list (cdr (assoc :epilogue params)))
-   (if graphics-file
-   (append
-(list (org-babel-R-construct-graphics-device-call
-   graphics-file params))
-inside
-(list },error=function(e){plot(x=-1:1, y=-1:1, type='n', xlab='', ylab='', axes=FALSE); text(x=0, y=0, labels=e$message, col='red'); paste('ERROR', e$message, sep=' : ')}); dev.off()))
- inside))
- \n)))
+(mapconcat #'identity
+	   (append
+		(when (cdr (assoc :prologue params))
+		  (list (cdr (assoc :prologue params
+		(org-babel-variable-assignments:R params)
+		(list body)
+		(when (cdr (assoc :epilogue params))
+		  (list (cdr (assoc :epilogue params)
+	   \n)))
 
 (defun org-babel-execute:R (body params)
   Execute a block of R code.
@@ -127,7 +118,17 @@ This function is called by `org-babel-execute-src-block'.
 	   (colnames-p (cdr (assoc :colnames params)))
 	   (rownames-p (cdr (assoc :rownames params)))
 	   (graphics-file (org-babel-R-graphical-output-file params))
-	   (full-body (org-babel-expand-body:R body params graphics-file))
+	   (full-body
+	(let ((inside (org-babel-expand-body:R body params graphics-file)))
+	  (mapconcat #'identity
+			 (if graphics-file
+			 (append
+			  (list (org-babel-R-construct-graphics-device-call
+ graphics-file params))
+			  inside
+			  (list },error=function(e){plot(x=-1:1, y=-1:1, type='n', xlab='', 

Re: [O] Out of Order Evaluation

2014-03-23 Thread Eric Schulte
Michael Weylandt michael.weyla...@gmail.com writes:

 Hi, 

 I want to put a summary of my analysis at the beginning of a document
 using results calculated at the end of the document. Is this possible?


Yes, simply place the calculation in a subtree marked with :noexport at
the top of the document.

Best,


 #=
 #+TITLE: Test
 #+AUTHOR: Michael Weylandt
 #+PROPERTY: header-args:R :session *__R__* :exports both

 * Summary
 The mean result was src_R[:exports results]{mean(x)}

 * Analysis, 
 We do some complicated calculations: 

 #+BEGIN_SRC R
 x - rnorm(5)
 #+END_SRC
 #=

 Is this possible in a single pass? I've played with #+NAME and
 block() but haven't gotten the out-of-order evaluation quite
 right.

 Michael

 (Bonus question, is there a way to not have to put :exports results in 
 inline blocks?)

-- 
Eric Schulte
https://cs.unm.edu/~eschulte
PGP: 0x614CA05D



[O] HTML export is using the wrong browser

2014-03-23 Thread James Harkins

OK, org is awesome, but sometimes it drives you crazy.

I have just lost an hour this morning trying to figure out how to convince 
HTML export to open the exported file in Firefox, rather than Chrome.


I noticed that C-c C-e h o was running sensible-browser, and after half 
an hour's completely wasted effort trying to understand the 
update-alternatives system, the only thing I know is that Chrome's priority 
in the system is 200 while Firefox is 40. That explains why 
sensible-browser is choosing Chrome. But I can't find any example of a 
command that will change the priority of an existing link.


So then I started poking around org options. I found that C-c C-o on an 
http hyperlink goes through browse-url, and I can configure 
browse-url-generic-program to Firefox, and C-c C-o does open such links in 
Firefox. Okay... but, C-c C-e h o *still* uses sensible-browser and opens 
it in the wrong program.


I opened the complete org manual (all on one page) and searched the page 
for browser. There is NO help anywhere in this document about the browser 
to use for HTML export.


So then I found:

(?o As HTML file and open
(lambda (a s v b)
  (if a (org-html-export-to-html t s v b)
(org-open-file (org-html-export-to-html nil s v b)))

And, looking over the definition of org-open-file, and realizing I've spent 
*a whole hour* on this problem that should be a simple matter of setting 
ONE option, I conclude... this is way too much of a puzzle. So I give up.


This should be a simple thing, so... can somebody please tell me a simple 
way to configure this?


(Yes, I am frustrated.)

hjh



[O] Bug in org-beamer-publish-to-pdf?

2014-03-23 Thread Rafael

Hi all,

Using Org-mode version 8.2.5h (release_8.2.5h-829-g9665f8) from git, and
GNU Emacs 24.3.1 (x86_64-pc-linux-gnu, GTK+ Version 3.4.2) of 2014-02-22
on king, modified by Debian

I think there is a bug in org-beamer-publish-to-pdf. The code of the
function is:

#+BEGIN_SRC emacs-lisp
  (defun org-beamer-publish-to-pdf (plist filename pub-dir)
(org-publish-attachment
 plist
 (org-latex-compile (org-publish-org-to 'beamer filename .tex plist))
 pub-dir))
#+END_SRC

It seems to me that (org-publish-org-to 'beamer filename .tex plist)
only returns filename.tex without the directory. Hence org-latex-compile
wants to compile a .tex file in my home directory, (rather than at the base
directory of the publishing) and fails at not finding it there. 

Certainly not the most elegant solution, but the following works for
me. Although only with (setq org-latex-pdf-process '(texi2dvi -p -b -V %f)),
since with the default setting for org-latex-pdf-process, still pdflatex
complains about not being able to write to the log file.

#+BEGIN_SRC emacs-lisp
  (defun org-beamer-publish-to-pdf (plist filename pub-dir)
(org-publish-attachment
 plist
 (org-latex-compile (concat
 (plist-get plist :base-directory)
 (substring (org-publish-org-to 'beamer filename .tex 
plist) 1 nil)
 ))
 pub-dir))
#+END_SRC




Re: [O] ox-rss.el custom headlines

2014-03-23 Thread Bastien
Hi steckerhalter,

bracket links in headlines are now replaced by their descriptions
in the RSS backend.

Thanks for reporting this,

-- 
 Bastien



Re: [O] HTML export is using the wrong browser

2014-03-23 Thread Bastien
James Harkins jamshar...@gmail.com writes:

 This should be a simple thing, so... can somebody please tell me a
 simple way to configure this?

M-x customize-variable RET org-file-apps RET

(Btw, I don't know sensible-browser, must come from a specific
Emacs install?)

-- 
 Bastien



Re: [O] HTML export is using the wrong browser

2014-03-23 Thread Marcin Borkowski
Dnia 2014-03-24, o godz. 06:41:12
Bastien b...@gnu.org napisał(a):

 James Harkins jamshar...@gmail.com writes:
 
  This should be a simple thing, so... can somebody please tell me a
  simple way to configure this?
 
 M-x customize-variable RET org-file-apps RET
 
 (Btw, I don't know sensible-browser, must come from a specific
 Emacs install?)

Confirmed: my Emacs also uses this function.  (And I didn't mess with
*that* part of config;).)  Maybe it's Ubuntu's fault?

Best,

-- 
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Adam Mickiewicz University