Re: [O] Can't execute the introductory code: take table as input to produce mean

2014-08-06 Thread jenia.ivlev




 Its the first time I use this type of mail system. I connected here
 using gmane and gnus. I;m not sure how to answer the thread Can't
 execute the introductory code: take table as input to produce mean.
 So i'll just try to answer the best way I can who means I'll answer to:
 emacs-orgmode-mXXj517/z...@public.gmane.org.

 Thanks Sebastien. Tell me though please, how do I define R-mean(x) to
 take any x? How do I run R-mean in the following form:
 R-mean(my-table1), R-mean(my-table2)...
 Cause here, it seems that R-mean is defined with the variable x
 hard-wired to  a specific value, namely x=tbl-example-data.

 So again, how do I call R-mean with x=tbl-example-data2 lets say
 (without redefining R-mean)?

 Thanks in advance.





Re: [O] How to change color of (part of) agenda header

2014-08-06 Thread Sebastien Vauban
Hello Nick,

Nick Dokos wrote:
 Sebastien Vauban writes:
 I'm trying to get part of the agenda header in another color, here
 TODAY:

   (add-to-list 'org-agenda-custom-commands
`(f Today
  (;; list of all TODO entries with deadline today
   (tags-todo DEADLINE=\+0d\
  ((org-agenda-overriding-header
(concat DUE  #(TODAY 0 4 (face 
 (:foreground red)
   (org-agenda-skip-function
'(org-agenda-skip-entry-if 'notdeadline)
  ((org-agenda-format-date ))) t)

 The goal is to make what's unique and different from the next agenda
 blocks very outstanding.

 Though, it does not work: text is simply copied, as if text properties
 did not exist.

 Am I missing something, or writing it in a buggy way?

 The limits should be 0 and 5 to get the whole word,

I had doubts on this, and as I couldn't see the results of my change...

 but that's not the problem here: if you do C-c a f to display the
 agenda and then do C-u C-x = on (say) the T of Today, you will see
 that the face is org-agenda-structure. Doing a grep for that in the
 org lisp directory will quickly lead you to this:

 ,
 |   (if org-agenda-overriding-header
 |   (insert (org-add-props (copy-sequence 
 org-agenda-overriding-header)
 |   nil 'face 'org-agenda-structure) \n)
 `

 so it doesn't matter what face property the header had to begin with:
 what is inserted into the buffer is given a different face property.

IIUC, you mean there's absolutely no way to do what I'd like to have?

Except, for example, setting a background if `org-agenda-structure' does
not have one already?  Not of much use, though.

What a pity.

Can't I add a face (should be easy, like above), and get mine applied
above `org-agenda-structure'?

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] Emacs-orgmode Digest, Vol 102, Issue 5

2014-08-06 Thread Sebastien Vauban
Nick Dokos wrote:
 Nick Dokos ndo...@gmail.com writes:
 Salome Södergran\ salome.soederg...@gmx.ch writes:
 Salome S?dergran\ wrote:
  I'm looking for a way to make orgmode export quote signs to LaTeX's 
  \enquote{}.
  On stackoverflow.com (1) I found a solution that uses 
