Re: [O] [BUG][ODT] Subtree export fails when link references target on higher level

2013-11-22 Thread Christian Moe

Nicolas Goaziou writes:

> Hello,
>
> Christian Moe  writes:
>
>> The two examples below illustrate an odd ODT export failure that occurs in
>> restricted circumstances: only when the target of the link is on a
>> higher level of the tree than the link. 
>>
>> * This fails
>>
>> ** A subheader
>>
>> This paragraph is bookmarked. <> 
>>
>> When I try to export this subtree to ODT (`C-c C-e C-s o O' at point), I get
>> : user-error: No such file: /Users/CM/org/OpenDocument export failed: FIXME?
>>
>> *** A sub-subheader
>>
>> Here's a ref to the bookmark at [[target1]].
>
> In this case, <> doesn't belong to any headline. What is the
> expected output for [[target]]?

Oh... right. But in that case, the output should be "No description for
this link", as happens with HTML export. More helpful and informative
than an export failure.

In ODT, the link can be useful anyway, as the ODT output is a reference
field that can be automatically updated to a different format, e.g. to
refer to a page number instead of the (missing) headline text.

Yours,
Christian



Re: [O] [BUG][ODT] Subtree export fails when link references target on higher level

2013-11-22 Thread Nicolas Goaziou
Hello,

Christian Moe  writes:

> In ODT, the link can be useful anyway, as the ODT output is a reference
> field that can be automatically updated to a different format, e.g. to
> refer to a page number instead of the (missing) headline text.

I don't know ODT syntax, but if you provide that useful syntax in this
case, I can add it to ox-odt.el.


Regards,

-- 
Nicolas Goaziou



Re: [O] Show TODO item in table of contents

2013-11-22 Thread Nicolas Goaziou
Hello,

Bernt Hansen  writes:

> This patch 
> 4c94c4d (ox-html: Add TODO keyword to TOC entries, 2013-11-06)
>
> changes the behaviour of HTML TOCs.  I noticed that when I export my
> org-mode document (http://doc.norang.ca/org-mode.html) with this patch
> the TOC no longer has numbering on the items - and it is just displayed
> as a plain list.
>
> Was this intended?  

Not really. This is a good ole regression.

> Can this be fixed?

I pushed a fix. Is it better now?


Thanks,

-- 
Nicolas Goaziou



Re: [O] [BUG][ODT] Subtree export fails when link references target on higher level

2013-11-22 Thread Christian Moe
Hi,

What I described already works out of the box, as long as a bookmark and
cross-reference are generated. In LibreOffice, you can then right-click
on the field of the cross-reference to display e.g. the target's chapter
heading number or page number instead of a textual description.

But on reflection, I think there's a strong case to change the default
ODT output of links with dedicated targets to page number
references. Under the new exporter, such <> are hidden in
output, i.e. they no longer contain text that will serve as a
description, and as shown by my example they may not always belong to a
heading. But in an ODT document they will always belong to a page, and
page number references would be a customary choice for printed media.

If that sounds reasonable I'll send a mini-patch later today.

Yours,
Christian



Nicolas Goaziou writes:

> Hello,
>
> Christian Moe  writes:
>
>> In ODT, the link can be useful anyway, as the ODT output is a reference
>> field that can be automatically updated to a different format, e.g. to
>> refer to a page number instead of the (missing) headline text.
>
> I don't know ODT syntax, but if you provide that useful syntax in this
> case, I can add it to ox-odt.el.
>
>
> Regards,




Re: [O] [BUG][ODT] Subtree export fails when link references target on higher level

2013-11-22 Thread Nicolas Goaziou
Hello,

Christian Moe  writes:

> But on reflection, I think there's a strong case to change the default
> ODT output of links with dedicated targets to page number
> references. Under the new exporter, such <> are hidden in
> output, i.e. they no longer contain text that will serve as a
> description, and as shown by my example they may not always belong to a
> heading. But in an ODT document they will always belong to a page, and
> page number references would be a customary choice for printed media.
>
> If that sounds reasonable I'll send a mini-patch later today.

You seem to forget a use-case here: when the target belongs to an item,
[[target1]] returns its number. Displaying the page, albeit correct,
would be less interesting in that situation.

Also, that would introduce an incompatibility with every other major
back-end. At the moment, the compatible way to handle it would just be
to ignore [[target1]] altogether (and keep section/list/whatever number
for other calls).

What do you think?


Regards,

-- 
Nicolas Goaziou



Re: [O] [PATCH] org-compat: Support for getting data from Windows clipboard

2013-11-22 Thread Bastien
Hi Alexander,

Alexander Vorobiev  writes:

> The patch doesn't work unfortunately. I stepped through
> x-get-selection-value in w32-common-fns.el and the correct value from
> the clipboard gets assigned to x-last-selected-text but then the
> function just returns nil (line 120). I would say x-last-selected
> text needs to be used somehow.

Okay.  I applied your previous patch.  Let's keep this under the radar
and see if there is a way to improve clipboard handling for Windows.

Thanks!

-- 
 Bastien



[O] [babel] how to pass data to gnuplot from another block

2013-11-22 Thread Eric S Fraga
Hello,

everything I have seen on the list and on Worg seems to indicate that it
should be possible to pass data from a babel src block to a gnuplot src
block.  See, for instance, the excellent article on data collection and
analysis at

http://orgmode.org/worg/org-contrib/babel/examples/data-collection-analysis.html

I don't have R so I have not tried the examples on this page.  However,
I have tried the following using octave and gnuplot:

#+begin_src org
  ,#+TITLE: examplebug.org
  ,#+AUTHOR:Eric S Fraga
  ,* bubble and dew points
  ,#+name: bubble-point-temperatures
  ,#+begin_src octave :results raw output
A = [   6.868806.84941]';
B = [1154.646   1206.001]';
C = [ 226.046223.148]';
pv = @(T) 10.^(A-B./(T+C));
x = 0;
res = [];
while x<(1+1e-3)
  f = @(T) 760 - [x (1-x)]*pv(T);
  T = fsolve(f, 70);
  printf("| %5.2f | %7.2f | \n", x, T);
  res = [res; [x T] ];
  x = x + 0.05;
endwhile
  ,#+end_src
  
  ,#+begin_src gnuplot :var data=bubble-point-temperatures :file "bubble.pdf"
set terminal pdfcairo mono enhanced font ",12" size 10cm,6cm
plot data
  ,#+end_src
  
  ,#+results:
  [[file:bubble.pdf]]
#+end_src
  
Trying to execute the gnuplot block leads to an error in gnuplot because
the output of the octave data block is being put directly into the data
variable instead of into a file whose name is passed to the data
variable.  The latter happens if the source of the data is a table
instead of a src block.

I have tried various combinations of output directives for the first src
block but to no avail.

I have tried this with "emacs -Q", by the way, and my org is up to date
as of a few minutes ago!

What am I doing wrong please?

Thanks,
eric

-- 
: Eric S Fraga (0xFFFCF67D), Emacs 24.3.50.1, Org release_8.2.3c-266-g7a726d




Re: [O] [PATCH] Re: \newpage in HTML export

2013-11-22 Thread Nicolas Goaziou
Hello,

Eric Abrahamsen  writes:

> Here's a fairly simple first stab, with page breaks made into an
> element, and a sample handling in the LaTeX backend. I've hardcoded ^L
> and the page-delimiter regexp that finds it, not sure it's worth
> providing an org-page-delimiter shadow. For now, use C-q C-l to insert
> the control character.

Thanks for the patch.

Anyway, I don't think this is a good idea to introduce a new syntax just
to avoid a one-liner (or a hook, see below). Also, this would only make
sense in few export back-ends.

Really, introducing new syntax has a cost, so you have to ponder if it's
really useful, because, once installed, every Org user will have to pay
the price for it.

In the same vein, we have a couple of dubious syntactical elements which
probably sound great for a few users but don't make much sense in most
cases (e.g. quote sections, which can be replaced with an example(!)
block and comments blocks, which can be replaced with a regular
comment).

Admittedly, in this particular case, that cost isn't very high, but
I think it would nonetheless add up to the list of hardly-used syntax
category.

> If this passes muster I can go through the other backends and add
> page-break handling where it makes sense. If not, I'll just keep it on
> my local branch!

You don't need such a patch. For example, you can install the following:

  (defun my-page-delimiter-hook (backend)
(while (re-search-forward page-delimiter nil t)
  (replace-match
   (cond
((org-export-derived-backend-p backend 'latex)
 "#+LATEX: newpage")
((org-export-derived-backend-p backend 'html)
 "#+HTML:  ")
;; Ignore page delimiters in other back-ends.
(t "")

  (add-hook 'org-export-before-parsing-hook 'my-page-delimiter-hook)

Obviously, you can handle as many back-ends as you see fit in
`my-page-delimiter-hook'.

Here are a few comments about the code:

>  (defconst org-element-all-objects
>'(bold code entity export-snippet footnote-reference inline-babel-call
> -  inline-src-block italic line-break latex-fragment link macro
> +  inline-src-block italic line-break latex-fragment link macro page-break
>radio-target statistics-cookie strike-through subscript superscript
>table-cell target timestamp underline verbatim)
>"Complete list of object types.")

