Re: [O] R code block produces only partial output

2014-08-07 Thread Aaron Ecay
Hi Eric,

2014ko abuztuak 6an, Eric Schulte-ek idatzi zuen:

[...]

 Perhaps you could begin with a patch for the regexp issue in this
 thread?

I have pushed a patch which allows us to avoid the regex issue
entirely by using a native R method to capture the session output to a
file.

This introduces the change that the output no longer appears in the
session buffer, but I think that’s actually an improvement: we were not
previously echoing the commands to the buffer, such that the output
would show up “out of the blue” without any indication of how it got
there.

-- 
Aaron Ecay



Re: [O] MobileOrg documentation?

2014-08-07 Thread David Masterson
John Hendy jw.he...@gmail.com writes:

 Did you look at the docs?
 - https://github.com/matburt/mobileorg-android/wiki/Documentation

Unfortunately, this looks like Android documentation where I have an
iPhone.

 Unfortunately, looks like his images are borked at the moment. It's
 been a while since I've used it, but you're saying there's not an
 intuitive way to add a new heading? Can you just do ** something (or
 similar)?

Doesn't seem to work.  The ** Something gets treated as text for the
previous heading.  I suspect that, although you type the ** Something
at the left margin, it gets indented as text under a heading should be
which messes up the heading interpretation.

 On Mon, Aug 4, 2014 at 11:26 PM, David Masterson dsmaster...@gmail.com 
 wrote:
 There is not much to the MobileOrg documentation.  For instance, how do
 you 'add' a new heading to an outline?  Any examples around on how to
 use MobileOrg?

Anyone using MobileOrg?

-- 
David Masterson
Programmer At Large




Re: [O] MobileOrg documentation?

2014-08-07 Thread Alexis

David Masterson writes:

 Unfortunately, this looks like Android documentation where I have an
 iPhone.

i didn't even realise MobileOrg was available for iOS until this moment!
It looks like there are two quite separate codebases (neither of which
seems to be actively maintained) which complicates things further; i can
easily imagine the provided functionality between both versions
gradually drifting apart 


Alexis.




Re: [O] ANN: org-vcard. Export/import vCards. Backwards-compatible with org-contacts.el.

2014-08-07 Thread Alexis

Charles Philip Chan writes:

 Personally I find no MUA as usable and feature rich as Gnus. ;-)

Heh! i didn't mind Gnus as a news reader, despite some initial
challenges in getting it set up for that; but i gave up trying to get it
working to my satisfaction as an MUA. It seems to be a very capable
package overall, but i decided to stick with Mutt after a number of
hours wrestling with Gnus (and its user manual, which i often found more
confusing than enlightening) to get even the basic functionality i
wanted. Later, and in contrast, i got basic functionality within about
an hour of installing mu4e; and i now have little incentive to try Gnus
again as an MUA. i'm more than willing to gradually and continually
tweak a system to better meet my needs, but i'm not likely to be able to
get to that point when even basic setup is such a struggle 

But to keep this discussion more on topic :-), this issue has informed
how i've designed org-vcard - i want it to be as easy to use out of the
box as possible, including making it as easy as possible for users to
take advantage of its underlying flexibility[1]. This has taken more
work than it might otherwise have done, but i think it's the right
approach to take.

[1] i (and many others, it seems) found GNOME 3 problematic in this
regard. i don't use it myself, but have in the past supported users who
did, and i wasn't thrilled to find GNOME 3 had taken away GUI access to
various configuration options important to my users, rather than
e.g. hiding them in an Advanced section with HERE BE DRAGONS!!!
warnings when people try to access those options.

 I am mainly talking about bbdb3 now, since I can't remember the
 variable names in bbdb2. For phone numbers one can use free form style
 by calling bbdb-insert-field with a prefix or change the variable
 bbdb-phone-style

 [snip]

 As for postal codes, either turn the checking off by setting
 bbdb-check-postcode to nil or change the variable
 bbdb-legal-postcodes

*nod*

Still, i'm surprised there's no default support for Australian-style
phone numbers and postcodes; are there really that few Australians
making use of BBDB?

In any case, if some people are happy with a BBDB-based solution to
managing their contacts, that's fine with me! It's just that i want an
Org-based system for myself. :-)


Alexis.



Re: [O] make slim auto-complete work in Org-mode (delete some ac-source in Org-mode).

2014-08-07 Thread numbch...@gmail.com
I test those ac-source one by one manually.
And also I have extension org-ac. Then they are more heavy.
And I open many big org files usually. So I found they are heavy.

[stardiviner]   Hack this world!  GPG key ID: 47C32433
IRC(freeenode): stardiviner Twitter:  @numbchild
Key fingerprint = 9BAA 92BC CDDD B9EF 3B36  CB99 B8C4 B8E5 47C3 2433
Blog: http://nagatopain-blog.logdown.com/


On Tue, Aug 5, 2014 at 8:54 PM, Sebastien Vauban sva-n...@mygooglest.com
wrote:

 stardiviner wrote:
  I setup default =ac-sources= for auto-complete like this:
 
  #+BEGIN_SRC emacs-lisp
  (setq-default ac-sources
'(ac-source-yasnippet
  ac-source-abbrev
  ac-source-filename
  ac-source-files-in-current-dir
  ac-source-dictionary
  ac-source-words-in-same-mode-buffers
  ))
  #+END_SRC
 
  And I found =ac-source-dictionary= and
 =ac-source-words-in-same-mode-buffers= is
  heavy for Org-mode, So I try to remove them only in Org-mode.

 Do you have some evidence of this?  Profiling with/without?  It'd be
 interesting.

 Other point: I'm surprised you don't have the source
 `ac-source-words-in-buffer' (maybe instead of
 `ac-source-words-in-same-mode-buffers')...

 Best regards,
   Seb

 --
 Sebastien Vauban





Re: [O] Problems with org-export: byte-code: Invalid function: 0

2014-08-07 Thread Martin Beck

Nick Dokos ndokos at gmail.com writes:


 Martin Beck Elwood151 at web.de writes:
  I tracked it down to this paragraph which seems to cause
  the problem:
  _ 
  Connect at AIIM is a news communication provided by AIIM. 2014
  AIIM - The Global Community of Information Professionals
  1100 Wayne Avenue, Suite 1100, Silver Spring, MD 20910 USA
  Phone: 301-587-8202
resource://skype_ff_extension-at-jetpack/skype_ff_extension/data/call_skype_logo.png301-587-8202
  The IT Centre, 8 Canalside, Lowesmoor Wharf, Worcestershire,
WR1 2RR UK
  Tel: +44 (0) 1905 727600

resource://skype_ff_extension-at-jetpack/skype_ff_extension/data/call_skype_logo.png+44
 (0) 1905 727600
  _ 
  
  (in my org-mode document, the linebreaks are visible only as ^M)
  
  

 This may be a problem in your setup. Please set the variable
 debug-on-error to t, try to publish and post the resulting backtrace.

 Alternatively, try restarting your emacs: it may have acquired a
 setting
 inadvertently that causes problems. You might also try without most
 of
 your customizations (emacs -q), but loading a minimal file that just
 sets up org and the publishing project.

 Nick



Hi Nick,

I restarted emacs several times in the meantime - no effect.
I then started emacs with option -q from cygwin,
then opened the document,
did M-x org-mode RET
and the export.

The debugger says:

Debuggerentered--Lisperror:(invalid-function0)
(0)
eval((0))
org-babel-read((0))
org-babel-ref-parse(results=(0))
#[(el)^HA:203 ^@^HA207301^HA!207
[elorg-babel-ref-parse]2]((:var.results=(0)))
mapcar(#[(el)^HA:203 ^@^HA207301^HA!207
[elorg-babel-ref-parse]2]((:var.results=(0
org-babel-process-params(((:comments.)(:shebang.)
(:cache.no)(:padline.)(:noweb.no)(:tangle.no)
(:exports.results)(:results.replace)(:var.results=(0))
(:session.none)(:hlines.no)(:padnewline.yes)))
org-babel-exp-results((emacs-lispresults((:comments.)
(:shebang.)(:cache.no)(:padline.)(:noweb.no)
(:tangle.no)(:exports.results)(:results.replace)
(:var.results=(0))(:padnewline.yes)(:hlines.no)
(:session.none))nil163)lobnilnil)
org-babel-exp-do-export((emacs-lispresults((:comments.)
(:shebang.)(:cache.no)(:padline.)(:noweb.no)
(:tangle.no)(:exports.results)(:results.replace)
(:var.results=(0))(:padnewline.yes)(:hlines.no)
(:session.none))nil163)lob)
org-babel-exp-non-block-elements(13532)
org-babel-exp-process-buffer()
org-export-execute-babel-code()
org-export-as(htmlnilnilnilnil)
org-export-to-file(html./test.htmlnilnilnilnil)
org-html-export-to-html(nilnilnilnil)
(org-open-file(org-html-export-to-htmlnilsvb))
(ifa(org-html-export-to-htmltsvb)(org-open-file
(org-html-export-to-htmlnilsvb)))
(lambda(asvb)(ifa(org-html-export-to-htmltsvb)
(org-open-file(org-html-export-to-htmlnilsvb(nilnilnilnil)
org-export-dispatch(nil)
call-interactively(org-export-dispatchnilnil)

Does that help?

Kind regards

Martin




Re: [O] Two potentially useful functions for org-element

2014-08-07 Thread Thorsten Jolitz
Thorsten Jolitz tjol...@gmail.com writes:

Hi List, 

 now that I understand the 'org-element API' a bit better, I think that
 the following two functions can be very useful for creating and
 modifying Org elements without the usual point movements, regexp
 searches and string operations in a buffer:

 #+begin_src emacs-lisp
 ;; might become `org-element-create'
 (defun* tj/create-element (optional insert-p rest args key (type 
 'headline) allow-other-keys)
   Create Org element, maybe insert at point.
   (let ((strg (org-element-interpret-data
  (list type args
 (if insert-p (insert strg) strg)))
 #+end_src

I made the second 'rewire element' function smarter so that it can now
reuse the old value when setting a new value for a property of the
'rewired' element:

#+begin_src emacs-lisp
  ;; might become `org-element-rewire'
  (defun* tj/rewire-element (optional replace rest args key type 
allow-other-keys)
Rewire element at point, maybe replace it.
  The former value of an element property can be reused in the
  creation of a new value by giving a `lambda' expession with one
  function argument instead of a value to a key. That argument will
  then be replaced by the property's former value when applying the
  function.
(let* ((elem (org-element-at-point))
   (plist (cadr elem))
   (beg (org-element-property :begin elem))
   (end (org-element-property :end elem))
   strg)
  (while args
(let* ((key (pop args))
   (val-or-fun (pop args))
   (old-val (org-element-property key elem))
   (new-val
(if (functionp val-or-fun)
(apply val-or-fun (list old-val))
  val-or-fun)))
(setq plist (plist-put plist key new-val
  (setq strg (org-element-interpret-data
  (list (or type (org-element-type elem)) plist)))
  (case replace
(append (save-excursion (goto-char end) (insert strg)))
(prepend (goto-char beg) (insert strg))
(t (if replace
   (let ((marker (save-excursion
   (goto-char end) (point-marker
 (delete-region beg end)
 (goto-char marker)
 (set-marker marker nil)
 (save-excursion (insert strg)))
 strg)
#+end_src

#+results:
: tj/rewire-element

Here a few examples, all of them assuming point is at beginning of
this src-block if not stated otherwise:

#+begin_src emacs-lisp
(+ 2 2)
#+end_src

1. do M-: [content-of-next-src-block]

#+begin_src emacs-lisp
  (tj/rewire-element 'append
 :name (format rewired-%d (1+ (random 10
#+end_src

#+NAME: rewired-7
#+BEGIN_SRC emacs-lisp
  (+ 2 2)
#+END_SRC

2. do M-: [content-of-next-src-block]

#+begin_src emacs-lisp
  (tj/rewire-element 'append
 :name (lambda (_old_)
 (if _old_
 (format rewired-%d
 (* (string-to-number
 (car
  (last
   (split-string _old_ - t
(1+ (random 10
   (format rewired-%d (1+ (random 10)
 :language picolisp)
#+end_src

gives 

#+NAME: rewired-2
#+BEGIN_SRC picolisp
  (+ 2 2)
#+END_SRC

when called on the original src-block, but 

#+NAME: rewired-63
#+BEGIN_SRC picolisp
(+ 2 2)
#+END_SRC

when called on the result of usage example 1 (with name rewired-7).

3. do M-: [content-of-next-src-block]

#+begin_src emacs-lisp
  (tj/rewire-element 'append
 :value (lambda (_old_)
  (concat
   (message \%d\ 
   (car
(split-string
 _old_ \n t)) )\n))
 :parameters :results raw)
#+end_src

gives

#+BEGIN_SRC emacs-lisp :results raw
  (message %d (+ 2 2))
#+END_SRC

-- 
cheers,
Thorsten




[O] [BUG] in `org-element-interpret-data'

2014-08-07 Thread Thorsten Jolitz

Hi List, 

when interpreting Org elements (type src-block) I frequently encounter
the case that the '#+end_src' delimter is not placed on a newline but
rather attached to the src-block's value without a linefeed in between.

I then have to append a \n to the src-block value to make things work,
but thats not a nice thing and causes problems in other places. The \n
should be set by the framework.

I think adding something like this at the end of the
interpreter-function could solve the problem, but this came out of
try-and-error only:
 
#+begin_src emacs-lisp
(((
 [...]
 (org-escape-code-in-string value)
 ;; check for newline
 (save-match-data
  (if (looking-at ^$)  \n))
 #+END_SRC)))
#+end_src

The problem seems to appear a bit randomly, but using my new function

#+begin_src emacs-lisp
;; might become `org-element-create'
(defun* tj/create-element (optional insert-p rest args key (type 'headline) 
allow-other-keys)
  Create Org element, maybe insert at point.
  (let ((strg (org-element-interpret-data
   (list type args
(if insert-p (insert strg) strg)))
#+end_src

#+results:
: tj/create-element

I can give an the following example

#+begin_src emacs-lisp :results raw
  (tj/create-element nil
 :type 'src-block
 :language emacs-lisp
 :value (+ 2 2))
#+end_src

#+results:
#+BEGIN_SRC emacs-lisp
  (+ 2 2)#+END_SRC

-- 
cheers,
Thorsten




Re: [O] Org equivalent to \chapter*

2014-08-07 Thread Rasmus
Alan L Tyree alanty...@gmail.com writes:

 On 07/08/14 05:52, Thomas S. Dye wrote:
 Aloha Rasmus,


 Rasmus ras...@gmx.us writes:

 Thomas,

 t...@tsdye.com (Thomas S. Dye) writes:

 Rasmus ras...@gmx.us writes:

 Alan L Tyree alanty...@gmail.com writes:

 I'm sure this has been asked before, but I can't seem to find it. Is
 there an org markup that produces a starred latex heading?

 In a book, for example, I want the Preface to be at chapter level, but
 not included in the numbering. Same for HTML export, of course.
 You would probably need some sort of filter for this.  Most certainly
 you will be able to find implementations on this list.

 Here's something from my init file that works with LaTeX.  Other
 formats such as txt and html are harder since Org generates section
 numbers and the TOC.
 Thanks for sharing this.  It will be useful for book authors.

 Do you think it is possible to write a general headline filter that
 takes care of all the various LaTeX possibilities?
 I don't like *one* filter to rule them all.  Of course, if it's a
 collection of other function calls that is OK.  As your recent
 question showed execution order may matter,
 (e.g. with :ignoreheading:clearpage:).

 Of course it's possible to bundle a couple of filters generally useful
 for ox-latex and provide a consistent interface.  Alternatively, one
 could make a ox-latex+.el that provides a derived class with extra
 options. That's may be more work, and may be harder to hack.

 In fact Aaron started ox-extra.el, with the intention of providing
 semi-official extensions but Worg may be a better means of
 communication.

 Right now Iʻm using tags to ignoreheading, clearpage, and newpage.
 In addition to your nonum filter, Eric S. has a filter that gets rid
 of a heading and promotes the content, which I havenʻt had occasion
 to use, but also has its own tag.
 Yes, Eric has cool tree-based filter(s).  I want to study them more
 carefully.  Quite possibly, it's easier to provide elegant filters
 with trees.  For instance, you have direct access to the element
 representation.  In my filters I hack my way to this using
 text-properties.

  From the LaTeX authorʻs point of view, it would be great to have a set
 of tags (and options) that just work.
 Would you want this as a derived class or filters?  Perhaps it's
 easier to have a derived class with an alternative headline
 function. . .

 Do you (and others) think the tag and filter approach can achieve
 this?  Or, are there too many moving parts to make it feasible?
 Yes.

 The ox-koma-script interface is basically controlled via tags.  I
 think it's nice.
 Thanks for this useful overview and the pointers to good examples.

 Iʻve been slowly building a set of filters and links that work for me,
 but each new project differs a bit from the previous one and I have to
 fiddle with the Org mode setup.  Iʻm eager to get to the place Iʻm at
 with LaTeX, where I just jump in and start writing.

 Thanks again for your help.

 All the best,
 Tom

 Thanks to everyone who responded.

 Several of my books are out of print and I am converting them to ePub
 and to printed form. ePub is pretty smooth by exporting to HTML and
 then using Calibre. LaTeX is the obvious choice for print.

Have you seen this project:

 https://github.com/rzoller/tex2ebook

I haven't tried it myself, but the process seems similar to what you
are doing only that it uses hevea to convert from tex to html.

—Rasmus

--
Lasciate ogni speranza o voi che entrate: siete nella mani di'machellaio




Re: [O] Problems with org-export: byte-code: Invalid function: 0

2014-08-07 Thread Nick Dokos
Martin Beck elwood...@web.de writes:

 Nick Dokos ndokos at gmail.com writes:

 Martin Beck Elwood151 at web.de writes:
  I tracked it down to this paragraph which seems to cause
  the problem:
_  
  Connect at AIIM is a news communication provided by AIIM. 2014
  AIIM - The Global Community of Information Professionals
  1100 Wayne Avenue, Suite 1100, Silver Spring, MD 20910 USA
  Phone: 301-587-8202
 resource://skype_ff_extension-at-jetpack/skype_ff_extension/data/call_skype_logo.png301-587-8202
  The IT Centre, 8 Canalside, Lowesmoor Wharf, Worcestershire,
 WR1 2RR  UK
  Tel: +44 (0) 1905 727600

 resource://skype_ff_extension-at-jetpack/skype_ff_extension/data/call_skype_logo.png+44
 (0) 1905 727600
_  
   
  (in my org-mode document, the linebreaks are visible only as ^M)
   
   

 This may be a problem in your setup.  Please set the variable
 debug-on-error to t, try to publish and post the resulting backtrace.

 Alternatively, try restarting your emacs: it may have acquired a
 setting
 inadvertently that causes problems. You might also try without most
 of
 your customizations (emacs -q), but loading a minimal file that just
 sets up org and the publishing project.

 Nick


 Hi Nick,
 I restarted emacs several times in the meantime - no effect.
 I then started emacs with option -q from cygwin,
 then opened the document,
 did M-x org-mode RET
 and the export.
 The debugger says:
 Debugger·entered--Lisp·error:·(invalid-function·0)$
 ··(0)$
 ··eval((0))$
 ··org-babel-read((0))$
 ··org-babel-ref-parse(results=(0))$
 ··#[(el)·^HA:\203» ^@^HA\207\301^HA!\207·$
 [el·org-babel-ref-parse]·2]((:var·.·results=(0)))$
 ··mapcar(#[(el)·^HA:\203»  ^@^HA\207\301^HA!\207·$
 [el·org-babel-ref-parse]·2]·((:var·.·results=(0$
 ··org-babel-process-params(((:comments·.·)·(:shebang·.·)·$
 (:cache·.·no)·(:padline·.·)·(:noweb·.·no)·(:tangle·.·no)·$
 (:exports·.·results)·(:results·.·replace)·(:var·.·results=(0))·$
 (:session·.·none)·(:hlines·.·no)·(:padnewline·.·yes)))$
 ··org-babel-exp-results((emacs-lisp·results·((:comments·.·)·$
 (:shebang·.·)·(:cache·.·no)·(:padline·.·)·(:noweb·.·no)·$
 (:tangle·.·no)·(:exports·.·results)·(:results·.·replace)·$
 (:var·.·results=(0))·(:padnewline·.·yes)·(:hlines·.·no)·$
 (:session·.·none))··nil·163)·lob·nil·nil)$
 ··org-babel-exp-do-export((emacs-lisp·results·((:comments·.·)·$
 (:shebang·.·)·(:cache·.·no)·(:padline·.·)·(:noweb·.·no)·$
 (:tangle·.·no)·(:exports·.·results)·(:results·.·replace)·$
 (:var·.·results=(0))·(:padnewline·.·yes)·(:hlines·.·no)·$
 (:session·.·none))··nil·163)·lob)$
 ··org-babel-exp-non-block-elements(1·3532)$  
 
 ··org-babel-exp-process-buffer()$
 ··org-export-execute-babel-code()$
 ··org-export-as(html·nil·nil·nil·nil)$
 ··org-export-to-file(html·./test.html·nil·nil·nil·nil)$
 ··org-html-export-to-html(nil·nil·nil·nil)$
 ··(org-open-file·(org-html-export-to-html·nil·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)))$
 ··(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(nil·nil·nil·nil)$
 ··org-export-dispatch(nil)$
 ··call-interactively(org-export-dispatch·nil·nil)$

This shows a problem evaluating a babel #+call or an inline source block
somewhere between positions 1 and 3532 in the buffer. I suspect those
call_skype thingies in your text are misinterpreted as babel calls
somehow.

The thing is that org-babel-exp-non-block-elements does not exist any
longer: it was taken out last December (from both master and maint).
With recent org, I don't have a problem exporting your text, so my
suggestion is: upgrade.

-- 
Nick




Re: [O] ox-reveal cannot export

2014-08-07 Thread Tyler van Hensbergen
Robert Eckl eckl.r at gmx.de writes:

 While exporting to reveal i get 
 
   Symbol's function definition is void: org-html-format-headline--wrap
 
 What i'm missing?


That function's name was changed. I made a temporary fix on
a forked branch on github and submitted a pull request
today (warning I'm new to elisp so I may have missed
something).

https://github.com/yjwen/org-reveal/pull/69

Not sure if it fixes everything but it is working for me know
and I am no longer receiving that error.





[O] How to insert/replace during `org-elemment-map' call?

2014-08-07 Thread Thorsten Jolitz

Hi List, 

when I change the signature of my new function `tj/rewire-element' by
adding an mandatory 'element' argument, it can be used in
`org-element-map' calls too:

#+begin_src emacs-lisp
(defun* tj/rewire-element (element optional replace rest args key type 
allow-other-keys)
...
(let* ((elem (or element (org-element-at-point))) ...)))
#+end_src

e.g. for converting all src-blocks in a buffer to example blocks:

#+begin_src emacs-lisp
  (org-element-map ptree 'src-block
(lambda (--elem)
  (tj/rewire-element --elem nil
 :type 'example-block
 :header nil)))
#+end_src

but the above just returns a list of strings with the created
example-blocks because argument 'replace' is nil:

,
| (tj/rewire-element --elem nil ...)
`

When I set that argument to non-nil (t or 'append or 'prepend), things
stop working because replacing/appending changes the parsed buffer,
but the :begin and :end properties of the already parsed elements are
not adjusted and I use them e.g. to delete a region.

Without using the export-framework (which seems overkill in this
case), is there a way to make this work anyway?

-- 
cheers,
Thorsten




Re: [O] ox-reveal cannot export

2014-08-07 Thread Nick Dokos
Tyler van Hensbergen ty...@mainstreetgenome.com writes:

 Robert Eckl eckl.r at gmx.de writes:

 While exporting to reveal i get 
 
   Symbol's function definition is void: org-html-format-headline--wrap
 
 What i'm missing?


 That function's name was changed. I made a temporary fix on
 a forked branch on github and submitted a pull request
 today (warning I'm new to elisp so I may have missed
 something).

 https://github.com/yjwen/org-reveal/pull/69

 Not sure if it fixes everything but it is working for me know
 and I am no longer receiving that error.


I haven't read things carefully, so take this with a large grain
of salt, but I think it should read:

 ...
 (full-text (org-html-headline headline contents info)))
 ...

instead of passing a nil for contents.

-- 
Nick




Re: [O] (Maybe) enhance `org-element-src-block-interpreter'?

2014-08-07 Thread Nicolas Goaziou
Thorsten Jolitz tjol...@gmail.com writes:

 I definitely would have used `org-element-put-property' to modify a
 'local' parse-tree too, but I can just as well directly use `plist-put'
 on the raw plist in its cdr - would that be the correct way?

You shouldn't do this. Local value is cached and
`org-element-put-property' is destructive. You might break cache.

Applying `org-element-put-property' on a copy of the returned value is
OK, though.


Regards,

-- 
Nicolas Goaziou



Re: [O] ox-reveal cannot export

2014-08-07 Thread Nicolas Goaziou
Hello,

Nick Dokos ndo...@gmail.com writes:

 Tyler van Hensbergen ty...@mainstreetgenome.com writes:

 Robert Eckl eckl.r at gmx.de writes:

 While exporting to reveal i get 
 
   Symbol's function definition is void: org-html-format-headline--wrap
 
 What i'm missing?


 That function's name was changed. I made a temporary fix on
 a forked branch on github and submitted a pull request
 today (warning I'm new to elisp so I may have missed
 something).

 https://github.com/yjwen/org-reveal/pull/69

 Not sure if it fixes everything but it is working for me know
 and I am no longer receiving that error.


 I haven't read things carefully, so take this with a large grain
 of salt, but I think it should read:

  ...
(full-text (org-html-headline headline contents info)))
  ...

 instead of passing a nil for contents.

It should not use `org-html-headline' anyway, as there is no guarantee
that this is the right function for headlines.

To export like html back-end, there are `org-export-data-with-backend'
and `org-export-with-backend' functions, which doesn't require to know
the original function.


Regards,

-- 
Nicolas Goaziou



Re: [O] [PATCH] problem with size of inline images

2014-08-07 Thread Joe Corneli
On Wed, Aug 6, 2014 at 2:22 PM, Nicolas Goaziou m...@nicolasgoaziou.fr wrote:

 Thanks for your patch.  Would you mind providing a commit message and
 send it again with git format-patch?  Don't forget to add TINYCHANGE
 at its end if you haven't signed FSF papers.

Sure.  I did sign them quite some time ago (2003 or 2004) though I
haven't contributed much if any code since then.  Git seems to make
that  quite easy!

 It seems that `save-match-data' is useless anyway and can be removed
 altogether. WDYT?

You're right.  I removed it at another point in the function as well.


0001-Fix-bug-associated-with-setting-image-size-via-ATTR.patch
Description: Binary data


Re: [O] [BUG] in `org-element-interpret-data'

2014-08-07 Thread Nicolas Goaziou
Hello,

Thorsten Jolitz tjol...@gmail.com writes:

 when interpreting Org elements (type src-block) I frequently encounter
 the case that the '#+end_src' delimter is not placed on a newline but
 rather attached to the src-block's value without a linefeed in
 between.

`org-element-src-block-parser' always add a final newline to the source
code. As a consequence `org-element-src-block-interpreter' expects it.

Anyway, it doesn't hurt to tolerate missing final newlines. I added the
feature. Thank you for suggesting it.


Regards,

-- 
Nicolas Goaziou



Re: [O] [PATCH] problem with size of inline images

2014-08-07 Thread Nicolas Goaziou
Hello,

Joe Corneli holtzerman...@gmail.com writes:

 You're right.  I removed it at another point in the function as well.

Applied, with a slight change to commit message. Thank you.


Regards,

-- 
Nicolas Goaziou



Re: [O] How to insert/replace during `org-elemment-map' call?

2014-08-07 Thread Nicolas Goaziou
Hello,

Thorsten Jolitz tjol...@gmail.com writes:

 When I set that argument to non-nil (t or 'append or 'prepend), things
 stop working because replacing/appending changes the parsed buffer,
 but the :begin and :end properties of the already parsed elements are
 not adjusted and I use them e.g. to delete a region.

 Without using the export-framework (which seems overkill in this
 case), is there a way to make this work anyway?

You can make replacements backwards, i.e., starting from the bottom of
the buffer.


Regards,

-- 
Nicolas Goaziou



Re: [O] MobileOrg documentation?

2014-08-07 Thread Jorge A. Alfaro-Murillo

David Masterson dsmaster...@gmail.com writes:

Anyone using MobileOrg? 


I use it all the time, but the Android version. I do not think 
that it is a dead project, at the end of last year there were 
quite a few updates.


I generally use it to read my org agenda and TODO list in my 
phone, to automatically transfer the org agenda to the Google 
calendar and to make captures in my phone that I later organize 
into the proper file and heading in my computer. For those three 
tasks it is a five star application.


I still think that it is far from being org-mode in your phone, but you
should not see it that way. If you want to something that allows
complete org functionality in your phone you are better off using
something like JuiceSSH and connecting to one of your computers.

Best,

--
Jorge.




Re: [O] MobileOrg documentation?

2014-08-07 Thread Jorge A. Alfaro-Murillo
Also there is a more or less active Google+ page: 


https://plus.google.com/u/0/101083268903948579162/posts

--
Jorge.




Re: [O] MobileOrg documentation?

2014-08-07 Thread Eric Abrahamsen
David Masterson dsmaster...@gmail.com writes:

 John Hendy jw.he...@gmail.com writes:

 Did you look at the docs?
 - https://github.com/matburt/mobileorg-android/wiki/Documentation

 Unfortunately, this looks like Android documentation where I have an
 iPhone.

 Unfortunately, looks like his images are borked at the moment. It's
 been a while since I've used it, but you're saying there's not an
 intuitive way to add a new heading? Can you just do ** something (or
 similar)?

 Doesn't seem to work.  The ** Something gets treated as text for the
 previous heading.  I suspect that, although you type the ** Something
 at the left margin, it gets indented as text under a heading should be
 which messes up the heading interpretation.

 On Mon, Aug 4, 2014 at 11:26 PM, David Masterson dsmaster...@gmail.com 
 wrote:
 There is not much to the MobileOrg documentation.  For instance, how do
 you 'add' a new heading to an outline?  Any examples around on how to
 use MobileOrg?

 Anyone using MobileOrg?

I use it, but only in one direction -- computer to tablet. And mostly
just for having meeting/appointment data with me as I wander around
looking for whoever it is I'm supposed to meet. In fact, I've always
wanted OSMand integration with MobileOrg (perhaps a osm link type) where
I could press the link and it would show me where I was going in OSMand.

I don't do the other direction (tablet to computer). Syncing has caused
me enough difficulties in the past that I'm only comfortable using
uni-directional syncing, not bi-directional. That and the problems that
Dropbox has been having in China have made MobileOrg much less useful
than it might have been...

E




[O] [PATCH] org.el: make org-paragraph-fill ignore \[...\] regions starting and ending a line

2014-08-07 Thread Federico Beffa
 Attached you find a patch with the proposed modification. I would
 greatly appreciate if you could consider it for inclusion in org-mode
 and provide feedback.

Here a more lispy version of the function
`org-fill-paragraph-construct-regions' used in the patch.I guess it
could be more appealing to people on this list :-)

(defun org-fill-paragraph-construct-regions (lbl dmrl)
  Construct paragraph regions to be filled.

This function takes an ordered list LBL with the positions of org
`line-break' objects and an ordered list DMRL with the start and
end positions of \\=\\[...\\=\\] LaTeX macros beginning and
ending a line.  It returns a list of the form ((r1-beg r1-end)
... (rN-beg rN-end)) with the start end end positions of the
paragraph regions to be filled.
  (let ((lbl-len (length lbl))) ; compute only once length of lbl
(or
 ;; elementary case 1: no display math regions and 2 entries in lbl
 (and (not dmrl)
  (eq lbl-len 2)
  (list lbl))
 ;; elementary case 2: 1 remaining line break (end of paragraph) and
 ;; 1 remaining display math region.
 (and (eq (length dmrl) 1)
  (eq lbl-len 1)
  (list (list (nth 1 dmrl) (car lbl
 ;; remove line-breaks within display math regions
 (and dmrl (= (nth 1 lbl) (caar dmrl))
  (= (nth 1 lbl) (nth 1 (car dmrl)))
  (if ( lbl-len 2)
  (org-fill-paragraph-construct-regions2
   (cons (car lbl) (cddr lbl))
   dmrl)
;; a displayed math region finished the paragraph
(org-fill-paragraph-construct-regions2
 (cons (car lbl) (list (caar dmrl)))
 nil)))
 ;; non elementary cases:
 (if (and dmrl ( (nth 1 lbl) (caar dmrl)))
 (cons (list (car lbl) (caar dmrl))
   (org-fill-paragraph-construct-regions2
(cons (nth 1 (car dmrl)) (cdr lbl))
(cdr dmrl)))
   (cons (list (car lbl) (nth 1 lbl))
 (org-fill-paragraph-construct-regions2
  (cdr lbl)
  dmrl))

Regards,
Federico



Re: [O] MobileOrg documentation?

2014-08-07 Thread Ramon Diaz-Uriarte


On Thu, 07-08-2014, at 15:41, Jorge A. Alfaro-Murillo 
jorge.alfaro-muri...@yale.edu wrote:
 David Masterson dsmaster...@gmail.com writes:

 Anyone using MobileOrg? 

 I use it all the time, but the Android version. I do not think 
 that it is a dead project, at the end of last year there were 
 quite a few updates.

 I generally use it to read my org agenda and TODO list in my 
 phone, to automatically transfer the org agenda to the Google 
 calendar and to make captures in my phone that I later organize 
 into the proper file and heading in my computer. For those three 
 tasks it is a five star application.

 I still think that it is far from being org-mode in your phone, but you
 should not see it that way. If you want to something that allows
 complete org functionality in your phone you are better off using
 something like JuiceSSH and connecting to one of your computers.

 Best,


My experience is the same as Jorge's. I use it often, and in particular I
make captures in my tablet that are synced back (in my case via Dropbox) to
my computer, and there I organize those notes. So, as he says, for those
three tasks it is a five star application.


Best,

R.

-- 
Ramon Diaz-Uriarte
Department of Biochemistry, Lab B-25
Facultad de Medicina 
Universidad Autónoma de Madrid 
Arzobispo Morcillo, 4
28029 Madrid
Spain

Phone: +34-91-497-2412

Email: rdia...@gmail.com
   ramon.d...@iib.uam.es

http://ligarto.org/rdiaz





Re: [O] MobileOrg documentation?

2014-08-07 Thread hymie!
In our last episode, the evil Dr. Lacto had captured our hero,
  Eric Abrahamsen e...@ericabrahamsen.net, who said:

I use it, but only in one direction -- computer to tablet. And mostly
just for having meeting/appointment data with me as I wander around
looking for whoever it is I'm supposed to meet.

I don't do the other direction (tablet to computer). Syncing has caused
me enough difficulties in the past that I'm only comfortable using
uni-directional syncing, not bi-directional.

Ditto.  Syncing works great computer-to-tablet.  Going tablet-to-computer,
not so much.  I'm not sure if the problem is
* my unfamiliarity with OrgMode
* my unfamiliarity with WebDav
* permissions are too strict
* MobileOrg not creating the sync files correctly
* OrgMode not processing the sync files correctly
but it's just not that important to me right now.  I have my notes (mostly
tasks) available, and that's what counts.  I can update them whenever.

--hymie!http://lactose.homelinux.net/~hymiehy...@lactose.homelinux.net




Re: [O] MobileOrg documentation?

2014-08-07 Thread Subhan Michael Tindall
-Original Message-
From: emacs-orgmode-bounces+subhant=familycareinc@gnu.org 
[mailto:emacs-orgmode-bounces+subhant=familycareinc@gnu.org] On Behalf Of 
David Masterson
Sent: Thursday, August 07, 2014 12:13 AM
To: emacs-orgmode@gnu.org
Subject: Re: [O] MobileOrg documentation?

[SNIP]


 Anyone using MobileOrg?

I have used it off  on for a couple of years. Unlike what seems to be the 
majority here, I primarily 
use it for data capture -- capturing time/date stamped notes(which it works 
great for), data capture, and so forth.
Unfortunately the issues with time stamps defaulting to 00:00 and the lack of 
property support have
made it difficult to do what I want (capture glucose readings, insulin, carbs, 
etc) without substantial 
post-sync processing. Maybe one of these days I'll get around to it.

Subhan

This message is intended for the sole use of the individual and entity to which 
it is addressed and may contain information that is privileged, confidential 
and exempt from disclosure under applicable law. If you are not the intended 
addressee, nor authorized to receive for the intended addressee, you are hereby 
notified that you may not use, copy, disclose or distribute to anyone the 
message or any information contained in the message. If you have received this 
message in error, please immediately advise the sender by reply email and 
delete the message.  Thank you.




Re: [O] How to insert/replace during `org-elemment-map' call?

2014-08-07 Thread Thorsten Jolitz
Nicolas Goaziou m...@nicolasgoaziou.fr writes:

Hello,

 Thorsten Jolitz tjol...@gmail.com writes:

 When I set that argument to non-nil (t or 'append or 'prepend), things
 stop working because replacing/appending changes the parsed buffer,
 but the :begin and :end properties of the already parsed elements are
 not adjusted and I use them e.g. to delete a region.

 Without using the export-framework (which seems overkill in this
 case), is there a way to make this work anyway?

 You can make replacements backwards, i.e., starting from the bottom of
 the buffer.

Its not really obvious for me how to do that. You mean simply by doing
it in 2 steps

 1. map parse-tree and get the result list

 2. goto point-max of buffer and use the result list to replace mapped
 elements backwards

or rather a 'trick' to make org-element-map process the parse-tree
backwards and thus start with replacing the last element?
Not sure what this trick would be - partly reverse the parse-tree?

-- 
cheers,
Thorsten




Re: [O] R code block produces only partial output

2014-08-07 Thread Charles C. Berry

On Wed, 6 Aug 2014, Aaron Ecay wrote:


Hi Eric,

2014ko abuztuak 6an, Eric Schulte-ek idatzi zuen:

[...]


Perhaps you could begin with a patch for the regexp issue in this
thread?


I have pushed a patch which allows us to avoid the regex issue
entirely by using a native R method to capture the session output to a
file.

This introduces the change that the output no longer appears in the
session buffer, but I think that’s actually an improvement: we were not
previously echoing the commands to the buffer, such that the output
would show up “out of the blue” without any indication of how it got
there.


Hi Aaron,

I like what you are trying to do, but ...

1) The change has at least one bug: Remote sessions are broken by this 
change.


2) The behavior of :results output is modified in ways that might not be 
desired. i.e. warnings and errors will not show up in the output.


Can you revert this change until the bugs are sorted out and consensus 
about the proper handling of cases like '2' is reached?


Can I also suggest that in the future before a change is pushed, that the 
patch is announced so we can try it out or at least eyeball it and discuss

issues/bugs?

Details:

Issue 1) ===

If I open a *.org file on a remote machine and C-c C-c on a src block that 
has `:session :results output', after the usual session startup the src 
block fails. The session buffer shows this



Error in file(file, if (append) a else w) :
  cannot open the connection
In addition: Warning message:
In file(file, if (append) a else w) :
  cannot open file '/scpc:berry@DELETED.URL:/tmp/R-1155xWV': 
No such file or directory



===

The file '/tmp/R-1155xWV' was created.

I think if the tramp file localname is used. it might work. I do not know 
tramp, but maybe something like


 (let output-file-localname
  (if (tramp-tramp-file-p output-file)
  (tramp-file-name-localname
   (tramp-dissect-file-name output-file))
output-file))

is good enough.


Issue 2) ===

ECM:

#+NAME: aa
#+BEGIN_SRC R :session R2 :results output
warning(this is a warning)
1+1
#+END_SRC

#+RESULTS: aa
: [1] 2

For some purposes having the warnings in the #+RESULTS: block is helpful.

And when revising code, having the errors in the #+RESULTS helps - 
especially if I have to put aside work in progress.


HTH,

Chuck



Re: [O] R code block produces only partial output

2014-08-07 Thread Aaron Ecay
Hi Chuck,

Thanks for your feedback.

2014ko abuztuak 7an, Charles C. Berry-ek idatzi zuen:
 Hi Aaron,
 
 I like what you are trying to do, but ...
 
 1) The change has at least one bug: Remote sessions are broken by this 
 change.
 
 2) The behavior of :results output is modified in ways that might not be 
 desired. i.e. warnings and errors will not show up in the output.
 
 Can you revert this change until the bugs are sorted out and consensus 
 about the proper handling of cases like '2' is reached?

OK.

 
 Can I also suggest that in the future before a change is pushed, that the 
 patch is announced so we can try it out or at least eyeball it and discuss
 issues/bugs?

Good idea.

 
 Details:
 
 Issue 1) ===
 
 If I open a *.org file on a remote machine and C-c C-c on a src block that 
 has `:session :results output', after the usual session startup the src 
 block fails. The session buffer shows this
 
 
 Error in file(file, if (append) a else w) :
cannot open the connection
 In addition: Warning message:
 In file(file, if (append) a else w) :
cannot open file '/scpc:berry@DELETED.URL:/tmp/R-1155xWV': 
 No such file or directory
 
 ===
 
 The file '/tmp/R-1155xWV' was created.
 
 I think if the tramp file localname is used. it might work. I do not know 
 tramp, but maybe something like
 
   (let output-file-localname
(if (tramp-tramp-file-p output-file)
(tramp-file-name-localname
 (tramp-dissect-file-name output-file))
  output-file))
 
 is good enough.

This looks promising – I’ll work on it.

 
 
 Issue 2) ===
 
 ECM:
 
 #+NAME: aa
 #+BEGIN_SRC R :session R2 :results output
 warning(this is a warning)
 1+1
 #+END_SRC
 
 #+RESULTS: aa
 : [1] 2
 
 For some purposes having the warnings in the #+RESULTS: block is helpful.
 
 And when revising code, having the errors in the #+RESULTS helps - 
 especially if I have to put aside work in progress.

Hmm.  Certainly, the previous behavior should be retained for now.  In
the longer term, I’d like to see a system whereby R errors trigger elisp
errors.  This is so that the execution of a whole document (subtree,
etc.) will be halted by the first error, rather than continuing what may
be a long series of commands that will not give valid output.  What do
you think?

Thanks,

-- 
Aaron Ecay



Re: [O] R code block produces only partial output

2014-08-07 Thread Charles C. Berry

On Thu, 7 Aug 2014, Aaron Ecay wrote:


Hi Chuck,

Thanks for your feedback.

2014ko abuztuak 7an, Charles C. Berry-ek idatzi zuen:

Hi Aaron,

I like what you are trying to do, but ...

1) The change has at least one bug: Remote sessions are broken by this
change.

2) The behavior of :results output is modified in ways that might not be
desired. i.e. warnings and errors will not show up in the output.



[snip issue 1 discussion]



Issue 2) ===

ECM:

#+NAME: aa
#+BEGIN_SRC R :session R2 :results output
warning(this is a warning)
1+1
#+END_SRC

#+RESULTS: aa
: [1] 2

For some purposes having the warnings in the #+RESULTS: block is helpful.

And when revising code, having the errors in the #+RESULTS helps -
especially if I have to put aside work in progress.


Hmm.  Certainly, the previous behavior should be retained for now.  In
the longer term, I’d like to see a system whereby R errors trigger elisp
errors.  This is so that the execution of a whole document (subtree,
etc.) will be halted by the first error, rather than continuing what may
be a long series of commands that will not give valid output.  What do
you think?



I need a while to sort through this. stop(), warning(), and message() will 
print to the session but not show up in what capture.output retains.


sink() has the ability to capture those things, but there is added 
baggage.


I fear some study of ?conditions is needed. My knowledge of condition 
handling in R is scant.


As for stopping on error, I think that anything that changes current 
behavior at this late date ought to be configurable.


FWIW, when I export documents, I sometimes get innocuous errors that I am 
happy did not stop the run in its tracks - like formatting one table fails 
with an error but all else went through. And sometimes I wish it had 
stopped.


Best,

Chuck

Re: [O] R code block produces only partial output

2014-08-07 Thread Thomas S. Dye
Charles C. Berry ccbe...@ucsd.edu writes:

 As for stopping on error, I think that anything that changes current
 behavior at this late date ought to be configurable.

+1, e.g., silent, message, stop.

All the best,
Tom

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



Re: [O] How to insert/replace during `org-elemment-map' call?

2014-08-07 Thread Nicolas Goaziou
Thorsten Jolitz tjol...@gmail.com writes:

 Its not really obvious for me how to do that. You mean simply by doing
 it in 2 steps

  1. map parse-tree and get the result list

  2. goto point-max of buffer and use the result list to replace mapped
  elements backwards

Yes, that is what I mean. Just make sure to reverse the list returned by
`org-element-map'.


Regards,

-- 
Nicolas Goaziou



Re: [O] exporting quotes

2014-08-07 Thread Salome Soedergran
Achim Gratz writes:
 When you install from ELPA, leave load-path alone (remove any
 alterations in respect to Org or any other package installed via ELPA),
 but you must make sure that:
 
 1) The original Org installation that comes with Emacs must not be
 loaded in any way when you install from ELPA.  This is most easily done
 by doing the install from emacs -Q, although you may then need to set
 up package manager in that session.
 
 2) After installation, the first thing in your init script should be
 (package-initialize) so that customization of Org variables doesn't
 auto-load the old version that came with Emacs.  You shouldn't require
 anything from Org, but if you still want to, it must be after
 package-initialize.
 
 Regards,
 Achim.

#1 was at fault. I just deleted my ELPA installation of Org and reinstalled it 
as  decribed by Achim. Now everything's fine.
Thanks, Salome



Re: [O] exporting quotes

2014-08-07 Thread Achim Gratz
Salome Soedergran writes:
 #1 was at fault. I just deleted my ELPA installation of Org and
 reinstalled it as decribed by Achim. Now everything's fine.

Thanks for letting us know.


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

Factory and User Sound Singles for Waldorf Q+, Q and microQ:
http://Synth.Stromeko.net/Downloads.html#WaldorfSounds




Re: [O] MobileOrg documentation?

2014-08-07 Thread Christian Kruse
Hi,

Am 07.08.14 09:13, schrieb David Masterson:
 Anyone using MobileOrg?

I use the iPhone version, via WebDAV. For exactly two things:
capturing TODOs and having my todo list at hand when I need it. It
works pretty well for these two tasks, gladly.

Best regards,

-- 
Christian Kruse
http://ck.kennt-wayne.de/




signature.asc
Description: OpenPGP digital signature


Re: [O] MobileOrg documentation?

2014-08-07 Thread Jacob Gerlach
This keeps coming up, and while the answers are there if you search in the
right place or ask the list, I wonder if there is a better way.

Would it be feasible to include some sort of test function in the elpa
version of org that checks for the correct installation conditions and
throws an error if org is already loaded?

If someone would point me in the right direction, I'd be happy to take a
stab at implementing it.


On Thu, Aug 7, 2014 at 4:09 PM, Christian Kruse c...@defunct.ch wrote:

 Hi,

 Am 07.08.14 09:13, schrieb David Masterson:
  Anyone using MobileOrg?

 I use the iPhone version, via WebDAV. For exactly two things:
 capturing TODOs and having my todo list at hand when I need it. It
 works pretty well for these two tasks, gladly.

 Best regards,

 --
 Christian Kruse
 http://ck.kennt-wayne.de/





Re: [O] Org equivalent to \chapter*

2014-08-07 Thread Alan L Tyree


On 07/08/14 20:05, Rasmus wrote:

Alan L Tyree alanty...@gmail.com writes:


On 07/08/14 05:52, Thomas S. Dye wrote:

Aloha Rasmus,

Rasmus ras...@gmx.us writes:


Thomas,

t...@tsdye.com (Thomas S. Dye) writes:


Rasmus ras...@gmx.us writes:


Alan L Tyree alanty...@gmail.com writes:


I'm sure this has been asked before, but I can't seem to find it. Is
there an org markup that produces a starred latex heading?

In a book, for example, I want the Preface to be at chapter level, but
not included in the numbering. Same for HTML export, of course.

You would probably need some sort of filter for this.  Most certainly
you will be able to find implementations on this list.

Here's something from my init file that works with LaTeX.  Other
formats such as txt and html are harder since Org generates section
numbers and the TOC.

Thanks for sharing this.  It will be useful for book authors.

Do you think it is possible to write a general headline filter that
takes care of all the various LaTeX possibilities?

I don't like *one* filter to rule them all.  Of course, if it's a
collection of other function calls that is OK.  As your recent
question showed execution order may matter,
(e.g. with :ignoreheading:clearpage:).

Of course it's possible to bundle a couple of filters generally useful
for ox-latex and provide a consistent interface.  Alternatively, one
could make a ox-latex+.el that provides a derived class with extra
options. That's may be more work, and may be harder to hack.

In fact Aaron started ox-extra.el, with the intention of providing
semi-official extensions but Worg may be a better means of
communication.


Right now Iʻm using tags to ignoreheading, clearpage, and newpage.
In addition to your nonum filter, Eric S. has a filter that gets rid
of a heading and promotes the content, which I havenʻt had occasion
to use, but also has its own tag.

Yes, Eric has cool tree-based filter(s).  I want to study them more
carefully.  Quite possibly, it's easier to provide elegant filters
with trees.  For instance, you have direct access to the element
representation.  In my filters I hack my way to this using
text-properties.


  From the LaTeX authorʻs point of view, it would be great to have a set
of tags (and options) that just work.

Would you want this as a derived class or filters?  Perhaps it's
easier to have a derived class with an alternative headline
function. . .


Do you (and others) think the tag and filter approach can achieve
this?  Or, are there too many moving parts to make it feasible?

Yes.

The ox-koma-script interface is basically controlled via tags.  I
think it's nice.

Thanks for this useful overview and the pointers to good examples.

Iʻve been slowly building a set of filters and links that work for me,
but each new project differs a bit from the previous one and I have to
fiddle with the Org mode setup.  Iʻm eager to get to the place Iʻm at
with LaTeX, where I just jump in and start writing.

Thanks again for your help.

All the best,
Tom


Thanks to everyone who responded.

Several of my books are out of print and I am converting them to ePub
and to printed form. ePub is pretty smooth by exporting to HTML and
then using Calibre. LaTeX is the obvious choice for print.

Have you seen this project:

  https://github.com/rzoller/tex2ebook

I haven't tried it myself, but the process seems similar to what you
are doing only that it uses hevea to convert from tex to html.

—Rasmus

--
Lasciate ogni speranza o voi che entrate: siete nella mani di'machellaio



Thanks, Rasmus. I'll have a look at this and report back. Org - tex - 
HTML would at least solve the unnumbered heading problem (with the use 
of your filter).


As an additional aside, note that Pandoc Markdown permits the use of a 
tag to produce an unnumbered heading when exporting to HTML and LaTeX.


# Heading {.unnumbered}

I'm a very inexperienced lisp coder, but it seems to me that this should 
be incorporated into the basic exporters. The HTML exporter, for 
example, adds the numbering to each heading. In the loop that 
accomplishes that, it should be easy to ignore headings with a tag such 
as your :nonum:. Otherwise, it is necessary to write a filter that not 
only undoes the numbering for selected headlines, but essentially 
reproduces the numbering algorithms originally introduced in ox-html.


Cheers,
Alan


--
Alan L Tyreehttp://www2.austlii.edu.au/~alan
Tel:  04 2748 6206  sip:typh...@iptel.org




[O] left padding added each time a code block is edited

2014-08-07 Thread Noah Hoffman
Hello,

Each time I edit a code block using =C-c '= (org-edit-special) and then
return to the org-mode buffer, two spaces are added to the left margin of
the code. For example,

#+BEGIN_SRC python
print hello
#+END_SRC

becomes

#+BEGIN_SRC python
  print hello
#+END_SRC

after one round-trip. This is particularly problematic for python code
blocks since leading whitespace is meaningful.

This is behavior that has been present in org-mode for so long that I
suspect that it's not a bug - but I'd love to know how to disable it.

Thanks a lot,
Noah


[O] #+OPTIONS: line kept in 'body-only' export to Org

2014-08-07 Thread Thorsten Jolitz

Hi List, 

doing:

,
| 1. C-c C-e
| 2. C-b ; body-only
| 3. O O ; - Org buffer
`

on this Org-buffer 


,
| #+TITLE: Foo
| #+DATE:  1953-05-15 Fr 
| #+OPTIONS: toc:nil p:t author:nil pri:t prop:t tags:nil
| 
| * A
| 
| ** TODO B
|:PROPERTIES:
|:task_id:  xyz
|:END:
`

I get

,
| #+OPTIONS: toc:nil p:t author:nil pri:t prop:t tags:nil
| 
| * A
| 
| ** TODO B
| :PROPERTIES:
| :task_id:  xyz
| :END:
`

Is that expected behaviour?

For me thats a bit surprising, since it would still force me to
post-process the results to really extract only the body of the Org
buffer.

-- 
cheers,
Thorsten





[O] Bug: org-in-src-block-p always returns nil [8.2.7b (8.2.7b-1-ga5beff-elpaplus @ /Users/ryan/.emacs.d/.cask/24.3.1/elpa/org-plus-contrib-20140714/)]

2014-08-07 Thread Ryan


Remember to cover the basics, that is, what you expected to happen and
what in fact did happen. You don't know how to make a good report? See

http://orgmode.org/manual/Feedback.html#Feedback

Your bug report will be posted to the Org-mode mailing list.


I was doing some programming and wanted to use the result of
org-in-src-block-p. I discovered that this function always returned nil,
because for some reason (overlays-at (point)) was always returning nil
everywhere that I tried it, including inside src blocks. So I rewrote
org-in-src-block-p to use org-element-at-point instead of looking at
overlays at point. My new implementation is below:

(defun org-in-src-block-p (optional inside)
Whether point is in a code source block.
When INSIDE is non-nil, don't consider we are within a src block
when point is at #+BEGIN_SRC or #+END_SRC.
(and
;; In a src block
(eq (car (org-element-at-point))
'src-block)
;; Not at block delimiter, if requested
(not
(and
inside
(let ((case-fold-search t))
(save-match-data
(save-excursion
(beginning-of-line)
(looking-at .*#\\+\\(begin\\|end\\)_src


Emacs : GNU Emacs 24.3.1 (x86_64-apple-darwin13.2.0, NS 
apple-appkit-1265.20)

of 2014-06-01 on tennine-slave.macports.org
Package: Org-mode version 8.2.7b (8.2.7b-1-ga5beff-elpaplus @ 
/Users/ryan/.emacs.d/.cask/24.3.1/elpa/org-plus-contrib-20140714/)


current state:
==
(setq
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-support-shift-select t
org-after-todo-state-change-hook '(org-clock-out-if-current)
org-from-is-user-regexp \\Ryan C\\. Thompson\\
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 '(#[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)
org-ctrl-c-ctrl-c-hook '(org-babel-hash-at-point 
org-babel-execute-safely-maybe)

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-confirm-elisp-link-function 'yes-or-no-p
org-metadown-hook '(org-babel-pop-to-session-maybe)
org-clock-out-hook '(org-clock-remove-empty-clock-drawer)
)




Re: [O] left padding added each time a code block is edited

2014-08-07 Thread Thorsten Jolitz
Noah Hoffman noah.hoff...@gmail.com writes:

Hello,

 Each time I edit a code block using =C-c '= (org-edit-special) and
 then return to the org-mode buffer, two spaces are added to the left
 margin of the code. For example,

 #+BEGIN_SRC python
 print hello
 #+END_SRC

 becomes

 #+BEGIN_SRC python
 print hello
 #+END_SRC

 after one round-trip. This is particularly problematic for python code
 blocks since leading whitespace is meaningful.

 This is behavior that has been present in org-mode for so long that I
 suspect that it's not a bug - but I'd love to know how to disable it.

At the risk of being critizised by this mailing-list's QC department I
give you this (unedited) hint:

,[ C-h v org-edit-src-content-indentation RET ]
| org-edit-src-content-indentation is a variable defined in `org-src.el'.
| Its value is 2
| 
| Documentation:
| Indentation for the content of a source code block.
| This should be the number of spaces added to the indentation of the #+begin
| line in order to compute the indentation of the block content after
| editing it with M-x org-edit-src-code.  Has no effect if
| `org-src-preserve-indentation' is non-nil.
`

-- 
cheers,
Thorsten




Re: [O] Bug: org-in-src-block-p always returns nil [8.2.7b (8.2.7b-1-ga5beff-elpaplus @ /Users/ryan/.emacs.d/.cask/24.3.1/elpa/org-plus-contrib-20140714/)]

2014-08-07 Thread Thorsten Jolitz
Ryan r...@thompsonclan.org writes:

 I discovered that this function always returned nil,

not for me:

#+begin_src emacs-lisp
(org-in-src-block-p)
#+end_src

#+results:
: t

eval here:

(org-in-src-block-p)

- nil

-- 
cheers,
Thorsten




Re: [O] [PATH] Speedups to org-table-recalculate

2014-08-07 Thread Nathaniel Flath
Yes, that wouldn't be supported - although certainly in my case what was
making it slow *were* the messages.  I'd be fine with displaying every
second, but I don't see a good way of doing this - do you have any
suggestions?


On Fri, Aug 1, 2014 at 2:56 PM, Michael Brand michael.ch.br...@gmail.com
wrote:

 Hi Nathaniel

 On Tue, Jul 29, 2014 at 2:03 PM, Nathaniel Flath flat0...@gmail.com
 wrote:
  This patch speeds up org-table-recalculate by removing all 'message'
  function calls.  Additionally adds an early check for whether there are
 any
  formulas and only executes the rest of the function if so.

 As far as I understand these `message' were added to see the progress
 of a long lasting recalculation which would not be supported any more
 with your patch. But I agree that it would be sufficient to report the
 current field/line only every let's say one second and suppress the
 others to gain speed for use cases like yours.

 Michael



[O] Fwd: left padding added each time a code block is edited

2014-08-07 Thread Noah Hoffman
Noah Hoffman noah.hoff...@gmail.com writes:

Hello,

 Each time I edit a code block using =C-c '= (org-edit-special) and
 then return to the org-mode buffer, two spaces are added to the left
 margin of the code. For example,

 #+BEGIN_SRC python
 print hello
 #+END_SRC

 becomes

 #+BEGIN_SRC python
 print hello
 #+END_SRC

 after one round-trip. This is particularly problematic for python code
 blocks since leading whitespace is meaningful.

 This is behavior that has been present in org-mode for so long that I
 suspect that it's not a bug - but I'd love to know how to disable it.

At the risk of being critizised by this mailing-list's QC department I
give you this (unedited) hint:

,[ C-h v org-edit-src-content-indentation RET ]
| org-edit-src-content-indentation is a variable defined in `org-src.el'.
| Its value is 2
|
| Documentation:
| Indentation for the content of a source code block.
| This should be the number of spaces added to the indentation of the #+begin
| line in order to compute the indentation of the block content after
| editing it with M-x org-edit-src-code.  Has no effect if
| `org-src-preserve-indentation' is non-nil.
`

--
cheers,
Thorsten

Thanks a lot, Thorsten - that's perfect. If I may provide some
suggestions/feedback to the list:

1. A more sensible value for this variable in python code blocks in
particular would be 0 if language-specific defaults are possible
(though I'll be setting my default to 0 for all languages).
2. While this variable is very well documented, it isn't very
discoverable via apropos or the html manual (at least, I wasn't able
to discover it). Perhaps a reference can be added to this variable in
the docstring for org-edit-src-code?

Best,
Noah



Re: [O] Bug: org-in-src-block-p always returns nil [8.2.7b (8.2.7b-1-ga5beff-elpaplus @ /Users/ryan/.emacs.d/.cask/24.3.1/elpa/org-plus-contrib-20140714/)]

2014-08-07 Thread Ryan
Actually, my implementation has a bug. org-element-at-point also 
returns the element if point is actually on one of the blank lines 
between that element and the next. So I've rewritten it to handle that 
case by computing the content end position and comparing point to that.


(defun org-in-src-block-p (optional inside)
 Whether point is in a code source block.
When INSIDE is non-nil, don't consider we are within a src block
when point is at #+BEGIN_SRC or #+END_SRC.
 (save-match-data
   (let* ((elem (org-element-at-point))
  (elem-type (car elem))
  (props (cadr elem))
  (end (plist-get props :end))
  (pb (plist-get props :post-blank))
  (content-end
   (save-excursion
 (goto-char end)
 (forward-line (- pb))
 (point)))
  (case-fold-search t))
 (and
  ;; Elem is a src block
  (eq elem-type 'src-block)
  ;; Make sure point is not on one of the blank lines after the
  ;; element.
  ( (point) content-end)
  ;; If INSIDE is non-nil, then must not be at block delimiter
  (not
   (and
inside
(save-excursion
  (beginning-of-line)
  (looking-at .*#\\+\\(begin\\|end\\)_src


On Thu Aug  7 15:36:00 2014, Ryan wrote:


Remember to cover the basics, that is, what you expected to happen and
what in fact did happen. You don't know how to make a good report? See

http://orgmode.org/manual/Feedback.html#Feedback

Your bug report will be posted to the Org-mode mailing list.


I was doing some programming and wanted to use the result of
org-in-src-block-p. I discovered that this function always returned nil,
because for some reason (overlays-at (point)) was always returning nil
everywhere that I tried it, including inside src blocks. So I rewrote
org-in-src-block-p to use org-element-at-point instead of looking at
overlays at point. My new implementation is below:

(defun org-in-src-block-p (optional inside)
Whether point is in a code source block.
When INSIDE is non-nil, don't consider we are within a src block
when point is at #+BEGIN_SRC or #+END_SRC.
(and
;; In a src block
(eq (car (org-element-at-point))
'src-block)
;; Not at block delimiter, if requested
(not
(and
inside
(let ((case-fold-search t))
(save-match-data
(save-excursion
(beginning-of-line)
(looking-at .*#\\+\\(begin\\|end\\)_src


Emacs : GNU Emacs 24.3.1 (x86_64-apple-darwin13.2.0, NS
apple-appkit-1265.20)
of 2014-06-01 on tennine-slave.macports.org
Package: Org-mode version 8.2.7b (8.2.7b-1-ga5beff-elpaplus @
/Users/ryan/.emacs.d/.cask/24.3.1/elpa/org-plus-contrib-20140714/)

current state:
==
(setq
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-support-shift-select t
org-after-todo-state-change-hook '(org-clock-out-if-current)
org-from-is-user-regexp \\Ryan C\\. Thompson\\
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 '(#[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)
org-ctrl-c-ctrl-c-hook '(org-babel-hash-at-point
org-babel-execute-safely-maybe)
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-confirm-elisp-link-function 'yes-or-no-p
org-metadown-hook '(org-babel-pop-to-session-maybe)
org-clock-out-hook '(org-clock-remove-empty-clock-drawer)
)





Re: [O] Problems with org-export: byte-code: Invalid function: 0

2014-08-07 Thread M



 Von: Nick Dokos ndo...@gmail.com
 Datum: Thu, 07 Aug 2014 06:35:17 -0400
 An: emacs-orgmode@gnu.org
 Betreff: Re: [O] Problems with org-export: byte-code: Invalid function: 0
 
 Martin Beck elwood...@web.de writes:
 
 Nick Dokos ndokos at gmail.com writes:

 
 This shows a problem evaluating a babel #+call or an inline source block
 somewhere between positions 1 and 3532 in the buffer. I suspect those
 call_skype thingies in your text are misinterpreted as babel calls
 somehow.
 
 The thing is that org-babel-exp-non-block-elements does not exist any
 longer: it was taken out last December (from both master and maint).
 With recent org, I don't have a problem exporting your text, so my
 suggestion is: upgrade.
 

Hi Nick,

thanks a lot for your help!
I'm using org-mode 8.2.7c.
I suspect, that you would call that recent org, so I wonder how the old
code could come into my installation.
But I'll have a look tomorrow.
Is there a way to find the source of this old code within Emacs?

Kind regards

Martin





[O] org-8 manual on Amazon!

2014-08-07 Thread John Kitchin
I saw on twitter today the org mode 8 manual is available on Amazon
today: http://www.amazon.com/dp/9881327709/. It looks like it covers Org 8.2.

-- 
---
John Kitchin
http://kitchingroup.cheme.cmu.edu




Re: [O] MobileOrg documentation?

2014-08-07 Thread David Masterson
jorge.alfaro-muri...@yale.edu (Jorge A. Alfaro-Murillo) writes:

 David Masterson dsmaster...@gmail.com writes:

 Anyone using MobileOrg? 

 I use it all the time, but the Android version. I do not think that it
 is a dead project, at the end of last year there were quite a few
 updates.

 I generally use it to read my org agenda and TODO list in my phone, to
 automatically transfer the org agenda to the Google calendar and to
 make captures in my phone that I later organize into the proper file
 and heading in my computer. For those three tasks it is a five star
 application.

 I still think that it is far from being org-mode in your phone, but you
 should not see it that way. If you want to something that allows
 complete org functionality in your phone you are better off using
 something like JuiceSSH and connecting to one of your computers.

Not looking for complete org functionality in my phone -- just a
reasonable ability to edit org outlines while I'm on the road.

-- 
David Masterson
Programmer At Large