(setq org-export-with-smart-quotes t)
(add-to-list 'org-export-smart-quotes-alist .)
  but on my system I find neither the variable 
  org-export-with-smart-quotes nor
  org-export-smartcodes-alist.
 
  Am I missing something or has the procedure been changed in the 
  meanwhile?
 
 You don't use Org mode 8, don't you?  Well, that'd explain...

 With M-x org-version I get: 
   Org-mode version 8.2.7b (8.2.7b-2-g798733-elpaplus @
 /home/salome/.emacs.d/elpa/org-plus-contrib-20140721/)

 So the version ought to be ok. What else could be the reason for the 
 missing variables?

 The variable is defined in ox.el. Try

   M-x locate-library RET ox RET

 and if that shows the right provenance, try

 M-x load-libary RET ox RET

I wonder as well if it's not related to the LaTeX babel package *and*
the #+LANGUAGE: keyword.

FWIW, I do have this in my .emacs:

#+begin_src emacs-lisp
;; include the `babel' package for language-specific hyphenation and
;; typography
(add-to-list 'org-latex-packages-alist '(french babel) t)
#+end_src

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] HTML export of - [ ] does not display box anymore

2014-08-06 Thread Rainer Stengele
Am 05.08.2014 um 15:39 schrieb Rick Frankel:
 On 2014-08-05 08:25, Rainer Stengele wrote:
 Hi,

 doing an html export of

 * headline
 - [ ] checkbox
 - item

 I do not see the checkbox box anymore as I did in older versions.
 I tried to find an export setting, tried several settings related to
 todos but I cannot find a setting stopping the box to be exported.

 Any hint where I could search for?

 Checkbox export is handled by a constant and a custom variable:

 - `org-html-checkbox-types' :: A constant defining the output for
 unicode (entity), ascii, and html (form) versions of the
 checkboxes.
 - `org-html-checkbox-type' :: A customizable variable defining
 which version of the above to use. The default is ascii,
 which should result in backwards compatible output.

 Here's the output i get for your list above (using the default ascii
 option):

 ul class=org-ul
 li class=offcode[#xa0;]/code checkbox
 /li
 liitem
 /li
 /ul

 which seems correct to me.


Hi,

I have these set correctly. What I get is: (I run Org-mode version 8.3beta 
(release_8.3beta-167-g003edd)

?xml version=1.0 encoding=utf-8?
!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Strict//EN
http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd;
html xmlns=http://www.w3.org/1999/xhtml; lang=de xml:lang=de
head
titleheadline/title
meta  http-equiv=Content-Type content=text/html;charset=utf-8 /
meta  name=generator content=Org-mode /
meta  name=author content=Rainer Stengele /
style type=text/css
 !--/*--![CDATA[/*!--*/
  .title  { text-align: center; }
  .todo   { font-family: monospace; color: red; }
  .done   { color: green; }
  .tag{ background-color: #eee; font-family: monospace;
padding: 2px; font-size: 80%; font-weight: normal; }
  .timestamp { color: #bebebe; }
  .timestamp-kwd { color: #5f9ea0; }
  .right  { margin-left: auto; margin-right: 0px;  text-align: right; }
  .left   { margin-left: 0px;  margin-right: auto; text-align: left; }
  .center { margin-left: auto; margin-right: auto; text-align: center; }
  .underline { text-decoration: underline; }
  #postamble p, #preamble p { font-size: 90%; margin: .2em; }
  p.verse { margin-left: 3%; }
  pre {
border: 1px solid #ccc;
box-shadow: 3px 3px 3px #eee;
padding: 8pt;
font-family: monospace;
overflow: auto;
margin: 1.2em;
  }
  pre.src {
position: relative;
overflow: visible;
padding-top: 1.2em;
  }
  pre.src:before {
display: none;
position: absolute;
background-color: white;
top: -10px;
right: 10px;
padding: 3px;
border: 1px solid black;
  }
  pre.src:hover:before { display: inline;}
  pre.src-sh:before{ content: 'sh'; }
  pre.src-bash:before  { content: 'sh'; }
  pre.src-emacs-lisp:before { content: 'Emacs Lisp'; }
  pre.src-R:before { content: 'R'; }
  pre.src-perl:before  { content: 'Perl'; }
  pre.src-java:before  { content: 'Java'; }
  pre.src-sql:before   { content: 'SQL'; }

  table { border-collapse:collapse; }
  caption.t-above { caption-side: top; }
  caption.t-bottom { caption-side: bottom; }
  td, th { vertical-align:top;  }
  th.right  { text-align: center;  }
  th.left   { text-align: center;   }
  th.center { text-align: center; }
  td.right  { text-align: right;  }
  td.left   { text-align: left;   }
  td.center { text-align: center; }
  dt { font-weight: bold; }
  .footpara:nth-child(2) { display: inline; }
  .footpara { display: block; }
  .footdef  { margin-bottom: 1em; }
  .figure { padding: 1em; }
  .figure p { text-align: center; }
  .inlinetask {
padding: 10px;
border: 2px solid gray;
margin: 10px;
background: #cc;
  }
  #org-div-home-and-up
   { text-align: right; font-size: 70%; white-space: nowrap; }
  textarea { overflow-x: auto; }
  .linenr { font-size: smaller }
  .code-highlighted { background-color: #00; }
  .org-info-js_info-navigation { border-style: none; }
  #org-info-js_console-label
{ font-size: 10px; font-weight: bold; white-space: nowrap; }
  .org-info-js_search-highlight
{ background-color: #00; color: #00; font-weight: bold; }
  /*]]*/--
/style
script type=text/javascript
/*
@licstart  The following is the entire license notice for the
JavaScript code in this tag.

Copyright (C) 2012-2013 Free Software Foundation, Inc.

The JavaScript code in this tag is free software: you can
redistribute it and/or modify it under the terms of the GNU
General Public License (GNU GPL) as published by the Free Software
Foundation, either version 3 of the License, or (at your option)
any later version.  The code is distributed WITHOUT ANY WARRANTY;
without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE.  See the GNU GPL for more details.

As additional permission under GNU GPL version 3 section 7, you
may distribute non-source (e.g., minimized or compacted) forms of
that code without the copy of the GNU GPL normally required by
section 4, provided you include this license notice and a URL
through which 

Re: [O] Org equivalent to \chapter*

2014-08-06 Thread Thorsten Jolitz
Nick Dokos ndo...@gmail.com writes:

 Thorsten Jolitz tjol...@gmail.com 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.

 ,[ C-h v org-latex-classes RET ]
 | org-latex-classes is a variable defined in `ox-latex.el'.
 | Its value is shown below.
 | ...
 `

 How does org-latex-classes help with the OP's question?

OP said 'any hint', and when exporting to LaTeX this variable is where
the starred latex headings come from.

 To the best of my knowledge, the answer to the OP's question is that it
 cannot be done from org: you have to tweak the export output.

So you gave him how many other hints?

-- 
cheers,
Thorsten




[O] ditaa on Mac OS X

2014-08-06 Thread SabreWolfy
This[1] ditaa example with ORg 8.2.7f under Mac OS X Mavericks fails with a
message indicating that .../elpa/contrib/scripts/ditaa.jar is not found. I
created the folder and soft-linked /usr/local/bin/ditaa to ditaa.jar and
tried again. This time the export ran, but the PDF it created contained a
large box with :file somefile_name.png inside it. I've also read this[2]
and did not find ditaa in ELPA. Suggestions?

[1] http://doc.norang.ca/org-mode.html#playingwithditaa
[2] http://orgmode.org/worg/org-contrib/babel/languages/ob-doc-ditaa.html




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

2014-08-06 Thread Thorsten Jolitz
Aaron Ecay aarone...@gmail.com writes:

 Hi Thorsten,

 2014ko abuztuak 5an, Thorsten Jolitz-ek idatzi zuen:

 [...]

 
 Parse this src-block (with point at beg of block):
 
 ,
 | M-: (setq ptree (org-element-at-point))
 `
 
 #+header: :results raw
 #+begin_src emacs-lisp
 (message hello world)
 #+end_src
 
 #+results:
 hello world
 
 Then evaluate
 
 #+begin_src emacs-lisp
 (org-element-src-block-interpreter ptree nil)
 #+end_src
 
 #+results:
 : #+BEGIN_SRC emacs-lisp
 :   (message hello world)
 : #+END_SRC
 
 #+begin_src emacs-lisp
 (tj/src-block-interpreter ptree nil)
 #+end_src
 
 #+results:
 : #+HEADER: :results raw
 : #+BEGIN_SRC emacs-lisp
 :   (message hello world)
 : #+END_SRC

 Indeed this seems like an improvement on the status quo.  But other
 elements of org syntax (not just src blocks) can have a valid #+header
 (and indeed other affiliated keywords, like #+attr_latex), so the fix
 probably should be more general.

Yes, there are other elements and more affiliated keywords. The
parser (or rather the interpreter(s)) and parts of Org Babel do not
always deal with them yet. 

This was more a 'constructive bug report', not so much an attempt of a
general fix. I just (partly) fixed this function for myself because I
needed it ...

-- 
cheers,
Thorsten




[O] Ditaa on Mac OS X

2014-08-06 Thread SabreWolfy
This[1] ditaa example with ORg 8.2.7f under Mac OS X Mavericks fails with a
message indicating that .../elpa/contrib/scripts/ditaa.jar is not found. I
created the folder and soft-linked /usr/local/bin/ditaa to ditaa.jar and
tried again. This time the export ran, but the PDF it created contained a
large box with :file somefile_name.png inside it. I've also read this[2]
and did not find ditaa in ELPA. Suggestions?

[1] http://doc.norang.ca/org-mode.html#playingwithditaa
[2] http://orgmode.org/worg/org-contrib/babel/languages/ob-doc-ditaa.html




Re: [O] [BUG] :header-args+:

2014-08-06 Thread Thorsten Jolitz
Aaron Ecay aarone...@gmail.com writes:

Hi Aaron,

 2014ko uztailak 6an, Thorsten Jolitz-ek idatzi zuen:
 
 Hi List, 
 
 doing C-c C-c on the first src_block
 
 ,
 | * A
 | ** B
 | :PROPERTIES:
 | :header-args: :var name=dblock-name
 | :header-args+: :var prms=dblock-params
 | :END:
 | 
 | #+begin_src emacs-lisp 
 |   (format \n#+begin: %s %s\n#+end:\n name prms)
 | #+end_src
 | 
 | #+name: dblock-params
 | #+begin_src emacs-lisp
 | foo
 | #+end_src
 | 
 | #+name: dblock-name
 | #+begin_src emacs-lisp
 | bar
 | #+end_src
 `


 You have an infinite regress.  In order to compute the result of the
 dblock-name block, we need to resolve each of its :vars, which includes
 dblock-name, so we try to resolve the same block again...

 Converting the second and third src blocks to example blocks (leaving in
 place the #+names) gives what you seem to be aiming for.

Yes, that works (see below), thank you. I already solved my problem in
plain Emacs Lisp, and example-blocks cannot really replace src-blocks,
but its good to know for the future that it (somehow) can be done.

* A
** B
:PROPERTIES:
:header-args: :var name=dblock-name
:header-args+: :var prms=dblock-params
:END:

#+begin_src emacs-lisp 
  (format \n#+begin: %s %s\n#+end:\n name prms)
#+end_src

#+results:
: 
: #+begin: bar
:  foo
: 
: #+end:

#+name: dblock-params
#+begin_example
foo
#+end_example


#+name: dblock-name
#+begin_example
bar
#+end_example

-- 
cheers,
Thorsten




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

2014-08-06 Thread Gour
Alexis flexibe...@gmail.com writes:

 i don't think that's a dumb question at all!

Good. ;)

 My original motivation for developing org-vcard was to create part of a
 pipeline for synchronising contacts between Org and my smartphone. 

That would be great!!

 (b) (i) i feel org-contacts.el, as it stands, is too inflexible. It's only
 aware of a relatively small number of properties, and extending this
 requires directly messing around in the org-contacts.el code. i feel
 that this has made it difficult to expand the list of properties
 available, as it basically requires everyone to agree on exactly what
 properties to add, and how.

I agree, but let me ask you what do you think about BBDB-v3? Many people
like it, but I must admit I haven't take closer look at it?

However, I wonder whether it's flexible enough to define one's own
properties of format of one's contact data and what about syncing?

 (b) (ii) Further to (b) (i), i feel people should be able to define
 their own properties, in their preferred language, without having to
 write code for this.

That's noble feature, indeed.

 (b) (iii) More generally, previous discussions on this topic on this
 list have convinced me that it's folly to expect everyone to agree on a
 single style for contacts in Org, and that what is needed is a system
 that can easily accommodate the development of new contact styles,
 potentially allowing an ecosystem/marketplace of styles to develop, with
 particularly popular styles being considered for inclusion by default in
 the system.

Sound very good and it seems it's obvious that such nice app as org-mode
needs some improvement in the way how the contacts are handled.

 Given all the above, yes, i would like to see org-vcard become the basis
 for an Org contacts NG system. (Which, to answer Feng Shu's question,
 would mean that the 'tree' style would be available by default in such a
 system.) Whether to actually take this approach, however, is something
 i'll let the community decide. :-)

I wish you all the best hoping org-mode users will find decent solution
for handling contacts soon.


Sincerely,
Gour

-- 
An intelligent person does not take part in the sources of misery, 
which are due to contact with the material senses. O son of Kuntī, 
such pleasures have a beginning and an end, and so the wise man does 
not delight in them.




Re: [O] #+header: :post - Symbol's value as variable is void: *this*

2014-08-06 Thread Thorsten Jolitz
Aaron Ecay aarone...@gmail.com writes:

Hi Aaron,

 2014ko uztailak 27an, Thorsten Jolitz-ek idatzi zuen:
 
 Thorsten Jolitz tjol...@gmail.com writes:
 
 Hi List, 
 
 whats wrong with this :post header arg:
 
 #+header: :post (format #+attr_latex :float :placement
 {c}{scale=.6}\n%s *this*)
 #+begin_src emacs-lisp 
 (+ 2 2)
 #+end_src
 
 When I understand 
 
 ,
 | http://orgmode.org/manual/post.html
 `
 
 correctly, *this* should hold the block results, but I get 
 
 ,
 | Symbol's value as variable is void: *this*
 `
 
 
 This works:
 
 #+name: myconcat
 #+header: :var x=
 #+begin_src emacs-lisp
  (format Do %sx then quit x)
 #+end_src
 
 
 #+header: :post myconcat(x=*this*)
 #+begin_src emacs-lisp 
  (+ 2 2)
 #+end_src
 
 #+results:
 : Do 4x then quit
 
 
 but how do I interpret the following sentence from the manual:
 
 ,
 | This variable [*this*] may then be included in header argument forms
 | such as those used in var header argument specifications allowing
 | passing of results to other code blocks, or direct execution via Emacs
 | Lisp.
 `
 
 What is meant by 'direct execution via Emacs Lisp' here? I think the
 above construct with two src-blocks is a bit heavy for the rather small
 task and hoped I could just give an Emacs Lisp expression containing
 *this* as value to the :post header arg, but apparently not?
 
 #+header: :post (format Do %sx then quit *this*)
 #+begin_src emacs-lisp 
  (+ 2 2)
 #+end_src
 
 - eval: Symbol's value as variable is void: *this*

 The value of :post should be a babel call (in the same format as e.g. a
 #+call line), not an elisp form.  If babel sees something that looks
 like elisp, it will attempt to ‘eval’ it when parsing the src block,
 before *this* is bound (which happens only upon execution, after
 parsing).

Thats 

 #+CALL: name(arguments)

then, and looks like the headerline of the working example above:

#+header: :post myconcat(x=*this*)

Then there is no way to achieve what I had in mind. Thx. 

-- 
cheers,
Thorsten




Re: [O] Org-mode extensions used to publish a dissertation

2014-08-06 Thread Joseph Vidal-Rosset
Many thanks Eric for this email and the attachment.

Of course it is very useful.

2014-08-05 2:23 GMT+02:00 Eric Schulte schulte.e...@gmail.com:

 Hi List,

 I thoroughly enjoyed using Org-mode to write my dissertation.  I was
 happy to be able to export (mostly) equivalent versions of the document
 to HTML and PDF.  I'd recommend using Org-mode for such a complex
 writing task to those who are either willing to hack the exporter, or
 are willing to accept an Org-mode document with inline LaTeX which only
 /really/ works with the LaTeX backend.

 As I fall in the former category, here are the small extensions to the
 Org-mode exporter which I found necessary.  Thanks to the new exporting
 backend they were uniformly easy to implement.  They are included in the
 attached elisp file.  Each pagefeed (^L) in the file marks a new section
 of functionality, the sections are as follows...

  1. Ignore Headlines and keep content (discussed here recently)
  2. Multi-column Table Cells
  3. Wide tables extend into the margins.
  4. Wide tables squeezed within the margins
  5. sc links for the \sc{} latex command
  6. gls links for the \gls{} family of Glossary commands
  7. color links
  8. TIKZ figure links
  9. Tie certain latex commands to the preceding word.
 10. Fix emphasis in text export

 A simplified version of my Makefile is also attached.  I hope someone
 finds this useful.

 Best,
 Eric


Can you tell us how using the Makefile in order to test all these functions
for a dissertation? I am  especially interested by points 2 and 8.

Best wishes ,

Jo.


Re: [O] exporting quotes

2014-08-06 Thread Salome =?iso-8859-1?Q?S=F6dergran
 Salome S?dergran\ salome.soederg...@gmx.ch writes:
 
  Salome S?dergran\ wrote:
   I'm looking for a way to make orgmode export quote signs to LaTeX's 
   \enquote{}.
   On stackoverflow.com (1) I found a solution that uses 
 (setq org-export-with-smart-quotes t)
 (add-to-list 'org-export-smart-quotes-alist .)
   but on my system I find neither the variable 
   org-export-with-smart-quotes nor
   org-export-smartcodes-alist.
  
   Am I missing something or has the procedure been changed in the 
   meanwhile?
  
  You don't use Org mode 8, don't you?  Well, that'd explain...
  
  Best regards,
Seb
  
  -- 
  Sebastien Vauban
 
  With M-x org-version I get: 
Org-mode version 8.2.7b (8.2.7b-2-g798733-elpaplus @ 
  /home/salome/.emacs.d/elpa/org-plus-contrib-20140721/)
 
  So the version ought to be ok. What else could be the reason for the 
  missing variables?
 
 
 The variable is defined in ox.el. Try
 
   M-x locate-library RET ox RET
 
 and if that shows the right provenance, try
 
   M-x load-library RET ox-le RET
 
 and see if the variable is defined. But note that you *should not have*
 to do this: it should work right off the bat.
 
 If the problem persists (even after you restart emacs), I would suspect
 a mixed installation (search the list for this).
 
 Nick

Indeed! I find an older org-version (7.x) in /usr/share/emacs. I have now 
changed the order in the load-path-list to load the local installations first. 
After reading the things on the list an on worg on mixed installations I'm 
not sure if I might delete the org-subdirectory in /usr/share/emacs. So I leave 
it untouched  and hope that the changed order of the load paths will do the 
trick.

At any rate, I've now been able to set the org-export-with-smart-quotes 
variable and to adjust org-export-smart-quotes-alist. The latter didn't work at 
first, only after putting it into 
 (eval-after-load 'ox ...).

Now everything seems to be working fine. Thanks for the help!
Salome







Re: [O] Org equivalent to \chapter*

2014-08-06 Thread Rasmus
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.

The filter will translate this file

 #+OPTIONS: tags:nil
 * preface:nonum:
   my preface
 * introduction
   this is numbered. 

To something like this:

\section*{preface}
\label{sec-1}
my preface
\section{introduction}
\label{sec-2}
this is numbered. 

If your other filters require #+OPTIONS: tags:t then you will have to
manually clean up the tag remedies.  I will not work on verbatim-only
headlines.

  (defun rasmus/get-org-headline-string-element  (headline backend info)
Return the org element representation of an element.  Does not
work with verbatim only headlines, e.g. \* ~Verb~.\
(let ((prop-point (next-property-change 0 headline)))
  (if prop-point (plist-get (text-properties-at prop-point headline) 
:parent


  (defun rasmus/org-export-nonum (headline backend info)
Remove the number from LaTeX headlines with the tag \nonum\
(when (org-export-derived-backend-p backend 'latex 'ascii)
  (let* ((e (rasmus/get-org-headline-string-element headline backend info))
 (tags (org-element-property :tags e))
 (level (org-element-property :level e))
 (class (assoc (plist-get info :latex-class) org-latex-classes)))
(when  (and level (member-ignore-case nonum tags))
  (string-match
   (format \\(\\%s\\) (replace-regexp-in-string {.*?}  (car (nth 
(1+ level) class
   headline)
  (replace-match (replace-regexp-in-string {.*?}  (concat \\ (cdr 
(nth (1+  level) class nil nil headline 0)

  (add-to-list 'org-export-filter-headline-functions 'rasmus/org-export-nonum)


-- 
Governments should be afraid of their people




Re: [O] Org-mode extensions used to publish a dissertation

2014-08-06 Thread Rasmus
Hi Eric,

Thank you for sharing this.  I have hacks for many of the same things,
but I'm sure I will find inspiration in your implementations as well
when I read them more carefully.

In particular the filters that operate directly on the tree seems
interesting!  I have never really gotten into tree-manipulation.

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

  1. Ignore Headlines and keep content (discussed here recently)
  2. Multi-column Table Cells
  3. Wide tables extend into the margins.

For this I use a makebox and simply wrap any table with a specified
width.  

  4. Wide tables squeezed within the margins

Cool. 

  5. sc links for the \sc{} latex command

For this I automatically export ALLCAPS or MiXeD words with small caps
(replacing X with \textsc{x}).  I used to use links as well, but
people I worked with found it unintuitive and didn't do it.

  6. gls links for the \gls{} family of Glossary commands
  7. color links
  8. TIKZ figure links

Am I right to understand that the main use of this is automatically
translating tikz figures into a format suitable for HTML?  The
function is a bit long and I couldn't entirely grasp the functionality
without reading the function in details.

  9. Tie certain latex commands to the preceding word.

Cool idea with the refs!

I use something similar where I escape single space after points so
that e.g. x becomes e.g.\ x.

 10. Fix emphasis in text export

Good idea.

Cheers,
Rasmus

-- 
I feel emotional landscapes they puzzle me




Re: [O] [RFC] Rewrite `org-entry-properties' using parser

2014-08-06 Thread Rasmus
Hi,

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

 Nicolas Goaziou m...@nicolasgoaziou.fr writes:

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

 here is my first take of rewriting `org-entry-properties'.

 Interesting. A first round of comments follows.
 [...]
 But this looks like an entirely different function to me, and IMO it
 does not make much sense that you explain what you want and I type
 it in (*because instead of explaining you could just as well type it
 yourself in the same time*), so I rather leave this to you (or
 whoever wants to do it).

[my emphasis added]

This is not directly related, I'm just guarding my own interests
here.

I *really* appreciate Nicolas' way of giving comments as I learn a lot
about my mistakes this way and how not to repeat them (though I most
likely do).  Surely Nicolas could take most of the ox-related patches
and iron out bugs and bugs the first time they are submitted.
Writing emails proposing change takes more time.  It's meant as a
favor and frankly the alternative is less pleasing — at least for me.

Granted, you, Thorsten, is a lot more senior is writing code than me
and perhaps you see it differently.

Cheers,
Rasmus




Re: [O] Org-mode extensions used to publish a dissertation

2014-08-06 Thread Suvayu Ali
Hi Eric,

On Mon, Aug 04, 2014 at 08:23:58PM -0400, Eric Schulte wrote:
 
  1. Ignore Headlines and keep content (discussed here recently)
  2. Multi-column Table Cells
  3. Wide tables extend into the margins.
  4. Wide tables squeezed within the margins
  5. sc links for the \sc{} latex command
  6. gls links for the \gls{} family of Glossary commands
  7. color links
  8. TIKZ figure links
  9. Tie certain latex commands to the preceding word.
 10. Fix emphasis in text export

Thanks a lot for sharing these :).

Cheers,

-- 
Suvayu

Open source is the future. It sets us free.



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

2014-08-06 Thread Alexis

Gour writes:

 what do you think about BBDB-v3? Many people like it, but I must admit
 I haven't take closer look at it?

i haven't tried using BBDB-v3, only BBDB-v2, several years ago. i found
the latter, hm, 'clunky'. (Similar to how, until the advent of mu4e, i
found no Emacs-based MUA with maildir support which i found as usable as
Mutt.) And iirc, part of the problem might have been lack of (full)
support for Australian phone numbers and/or postcodes, which at the time
i really didn't want to wrestle with.

In any case, org-contacts.el has nowwhetted my appetite for an Org-based
contacts solution - given the slogan Your life in plain text, contacts
management certainly seems to me to fall within Org's remit. :-)

 However, I wonder whether it's flexible enough to define one's own
 properties of format of one's contact data and what about syncing?

i've just had a quick scan through the BBDB-v3 source, and
superficially, it looks like the properties are hard-coded.

Regarding syncing, the BBDB page on SourceForge suggests that existing
support for this might be rather limited - i only see mention of
PalmPilot syncing. i would certainly be interested to know if anyone's
created CardDAV support for BBDB - given that Google Contacts can be
accessed via CardDAV, and given (what i imagine to be) the large number
of people syncing their Android phone's contacts with Google Contacts,
such support might well be in demand!

 I wish you all the best hoping org-mode users will find decent solution
 for handling contacts soon.

Thank you! i'm hoping my ongoing work with org-vcard might eventually
contribute towards this. :-)


Alexis.



Re: [O] org-ref in action

2014-08-06 Thread Xebar Saram
Thanks John

No worries :) ive installed it and its working great.

in a related question, does anyone use it with jabef?

the reason im asking is that im very new to this and wonder about a
possible workflow to export a bib citation from jabref to org and create an
org header (per reference). so far it seems like org-ref will only insert
something like
cite:REF
I have played around with org-bibtex and seem to remember there was a
org-bibtex yank function that created a header in org from the bib citation
in clipboard, can org-ref do something similar?

sorry for the neewb questions

z





On Wed, Aug 6, 2014 at 12:08 AM, John Kitchin jkitc...@andrew.cmu.edu
wrote:

 Hi, it got moved in a re-organization to
 https://github.com/jkitchin/jmax/blob/master/org/org-ref.org.

 Sorry for the inconvenience!

 Xebar Saram zelt...@gmail.com writes:

  Hi all
 
  the github link seems dead, anyone knows where one could get and try
  org-ref from?
 
  z
 
  On Mon, Jun 30, 2014 at 2:27 PM, Joseph Vidal-Rosset
  joseph.vidal.ros...@gmail.com wrote:
 
  Thanks Eric, it works now, with the latest version of org-mode.
 
  Best wishes
 
  Jo.
 
 
 
 
  2014-06-30 12:22 GMT+02:00 Eric Schulte schulte.e...@gmail.com:
 
 
 
   Thanns to the default cite action, I get for example in my
  org file:
  
   [[cite:(119–136)johansson36:_minim_formal]]
  
   and it creates no reference at al, because via the export I
  get:
  
   \cite{(119–136)johansson36:_minim_formal}
  
 
 
  Using the latest version of Org-mode from the git repository,
  this is a
  very new feature and requires usage of the git version of
  Org-mode, I am
  seeing the desired behavior. After simply requiring ox-bibtex,
  the
  following
 
  * H1
  [[cite:(119–136)johansson36:_minim_formal]]
 
  exports to
 
  \begin{document}
 
  \maketitle
  \tableofcontents
 
  \section{H1}
  \label{sec-1}~\cite[119–136]{johansson36:_minim_formal}
  % Emacs 24.4.50.2 (Org mode beta_8.3)
  \end{document}
 
  As expected.
 
  I hope this helps,
  Eric
 
 
 
  --
  Eric Schulte
  https://cs.unm.edu/~eschulte
  PGP: 0x614CA05D (see https://u.fsf.org/yw)
 
 
 
 
 

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



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

2014-08-06 Thread Eric Schulte
Aaron Ecay aarone...@gmail.com writes:

 Hi Eric,

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

 [...]

 I don't know.
 
 The Babel R support needs a dedicated maintainer.  This was a role Dan
 Davison originally filled.  I've partially filled in since, but as a
 *very* light R user I'm not the best person.

 I use babel’s R support (almost) every day for my work, and I know
 enough elisp to be getting along.  I’ve not had tons of time for
 org/emacs development lately, but I think I can make enough time to
 maintain ob-R.el.


That would be great, and a personal relief.  Perhaps you could begin
with a patch for the regexp issue in this thread?


 There are others who could probably do just as good (if not indeed
 better) a job.  Rainer’s name springs to mind as someone who has
 submitted several patches for ob-R lately, but there are probably
 others who I’m not calling to mind immediately.  I’d be happy to
 share with other willing volunteers, either as a joint maintainership
 or (perhaps preferably) alternating the position in a 3- to 6-month
 rota.

Yes, and some form of sharing would of course be great.  Multiple active
maintainers is better than just one.  I think the main thing is to have
someone who, in threads like this one with many good suggestions, will
take the initiative to move from discussion to a proposed patch, and
then to apply that patch down the line.

Thanks!
Eric

-- 
Eric Schulte
https://cs.unm.edu/~eschulte
PGP: 0x614CA05D (see https://u.fsf.org/yw)



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

2014-08-06 Thread Nicolas Goaziou
Hello,

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

 Aaron Ecay aarone...@gmail.com writes:

 Hi Thorsten,

 2014ko abuztuak 5an, Thorsten Jolitz-ek idatzi zuen:

 [...]

 
 Parse this src-block (with point at beg of block):
 
 ,
 | M-: (setq ptree (org-element-at-point))
 `
 
 #+header: :results raw
 #+begin_src emacs-lisp
 (message hello world)
 #+end_src
 
 #+results:
 hello world
 
 Then evaluate
 
 #+begin_src emacs-lisp
 (org-element-src-block-interpreter ptree nil)
 #+end_src
 
 #+results:
 : #+BEGIN_SRC emacs-lisp
 :   (message hello world)
 : #+END_SRC
 
 #+begin_src emacs-lisp
 (tj/src-block-interpreter ptree nil)
 #+end_src
 
 #+results:
 : #+HEADER: :results raw
 : #+BEGIN_SRC emacs-lisp
 :   (message hello world)
 : #+END_SRC

 Indeed this seems like an improvement on the status quo.  But other
 elements of org syntax (not just src blocks) can have a valid #+header
 (and indeed other affiliated keywords, like #+attr_latex), so the fix
 probably should be more general.

 Yes, there are other elements and more affiliated keywords. The
 parser (or rather the interpreter(s)) and parts of Org Babel do not
 always deal with them yet. 

 This was more a 'constructive bug report', not so much an attempt of a
 general fix. I just (partly) fixed this function for myself because I
 needed it ...

There is no bug here.

`org-element-src-block-interpreter' is meant to create a src block and
only a src block. `org-element--interpret-affiliated-keyword' is used to
create affiliated keywords (like #+header). You shouldn't call any of
these anyway, since `org-element-interpret-data' is the one and only
entry point to interpret parsed data. Try


  (org-element-interpret-data ptree)


Regards,

-- 
Nicolas Goaziou



Re: [O] Multi-line links

2014-08-06 Thread Nicolas Goaziou
Hello,

Tobias Getzner tobias.getz...@gmx.de writes:

 The only remaining issue would be that these links can only be
 triggered from the first line. Clicking on another line will yield «No
 link found», so I cannot get org-ref to return the BibTeX entry
 appropriate for the line from which the action is triggered.

`org-open-at-point' was rewritten in master branch a while ago, so it
should be fixed in Org 8.3. The fix will not be backported to Org 8.2,
though, as it implies a non-trivial amount of changes.


Regards,

-- 
Nicolas Goaziou



Re: [O] Org-mode extensions used to publish a dissertation

2014-08-06 Thread Eric Schulte
Rasmus ras...@gmx.us writes:

 Hi Eric,

 Thank you for sharing this.  I have hacks for many of the same things,
 but I'm sure I will find inspiration in your implementations as well
 when I read them more carefully.

 In particular the filters that operate directly on the tree seems
 interesting!  I have never really gotten into tree-manipulation.


With help on list I wrote one, and every subsequent filter has been a
simple extension from the first.  Hopefully those included herein will
be good models for future filters.

[...]

  8. TIKZ figure links

 Am I right to understand that the main use of this is automatically
 translating tikz figures into a format suitable for HTML?  The
 function is a bit long and I couldn't entirely grasp the functionality
 without reading the function in details.


See my reply to Joseph in this thread, hopefully it will clear this up.
This point is probably the most heavily influenced by personal
preference of all these points.


  9. Tie certain latex commands to the preceding word.

 Cool idea with the refs!

 I use something similar where I escape single space after points so
 that e.g. x becomes e.g.\ x.

 10. Fix emphasis in text export

 Good idea.

 Cheers,
 Rasmus

Best,
Eric

-- 
Eric Schulte
https://cs.unm.edu/~eschulte
PGP: 0x614CA05D (see https://u.fsf.org/yw)



Re: [O] Org-mode extensions used to publish a dissertation

2014-08-06 Thread Eric Schulte
Joseph Vidal-Rosset joseph.vidal.ros...@gmail.com writes:

 Many thanks Eric for this email and the attachment.

 Of course it is very useful.

 2014-08-05 2:23 GMT+02:00 Eric Schulte schulte.e...@gmail.com:

 Hi List,

 I thoroughly enjoyed using Org-mode to write my dissertation.  I was
 happy to be able to export (mostly) equivalent versions of the document
 to HTML and PDF.  I'd recommend using Org-mode for such a complex
 writing task to those who are either willing to hack the exporter, or
 are willing to accept an Org-mode document with inline LaTeX which only
 /really/ works with the LaTeX backend.

 As I fall in the former category, here are the small extensions to the
 Org-mode exporter which I found necessary.  Thanks to the new exporting
 backend they were uniformly easy to implement.  They are included in the
 attached elisp file.  Each pagefeed (^L) in the file marks a new section
 of functionality, the sections are as follows...

  1. Ignore Headlines and keep content (discussed here recently)
  2. Multi-column Table Cells
  3. Wide tables extend into the margins.
  4. Wide tables squeezed within the margins
  5. sc links for the \sc{} latex command
  6. gls links for the \gls{} family of Glossary commands
  7. color links
  8. TIKZ figure links
  9. Tie certain latex commands to the preceding word.
 10. Fix emphasis in text export

 A simplified version of my Makefile is also attached.  I hope someone
 finds this useful.

 Best,
 Eric


 Can you tell us how using the Makefile in order to test all these functions
 for a dissertation?

The Makefile and the code do not need to be used together.

 I am especially interested by points 2 and 8.


For point 2 try adding the following above a wide table in an Org-mode
document (after evaluating the code).

  #+ATTR_LaTeX: :environment wide

On export this should allow your table to cut into the page margins
(note: for my school I later had to undo this as there were strict rules
about margins in dissertations).

Point 8 is a little more involved.  I prefer to convert my TIKZ figures
to svg for HTML export, and keep them as raw tikz for LaTeX export.  I
found that the easiest way to do this (for me at least), was to keep the
figures in external .tex files.  I would then manually generate an svg
version of these files using the tex2svg script (attached).  With these
files on hand, the code in Point 8 will export Org-mode text like the
following.

  #+name: llvm-mutation
  #+Caption[LLVM Transformations]: Illustration of transformations over LLVM 
IR.  These transformations require that the SSA data dependency graph be 
repaired after each mutation.
  #+TIKZ_Figure: llvm-mutation

so that the file llvm-mutation.tex is included in LaTeX export wrapped
in a figure, and the file llvm-mutation.svg is included as an image in
HTML export.

Best,
Eric

#!/bin/bash
#
# Usage: tex2svg [source.tex]
#
#Generate an SVG file from a snippet of LaTeX source code.
#The tex source should not be wrapped in begin/end{document}.
#
# Example Usage:
#
# $ cat tree.tex
# \usetikzlibrary{trees}
# \begin{tikzpicture}
#   \node [circle, draw, fill=red!20] at (0,0) {1}
#   child { node [circle, draw, fill=blue!30] {2}
# child { node [circle, draw, fill=green!30] {3} }
# child { node [circle, draw, fill=yellow!30] {4} }};
# \end{tikzpicture}
#
# $ ./tex2svg tree.tex
#
# $ file tree.svg
# tree.svg: SVG Scalable Vector Graphics image
#
PACKAGES=('[usenames]{color}' '{tikz}' '{color}' '{listings}' '{amsmath}' '{fancyvrb}' '{soul}')

PREAMBLE=$(cat EOF
\documentclass[preview]{standalone}
\def\pgfsysdriver{pgfsys-tex4ht.def}
$(for pack in ${PACKAGES[@]};do echo \\usepackage$pack; done)
\usepackage{algorithmic}
\usepackage{amsmath}
\usepackage{adjustbox}
\usepackage{fancyvrb}
\usepackage{booktabs}
\usepackage{xcolor}
\usepackage{hyperref}
\usepackage{changepage}
\usepackage{graphicx}
\DeclareGraphicsExtensions{.pdf,.png,.jpg,.JPG}
\begin{document}
EOF
)
POSTAMBLE=$(cat EOF
\end{document}
EOF
)

FIG=$1; shift;
BASE=$(basename $FIG .tex)
TMPFILE=$(mktemp).tex
TMPBASE=`basename $TMPFILE .tex`
TMPDIR=`dirname $TMPFILE`
cp $@ $TMPDIR

function exit_hook (){ rm -f $TMPBASE* $TMPFILE*; exit 0; }
trap exit_hook EXIT

cat EOF  $TMPFILE
$PREAMBLE
$(cat $FIG|sed 's/\\subcaption{.*}//')
$POSTAMBLE
EOF
htlatex $TMPFILE  rm $TMPFILE
if [ -f $TMPBASE-1.svg ];then
# scour -i $TMPBASE-1.svg -o $BASE.svg \
# || cp $TMPBASE-1.svg $BASE.svg
cp $TMPBASE-1.svg $BASE.svg
echo $BASE.svg
else
cp $TMPBASE.html $BASE.html
echo $BASE.html
fi

 Best wishes ,

 Jo.

-- 
Eric Schulte
https://cs.unm.edu/~eschulte
PGP: 0x614CA05D (see https://u.fsf.org/yw)


Re: [O] [RFC] Add commmand for wrapping sexp/region in src-blocks to Org?

2014-08-06 Thread Xebar Saram
thanks Thorsten

its perfect

z


On Tue, Aug 5, 2014 at 4:15 PM, Thorsten Jolitz tjol...@gmail.com wrote:

 Xebar Saram zelt...@gmail.com writes:

 Hi Xebar,

  small question.

 sorry for the late answer

  i wonder if i could request a tiny related feature (this may be very
  easy to do already).
  i would like to assign hotkeys for 2 scenarios:
 
  1) pre selected language for 1 line
  2) pre selected language prompting for number of lines to wrap
 
  so IE id assign F9-b to auto wrap current line with bash syntax while
  F9-l would wrap in lisp
  also F10-b would prompt me how man lines to wrap in bash etc
 
  is that possible?

 I think so, I have some predefined calls to that function with global
 keybindings in my init file (right now I call it `tj/wrap-in-src-block',
 you might have to adapt this):

 (global-set-key (kbd C-c w l)
 (lambda ()
   (interactive)
   (let ((current-prefix-arg '(4)))
  (call-interactively
   'tj/wrap-in-src-block

 (global-set-key (kbd C-c w n)
 (lambda ()
   (interactive)
   (let ((current-prefix-arg '(16)))
  (call-interactively
   'tj/wrap-in-src-block

 (global-set-key (kbd C-c w w) 'tj/wrap-in-src-block)


  1) pre selected language for 1 line

 e.g.
 (global-set-key (kbd C-c w y)
 (lambda ()
   (interactive)
   (tj/wrap-in-src-block shell 1)))


  2) pre selected language prompting for number of lines to wrap

 emacs-lisp is kind of preselected, but you could add this after the
 ((equal current-prefix-arg '(16)) ...) part


 ((equal current-prefix-arg '(64))
  (list
  shell
   (read-number Number of lines to wrap:  1)))

 and then

 (global-set-key (kbd C-c w z)
 (lambda ()
   (interactive)
   (let ((current-prefix-arg '(64)))
  (call-interactively
   'tj/wrap-in-src-block

 everything untested, unfortunately ...
 --
 cheers,
 Thorsten





Re: [O] [RFC] Rewrite `org-entry-properties' using parser

2014-08-06 Thread Nicolas Goaziou
Hello,

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

 Thanks for the review and the comments. But this looks like an entirely
 different function to me

I think you're confused between `org-element-at-point' and
`org-entry-properties'. As I pointed out, there are properties that
ought to stay specific to the former (e.g. :contents-begin) and some
specific to the latter (e.g. :clocksum).

As I said, sharing code for the common parts is interesting. But it is
not sufficient.

Another option would be to discuss if `org-entry-properties' is needed
at all. AFAICT by grepping for org-entry-properties through the code
base, besides org-pcomplete.el, no call is really needed. Most
functions really need a single property. It is inefficient to grab them
all just to extract one.

 and IMO it does not make much sense that you explain what you want
 and I type it in (because instead of explaining you could just as well
 type it yourself in the same time)

You may want to read my answer again. There is no write this, write
that in it. I'm pointing out what is missing or flawed and _suggesting_
alternative approaches.

 so I rather leave this to you (or whoever wants to do it).

Unfortunately, my plate is full at the moment.


Regards,

-- 
Nicolas Goaziou



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

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

Hello,
 Yes, there are other elements and more affiliated keywords. The
 parser (or rather the interpreter(s)) and parts of Org Babel do not
 always deal with them yet. 

 This was more a 'constructive bug report', not so much an attempt of a
 general fix. I just (partly) fixed this function for myself because I
 needed it ...

 There is no bug here.

 `org-element-src-block-interpreter' is meant to create a src block and
 only a src block. `org-element--interpret-affiliated-keyword' is used to
 create affiliated keywords (like #+header). You shouldn't call any of
 these anyway, since `org-element-interpret-data' is the one and only
 entry point to interpret parsed data. Try


   (org-element-interpret-data ptree)

I see, thanks. I'm still getting used to the 'org-element API', but it
seems to be much easier than I thought: just use `org-element-at-point' and
`org-element-interpret-data' in most cases ...

-- 
cheers,
Thorsten




Re: [O] HTML lists are including paragraphs (lip…/p/li)

2014-08-06 Thread Nicolas Goaziou
Hello,

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

 The code which checks to ensure that paragraph wrappers are only
 inhibited if they are inhibited for the whole list mistakenly keeps
 paragraph wrappers if one item of the list is itself a list

 The location of this bug is the (cdr contents) in line 2899 of
 ox-html.el.  I'd be inclined to remove this form, but I'm not sure what
 valid case it checks for.

This is more a misunderstanding that a bug. (cdr contents) tests if
there is anything after the current paragraph. In the following example,

  1. hola
  2. uno
 - dos
  3. tres

item 2. contains (paragraph plain-list), so (cdr contents) in not nil.

I understand that paragraph is alone in its item is not a good test to
skip paragraph wrappers. I'm still confused about what a good test would
be. In particular, what should be done in the following cases

  - item
  - item
- subist
resuming item

i.e., (paragraph plain-list paragraph), and

  - outer

another paragraph

- inner
- simple list

i.e., are nested plain-lists independent relatively to paragraph
wrappers skipping. I think so, but I'd rather make sure.


Regards,

-- 
Nicolas Goaziou



Re: [O] [RFC] Add commmand for wrapping sexp/region in src-blocks to Org?

2014-08-06 Thread Thorsten Jolitz
Xebar Saram zelt...@gmail.com writes:

 thanks Thorsten

 its perfect

well, not perfect yet since, as Nicolas mentioned, it does not cover all
possible use cases (wrap/unwrap/modify ALL kinds of Org blocks with or
without header-line params and with or without affiliated keywords or
with a combination of both). 

I got pretty far in implementing this, but spent too much time - maybe I
can deliver the general 'all-inclusive' version later, I hope so, its
useful.

 On Tue, Aug 5, 2014 at 4:15 PM, Thorsten Jolitz tjol...@gmail.com
 wrote:

 Xebar Saram zelt...@gmail.com writes:
 
 Hi Xebar,
 
  small question.
 
 sorry for the late answer
 
 
  i wonder if i could request a tiny related feature (this may be
 very
  easy to do already).
  i would like to assign hotkeys for 2 scenarios:
 
  1) pre selected language for 1 line
  2) pre selected language prompting for number of lines to wrap
 
  so IE id assign F9-b to auto wrap current line with bash syntax
 while
  F9-l would wrap in lisp
  also F10-b would prompt me how man lines to wrap in bash etc
 
  is that possible?
 
 
 I think so, I have some predefined calls to that function with
 global
 keybindings in my init file (right now I call it
 `tj/wrap-in-src-block',
 you might have to adapt this):
 
 (global-set-key (kbd C-c w l)
 (lambda ()
 (interactive)
 (let ((current-prefix-arg '(4)))
 (call-interactively
 'tj/wrap-in-src-block
 
 (global-set-key (kbd C-c w n)
 (lambda ()
 (interactive)
 (let ((current-prefix-arg '(16)))
 (call-interactively
 'tj/wrap-in-src-block
 
 (global-set-key (kbd C-c w w) 'tj/wrap-in-src-block)
 
 
 
  1) pre selected language for 1 line
 
 
 e.g.
 (global-set-key (kbd C-c w y)
 (lambda ()
 (interactive)
 (tj/wrap-in-src-block shell 1)))
 
 
 
  2) pre selected language prompting for number of lines to wrap
 
 
 emacs-lisp is kind of preselected, but you could add this after
 the
 ((equal current-prefix-arg '(16)) ...) part
 
 
 ((equal current-prefix-arg '(64))
 (list
 shell
 
 (read-number Number of lines to wrap:  1)))
 
 
 and then
 
 (global-set-key (kbd C-c w z)
 (lambda ()
 (interactive)
 (let ((current-prefix-arg '(64)))
 (call-interactively
 'tj/wrap-in-src-block
 
 everything untested, unfortunately ...
 --
 cheers,
 Thorsten


-- 
cheers,
Thorsten




Re: [O] [RFC] Add commmand for wrapping sexp/region in src-blocks to Org?

2014-08-06 Thread Xebar Saram
that sounds great :)

looking forward to the next iterations ;-)

thanks again for all your hard work

Z


On Wed, Aug 6, 2014 at 3:14 PM, Thorsten Jolitz tjol...@gmail.com wrote:

 Xebar Saram zelt...@gmail.com writes:

  thanks Thorsten
 
  its perfect

 well, not perfect yet since, as Nicolas mentioned, it does not cover all
 possible use cases (wrap/unwrap/modify ALL kinds of Org blocks with or
 without header-line params and with or without affiliated keywords or
 with a combination of both).

 I got pretty far in implementing this, but spent too much time - maybe I
 can deliver the general 'all-inclusive' version later, I hope so, its
 useful.

  On Tue, Aug 5, 2014 at 4:15 PM, Thorsten Jolitz tjol...@gmail.com
  wrote:
 
  Xebar Saram zelt...@gmail.com writes:
 
  Hi Xebar,
 
   small question.
 
  sorry for the late answer
 
 
   i wonder if i could request a tiny related feature (this may be
  very
   easy to do already).
   i would like to assign hotkeys for 2 scenarios:
  
   1) pre selected language for 1 line
   2) pre selected language prompting for number of lines to wrap
  
   so IE id assign F9-b to auto wrap current line with bash syntax
  while
   F9-l would wrap in lisp
   also F10-b would prompt me how man lines to wrap in bash etc
  
   is that possible?
 
 
  I think so, I have some predefined calls to that function with
  global
  keybindings in my init file (right now I call it
  `tj/wrap-in-src-block',
  you might have to adapt this):
 
  (global-set-key (kbd C-c w l)
  (lambda ()
  (interactive)
  (let ((current-prefix-arg '(4)))
  (call-interactively
  'tj/wrap-in-src-block
 
  (global-set-key (kbd C-c w n)
  (lambda ()
  (interactive)
  (let ((current-prefix-arg '(16)))
  (call-interactively
  'tj/wrap-in-src-block
 
  (global-set-key (kbd C-c w w) 'tj/wrap-in-src-block)
 
 
 
   1) pre selected language for 1 line
 
 
  e.g.
  (global-set-key (kbd C-c w y)
  (lambda ()
  (interactive)
  (tj/wrap-in-src-block shell 1)))
 
 
 
   2) pre selected language prompting for number of lines to wrap
 
 
  emacs-lisp is kind of preselected, but you could add this after
  the
  ((equal current-prefix-arg '(16)) ...) part
 
 
  ((equal current-prefix-arg '(64))
  (list
  shell
 
  (read-number Number of lines to wrap:  1)))
 
 
  and then
 
  (global-set-key (kbd C-c w z)
  (lambda ()
  (interactive)
  (let ((current-prefix-arg '(64)))
  (call-interactively
  'tj/wrap-in-src-block
 
  everything untested, unfortunately ...
  --
  cheers,
  Thorsten


 --
 cheers,
 Thorsten





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

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

 I see, thanks. I'm still getting used to the 'org-element API', but it
 seems to be much easier than I thought: just use `org-element-at-point' and
 `org-element-interpret-data' in most cases ...

Correct.

For completeness, if you're working at the local level (i.e. with
`org-element-at-point'), available accessors are

  - `org-element-type'
  - `org-element-property'

When you're working at the global level (i.e. with
`org-element-parse-buffer'), you get another accessor,
`org-element-contents', and some tools to modify the parse tree

  - `org-element-put-property'
  - `org-element-adopt-element'
  - `org-element-insert-before'
  - `org-element-extract-element'
  - `org-element-set-element'

In both cases, `org-element-interpret-data' is the only way to turn data
back into Org syntax.


Regards,

-- 
Nicolas Goaziou



Re: [O] org-ref in action

2014-08-06 Thread John Kitchin
I am not familiar with jabref, but assuming it stores the entries in a
regular bibtex format, and you have the bibtex file open in emacs, with the
cursor on the entry you want to make a heading for, you run
M-x org-ref-open-bibtex-notes.

That creates something like an org-bibtex heading in your
org-ref-bibliography-notes file, but it is probably a little different. I
haven't used org-bibtex, and I didn't try to make it exactly the same. If
you try it and tell me what is missing, I can make it be more like
org-bibtex. The format there is not critical to me.

John

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



On Wed, Aug 6, 2014 at 6:54 AM, Xebar Saram zelt...@gmail.com wrote:

 Thanks John

 No worries :) ive installed it and its working great.

 in a related question, does anyone use it with jabef?

 the reason im asking is that im very new to this and wonder about a
 possible workflow to export a bib citation from jabref to org and create an
 org header (per reference). so far it seems like org-ref will only insert
 something like
 cite:REF
 I have played around with org-bibtex and seem to remember there was a
 org-bibtex yank function that created a header in org from the bib citation
 in clipboard, can org-ref do something similar?

 sorry for the neewb questions

 z





 On Wed, Aug 6, 2014 at 12:08 AM, John Kitchin jkitc...@andrew.cmu.edu
 wrote:

 Hi, it got moved in a re-organization to
 https://github.com/jkitchin/jmax/blob/master/org/org-ref.org.

 Sorry for the inconvenience!

 Xebar Saram zelt...@gmail.com writes:

  Hi all
 
  the github link seems dead, anyone knows where one could get and try
  org-ref from?
 
  z
 
  On Mon, Jun 30, 2014 at 2:27 PM, Joseph Vidal-Rosset
  joseph.vidal.ros...@gmail.com wrote:
 
  Thanks Eric, it works now, with the latest version of org-mode.
 
  Best wishes
 
  Jo.
 
 
 
 
  2014-06-30 12:22 GMT+02:00 Eric Schulte schulte.e...@gmail.com:
 
 
 
   Thanns to the default cite action, I get for example in my
  org file:
  
   [[cite:(119–136)johansson36:_minim_formal]]
  
   and it creates no reference at al, because via the export I
  get:
  
   \cite{(119–136)johansson36:_minim_formal}
  
 
 
  Using the latest version of Org-mode from the git repository,
  this is a
  very new feature and requires usage of the git version of
  Org-mode, I am
  seeing the desired behavior. After simply requiring ox-bibtex,
  the
  following
 
  * H1
  [[cite:(119–136)johansson36:_minim_formal]]
 
  exports to
 
  \begin{document}
 
  \maketitle
  \tableofcontents
 
  \section{H1}
  \label{sec-1}~\cite[119–136]{johansson36:_minim_formal}
  % Emacs 24.4.50.2 (Org mode beta_8.3)
  \end{document}
 
  As expected.
 
  I hope this helps,
  Eric
 
 
 
  --
  Eric Schulte
  https://cs.unm.edu/~eschulte
  PGP: 0x614CA05D (see https://u.fsf.org/yw)
 
 
 
 
 

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





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

2014-08-06 Thread Nicolas Goaziou
Here goes the completeness...

Nicolas Goaziou m...@nicolasgoaziou.fr writes:

 For completeness, if you're working at the local level (i.e. with
 `org-element-at-point'), available accessors are

with `org-element-at-point' or `org-element-context'

   - `org-element-type'
   - `org-element-property'

 When you're working at the global level (i.e. with
 `org-element-parse-buffer'), you get another accessor,
 `org-element-contents',

In fact, new accessors are

  - `org-element-contents'
  - `org-element-map'

 and some tools to modify the parse tree

   - `org-element-put-property'
   - `org-element-adopt-element'
   - `org-element-insert-before'
   - `org-element-extract-element'
   - `org-element-set-element'



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

2014-08-06 Thread Nicolas Goaziou
Hello,

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

 I've noticed a problem around line 19171 of org.el.  The size of
 images is supposed to be controlled by attributes and by
 `org-image-actual-width'.  But it seems like the use of `when',
 `save-match-data' and `string-to-number' are in the wrong order in
 this region, so that `(match-string 1)' is not defined properly when
 it's evaluated.  The following instructions should allow you to
 reproduce the issue:

 Run this:
 #+BEGIN_SRC shell
 wget http://www.lisperati.com/lisplogo_warning_256.png -O lisp_warning.png
 #+END_SRC

 Then:
 [[elisp:(setq org-image-actual-width '(1200))]]
 [[elisp:(org-toggle-inline-images)]]

 #+ATTR_ORG: :width 256
 [[file:./lisp_warning.png]]

 ... and the attached patch fixed the problem for me.

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.

 +  (save-match-data
 +(when 
 +(re-search-forward
 + ^[ \t]*#\\+attr_.*?: +.*?:width 
 +\\(\\S-+\\)
 + (org-element-property
 +  :post-affiliated paragraph)
 + t)
 +  (string-to-number (match-string 1)))

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


Regards,

-- 
Nicolas Goaziou



[O] [BUG] S-tab shows sub-headlines of archived headlines when org-inlinetask is loaded

2014-08-06 Thread Francesco Pizzolante
Hi,

Under normal cirscumstances, S-tab does not show up sub-headlines of
archived headlines.

When 'org-inlinetask' is loaded, the behavior of S-tab changes and it
shows up sub-headlines of archived headlines (which is not what we
expect).

Here's an ECM in order to easily reproduce the issue:

--8---cut here---start-8---
#+TITLE: ECM S-TAB

* Problem

When org-inlinetask is loaded, S-TAB displays the sublevels of ARCHIVE'd tasks!

* Example

* DONE This task is DONE, but well archived   :ARCHIVE:

** Subpoint A (BUG IF YOU SEE ME!)

** Subpoint B (BUG IF YOU SEE ME!)

* DONE This task is DONE, but not archived

** Subpoint A

** Subpoint B
--8---cut here---end---8---

Thanks for your help.

Regards,
 Francesco



[O] MobileOrg

2014-08-06 Thread Noah Slater
Hello folks,

Does anyone know what's happening to MobileOrg? It seems like the project
was taken over by a new maintainer and then subsequently abandoned.

I'd love to use MobileOrg, but I always feel wary about starting to use new
software which likely wont receive any updates.

Thanks,

Noah


Re: [O] Can't execute the introductory code: take table as input to produce mean

2014-08-06 Thread Sebastien Vauban
jenia.ivlev wrote:
  Its the first time I use this type of mail system. I connected here
  using gmane and gnus. I;m not sure how to answer the thread Can't
  execute the introductory code: take table as input to produce mean.
  So i'll just try to answer the best way I can who means I'll answer to:
  emacs-orgmode@gnu.org.

  Thanks Sebastien. Tell me though please, how do I define R-mean(x) to
  take any x? How do I run R-mean in the following form:
  R-mean(my-table1), R-mean(my-table2)...
  Cause here, it seems that R-mean is defined with the variable x
  hard-wired to  a specific value, namely x=tbl-example-data.

Adding `:var x=something' serves 2 purposes:

- Defining the `x' parameter (to the code block)
- Setting its default value

  So again, how do I call R-mean with x=tbl-example-data2 lets say
  (without redefining R-mean)?

#+call: R-mean(x=tbl-example-data2)

Best regards,
  Seb

-- 
Sebastien Vauban




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

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

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

 I see, thanks. I'm still getting used to the 'org-element API', but it
 seems to be much easier than I thought: just use
 org-element-at-point' and
 `org-element-interpret-data' in most cases ...

 Correct.

 For completeness, if you're working at the local level (i.e. with
 `org-element-at-point'), available accessors are

   - `org-element-type'
   - `org-element-property'

 When you're working at the global level (i.e. with
 `org-element-parse-buffer'), you get another accessor,
 `org-element-contents', and some tools to modify the parse tree

   - `org-element-put-property'
   - `org-element-adopt-element'
   - `org-element-insert-before'
   - `org-element-extract-element'
   - `org-element-set-element'

 In both cases, `org-element-interpret-data' is the only way to turn data
 back into Org syntax.

That makes things much clearer, thanks.

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?

-- 
cheers,
Thorsten




Re: [O] HTML export of - [ ] does not display box anymore

2014-08-06 Thread Rick Frankel
On Wed, Aug 06, 2014 at 10:05:25AM +0200, Rainer Stengele wrote:
Am 05.08.2014 um 15:39 schrieb Rick Frankel:

I do not see the checkbox box anymore as I did in older versions.
I tried to find an export setting, tried several settings related to
todos but I cannot find a setting stopping the box to be exported.


I have these set correctly. What I get is: (I run Org-mode version 8.3beta
(release_8.3beta-167-g003edd)

You are correct. This was broken in commit c9ca0b6... ox-html: Use options
instead of hard-coded variables.

I will look into a fix later.

rick



[O] Large numbers of named variables in Babel

2014-08-06 Thread Brett Witty
Hi,

I'm trying to write my RPG adventures in org-mode and would like to bring
character sheets into that fold. Is there a way in Babel to have a vast
number of named variables that I can feed into source blocks? Are macros
the way to achieve this?

As an example, I'd like something like a big (hidden) table:
#+NAME: stats
| STR | 13 |
| DEX | 12 |
| CON | 11 |

and then later I can use that like:
#+NAME: AC
#+begin_src python :var dex=table[DEX] :var armour=table[ARMOUR]
return dex + armour
#+end_src

I know I can make explicit cell references, but it'd be neat to just use
keys for values.

Cheers,

BrettW


Re: [O] HTML export of - [ ] does not display box anymore

2014-08-06 Thread Rick Frankel
On Wed, Aug 06, 2014 at 10:05:25AM +0200, Rainer Stengele wrote:
Am 05.08.2014 um 15:39 schrieb Rick Frankel:
  On 2014-08-05 08:25, Rainer Stengele wrote:
doing an html export of
 
* headline
- [ ] checkbox
- item
 
I do not see the checkbox box anymore as I did in older versions.
I tried to find an export setting, tried several settings related to
todos but I cannot find a setting stopping the box to be exported.
 

The fix was easier than i thought. Please pull master and retry.

rick



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

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

 Nicolas Goaziou m...@nicolasgoaziou.fr writes:

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

 I see, thanks. I'm still getting used to the 'org-element API', but it
 seems to be much easier than I thought: just use
 org-element-at-point' and
 `org-element-interpret-data' in most cases ...

 Correct.

 For completeness, if you're working at the local level (i.e. with
 `org-element-at-point'), available accessors are

   - `org-element-type'
   - `org-element-property'

 When you're working at the global level (i.e. with
 `org-element-parse-buffer'), you get another accessor,
 `org-element-contents', and some tools to modify the parse tree

   - `org-element-put-property'
   - `org-element-adopt-element'
   - `org-element-insert-before'
   - `org-element-extract-element'
   - `org-element-set-element'

 In both cases, `org-element-interpret-data' is the only way to turn data
 back into Org syntax.

 That makes things much clearer, thanks.

 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?

I tried it out, works very nicely in this buffer:

* ORG SCRATCH

#+name: myPicoBlock
#+header: :var X=5
#+begin_src picolisp :results value raw :tangle no
  (+ 3 X)
#+end_src

#+results:
8

Evaluating the following src-block with C-c C-c gives an error:
 
,
| split-string: Wrong type argument: stringp, nil
`

but it can be copied to the *scratch* buffer and evaluated there.

#+begin_src emacs-lisp :results
(defun tj/try-parser-api ()
  (let (ptree)
(org-babel-map-src-blocks nil
  (when (string= lang picolisp)
(setq ptree
  (delq nil
(list (org-element-at-point) ptree)
(org-element-put-property (car ptree) :value  (* 5 X)\n)
(message %S ptree)
(mapconcat 
 'org-element-interpret-data
 ptree \n)))
#+end_src

Then interpreting works as expected:

#+begin_src emacs-lisp :results raw
(tj/try-parser-api)
#+end_src

#+results:
#+NAME: myPicoBlock
#+HEADER: :var X=5
#+BEGIN_SRC picolisp :results value raw :tangle no
   (* 5 X)
#+END_SRC

#+results: myPicoBlock
25


and I can actually use `org-element-put-property' on the car of the
local parse-tree (but need to add an \n). 

-- 
cheers,
Thorsten




Re: [O] Highlighting text for HTML mark tag export?

2014-08-06 Thread Thomas Herbert

Thanks Sebastien, unfortunately this is not that useful if you simply
want to highlight words or a sentence in a paragraph.

BTW for anyone who is interested I discovered Wrap Region 
(https://github.com/rejeep/wrap-region.el) which is pretty
useful. You can select a region, hit a key and it will pair it.

I was using this for example:

   (wrap-region-add-wrapper mark /mark m)

Unfortunately using HTML markup in an org file, org-ruby doesn't parse
these tags.

Might be an interesting feature request to to coinside with _underline_,
*bold*, etc

Sebastien Vauban sva-n...@mygooglest.com writes:

 'Mash wrote:
 Just been looking around and I have not come across a way to highlight
 text in org-mode to be HTML exported as the mark.../mark tags?

 Anyone know if this exists?

 You could use org-macros.

 Or simply:

 #+HTML: mark
 ...
 #+HTML: /mark

 Best regards,
   Seb

--
Thomas Herbert



[O] Clocksums are not computed for custom agenda views

2014-08-06 Thread Barton
Hi,

I have several custom agenda commands of this form:

(setq org-agenda-custom-commands
  '((c . Custom views)
(cw Work agenda 
 ((org-agenda-files '(
  ;; work files
  ))

Whenever I try to view these in column view, the CLOCKSUM is blank
unless I go into the specific buffer with the file and run
org-clock-sum.

On the other hand, org-clock-sum seems to happen automatically for all
agenda file buffers if the same files are added to org-agenda-files
directly and then accessed with org-agenda-list, org-agenda-columns.

What would be the correct way to automate this CLOCKSUM computation for
the files in my custom agenda views?


My org-columns-default-format is %25ITEM(Item) %5Effort(t est){:}
%5CLOCKSUM_T(t today){:} %SCHEDULED(ON) %DEADLINE(BY).

--
Barton



Re: [O] Large numbers of named variables in Babel

2014-08-06 Thread John Kitchin
Brett Witty brettwi...@brettwitty.net writes:

This is close to what you want I think.

#+TBLNAME: stats
| STR | 13 |
| DEX | 12 |
| CON | 11 |


#+BEGIN_SRC python :results value :var data=stats
d = dict(data)
return d['DEX'] + d['CON']
#+END_SRC

#+RESULTS:
: 23


 Hi,

 I'm trying to write my RPG adventures in org-mode and would like to
 bring character sheets into that fold. Is there a way in Babel to have
 a vast number of named variables that I can feed into source blocks?
 Are macros the way to achieve this?

 As an example, I'd like something like a big (hidden) table:
 #+NAME: stats
 | STR | 13 |
 | DEX | 12 |
 | CON | 11 |

 and then later I can use that like:
 #+NAME: AC
 #+begin_src python :var dex=table[DEX] :var armour=table[ARMOUR]
 return dex + armour
 #+end_src

 I know I can make explicit cell references, but it'd be neat to just
 use keys for values.

 Cheers,

 BrettW


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



[O] Creating a new contacts style for org-vcard [was: Re: ANN: org-vcard. ...]

2014-08-06 Thread Alexis

Feng Shu wrote:

 Is this tree style possible?

 #+begin-comment
 * People
 ** Joan Smith
 :PROPERTIES:
 :KIND: individual
 :FIELDTYPE: name
 :END:
 *** Cell
 :PROPERTIES:
 :FIELDTYPE: cells-folder
 :END:
   999 991
   999 992
   999 993
   999 994
   999 995
 *** Email 
 :PROPERTIES:
 :FIELDTYPE: emails-folder
 :END:
  address@hidden
  address@hidden
  address@hidden
  address@hidden
  address@hidden

 #+end-comment

Here's what i've come up with. :-)

(a) Please make sure you have the latest version of org-vcard
installed!

(b) For clarity, i've made use of the `s-repeat` function from the
`s` library; if you don't already have it installed, you can install it
from MELPA or Marmalade.

(c) Assuming you've installed org-vcard from MELPA, copy the 'tree'
folder from the elpa/org-vcard-[date]/styles/ folder to the
~/.emacs.d/org-vcard-styles/ folder; the latter should already have been
created for you automatically. Then rename:

~/.emacs.d/org-vcard-styles/tree

to

~/.emacs.d/org-vcard-styles/fengshu

(d) Open the file:

~/.emacs.d/org-vcard-styles/fengshu/functions.el

Delete its entire contents, and replace it with the text between the
BEGIN and END markers:

--- BEGIN ---
(defun org-vcard-export-from-fengshu (source destination)
  Export fengshu-style SOURCE to vCard format, sending output
to DESTINATION.

SOURCE must be \buffer\, \region\ or \subtree\.
DESTINATION must be either \buffer\ or \file\.
  (let* ((in-contact-entry nil)
 (fengshu-style-properties
  (or (cadr (assoc org-vcard-active-version
   (cadr (assoc org-vcard-active-language
(cadr (assoc fengshu 
org-vcard-styles-languages-mappings))
  (error No mapping available for specified vCard version)))
 (encoding (cond
((string= 4.0 org-vcard-active-version) 'utf-8)
((string= 3.0 org-vcard-active-version) 'utf-8)
((string= 2.1 org-vcard-active-version) 'us-ascii)))
 (output (encode-coding-string  encoding)))
(if (not (member source '(buffer region subtree)))
(error Invalid source type))
(save-excursion
  (let ((search-result nil))
(cond
 ((string= region source)
  (narrow-to-region (region-beginning) (region-end)))
 ((string= subtree source)
  (org-narrow-to-subtree)))
(goto-char (point-min))
(setq case-fold-search t)
(while (re-search-forward \\s *:FIELDTYPE:\\s *name nil t)
  (let ((content (concat (org-vcard-export-line BEGIN:VCARD  t)
 (org-vcard-export-line VERSION 
org-vcard-active-version)))
(end-vcard nil))
(setq content (concat content
  (org-vcard-export-line FN (org-get-heading 
t t
(if (or (string= 3.0 org-vcard-active-version)
   (string= 2.1 org-vcard-active-version))
(setq content (concat content
  (org-vcard-export-line N 
(while (and (setq search-result (re-search-forward \\s 
*:FIELDTYPE:\\s *\\(\\(?:\\w\\|-\\)+\\) nil t))
  (not end-vcard))
  (let ((fieldtype (match-string 1)))
(if (not (string= name (downcase fieldtype)))
;; BEGIN main changes
(if (or (string= cell (downcase fieldtype))
   (string= email (downcase fieldtype)))
(let ((done nil)
  (heading-levels (let ((l nil)
(n (1+ 
(org-current-level
(while ( n 0)
  (setq l (append l 
`(,(s-repeat n \\*
  (setq n (1- n)))
l)))
  (while (and (not done)
  (re-search-forward (concat (nth 0 
heading-levels)  +\\([^\n]+\\)\n) nil t))
(setq content (concat content
  (org-vcard-export-line
   (cdr (assoc (downcase 
fieldtype) fengshu-style-properties))
   (match-string 1
(dolist (level (cdr heading-levels))
  (if (or (looking-at (concat level  +))
 (looking-at ^ +$)
 (looking-at ^$))
  (setq done t)
  ;; END main changes
  (setq content (concat content
(org-vcard-export-line

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

2014-08-06 Thread Charles C. Berry

On Tue, 5 Aug 2014, Aaron Ecay wrote:


Hi Chuck,

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

[...]




Here is the docstring from ESS's inferior-S-prompt:

inferior-S-prompt is a variable defined in `ess-custom.el'.
Its value is []a-zA-Z0-9.[]*\\([+.] \\)* 

[snip]




Note that there is a space *required* after the [+.], but the hard coded
regex in `org-babel-R-evaluate-session' lets the space be optional.

I am guessing the a-zA-Z stuff is there to strip 'Browse[1] ' prompts and
such, which probably isn't an issue for babel.


Why doesn’t org just use the value of inferior-S-prompt?  (which would
then need to have the bit concatenated to the end that matches
e.g. [1]).  Another way of putting this might be “does the space that
ESS requires ever turn up missing?”


I don't really know why.

Re the space, do the characters preceeding the [+.] ever show up 
in Babel output?






Just before the defcustom for inferior-S-prompt, I see this comment
in ess-custom.el:

;; need to recognise  + + +   
;; and + . +  in tracebug prompt

Ha! The '.' seems to be for ess-tracebug. I am guessing that nobody will
need to output tracebug sessions from babel. So maybe it is safe to delete
the . after all - or at least require the space after it.


Tracebug is on by default in ESS – C-h v ess-use-tracebug.  Tracebug
even has babel support: see e.g. line 148 in ess.tracebug.el
https://github.com/emacs-ess/ESS/blob/4283f1304a54502c42707b6a4ba347703f0992dd/lisp/ess-tracebug.el#L148.



When I said 'output tracebug sessions' I meant in the sense of using 
`:results output' to save the part of the session pertaining to tracebug 
in the *.org buffer, which seemed like an unusual use case.





Maybe the regex should be put in a defcustom.


Why?


options(prompt=$ ) # for example

Plus, if anything like the case that started this thread ever happens 
again it might be easier to figure out and offer workarounds for special 
cases that would be hazardous as a default setting.



The current mismatch between babel and ESS seems like a bug, but
once that’s fixed I don’t see the use case for configurability here.
(But maybe you have something in mind...)


It looks like the babel regex was copied and intentionally modified for 
some reason --- suggesting the author knows something we do not, e.g. a 
case that would be broken by using `inferior-S-prompt'.


I don't have a handle on all the issues in `comint-use-prompt-regexp' and 
all the `inferior-*-prompt' variables, but those are customizable.


If the mismatch is a bug, why not use 'inferior-S-prompt' as the default 
and allow customization or at least use  `(defvar org-babel-R-prompt 
inferior-S-prompt)'?


HTH,

Chuck


Re: [O] MobileOrg

2014-08-06 Thread Subhan Michael Tindall
I wish I did.
I’ve tried using it on my Android phone. It appears pretty stable, but the 
documentation is limited and woefully out of date.
There’s also a few areas I’d like to do or see some enhancements on the mobile 
end, for example handling display or edit of properties is very limited, time 
stamp defaults should maybe be set to current time instead of 00:00, etc.
It feels like about 85% of a really good app right now, and I’d love to see it 
get to 95 or 100%, but as it is now it’s mostly useful as a display option 
rather than for capturing anything other than simple data.
I’m not an Android/mobile programmer or I’d try making some modifications 
myself.
Subhan


From: emacs-orgmode-bounces+subhant=familycareinc@gnu.org 
[mailto:emacs-orgmode-bounces+subhant=familycareinc@gnu.org] On Behalf Of 
Noah Slater
Sent: Wednesday, August 06, 2014 7:08 AM
To: emacs-orgmode@gnu.org
Subject: [O] MobileOrg

Hello folks,

Does anyone know what's happening to MobileOrg? It seems like the project was 
taken over by a new maintainer and then subsequently abandoned.

I'd love to use MobileOrg, but I always feel wary about starting to use new 
software which likely wont receive any updates.

Thanks,

Noah


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] ANN: org-vcard. Export/import vCards. Backwards-compatible with org-contacts.el.

2014-08-06 Thread Eric Abrahamsen
Alexis flexibe...@gmail.com writes:

 Gour writes:

 what do you think about BBDB-v3? Many people like it, but I must admit
 I haven't take closer look at it?

 i haven't tried using BBDB-v3, only BBDB-v2, several years ago. i found
 the latter, hm, 'clunky'. (Similar to how, until the advent of mu4e, i
 found no Emacs-based MUA with maildir support which i found as usable as
 Mutt.) And iirc, part of the problem might have been lack of (full)
 support for Australian phone numbers and/or postcodes, which at the time
 i really didn't want to wrestle with.

 In any case, org-contacts.el has nowwhetted my appetite for an Org-based
 contacts solution - given the slogan Your life in plain text, contacts
 management certainly seems to me to fall within Org's remit. :-)

 However, I wonder whether it's flexible enough to define one's own
 properties of format of one's contact data and what about syncing?

 i've just had a quick scan through the BBDB-v3 source, and
 superficially, it looks like the properties are hard-coded.

If by properties you mean arbitrary key-value data, BBDB does indeed
support that -- properties are known as fields, and xfields are
user-designated fields. Labels and values can be arbitrarily designated
by the user, and with a bit of coding you can format them in unusual
ways, or have them do things.

 Regarding syncing, the BBDB page on SourceForge suggests that existing
 support for this might be rather limited - i only see mention of
 PalmPilot syncing. i would certainly be interested to know if anyone's
 created CardDAV support for BBDB - given that Google Contacts can be
 accessed via CardDAV, and given (what i imagine to be) the large number
 of people syncing their Android phone's contacts with Google Contacts,
 such support might well be in demand!

 I wish you all the best hoping org-mode users will find decent solution
 for handling contacts soon.

 Thank you! i'm hoping my ongoing work with org-vcard might eventually
 contribute towards this. :-)


 Alexis.




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

2014-08-06 Thread Alexis

Eric Abrahamsen writes:

 If by properties you mean arbitrary key-value data, BBDB does indeed
 support that -- properties are known as fields, and xfields are
 user-designated fields. Labels and values can be arbitrarily
 designated by the user, and with a bit of coding you can format them
 in unusual ways, or have them do things.

Ah okay - thanks for clearing that up!


Alexis.



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

2014-08-06 Thread Eric Abrahamsen
Alexis flexibe...@gmail.com writes:

 Eric Abrahamsen writes:

 If by properties you mean arbitrary key-value data, BBDB does indeed
 support that -- properties are known as fields, and xfields are
 user-designated fields. Labels and values can be arbitrarily
 designated by the user, and with a bit of coding you can format them
 in unusual ways, or have them do things.

 Ah okay - thanks for clearing that up!

Not that it really changes the discussion :) But I do feel the need to
stick up for BBDB...




Re: [O] MobileOrg

2014-08-06 Thread Alexis

Subhan Michael Tindall writes:

 There’s also a few areas I’d like to do or see some enhancements on
 the mobile end, for example handling display or edit of properties is
 very limited

*nod* i started to address this issue with this pull request:

https://github.com/matburt/mobileorg-android/pull/434

which got merged  But given the lack of commits and releases more
generally, i've been reticent to work on this further.


Alexis.



Re: [O] Org equivalent to \chapter*

2014-08-06 Thread Thomas S. Dye
Aloha Rasmus,

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?  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.

From the LaTeX authorʻs point of view, it would be great to have a set
of tags (and options) that just work.  Do you (and others) think the
tag and filter approach can achieve this?  Or, are there too many
moving parts to make it feasible?

All the best,
Tom

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



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

2014-08-06 Thread Charles Philip Chan
On 6 Aug 2014, flexibe...@gmail.com wrote:

 i haven't tried using BBDB-v3, only BBDB-v2, several years ago. i
 found the latter, hm, 'clunky'. (Similar to how, until the advent of
 mu4e, i found no Emacs-based MUA with maildir support which i found as
 usable as Mutt.)

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

 And iirc, part of the problem might have been lack of (full) support
 for Australian phone numbers and/or postcodes, which at the time i
 really didn't want to wrestle with.

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:

,[ bbdb-phone-style ]
| bbdb-phone-style is a variable defined in `bbdb.el'.
| Its value is nanp
| 
| Documentation:
| Phone numbering plan assumed by BBDB.
| The value 'nanp refers to the North American Numbering Plan.
| The value nil refers to a free-style numbering plan.
| 
| You can have both styles of phone number in your database by providing a
| prefix argument to the command `bbdb-insert-field'.
`

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

,[ bbdb-legal-postcodes ]
| bbdb-legal-postcodes is a variable defined in `bbdb.el'.
| Its value is
| (^$ ^[ \n]*[0-9][0-9]?[0-9]?[0-9]?[0-9]?[0-9]?[\n]*$ ^[  
\n]*\\([0-9][0-9][0-9][0-9][0-9]\\)[\n]*-?[ 
\n]*\\([0-9][0-9][0-9][0-9]?\\)[\n]*$ ^[  \n]*\\([A-Za-z0-9]+\\)[ 
\n]+\\([A-Za-z0-9]+\\)[ \n]*$ ^[  \n]*\\([A-Z]+\\)[   
\n]*-?[ \n]*\\([0-9]+ ?[A-Z]*\\)[   \n]*$ ^[  
\n]*\\([A-Z]+\\)[   \n]*-?[ \n]*\\([0-9]+\\)[   
\n]+\\([0-9]+\\)[   \n]*$)
| 
| 
| Documentation:
| List of regexps that match legal postcodes.
| Whether this is used at all depends on the variable `bbdb-check-postcode'.
`

Charles

-- 
I did this 'cause Linux gives me a woody.  It doesn't generate revenue.
(Dave '-ddt-` Taylor, announcing DOOM for Linux)


signature.asc
Description: PGP signature


Re: [O] Org equivalent to \chapter*

2014-08-06 Thread Rasmus
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.

—Rasmus

-- 
If you can mix business and politics wonderful things can happen!



Re: [O] Cannot build documentation (release_8.3beta-155-g82b64d)

2014-08-06 Thread Achim Gratz
Vicente Vera writes:
 Yes, i had an old makeinfo (4.13) that lives in the debian wheezy
 repository. Just now got the latest version and it worked. Didn't
 thought about this since some commits ago the documentation was built
 just fine with makeinfo 4.13.

Glad you've solved it, but makeinfo 4.13 should work just fine (I'm
using it).  So there must still be something else wrong with that
makeinfo.


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

Factory and User Sound Singles for Waldorf rackAttack:
http://Synth.Stromeko.net/Downloads.html#WaldorfSounds




Re: [O] exporting quotes

2014-08-06 Thread Achim Gratz
Salome Södergran\ writes:
 Indeed! I find an older org-version (7.x) in /usr/share/emacs. I have
 now changed the order in the load-path-list to load the local
 installations first.

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.
-- 
+[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]+

Wavetables for the Terratec KOMPLEXER:
http://Synth.Stromeko.net/Downloads.html#KomplexerWaves




Re: [O] MobileOrg

2014-08-06 Thread Xebar Saram
Shame

ive been using it for the past few months (took me a loong time to setup as
the documentation is really hard to follow). i really would love to see
mobile org developed as having my orgmode data on the go is really crucial

best

Z


On Wed, Aug 6, 2014 at 7:33 PM, Alexis flexibe...@gmail.com wrote:


 Subhan Michael Tindall writes:

  There’s also a few areas I’d like to do or see some enhancements on
  the mobile end, for example handling display or edit of properties is
  very limited

 *nod* i started to address this issue with this pull request:

 https://github.com/matburt/mobileorg-android/pull/434

 which got merged  But given the lack of commits and releases more
 generally, i've been reticent to work on this further.


 Alexis.




Re: [O] HTML export of - [ ] does not display box anymore = solved

2014-08-06 Thread Rainer Stengele
Am 06.08.2014 um 16:28 schrieb Rick Frankel:
 On Wed, Aug 06, 2014 at 10:05:25AM +0200, Rainer Stengele wrote:
Am 05.08.2014 um 15:39 schrieb Rick Frankel:
  On 2014-08-05 08:25, Rainer Stengele wrote:
doing an html export of

* headline
- [ ] checkbox
- item

I do not see the checkbox box anymore as I did in older versions.
I tried to find an export setting, tried several settings related to
todos but I cannot find a setting stopping the box to be exported.

 The fix was easier than i thought. Please pull master and retry.

 rick
Perfect, that brings it back.
Thanks a lot!
Rainer



Re: [O] Org equivalent to \chapter*

2014-08-06 Thread Thomas S. Dye
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

-- 
T.S. Dye  Colleagues, Archaeologists
735 Bishop St, Suite 315, Honolulu, HI 96813
Tel: 808-529-0866, Fax: 808-529-0884
http://www.tsdye.com



Re: [O] eliminate creation of backup files in :publishing-directory

2014-08-06 Thread regcl
 regcl re...@channing.harvard.edu writes:

 Is there a way to stop org mode from creating backup files in the
 :publishing-directory?

 What are backup files exactly?

e.g., the second time you run org-html-export-to-html or
org-html-publish-to-html on README.org you get README.html -plus-
README.html~. I would like to not produce README.html~. I believe there
is a global emacs setting, but I would prefer to disable only those
backups produced by org-html-export-to-html, etc.

Thanks,
regcl


 There is `org-publish-after-publishing-hook' which may help cleaning
 up stuff if needed.



Re: [O] :exclude sub folder in org-publish

2014-08-06 Thread regcl
Bastien b...@gnu.org writes:

 Hi,

 regcl re...@channing.harvard.edu writes:

 I could not figure out how to do this from INFO. I found examples of
 preventing publishing of specific file extensions, but not whole
 directories.

 Unless my memory fails me, :exclude works on names, not just on
 extensions.  So maybe using both :recursive and :exclude can lead
 to what you want.

Yes that matches my understanding and experience. But I could not figure
out how to, for example in this tree ...

~/A
.
+--proj
|  +--.git
|  +--README.org
|  |  +--Manuscript
|  |  |  +--.git
|  |  |  +--README.org
|  |  |  +--drafts
|  |  |  +--GenomicsData
|  |  |  |  +--.git
|  |  |  |  +--README.org

... publish the README's above GenomicsData, but not in GenomicsData.

But maybe this is asking too much of org-mode publish. 

FWIW, I ended up using a recursive sub- make harness with something like
this in the Makefile ...

.PHONY: html
html: README.html

# export org file to html
%.html: %.org
emacs --batch --load=~/.emacs $*.org --eval='(org-html-export-to-html)'


Best,
George




Re: [O] Org equivalent to \chapter*

2014-08-06 Thread Alan L Tyree


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.


It would be nice to have a single tag that gives the \section*{} 
equivalent for all exports, but I can see that there is some difficulty 
with that. Thanks Rasmus for the LaTeX filter -- I'll have a look at 
adapting it for the HTML.


As Thomas mentioned, having selectively unnumbered sections is pretty 
important for book authors.


Thanks again,
Alan

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




[O] Two potentially useful functions for org-element

2014-08-06 Thread Thorsten Jolitz

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

#+results:
: tj/create-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.
  (let* ((elem (org-element-at-point))
 (plist (cadr elem))
 (beg (org-element-property :begin elem))
 (end (org-element-property :end elem))
 strg)
(while args
  (setq plist (plist-put plist (pop args) (pop args
(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)
   (save-excursion (insert strg)))
   strg)
#+end_src

#+results:
: tj/rewire-element

Here are a few usage examples:

#+begin_src emacs-lisp
  (tj/create-element nil
 :type 'src-block
 :language emacs-lisp
 :value (+ 2 2)\n
 :parameters :results raw
 :name myblock
 :header '(:var x=5))
#+end_src

#+results:
: #+NAME: myblock
: #+HEADER: :var x=5
: #+BEGIN_SRC emacs-lisp :results raw
:   (+ 2 2)
: #+END_SRC

#+begin_src emacs-lisp :wrap org
  (tj/create-element nil
 :type 'headline
 :level 2
 :todo-keyword DONE
 :priority 66
 :title Hello World
 :tags '(tag1 tag2))
#+end_src

#+results:
#+BEGIN_org
,** DONE [#B] Hello World :tag1:tag2:
#+END_org

Now eval next src-block


#+begin_src emacs-lisp
  (defun test-fun ()
(tj/rewire-element 'append
   :parameters :results table :exports both
   :name (format random-block-%d (1+ (random 11)))
   :header '(:var x=5)
   :value (format %s\n%s\n '(+ 2 2) '(* 3 x
#+end_src

#+results:
: test-fun

and then, with point at beginning of following src-block, eval 'M-: (test-fun)'

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


#+NAME: random-block-6
#+HEADER: :var x=5
#+BEGIN_SRC emacs-lisp :results table :exports both
  (+ 2 2)
  (* 3 x)
#+END_SRC


-- 
cheers,
Thorsten




Re: [O] MobileOrg documentation?

2014-08-06 Thread John Hendy
Did you look at the docs?
- https://github.com/matburt/mobileorg-android/wiki/Documentation

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)?


John

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?
 --
 David Masterson
 Programmer At Large





[O] More detail in the agenda logbook?

2014-08-06 Thread hymie!
Hi again.

So I've got a few repetitive tasks, for example

* TODO machine backups
** TODO machine 1
*** TODO create backup
*** TODO copy backup to DVD
** TODO machine 2
*** TODO create backup
*** TODO copy backup to DVD
** TODO machine 3
*** TODO create backup
*** TODO copy backup to DVD
** TODO machine 4
*** TODO create backup
*** TODO copy backup to DVD

It's the same set of tasks for each machine.

When I complete these tasks and look at the Agenda Logbook, I see
this:

  State: (DONE) DONE create backup
  State: (DONE) DONE create backup
  State: (DONE) DONE create backup
  State: (DONE) DONE create backup
  State: (DONE) DONE copy backup to DVD
  State: (DONE) DONE copy backup to DVD
  State: (DONE) DONE copy backup to DVD
  State: (DONE) DONE copy backup to DVD

I'd really like to see something along the lines of
  State: (DONE) DONE machine backups / machine 1 / create backup
  State: (DONE) DONE machine backups / machine 2 / create backup
  State: (DONE) DONE machine backups / machine 3 / create backup
  State: (DONE) DONE machine backups / machine 4 / create backup

or

  State: (DONE) DONE machine backups 
 machine 1 
 create backup
  State: (DONE) DONE machine backups 
 machine 2 
 create backup
  State: (DONE) DONE machine backups 
 machine 3 
 create backup
  State: (DONE) DONE machine backups 
 machine 4 
 create backup

Is this possible?

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