Since `page-break' is an element type, you cannot make it also an object
type.

Also, you would need to update `org-element-paragraph-separate' regexp.

>  (defun org-element-paragraph-parser (limit affiliated)
> @@ -3845,6 +3879,8 @@ element it has to parse."
>;; Horizontal Rule.
>((looking-at "[ \t]*-\\{5,\\}[ \t]*$")
> (org-element-horizontal-rule-parser limit affiliated))
> +  ((looking-at page-delimiter)
> +   (org-element-page-break-parser limit affiliated))

Using `page-delimiter' is not desirable because it implies that its
syntax is customizable, which would go against the last syntax patches
(changing defcustoms into defconsts whenever possible). Customizable
syntax cripples portability: please use it with care.


Regards,

-- 
Nicolas Goaziou



Re: [O] links to attachments don't export anymore

2013-11-22 Thread Thomas Holst
Hi Nicolas,

· Thomas Holst  wrote:
> Hi,
>
> · Nicolas Goaziou  wrote:
>
>>> Actually, this could solved by widening the buffer before expanding the
>>> link in `org-element-link-parser'.
>>>
>>> Though, I'm surprised that neither `org-id-get', `org-entry-get' nor, at
>>> the most basic level, `org-entry-properties' remove narrowing before
>>> computing their return value.
>>>
>>> Is there any reason for this? AFAICT, it would be better to wrap them
>>> with a `org-with-wide-buffer' macro.
>>
>> Done for `org-entry-properties'. The regression should be fixed now.
>>
>> Thank you for the report.
>
> Thanks for fixing it! I don't have time to test it today. But I will do
> so tomorrow. I will report.

sorry for the late answer. I could only test it today.

For me the problem still persists.

Here is my way to produce it.

- start emacs (Win7)
  
  : start C:\Programme\gnu\emacs-24.3\bin\emacs.exe -Q --eval "(load-file 
\"testing.el\")"

- testing.el

  #+begin_src emacs_lisp
(add-to-list 'load-path "~/git/org-mode/lisp")
(add-to-list 'load-path "~/git/site-lisp")
;; pfad zu contib/lisp
(add-to-list 'load-path "~/git/org-mode/contrib/lisp")
(add-to-list 'load-path "~/git/org-mode/contrib/babel/lisp")

(require 'org-install)
(require 'ox)
(require 'ox-latex)
(require 'org-attach)

(setq org-link-abbrev-alist '(("att" . org-attach-expand-link)))

(find-file "testing.org")
  #+end_src

- testing.org

  #+begin_src org
#+OPTIONS:   H:3 num:t toc:nil \n:nil @:t ::t |:t ^:{} -:t f:t *:t <:t
#+OPTIONS:   TeX:dvipng LaTeX:t skip:nil d:t todo:t pri:nil tags:nil

* Attachment
   :ATTACH:
  :PROPERTIES:
  :Attachments: overview.png
  :ID:   1eb9cb02-4011-4720-932b-2934e99827d0
  :END:

  With org-version:
  
  #+BEGIN_SRC emacs-lisp :exports results
(org-version nil t)
  #+END_SRC

  #+RESULTS:
  : Org-mode version 8.0.7 (release_8.0.7 @ path-to/org-mode/lisp/)

  an attachment link

  #+BEGIN_VERBATIM
att:overview.png
  #+END_VERBATIM

  gets exported as:

  [[att:overview.png]]
  #+end_src

The link gets exportet as:

Org-mode version 8.0.7 (release_8.0.7 @ path-to/org-mode/lisp/)

[file:c:/temp/att-links/data/1e/b9cb02-4011-4720-932b-2934e99827d0/overview.png]


Org-mode version 8.2.3c (release_8.2.3c-251-gbb97f5 @ 
path-to/git/org-mode/lisp/)

[file:c:/temp/att-links/overview.png]

So obviously the sub path to the attachment is missing in the link

Thanks for looking into this.
-- 
Bis neulich ...
 Thomas



Re: [O] [ANN] Improved Flyspell check

2013-11-22 Thread Rasmus Pank Roulund
Nicolas Goaziou  writes:

> Nicolas Goaziou  writes:
>
> Updated patch.

I've been using this patch without issues for at least two week.  I
haven't experienced any slowdowns over wcheck other than that
associated with the design of Flyspell (e.g. flyspell-buffer moves the
cursor over all words).

Quick question: does ISpell/Flyspell feature options to:

  1. Move the ispell suggestion window to the bottom of the window
 (rather than the top)

  2. Select the first suggestion with 1 rather than 0?  The latter is
 harder to press on my keyboard.

Thanks,
Rasmus

-- 
There are known knowns; there are things we know that we know.



[O] [Patch] Fix for org-export-pubishing-directory

2013-11-22 Thread Shitikanth
The new export system was ignoring the value of variable
org-export-publishing-directory.

For example, even with the value of org-export-publishing-directory set to
"./exports", the exported files would end up in the same folder as the org
file.

This patch seems to solve the problem, at least on my emacs.

Thanks,
Shitikanth Kashyap


export-dir.patch
Description: Binary data


[O] Bug: indenting in sh-mode org-babel source block causes 100% CPU [8.2.3c (8.2.3c-elpa @ /Users/hinmanm/.emacs.d/elpa/org-20131115/)]

2013-11-22 Thread Lee Hinman
If I have a simple org-mode file containing:

#+BEGIN_SRC sh

#+END_SRC

And I hit C-c ' to edit code in the block, then type (ignore the <<>>
for a second):

for i in {1..10}; do
<<>>
done

If I place my cursor at the <<>> and hit TAB to indent, Emacs freezes,
using 100% CPU until I quit. For reference, this works completely fine
in a regular sh-mode buffer, it only freezes if editing an org-babel
block.

I've used the profiler to narrow this down to something in the smie
indention code, but my elisp-fu is too weak to narrow any further.

;; Lee Hinman

Emacs  : GNU Emacs 24.3.50.1 (i386-apple-darwin12.5.0, NS
apple-appkit-1187.40)
 of 2013-10-28 on Xanadu.local
Package: Org-mode version 8.2.3c (8.2.3c-elpa @
/Users/hinmanm/.emacs.d/elpa/org-20131115/)

current state:
==
(setq
 org-export-backends '(ascii html icalendar latex md)
 org-export-babel-evaluate nil
 org-tab-first-hook '(org-hide-block-toggle-maybe
org-src-native-tab-command-maybe
  org-babel-hide-result-toggle-maybe
org-babel-header-arg-expand)
 org-speed-command-hook '(org-speed-command-default-hook
org-babel-speed-command-hook)
 org-occur-hook '(org-first-headline-recenter)
 org-metaup-hook '(org-babel-load-in-session-maybe)
 org-confirm-shell-link-function 'yes-or-no-p
 org-return-follows-link t
 org-todo-keyword-faces '(("STARTED" :foreground "deep sky blue" :weight
bold)
  ("DONE" :foreground "SpringGreen1" :weight bold)
  ("WAITING" :foreground "orange" :weight bold))
 org-after-todo-state-change-hook '(org-clock-out-if-current)
 org-src-mode-hook '(org-src-babel-configure-edit-buffer
org-src-mode-configure-edit-buffer)
 org-agenda-before-write-hook '(org-agenda-add-entry-text)
 org-babel-pre-tangle-hook '(save-buffer)
 org-mode-hook '(org-clock-load
 #[nil "\300\301\302\303\304$\207"
   [org-add-hook change-major-mode-hook
org-show-block-all append local] 5]
 #[nil "\300\301\302\303\304$\207"
   [org-add-hook change-major-mode-hook
org-babel-show-result-all append local] 5]
 org-babel-result-hide-spec org-babel-hide-all-hashes
 (lambda nil (define-key org-mode-map [C-tab] (quote
other-window))
  (flyspell-mode -1)
  (define-key org-mode-map [C-S-tab] (lambda nil
(interactive) (other-window -1
 yas-minor-mode-on)
 org-refile-targets '(("~hinmanm/org/todo.org" :level . 1)
("~hinmanm/org/notes.org" :level . 1))
 org-clock-persist 'history
 org-ctrl-c-ctrl-c-hook '(org-babel-hash-at-point
org-babel-execute-safely-maybe)
 org-directory "~/.emacs.d/"
 org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-drawers
  org-cycle-hide-inline-tasks org-cycle-show-empty-lines
  org-optimize-window-after-visibility-change)
 org-todo-keywords '((sequence "TODO(t)" "STARTED(s)" "WAITING(w)" "|"
"DONE(x)" "CANCEL(c)")
 (sequence "WAITING(f)" "|" "DONE(x)" "CANCEL(c)"))
 org-modules '(org-bbdb org-bibtex org-docview org-gnus org-info org-irc
org-mhe org-rmail org-w3m
   org-velocity)
 org-babel-tangle-lang-exts '(("python" . "py") ("ruby" . "rb")
("clojure" . "clj")
  ("emacs-lisp" . "el"))
 org-confirm-elisp-link-function 'yes-or-no-p
 org-metadown-hook '(org-babel-pop-to-session-maybe)
 org-startup-truncated nil
 org-completion-use-ido t
 org-babel-load-languages '((emacs-lisp . t) (clojure . t) (sh . t)
(ruby . t) (python . t))
 org-agenda-files '("/Users/hinmanm/org/.#circuit-breaker.org"
"/Users/hinmanm/org/amazon-purchases.org"
"/Users/hinmanm/org/catapi.org"
"/Users/hinmanm/org/ch04-search.org"
"/Users/hinmanm/org/ch05-analysis.org"
"/Users/hinmanm/org/circuit-breaker.org"
"/Users/hinmanm/org/cluster-settings.org"
"/Users/hinmanm/org/companies.org"
"/Users/hinmanm/org/excluded-source-filter.org"
"/Users/hinmanm/org/index.org"
"/Users/hinmanm/org/journal.org"
"/Users/hinmanm/org/literate-es-scripts.org"
"/Users/hinmanm/org/malformed-in-source.org"
"/Users/hinmanm/org/named-queries.org"
"/Users/hinmanm/org/nested-in-all.org"
"/Users/hinmanm/org/notes.org"
"/Users/hinmanm/org/numeric-loading.org"
"/Users/hinmanm/org/simple-query-parser.org"
"/Users/hinmanm/org/todo.org"
"/Users/hinmanm/org/update-api-with-partial-source.org"
"/Users/hinmanm/org/work.org")
 org-clock-out-hook '(org-clock-remove-empty-clock-drawer)
 org-confirm-babel-evaluate nil
 org-src-fontify-natively t
 )



Re: [O] [BUG][ODT] Subtree export fails when link references target on higher level

2013-11-22 Thread Dan Griswold
On Fri, Nov 22, 2013 at 4:08 AM, Christian Moe wrote:

> Hi,
>
> But on reflection, I think there's a strong case to change the default
> ODT output of links with dedicated targets to page number
> references. Under the new exporter, such <> are hidden in
> output, i.e. they no longer contain text that will serve as a
> description, and as shown by my example they may not always belong to a
> heading. But in an ODT document they will always belong to a page, and
> page number references would be a customary choice for printed media
>

I can say that this describes my typical needs very well. I have a project
with a fair number of targets (at least 26) that all will be referred to by
page number. Like this:

<

.
.
.

See above, on p. [[this target]].


I don't know if mine would be the odd or typical use. But it is what I am
needing.

Gratefully,

Dan Griswold
Rochester, NY


Re: [O] links to attachments don't export anymore

2013-11-22 Thread Nicolas Goaziou
Hello,

Thomas Holst  writes:

> For me the problem still persists.

Thank you for the report.

I pushed another fix. Please let me know if it doesn't do its job.


Regards,

-- 
Nicolas Goaziou



Re: [O] [Patch] Fix for org-export-pubishing-directory

2013-11-22 Thread Nicolas Goaziou
Hello,

Shitikanth  writes:

> The new export system was ignoring the value of variable
> org-export-publishing-directory.
>
> For example, even with the value of org-export-publishing-directory set to
> "./exports", the exported files would end up in the same folder as the org
> file.
>
> This patch seems to solve the problem, at least on my emacs.

Thanks for the patch.

However, this variable doesn't exist in the new export framework, which
explains why its value is ignored.


Regards,

-- 
Nicolas Goaziou



Re: [O] [PATCH] Re: \newpage in HTML export

2013-11-22 Thread Rüdiger Sonderfeld
On Friday 22 November 2013 11:24:17 Nicolas Goaziou wrote:
> Anyway, I don't think this is a good idea to introduce a new syntax just
> to avoid a one-liner (or a hook, see below). Also, this would only make
> sense in few export back-ends.

But is it really a new syntax or just support for an existing Emacs 
convention?  See (info "(emacs) Pages").

It seems like a feature which could be supported in many back-ends: LaTeX, 
ODT, HTML, Texinfo, Ascii, Org, (Groff), maybe even md with pandoc.

Regards,
Rüdiger




[O] Near real-time preview of PDF/ODT export?

2013-11-22 Thread Bastien
Dear all,

Richard Stallman started a thread on emacs-devel on how to let Emacs
do WYSIWG word processing:

  https://lists.gnu.org/archive/html/emacs-devel/2013-11/msg00515.html
  
  "25 years ago I hoped we would extend Emacs to do WYSIWG word
  processing.  That is why we added text properties and variable width
  fonts.  However, more features are still needed to achieve this.
  
  Could people please start working on the features that are needed?"

This hit the news: https://news.ycombinator.com/item?id=6773529

I don't want to fork the thread and import the discussion here,
instead I'd like to discuss a feature for Org that I think would be
useful*.

How far are we from allowing users to preview an exported Org buffer
into a separate window, and displaying either a PDF or an ODT document
through DocView?

Since Org can already perform export asynchronously, maybe all what we
need is to create a function for `write-file-hooks' that exports in the
background and display the document in another window.

Maybe someone already have such a setup?

Would you be interested in having it?

Thanks in advance for your feedback!

* See http://article.gmane.org/gmane.emacs.devel/165543

-- 
 Bastien




[O] ODT export produces odt file which MS Word 2007 can't open

2013-11-22 Thread Gary Oberbrunner
This simple org file:
 * This is a list
 * Here's another item

produces the simple-list.odt file attached with the latest org-mode (from
git master).  MS Word 2007 (10.0.6683.5002) SP3 can't open it; it says the
file cannot be opened because there are problems with it, then says it's
corrupt.  It then offers to recover the contents of the document; that
works and it comes in fine.  This is on Windows 7.

I don't have OpenOffice on this machine so can't check it there.

(This is not a big problem for me, but just wanted to let you know.)

-- 
Gary


simple-list.odt
Description: application/vnd.oasis.opendocument.text


[O] Agenda: open in other frame

2013-11-22 Thread Fredrik
When I open an agenda and push enter on a text it opens the file related 
to the text in the same frame. Is there any way to make it open it in 
another frame so I keep my agenda in front?


Regards,

Fredrik



Re: [O] Near real-time preview of PDF/ODT export?

2013-11-22 Thread Rasmus
Bastien  writes:

> Dear all,
>
> Richard Stallman started a thread on emacs-devel on how to let Emacs
> do WYSIWG word processing:
>
>   https://lists.gnu.org/archive/html/emacs-devel/2013-11/msg00515.html
>   
>   "25 years ago I hoped we would extend Emacs to do WYSIWG word
>   processing.  That is why we added text properties and variable width
>   fonts.  However, more features are still needed to achieve this.
>   
>   Could people please start working on the features that are needed?"
>
> This hit the news: https://news.ycombinator.com/item?id=6773529
>
> I don't want to fork the thread and import the discussion here,
> instead I'd like to discuss a feature for Org that I think would be
> useful*.
>
> How far are we from allowing users to preview an exported Org buffer
> into a separate window, and displaying either a PDF or an ODT document
> through DocView?
>
> Since Org can already perform export asynchronously, maybe all what we
> need is to create a function for `write-file-hooks' that exports in the
> background and display the document in another window.

So with LaTeX it should be pretty easy using latexmk.  Latexmk can
watch for changes in the .tex file and recompile the pdf
intelligently.  For windows there's a program called LaTeXDaemon.

Thus, what would be needed would be to write the tex file when stuff
changes and it wasn't exported in the last t seconds.  Perhaps it
would require some caching, e.g. with heavy babel blocks.

Personally, I'd want to use Evince and not Docview.  Does Docview
notice changes in the pdf?

–Rasmus

-- 
⠠⠵




Re: [O] Near real-time preview of PDF/ODT export?

2013-11-22 Thread Thorsten Jolitz
Bastien  writes:

Hi Bastien

> How far are we from allowing users to preview an exported Org buffer
> into a separate window, and displaying either a PDF or an ODT document
> through DocView?

not sure about Org preview, but when using AucTex, Evince updates
automatically when re-compiling the doc, the display looks nicer, and
the first display of an entire (big) pdf is definitely faster than with
DocView.

Using my window-manager to put the Emacs and Evince frames side-by-side
gives me direct feedback about the resulting pdf each time I do C-c C-c
in the .tex buffer. 

I don't know if this would work in Org-mode with re-exporting just like
in AucTex with re-compiling. But anyway, I guess you are looking for an
Emacs solution without external programs like Evince. 

-- 
cheers,
Thorsten




Re: [O] Near real-time preview of PDF/ODT export?

2013-11-22 Thread Suvayu Ali
On Fri, Nov 22, 2013 at 03:30:18PM +0100, Rasmus wrote:
> 
> Personally, I'd want to use Evince and not Docview.  Does Docview
> notice changes in the pdf?

Only with auto-revert-mode on.  I prefer Evince over Docview too.
Docview wait times can be significant when the pdf is large (~30), or
when there is a large vector drawing in the pdf.

-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] Opening an Org file slowed down

2013-11-22 Thread Michael Brand
Hi Nicolas

On Mon, Nov 11, 2013 at 5:41 PM, Michael Brand
 wrote:
> I noticed that to open an Org file with a minimal example generated
> like this slowed down:
>
> #+BEGIN_SRC sh
>   #!/bin/sh
>   echo '* a'
>   for ((i = 0; i < 400; i++)); do
>   echo '  - b'
>   echo ':PROPERTIES:'
>   echo ':END:'
>   done
> #+END_SRC
>
> Bisecting shows that release_8.2.1-161-g205e586 is fast and
>
> release_8.2.1-162-gb392750
>
> commit b3927501081b1dab15540591d55f016ed4f9f948
> Author: Nicolas Goaziou 
> Date:   Sat Nov 2 15:48:36 2013 +0100
>
> Prevent flagging drawers in example blocks
>
> is slow. Today's release_8.2.2-192-ge3033d3 is between fast and slow but
> mainly it also slows down disproportionate to increasing the number 400
> above. Emacs is 24.3.2 (with -q).
>
> My use case is that "  - b" is in fact "  * b" and is converted in a
> hook to "*** b" with the help of "hidestarsfile" from "fileconversion"
> described here:
> http://orgmode.org/worg/org-hacks.html#hidestarsfile

I still see the same problem with today's release_8.2.3c-271-gd0e8e57.
Can you reproduce it with the test Org file from my recipe?

Michael



Re: [O] [babel] how to pass data to gnuplot from another block

2013-11-22 Thread Eric Schulte
Hi Eric,

The attached works fine for me (using sh since I don't have octave).


#+name: uptime
#+begin_src sh
  paste <(echo -e "1\n5\n15") <(uptime|sed 's/^.*average: //;s/,//g'|tr ' ' '\n')
#+end_src

#+RESULTS: uptime
|  1 | 0.02 |
|  5 | 0.06 |
| 15 | 0.05 |

#+begin_src gnuplot :var data=uptime :results silent
  set xrange [0:]
  set yrange [0:]
  set title "uptime"
  set xlabel "minutes ago"
  set ylabel "load"
  plot data w lines
#+end_src

Ensure that the data you're passing into gnuplot is a table and not a
string.  Gnuplot blocks handle tables by writing them to a file, and
then replacing the variable with the file name.  As I recall gnuplot
blocks assume string data already is a file name, so the variable is
replaced directly.

Best,

Eric S Fraga  writes:

> Hello,
>
> everything I have seen on the list and on Worg seems to indicate that it
> should be possible to pass data from a babel src block to a gnuplot src
> block.  See, for instance, the excellent article on data collection and
> analysis at
>
> http://orgmode.org/worg/org-contrib/babel/examples/data-collection-analysis.html
>
> I don't have R so I have not tried the examples on this page.  However,
> I have tried the following using octave and gnuplot:
>
> #+begin_src org
>   ,#+TITLE: examplebug.org
>   ,#+AUTHOR:Eric S Fraga
>   ,* bubble and dew points
>   ,#+name: bubble-point-temperatures
>   ,#+begin_src octave :results raw output
> A = [   6.868806.84941]';
> B = [1154.646   1206.001]';
> C = [ 226.046223.148]';
> pv = @(T) 10.^(A-B./(T+C));
> x = 0;
> res = [];
> while x<(1+1e-3)
>   f = @(T) 760 - [x (1-x)]*pv(T);
>   T = fsolve(f, 70);
>   printf("| %5.2f | %7.2f | \n", x, T);
>   res = [res; [x T] ];
>   x = x + 0.05;
> endwhile
>   ,#+end_src
>   
>   ,#+begin_src gnuplot :var data=bubble-point-temperatures :file "bubble.pdf"
> set terminal pdfcairo mono enhanced font ",12" size 10cm,6cm
> plot data
>   ,#+end_src
>   
>   ,#+results:
>   [[file:bubble.pdf]]
> #+end_src
>   
> Trying to execute the gnuplot block leads to an error in gnuplot because
> the output of the octave data block is being put directly into the data
> variable instead of into a file whose name is passed to the data
> variable.  The latter happens if the source of the data is a table
> instead of a src block.
>
> I have tried various combinations of output directives for the first src
> block but to no avail.
>
> I have tried this with "emacs -Q", by the way, and my org is up to date
> as of a few minutes ago!
>
> What am I doing wrong please?
>
> Thanks,
> eric

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


Re: [O] [Babel] [Bug] Cache

2013-11-22 Thread Eric Schulte
Hi Seb,

Could you git bisect this breakage to isolate the offending commit?

Thanks,

"Sebastien Vauban"  writes:

> Hello Eric,
>
> IIRC, some time ago, a bug involving the computation of the hash (when option
> cache is enabled) and NoWeb code blocks. I remember that it had been fixed.
>
> However, the following example shows it's not (true anymore):
>
> --8<---cut here---start->8---
> #+PROPERTY: cache yes
>
> #+name: common-code
> #+begin_src R :eval no
> s <- "Hello"
> #+end_src
>
> #+begin_src R :noweb yes
> <>
>
> print(s)
> #+end_src
>
> #+results[f472c44e64e310a6d06544dbdfba558a709873a7]:
> : Hello
> --8<---cut here---end--->8---
>
> Change the "common code" block: edit "Hello", for example, and you'll see that
> the evaluation of the other code block is not redone (like if the NoWeb code
> was not expanded for computing the hash). It stays printing "Hello".
>
> Best regards,
>   Seb

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



Re: [O] [BUG] org-confirm-babel-evaluate breaks inline src blocks

2013-11-22 Thread Eric Schulte
Charles Berry  writes:

> Following this thread:
>
> http://thread.gmane.org/gmane.emacs.orgmode/77572/focus=77648
>
> I found that setting org-confirm-babel-evaluate to a lambda form
> BREAKS inline src blocks.
>
>
> Here is an ECM:
>
> # 
>
> #+BEGIN_SRC emacs-lisp
> (setf org-confirm-babel-evaluate
>   (lambda (&rest args)
> (message "info: %S" (org-babel-get-src-block-info 'light))
> nil))
> #+END_SRC
>
> #+RESULTS:
>
>  src_R{1+1}
>
> # 
>
>

Thanks for pointing this out, I've just pushed up a fix.

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



Re: [O] Agenda: open in other frame

2013-11-22 Thread Alexander Baier
Fredrik  writes:

> When I open an agenda and push enter on a text it opens the file
> related to the text in the same frame. Is there any way to make it
> open it in another frame so I keep my agenda in front?
>
> Regards,
>
> Fredrik

When you say "frame", do you mean what in emacs terminology is called a
"window"?  I am asking this as pressing RET on an item in my agenda open
the corresponding file in the same _window_, not the same _frame_.


Regards,
Alex




[O] Converting org-mode/org-contacts to VCard (importing to Android)

2013-11-22 Thread Karl Voit
Hi!

I wrote a Python script that parses an Org-mode file in order to
generate a VCard 2.1 compatible output file I am using to import to
my Android 4.4 device:

https://github.com/novoid/org-contacts2vcard

The reason I wrote it in Python is that I don't know ELISP well
enough. The reason I wrote the script instead of using existing
export methods: I only want to export a small sub-set (names, phone
numbers, email addresses, contact image) due to privacy reasons.

So far, it is a one-direction approach and no synchronization
solution.



By the way: does somebody know of any somewhat intelligent tool that
is able to compare two different VCard files? The main issue here is
the fact that VCard order and property order within a single VCard
can be different but the VCard file could still contain the same
information. So line-by-line comparisons like diff do not work here.

-- 
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] Converting org-mode/org-contacts to VCard (importing to Android)

2013-11-22 Thread Rüdiger Sonderfeld
On Friday 22 November 2013 17:37:01 Karl Voit wrote:
> The reason I wrote it in Python is that I don't know ELISP well
> enough. The reason I wrote the script instead of using existing
> export methods: I only want to export a small sub-set (names, phone
> numbers, email addresses, contact image) due to privacy reasons.

That should be possible with the existing VCard export.  See `org-contacts-
ignore-property' to ignore specific properties.  And `org-contacts-export-as-
vcard' takes a NAME parameter to limit the names.

Regards,
Rüdiger




Re: [O] imaxima babel

2013-11-22 Thread yggdrasil
Thanks, this does answer my initial question and works good enough to
enable latex export! 

Even better would be if it's possible to mimic imaxima behaviour which
is (I think) to directly process the resulting latex code and
(temporarily?) store it as an image to display the pretty-printed
equations directly inline in the org-buffer (which will make it export
as html better I guess as the latex output doesn't seem to be recognised
when exporting to html).

All the best,

Johnny

Eric Schulte  writes:

> Changing ":results output" to ":results output latex" in Rüdiger's nice
> example below would probably be an improvement.
>
> Best,
>
> Rüdiger Sonderfeld  writes:
>
>> TeX output is a feature of Maxima.  See
>> (info "(maxima) Functions and Variables for TeX Output")
>>
>> E.g.
>>
>> #+name: solve-maxima
>> #+header: :exports results
>> #+begin_src maxima :results output
>>   tex(exp(-x)/x);
>> #+end_src
>> #+RESULTS: solve-maxima
>> : $${{e^ {- x }}\over{x}}$$
>>
>>
>> On Thursday 21 November 2013 23:58:35 yggdra...@gmx.co.uk wrote:
>>> Hi,
>>> 
>>> Is there a way to evaluate imaxima source code in org-mode to display
>>> the latex output inline in the org-buffer? I have found in [1] how to
>>> evaluate maxima code, but I don't understand if and how to adopt it to
>>> get the nice latex/pdf output. Any pointers appreciated, or just whether
>>> it is possible or not.
>>> 
>>> 
>>> I am running emacs 24.3.1 with org mode 7.9.3f.
>>> 
>>> Thanks,
>>> 
>>> Johnny
>>> 
>>> Footnotes:
>>> [1]  http://orgmode.org/worg/org-contrib/babel/languages/ob-doc-maxima.html
>>
>>



Re: [O] Converting org-mode/org-contacts to VCard (importing to Android)

2013-11-22 Thread Karl Voit
* Rüdiger Sonderfeld  wrote:
> On Friday 22 November 2013 17:37:01 Karl Voit wrote:
>> The reason I wrote it in Python is that I don't know ELISP well
>> enough. The reason I wrote the script instead of using existing
>> export methods: I only want to export a small sub-set (names, phone
>> numbers, email addresses, contact image) due to privacy reasons.
>
> That should be possible with the existing VCard export.  See `org-contacts-
> ignore-property' to ignore specific properties.  And `org-contacts-export-as-
> vcard' takes a NAME parameter to limit the names.

Fair enough :-)

However, I did additional things like checks, filtering, and so
forth that were important to my data-set. E.g., my contact template
does contain "0043/" as a pre-filled content for phone numbers. I
wanted to ignore those fields that got only this template and not a
complete phone number. I also wanted to get warnings in case some
data does not fulfill certain other requirements.

I have to admit that I don't know the feature-set of the Org-mode
export. I would be very surprised, if the Org-mode export method is
able to follow my custom "photo:" link I am using, grab the image
file, test if it has a image format that works with VCard
2.1 on Android, and encodes it in base64 accordingly.

You see: I want to have ways to tweak the export process. And as
long as I don't know ELISP that well, I stick to the tools I know.


A side remark of mine: a couple of months ago I tried to find out
how to store address information, phone numbers, and so on in
org-contact properties. AFAIR I could not find anything except the
:EMAIL: property. Is there a standard out there that answers
questions like "separate street from house number?", "how to cope
with multiple addresses for one contact?", and so forth? I created
something on my own as you can see on [1].


I am happy if you can get benefit from my little project and I am
also happy when Org-mode offers a great export functionality for the
rest of us :-)

  1. 
https://raw.github.com/novoid/org-contacts2vcard/master/testdata/testcontacts.org
-- 
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] [babel] how to pass data to gnuplot from another block

2013-11-22 Thread Nick Dokos
Eric Schulte  writes:


> The attached works fine for me (using sh since I don't have octave).
>
> #+name: uptime
> #+begin_src sh
>   paste <(echo -e "1\n5\n15") <(uptime|sed 's/^.*average: //;s/,//g'|tr ' ' 
> '\n')
> #+end_src
>

Just an fyi: I had to set org-babel-sh-command to "bash" for this to
work. Why is "sh" the default value of this variable?

> #+RESULTS: uptime
> |  1 | 0.02 |
> |  5 | 0.06 |
> | 15 | 0.05 |
>
> #+begin_src gnuplot :var data=uptime :results silent
>   set xrange [0:]
>   set yrange [0:]
>   set title "uptime"
>   set xlabel "minutes ago"
>   set ylabel "load"
>   plot data w lines
> #+end_src
>
> Ensure that the data you're passing into gnuplot is a table and not a
> string.  Gnuplot blocks handle tables by writing them to a file, and
> then replacing the variable with the file name.  As I recall gnuplot
> blocks assume string data already is a file name, so the variable is
> replaced directly.
>

Ah, that explains everything! I also didn't have octave on this machine
so I wrote a python block. Initially, I had

--8<---cut here---start->8---
#+name: foo
#+begin_src python
  x = ((1, 1), (2, 4), (3, 9))
  return "\n".join(["|%d | %d |" % (y[0], y[1]) for y in x])
#+end_src


#+RESULTS: foo
| 1 | 1 |
| 2 | 4 |
| 3 | 9 |
--8<---cut here---end--->8---

which looks like a table, but isn't: the gnuplot block was blowing
up just like Eric F's. I replaced it with

--8<---cut here---start->8---
#+name: foo
#+begin_src python
  x = ((1, 1), (2, 4), (3, 9))
  return x
#+end_src


#+RESULTS: foo
| 1 | 1 |
| 2 | 4 |
| 3 | 9 |
--8<---cut here---end--->8---

and everything is working. The only problem is that the results
*look* the same, so it's hard to see what the type is.

Nick






[O] [Babel] Bug reading example blocks?

2013-11-22 Thread Thomas S. Dye
Aloha all,

Responding to a query by Gary Oberbrunner, I tried to point out the use
of example blocks to name arbitrary pieces of text. What I found is that
the example block isn't passed whole to a babel source block--whitespace
is removed from the first line.

* Whitespace on first line of example block removed

#+name: example
#+begin_example
 1. this is the first line
 2. this is the second line with %VARIANT% as the value
 3. this is the third line
#+end_example

#+name: repeated-text
#+header: :var x="" 
#+header: :var eg=""
#+begin_src emacs-lisp
  (let ((result))
(setf result (replace-regexp-in-string "%VARIANT%" x eg t))
result)
#+end_src

#+call: repeated-text(x="foo",eg=example) :results raw

#+results:
1. this is the first line
 2. this is the second line with foo as the value
 3. this is the third line

This happens, AFAICT, regardless of the value of
org-src-preserve-indentation. 

Is there a reason for this? Or, is it a bug? Or, am I going about this
task in the wrong way?

All the best,
Tom
-- 
Thomas S. Dye
http://www.tsdye.com



[O] problems while editing in org-columns mode

2013-11-22 Thread andrea . rossetti

Hello everyone,

  I get some unexpected behaviour in org-column mode on my
workstation (Emacs 24.3, org-version 8.2.2, Win 7 64 bit).
May I ask support in order to understand:

- if this is reproducible for you as well
- if it is actually a bug, or a mess on my local installation,
  or if I misunderstood how to use org-column properly

  Thanks in advance to anyone patient enough to read this
and give it a try. Kindest regards, Andrea.




HOW TO REPRODUCE PROBLEM A:

1) create an example Org file like this:

* myproject
** mytask1
** mytask2

2) click on the word "myproject", C-c C-x C-c to enable
column view

3) M-S-, then answer the wizard questions:
property=cost, title=cost, width=8, summary=add_numbers

4) now click on the word "myproject", type q to leave
org-columns mode

5) you will see that in the first row of the buffer
a new line appears:

#+COLUMNS: %25ITEM %8cost %TODO %3PRIORITY %TAGS

  I expected "%8cost{+}" instead of "%8cost". Even
if f I change manually "%8cost" to "%8cost{+}" the
automatic sums (cost of myproject sums cost of
mytask1+mytask2) still don't work.

  The sums work properly if I remove the entire
#+COLUMNS statement and add to the :PROPERTIES: of
row "myproject" the following property:

:COLUMNS: %25ITEM %8cost{+} %TODO %3PRIORITY %TAGS



HOW TO REPRODUCE PROBLEM B:

1, 2, 3) same steps than problem A

4) go on row "mytask1" column "cost", type "e" to edit
the value, set it to 1234, type RET

5) type "e" and change the proposed value 1234 into
the empty string, then type RET 

6) type "e" and set the value to 3456, then type RET

7) go on row "mytask1", type TAB to see the properties:
you will see that the properties are now:

   :PROPERTIES:
   :cost: 
   :cost: 3456
   :END:

(I did not expect that empty :cost: column)



[O] [patch] Bug: docfix [8.0.7 (release_8.0.7-437-g927c0e @ /home/youngfrog/sources/org-mode/lisp/)]

2013-11-22 Thread Nicolas Richard
Hi,

A comment in org.el seems to be related to code that was changed long
ago.

Emacs  : GNU Emacs 24.3.1 (i686-pc-linux-gnu, X toolkit, Xaw3d scroll bars)
 of 2013-10-24 on geodiff-mac3
Package: Org-mode version 8.0.7 (release_8.0.7-437-g927c0e @ 
/home/youngfrog/sources/org-mode/lisp/)

>From 9a82a6b1fe29a936f7ed73fe7bb46464fa17800f Mon Sep 17 00:00:00 2001
From: Nicolas Richard 
Date: Thu, 7 Nov 2013 09:15:36 +0100
Subject: [PATCH 1/2] Remove old comment

The comment was introduced (in git) at commit
4be4c56239c224094e717dcd57068f58f99c2dfc ; it refers to a
FIXME located ~40 lines above it. The FIXME was removed in
dc8bc8e39230bde1eca569c564e65bf85c43de54.
---
 lisp/org.el | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/lisp/org.el b/lisp/org.el
index 3e83043..3001640 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -19590,9 +19590,6 @@ because, in this case the deletion might narrow the column."
 (put 'org-self-insert-command 'pabbrev-expand-after-command t)
 (put 'orgtbl-self-insert-command 'pabbrev-expand-after-command t)
 
-;; How to do this: Measure non-white length of current string
-;; If equal to column width, we should realign.
-
 (defun org-remap (map &rest commands)
   "In MAP, remap the functions given in COMMANDS.
 COMMANDS is a list of alternating OLDDEF NEWDEF command names."
-- 
1.8.1.5


-- 
Nico.


[O] Bug: Prettier keybinding descriptions for orgtbl-mode [8.0.7 (release_8.0.7-437-g927c0e @ /home/youngfrog/sources/org-mode/lisp/)]

2013-11-22 Thread Nicolas Richard
Hi,

This small patch makes key descriptions a little nicer ; those that are
shown in the various orgtbl-hijacker-command-... functions.


Emacs  : GNU Emacs 24.3.1 (i686-pc-linux-gnu, X toolkit, Xaw3d scroll bars)
 of 2013-10-24 on geodiff-mac3
Package: Org-mode version 8.0.7 (release_8.0.7-437-g927c0e @ 
/home/youngfrog/sources/org-mode/lisp/)

>From 08bbff5e2ce6b6b9d750b0a9319701a2eecd45bd Mon Sep 17 00:00:00 2001
From: Nicolas Richard 
Date: Tue, 12 Nov 2013 09:02:23 +0100

Use key-description on the keys mentionned by the functions defined by
`orgtbl-mode'.
---
 lisp/org-table.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/org-table.el b/lisp/org-table.el
index 81c681b..6526166 100644
--- a/lisp/org-table.el
+++ b/lisp/org-table.el
@@ -4141,7 +4141,7 @@ to execute outside of tables."
 	 '(arg)
 	 (concat "In tables, run `" (symbol-name fun) "'.\n"
 		 "Outside of tables, run the binding of `"
-		 (mapconcat (lambda (x) (format "%s" x)) keys "' or `")
+		 (mapconcat #'key-description keys "' or `")
 		 "'.")
 	 '(interactive "p")
 	 (list 'if
-- 
1.8.1.5


-- 
Nico.


Re: [O] Bug: Prettier keybinding descriptions for orgtbl-mode [8.0.7 (release_8.0.7-437-g927c0e @ /home/youngfrog/sources/org-mode/lisp/)]

2013-11-22 Thread Bastien
Nicolas Richard  writes:

> This small patch makes key descriptions a little nicer ; those that are
> shown in the various orgtbl-hijacker-command-... functions.

Applied, thanks!

-- 
 Bastien



Re: [O] [patch] Bug: docfix [8.0.7 (release_8.0.7-437-g927c0e @ /home/youngfrog/sources/org-mode/lisp/)]

2013-11-22 Thread Bastien
Hi Nicolas,

Nicolas Richard  writes:

> A comment in org.el seems to be related to code that was changed long
> ago.

Applied, thanks.

-- 
 Bastien



Re: [O] Show TODO item in table of contents

2013-11-22 Thread Bernt Hansen
Nicolas Goaziou  writes:

> Bernt Hansen  writes:
>
>> This patch 
>> 4c94c4d (ox-html: Add TODO keyword to TOC entries, 2013-11-06)
>>
>> changes the behaviour of HTML TOCs.  I noticed that when I export my
>> org-mode document (http://doc.norang.ca/org-mode.html) with this patch
>> the TOC no longer has numbering on the items - and it is just displayed
>> as a plain list.
>>
>> Was this intended?  
>
> Not really. This is a good ole regression.
>
>> Can this be fixed?
>
> I pushed a fix. Is it better now?

Much better!  Thanks for the quick fix! :)

Regards,
Bernt



Re: [O] Converting org-mode/org-contacts to VCard (importing to Android)

2013-11-22 Thread Rüdiger Sonderfeld
On Friday 22 November 2013 18:09:42 Karl Voit wrote:
> I have to admit that I don't know the feature-set of the Org-mode
> export. I would be very surprised, if the Org-mode export method is
> able to follow my custom "photo:" link I am using, grab the image
> file, test if it has a image format that works with VCard
> 2.1 on Android, and encodes it in base64 accordingly.

Org-contacts has an :ICON: property and supports Gravatar.  It doesn't seem to 
be handled in the VCard export though.
 
> You see: I want to have ways to tweak the export process. And as
> long as I don't know ELISP that well, I stick to the tools I know.

I understand that and it solved your problem for now.  But having an external 
tool in a different programming language is usually not a good idea to solve 
the problem in the long run.  The code base of org-contacts and your tool is 
under the risk of diverting quickly.  If it's in org-contacts then it is 
maintained in one piece and easily accessible to other users.

So my point is you should take a look at elisp.  It's a lot of fun to use and 
if you are using org-mode and Emacs then you will have to learn it sooner or 
later.

> A side remark of mine: a couple of months ago I tried to find out
> how to store address information, phone numbers, and so on in
> org-contact properties. AFAIR I could not find anything except the
> 
> :EMAIL: property. Is there a standard out there that answers
> 
> questions like "separate street from house number?", "how to cope
> with multiple addresses for one contact?", and so forth? I created
> something on my own as you can see on [1].

I have to admit the org-contacts format is pretty much ad-hoc and not really 
well designed.  It is documented a bit in the file itself 
(contrib/lisp/contacts.el).  M-x customize-group RET org-contacts RET should 
also tell you more about the options.

Your format choice is not fully compatible with the existing org-contacts.  
Right now multiple entries are separated by space (which sadly breaks for 
addresses) and different entry names are used.

However I'd look forward to some new ideas and improvements.  Right now it's 
not ideal solution.

Regards,
Rüdiger



Re: [O] managing articles in my personal library, and their citational material, using org mode instead of bibtex

2013-11-22 Thread Richard Lawrence
Hi Eric,

On Thu, Nov 21, 2013 at 03:00:00PM -0700, Eric Schulte wrote:
> Very cool,
> 
> I think some of these functions could be merged into
> contrib/lisp/org-bibtex-extras.el to very good effect.

Sure!  I'd be happy to help out with this.  I see you are the author
of org-bibtex-extras; feel free to grab/borrow/adapt any code from my
post, or let me know if there are changes I could work on and send
you.

Best,
Richard


(If possible, please encrypt your reply to me using my PGP key:
Key ID: CF6FA646
Fingerprint: 9969 43E1 CF6F A646.
See http://www.ocf.berkeley.edu/~rwl/encryption.html for more information.)



Re: [O] [BUG] org-confirm-babel-evaluate breaks inline src blocks

2013-11-22 Thread Charles Berry
Eric Schulte  gmail.com> writes:

> 
> Charles Berry  ucsd.edu> writes:
> 
[snip]
> 
> Thanks for pointing this out, I've just pushed up a fix.
> 

AFAICS, it is still broken.

I did a git pull, downloaded the patches, applied them, compiled
ob-core.el. I am still getting 

org-babel-exp-results: Wrong type argument: integer-or-marker-p, nil


I suspect that 

   (,head   (nth 6 ,info))
...
  (goto-char ,head)

in the org-babel-check-confirm-evaluate macro is the source of the message.

(nth 6 info) is nil for inline src blocks.

HTH,

Chuck