Re: [O] #attr_latex :width \textwidth

2013-04-14 Thread Vikas Rawal
 
  #+attr_latex: :environment tabulary :width \textwidth :align L|RR
 
 For the record, for simple :align strings, you can also use Org
 syntax:
 
  | / || | | | | | |
  |   | l | r | r | r | r | r | r |
  |   | a   |   b |   c |   d |   e |   f |   g |
 
 It is more intrusive, but it will (should) work in all back-ends.
 

tabulary allows me to use L and R where the column contents are nicely
wrapped. I do not know if this would work with align strings in the
table. 

Also, my tables are created by babel source code blocks. I would have
to hack that code to insert additional rows in the table. Am not sure
if that is a good idea.

Vikas



Re: [O] phone links...

2013-04-14 Thread Feng Shu

[update diff] make output format more beautiful

From 500694de70f14095acc765875182d65feab7ef85 Mon Sep 17 00:00:00 2001
From: Feng Shu tuma...@gmail.com
Date: Sat, 13 Apr 2013 22:00:03 +0800
Subject: [PATCH] org-contacts.el, export contacts to outline-format

* contrib/lisp/org-contacts.el (org-contacts-outline-file): new
  variable
(org-contacts-outline-format): new function which formats a contact to
outline-format
(org-contacts-export-as-outline-format): new function, formats all
contacts to outline-format

* NAME
 :PROPERTIES:
 :EMAIL: n...@n.com n...@n.com
 :PHONE: 123456789
 :END:

export as:

* NAME
** EMAIL: [[mailto:n...@n.com]]
** EMAIL: [[mailto:n...@n.com]]
** PHONE: [[tel:123456789]]
** PHONE: [[tel:123456789]]
---
 contrib/lisp/org-contacts.el |   72 ++
 1 个文件被修改,插入 72 行(+)

diff --git a/contrib/lisp/org-contacts.el b/contrib/lisp/org-contacts.el
index a3c4aed..c65ebf0 100644
--- a/contrib/lisp/org-contacts.el
+++ b/contrib/lisp/org-contacts.el
@@ -156,6 +156,12 @@ This overrides `org-email-link-description-format' if set.
   :group 'org-contacts
   :type 'file)
 
+(defcustom org-contacts-outline-file contacts-outline.org
+  Default file for outline-format export.
+  :group 'org-contacts
+  :type 'file)
+
+
 (defcustom org-contacts-enable-completion t
   Enable or not the completion in `message-mode' with `org-contacts'.
   :group 'org-contacts
@@ -896,6 +902,72 @@ is created and the VCard is written into that buffer.
 	(current-buffer)
   (progn (save-buffer) (kill-buffer)
 
+(defun org-contacts-outline-format (contact)
+  Formats CONTACT in outline format.
+  (let* ((properties (caddr contact))
+	 (name (org-contacts-vcard-escape (car contact)))
+	 (n (org-contacts-vcard-encode-name name))
+	 (email (cdr (assoc-string org-contacts-email-property properties)))
+	 (alias (cdr (assoc-string org-contacts-alias-property properties)))
+	 (tel  (cdr (assoc-string org-contacts-tel-property properties)))
+	 (note (cdr (assoc-string org-contacts-note-property properties)))
+	 (bday (org-contacts-vcard-escape (cdr (assoc-string org-contacts-birthday-property properties
+	 (addr (cdr (assoc-string org-contacts-address-property properties)))
+	 (nick (org-contacts-vcard-escape (cdr (assoc-string org-contacts-nickname-property properties
+	 (head (format * %s\n name)))
+(concat head
+	(when alias
+	  (format ** ALIAS:   %s\n alias))
+	(when email (progn
+			  (setq emails-list (split-string email [,;: ]+))
+			  (setq result )
+			  (while emails-list
+			(setq result (concat result  ** EMAIL:(concat [[mailto: (car emails-list) ]]) \n))
+			(setq emails-list (cdr emails-list)))
+			  result))
+	(when addr
+	  (format ** ADRESS:   (replace-regexp-in-string \\, ? ; addr)))
+	(when tel (progn
+			(setq phones-list (split-string tel [,;: ]+))
+			(setq result )
+			(while phones-list
+			  (setq result (concat result  ** TEL:  (concat [[tel: (car phones-list) ]] ) \n))
+			  (setq phones-list (cdr phones-list)))
+			result))
+	(when bday
+	  (let ((cal-bday (calendar-gregorian-from-absolute (org-time-string-to-absolute bday
+		(format ** BDAY:%04d-%02d-%02d\n
+			(calendar-extract-year cal-bday)
+			(calendar-extract-month cal-bday)
+			(calendar-extract-day cal-bday
+	(when nick (format ** NICKNAME: %s\n nick))
+	(when note (format ** NOTE:%s\n note)
+
+
+
+(defun org-contacts-export-as-outline-format (optional name file to-buffer)
+  Export all contacts matching NAME as outline format
+If TO-BUFFER is nil, the content is written to FILE or
+`org-contacts-outline-file'.  If TO-BUFFER is non-nil, the buffer
+is created and the outlines is written into that buffer.
+  (interactive) ; TODO ask for name?
+  (let* ((filename (or file org-contacts-outline-file))
+	 (buffer (if to-buffer
+		 (get-buffer-create to-buffer)
+		   (find-file-noselect filename
+(message Exporting...)
+(set-buffer buffer)
+(let ((inhibit-read-only t)) (erase-buffer))
+(fundamental-mode)
+(when (fboundp 'set-buffer-file-coding-system)
+  (set-buffer-file-coding-system coding-system-for-write))
+(loop for contact in (org-contacts-filter name)
+	  do (insert (org-contacts-outline-format contact)))
+(if to-buffer
+	(current-buffer)
+  (progn (save-buffer) (kill-buffer)
+
+
 (defun org-contacts-show-map (optional name)
   Show contacts on a map.
 Requires google-maps-el.
-- 
1.7.10.4



-- 


Re: [O] Fix info manual compilation

2013-04-14 Thread Nicolas Goaziou
Hello,

Suvayu Ali fatkasuvayu+li...@gmail.com writes:

 On Sat, Apr 13, 2013 at 10:42:12PM +0200, Nicolas Goaziou wrote:
 Hello,
 
 Suvayu Ali fatkasuvayu+li...@gmail.com writes:
 
  The info manual does not compile because of a wrong next node entry in
  org.texi.  A fix is attached.
 
 Thank you for the patch.
 
 You need to add TINYCHANGE at the end of the commit message before I can
 apply it.

 I actually signed the FSF papers quite a while back; just forgot to
 mention it on the list :-p.

I have applied the patch. Thanks again.

I admit I was surprised not to see you in the list of contributors who
have signed FSF papers.

 My assignment number is: RT704245. In the form I had mentioned
 I submitted changes to doc/org.texi so this patch should be covered.
 Do I need to send a copy of the assignment to the list? I have a scan
 of the assignment.

Bastien (Cc'ed) will tell you if he needs the scan.


Regards,

-- 
Nicolas Goaziou



Re: [O] having problems exporting to Beamer

2013-04-14 Thread Nicolas Goaziou
Hello,

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

 When I attempt to export a .org file to Beamer (with C-c C-e l b after
 requiring ox-beamer) I get the following error [1].  From the info page
 (info (org)Beamer export) it looks like I shouldn't have to do any
 special buffer preparation.

 What am I doing wrong?

It looks like `org-beamer-outline-frame-options' is nil, but it must be
a string (possibly empty).


Regards,

-- 
Nicolas Goaziou



Re: [O] Tables for attendance lists - A problem understanding TBLFM?

2013-04-14 Thread Michael Brand
Hi Bastien

On Tue, Apr 9, 2013 at 7:06 PM, Bastien b...@gnu.org wrote:
 It is worth a small compatibility change: For a range with only empty
 fields it is now possible and necessary to choose different behaviors
 of vmean by adding the format specifiers E and/or N.

 I'll add this in the release notes.

The wording of my paragraph quoted above is unfortunate, sorry. It is
more that I made fail what is the same as a division by 0 instead of
silently using 0 as the result for 0/0. Now one is forced to think
about the mean value of an empty vector/list (it is not defined) and
has to check for empty vector/list or consider EN, all explained with
examples for Calc vmean in the manual now. I don't think such a detail
is worth mentioning in the release notes.

But in the release notes I would generally, not particularly because
of the above, write:

If empty fields are of interest it is recommended to reread the
section 3.5.2 Formula syntax for Calc of the manual because the
description for the mode strings has been clarified and new examples
have been added towards the end.

 Maybe you could add a footnote in the manual for this?

Do the attached patches clarify what you had in mind?

And to repeat myself: I see the directory testing as part of the
doc, in this case `test-org-table/empty-field'. ;-)

Michael
From 55abfd1374b0741a23dab6ca16d88756d46a4c6c Mon Sep 17 00:00:00 2001
From: Michael Brand michael.ch.br...@gmail.com
Date: Sun, 14 Apr 2013 10:02:32 +0200
Subject: [PATCH 1/2] org.texi: Reformat some description lists

* doc/org.texi (Formula syntax for Calc, Emacs Lisp forms as
formulas): Reformat spreadsheet formula mode strings and some examples
from @example block with xy @r{yz} to @table.
---
 doc/org.texi |   67 +++--
 1 files changed, 36 insertions(+), 31 deletions(-)

diff --git a/doc/org.texi b/doc/org.texi
index c65bdc1..c9b1f5b 100644
--- a/doc/org.texi
+++ b/doc/org.texi
@@ -2652,23 +2652,28 @@ format, however, has been changed to @code{(float 8)} 
to keep tables
 compact.  The default settings can be configured using the variable
 @code{org-calc-default-modes}.
 
-@example
-p20   @r{set the internal Calc calculation precision to 20 digits}
-n3 s3 e2 f4   @r{Normal, scientific, engineering, or fixed}
-  @r{format of the result of Calc passed back to Org.}
-  @r{Calc formatting is unlimited in precision as}
-  @r{long as the Calc calculation precision is greater.}
-D R   @r{angle modes: degrees, radians}
-F S   @r{fraction and symbolic modes}
-E @r{keep empty fields in ranges and use nan (not a number)}
-  @r{in Calc formulas for empty fields in range references and}
-  @r{for empty field references; else suppress empty fields in}
-  @r{range references and use 0 for empty field references, see}
-  @r{also the notes for `Range references' in @pxref{References}}
-N @r{interpret all fields as numbers, use 0 for non-numbers;}
-  @r{N has higher precedence than E (for the value of the field)}
-L @r{literal, for Lisp formulas only}
-@end example
+@table @asis
+@item @code{p20}
+Set the internal Calc calculation precision to 20 digits.
+@item @code{n3}, @code{s3}, @code{e2}, @code{f4}
+Normal, scientific, engineering or fixed format of the result of Calc passed
+back to Org.  Calc formatting is unlimited in precision as long as the Calc
+calculation precision is greater.
+@item @code{D}, @code{R}
+Angle modes: Degree, radian.
+@item @code{F}, @code{S}
+Fraction and symbolic modes.
+@item @code{E}
+Keep empty fields in ranges and use nan (not a number) in Calc formulas for
+empty fields in range references and for empty field references.  Else
+suppress empty fields in range references and use 0 for empty field
+references, see also the notes for `Range references' in @pxref{References}.
+@item @code{N}
+Interpret all fields as numbers, use 0 for non-numbers.  @code{N} has higher
+precedence than @code{E} (for the value of the field).
+@item @code{L}
+Literal, for Lisp formulas only.
+@end table
 
 @noindent
 Unless you use large integer numbers or high-precision-calculation
@@ -2698,12 +2703,12 @@ taylor($3,x=7,2) @r{Taylor series of $3, at x=7, 
second degree}
 
 Calc also contains a complete set of logical operations.  For example
 
-@example
-if($1  20, teen, string())
- @r{teen if age $1 is less than 20, else empty}
-if($1 = nan || $2 = nan, string(), $1 + $2); E
- @r{sum of first two columns unless one or both empty}
-@end example
+@table @code
+@item if($1  20, teen, string())
+teen if age $1 is less than 20, else empty.
+@item if($1 = nan || $2 = nan, string(), $1 + $2); E
+Sum of first two columns unless one or both empty.
+@end table
 
 Note that you can also use two org-specific flags @code{T} and @code{t} for
 durations computations 

[O] sequence of tangles

2013-04-14 Thread Johan Sandblom
Hi, all. I have a problem, most likely due to ignorance. For a project 
I am construction a web page as a single page. This page contains html, 
php, css and javascript. I have collected the project in an org file, 
with source code chunks in the various languages. So I have


#+BEGIN_SRC nxml :tangle file.php
!!DOCTYPE html
!-- header and stuff --
#+END_SRC

#+BEGIN_SRC css :tangle file.php
/* inline CSS */
#+END_SRC

#+BEGIN_SRC javascript :tangle file.php
// javascript
#+END_SRC

#+BEGIN_SRC nxml :tangle file.php
!-- more html --
#+END_SRC

#+BEGIN_SRC php :tangle file.php
#+END_SRC

#+BEGIN_SRC nxml :tangle file.php
!-- even more html --
#+END_SRC

However, tangling this apparently first sorts the chunks according to 
mode, so the resulting file first contains all the html, then the css, 
javascript and php in order


html
more html
even more html
css
js
php

resulting in an unusable file. I am sure I am overlooking something 
simple but I am unable to find it.


Johan

--
Johan Sandblom, MD PhD
m +46735521477
What is wanted is not the will to believe, but the
will to find out, which is the exact opposite
--Bertrand Russell



[O] Exploring org-element.el with navi-mode (was: Navi-mode in action)

2013-04-14 Thread Thorsten Jolitz
Thorsten Jolitz tjol...@gmail.com writes:

Hi List, 

its now possible to use the new libraries for 'Org-mode outside
Org-mode' (outshine, outorg, pop-org, navi-mode) on Emacs Lisp files
that use the official header conventions (;;;+ ). 

Here is a 4 min screencast demonstrating this, using the well-structured
'org-element.el' as example file:

,---
| http://www.youtube.com/watch?v=I0hxTAAlGZQ
`---

-- 
cheers,
Thorsten




Re: [O] Fix info manual compilation

2013-04-14 Thread Suvayu Ali
On Sun, Apr 14, 2013 at 09:41:53AM +0200, Nicolas Goaziou wrote:
 Hello,
 
 Suvayu Ali fatkasuvayu+li...@gmail.com writes:
 
  On Sat, Apr 13, 2013 at 10:42:12PM +0200, Nicolas Goaziou wrote:
  Hello,
  
  Suvayu Ali fatkasuvayu+li...@gmail.com writes:
  
   The info manual does not compile because of a wrong next node entry in
   org.texi.  A fix is attached.
  
  Thank you for the patch.
  
  You need to add TINYCHANGE at the end of the commit message before I can
  apply it.
 
  I actually signed the FSF papers quite a while back; just forgot to
  mention it on the list :-p.
 
 I have applied the patch. Thanks again.
 
 I admit I was surprised not to see you in the list of contributors who
 have signed FSF papers.
 
  My assignment number is: RT704245. In the form I had mentioned
  I submitted changes to doc/org.texi so this patch should be covered.
  Do I need to send a copy of the assignment to the list? I have a scan
  of the assignment.
 
 Bastien (Cc'ed) will tell you if he needs the scan.

Thanks!

-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] C-o now mapped to org-ctrl-o surprise

2013-04-14 Thread Bastien
Hi Sean,

Sean O'Halpin sean.ohal...@gmail.com writes:

 I was quite surprised after pulling down master to find that C-o has
 been bound to org-ctrl-o (commit 45d6d8f8 2013-04-05 11:14:20 +0200).

 I personally don't use open-line much myself so remap this key for my own use.

 Wouldn't it be better to do something like:

 (define-key org-mode-map [remap open-line] 'org-ctrl-o)

 and let the user choose which key does open-line rather than create a
 new keybinding which might override a user definition? Also, perhaps
 the function should be called org-open-line rather than org-ctrl-o.

Indeed.  I renamed the command and used remap as you suggest.

-- 
 Bastien



Re: [O] Fix info manual compilation

2013-04-14 Thread Bastien
Hi Suvayu,

Suvayu Ali fatkasuvayu+li...@gmail.com writes:

 I actually signed the FSF papers quite a while back; just forgot to
 mention it on the list :-p.  My assignment number is: RT704245.  In the
 form I had mentioned I submitted changes to doc/org.texi so this patch
 should be covered.  Do I need to send a copy of the assignment to the
 list?  I have a scan of the assignment.

No need for this.  I added you to the list of FSF-signed contributors 
on the Worg page (dunno why you weren't there already):

  http://orgmode.org/worg/org-contribute.html

And thanks for the fix!

-- 
 Bastien



Re: [O] Attributes on HTML tables?

2013-04-14 Thread Bastien
Hi Rick,

Rick Frankel r...@rickster.com writes:

 However, you will need to change the html-table-tag to not use
 attributes, and remove the xml declaration
 (which is a warning and not an error in html5)

(Note that `org-html-table-tag' has been deleted, you need to check
`org-html-table-default-attributes' instead.)

The HTML5 validation is good news and your example is great.
Would be nice to have this in worg/org-faq.org!

Thanks,

-- 
 Bastien



Re: [O] [PATCH] Locally scope the variable `org-agenda-tag-filter' in `org-agenda-filter-by-tag'

2013-04-14 Thread Bastien
Hi Muchenxuan,

sorry for the delay.  The patch isn't applicable anymore and it has
problems too.

Muchenxuan Tong demon...@gmail.com writes:

 * lisp/org-agenda.el: Introduce a local variable tag-filter to replace
   the global variable `org-agenda-tag-filter'.

 This relates to the bug when trying to filter by tag in agenda view with
 entry-text shown. In `org-agenda-filter-apply' -
 `org-agenda-entry-text-mode', it shows error when the global variable
 `org-agenda-tag-filter' is set. Thus, the variable
 `org-agenda-tag-filter' shouldn't be set in advance.

 Modifying the global one will be done anyway in
 `org-agenda-filter-apply', which happens after
 calling (org-agenda-entry-text-mode).

The main problem comes from mixing overlays from hiding entries
(through filtering) and from showing entry text.  I don't think there
is a simple solution to this, but let us know if you find one.

Thanks,

-- 
 Bastien



Re: [O] phone links...

2013-04-14 Thread Bastien
Hi Feng,

Feng Shu tuma...@gmail.com writes:

 [update diff] make output format more beautiful

thanks for the patch -- at first sight, the formatting should be
fixed, let's try to avoid lines longer than 80 characters.  But in
general, I'd be more comfortable with someone taking org-contacts.el
in charge: I copy Grégoire as he proposed to do this.

Thanks,

-- 
 Bastien



Re: [O] blank todo kw does not delete closed ts

2013-04-14 Thread Bastien
Hi Brian,

Brian van den Broek brian.van.den.br...@gmail.com writes:

 Hi Bastien and all,

 I am afriad you saw this coming:

I somehow was, but I played ostrich here :)

 Could that be an option? I actively would want to preserve the closed
 note to keep an accurate history of my work with the task.

There is now `org-closed-keep-when-no-todo', defaulting to nil.

Thanks,

-- 
 Bastien



Re: [O] New exporter and dates in tables

2013-04-14 Thread Bastien
Hi Nicolas,

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

 Bastien b...@gnu.org writes:

 I would find it both cleaner and more useful for users to extend
 `org-export-with-timestamps' with three choices:

   'inactive-not-standalone
 'active-not-standalone
'not-standalone

 This is a different idea. The change would happen at the exporter level,
 not at parser's.

Yes.

 If we agree to the alone in a paragraph part, I can implement it.

 But we still need exceptions for clocks and timestamps (i.e., ignore
 `org-export-with-timestamps' value when `org-export-with-planning' or
 `org-export-with-clocks' is non-nil).

Let's not implement my proposal and stick to your implementation of
the exceptions you first proposed.

I expect users will want a way to get rid of time-stamp in

* Task
  time-stamp

without getting rid of time-stamps in paragraphs, but this can be
tackled later on I guess.

Thanks,

-- 
 Bastien



Re: [O] minor bug in babel with silent output and remote R session

2013-04-14 Thread Thomas Alexander Gerds

yes, I am using ESS. ess-remote allows me to evaluate R-code from the local
emacs-session on a remote machine connected to via ssh.

there are two problems:

1) the remote machine cannot write to org-babel-temp-file because the
   tmp-directory exists on the local machine. here we could add

   if(!file.exists(dirname(transfer.file))){dir.create(dirname(transfer.file))}
   
in the middle of the variable org-babel-R-write-object-command
this would achieve that the file is at least  generated on the remote host.

2) however, still the transfer file does not exist on the local
machine. there are several possiblities:

a) tell org-babel-comint-eval-invisibly-and-wait-for-file
 that the file is remote and then test if
 (concat / username @ host : file) exists instead of file.

b) use tramp to transfer the file from the remote to the local
machine. the function ssh does define ssh-host and ssh-username,
however, calling ess-remote removes these variables again.

c) tell org-babel-comint-eval-invisibly-and-wait-for-file not to wait
 for file if it is remote

my conclusion: it would be nice to have this functionality, but perhaps
it is not worth the efforts and it would be sufficient to avoid the
endless loop when waiting for a file which never will generated.

cheers thomas


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

 Bastien b...@gnu.org writes:

 Hi Thomas,
 thanks for the follow-up.
 Thomas Alexander Gerds t...@biostat.ku.dk writes:

 I think that I can describe the problem a bit better now. It is not
 related to the silent option but occurs whenever :results value.
 Emacs freezes due to the following line in
 org-babel-comint-eval-invisibly-and-wait-for-file
 (while (not (file-exists-p file)) (sit-for (or period 0.25)))
 it seems that R cannot transfer the file and hence this is an
 endless loop.
 I'm not knowledgeable enough in this area to provide a fix, maybe
 someone else will.


 Could this be a problem with whatever tool (I'm assuming ESS) you are
 using to maintain the R session and generate the R file?

 Perhaps babel needs to modify the R code used to create the file (held
 in the `org-babel-R-write-object-command' variable).  Could you take a
 shot at providing another version of this variable?  I don't really
 use R myself.

 Thanks,
--
Thomas A. Gerds -- Assoc. Prof. Department of Biostatistics
University of Copenhagen, Øster Farimagsgade 5, 1014 Copenhagen, Denmark
Office: CSS-15.2.07 (Gamle Kommunehospital)
tel: 35327914 (sec: 35327901) 



Re: [O] sequence of tangles

2013-04-14 Thread Christian Moe

Johan Sandblom writes:
 However, tangling this apparently first sorts the chunks according to 
 mode, so the resulting file first contains all the html, then the css, 
 javascript and php in order

Hi,

Try naming the chunks (any name will do), and add a block pulling them
all together with noweb syntax.

#+NAME: header
#+BEGIN_SRC nxml
!!DOCTYPE html
!-- header and stuff --
#+END_SRC

#+NAME: styles
#+BEGIN_SRC css
/* inline CSS */
#+END_SRC

#+NAME: scripts
#+BEGIN_SRC javascript
// javascript
#+END_SRC

#+NAME: body1
#+BEGIN_SRC nxml
!-- more html --
#+END_SRC

#+NAME: body2
#+BEGIN_SRC nxml
!-- even more html --
#+END_SRC

#+NAME: fulldoc
#+BEGIN_SRC nxml :tangle test-tangle.php :noweb yes
  header
  styles
  scripts
  body1
  body2
#+end_src

Yours,
Christian



Re: [O] exporting, too, was: Re: multiline emphasis, was: Re: latex italics in list, with quotation marks

2013-04-14 Thread Bastien
Hi Robert,

Robert Klein klein...@mpip-mainz.mpg.de writes:

 Thanks a lot, this works.  I didn't find (or understand) this in the
 docstring, though. :(

This was, but too implicit.

C-h v org-emphasis-regexp-components RET to check again.

Thanks,

-- 
 Bastien



Re: [O] Fix info manual compilation

2013-04-14 Thread Suvayu Ali
On Sun, Apr 14, 2013 at 10:34:29AM +0200, Bastien wrote:
 Hi Suvayu,
 
 Suvayu Ali fatkasuvayu+li...@gmail.com writes:
 
  I actually signed the FSF papers quite a while back; just forgot to
  mention it on the list :-p.  My assignment number is: RT704245.  In the
  form I had mentioned I submitted changes to doc/org.texi so this patch
  should be covered.  Do I need to send a copy of the assignment to the
  list?  I have a scan of the assignment.
 
 No need for this.  I added you to the list of FSF-signed contributors 
 on the Worg page (dunno why you weren't there already):

Thanks!  My fault, I was moving around the time I got the confirmation
from the FSF and forgot to mention it on the list in all the rush :).

Cheers,

-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] Attributes on HTML tables?

2013-04-14 Thread Eric Abrahamsen
Rick Frankel r...@rickster.com writes:

 On Sat, Apr 13, 2013 at 01:31:17PM +0800, Eric Abrahamsen wrote:
 Eric Abrahamsen e...@ericabrahamsen.net writes:
 
  François Pinard pin...@iro.umontreal.ca writes:
 
  Bastien b...@gnu.org writes:
 
  Eric Abrahamsen e...@ericabrahamsen.net writes:
 
  The first step is probably to research the differences between xhtml and
  html 5.
 
  Well, I would even skip this step and just hack something usable.
 
 
 I sort of fudged on the below. The upside is that it should be pretty
 forgiving now: you can set all kinds of strings as your :html-doctype,
 and it will do a reasonably good job of guessing how to handle it.
 
 Barring actual bugs or poor design decisions, what's left to do is:
 
 1. Make sure that inlined script and style chunks are escaped correctly,
 I seem to remember reading that the commenting/escaping syntax for these
 chunks varies according to html flavor.
 
 2. I'd like to add the possibility to put an arbitrary :html-container

 #+BEGIN_SRC emacs-lisp
 #+TITLE:  HTML 5 Test
 #+DATE:  {{{modification-time(%Y-%m-%d)}}}
 #+HTML_DOCTYPE: html5
 #+BIND: org-html-divs ((preamble header preamble) (content section 
 content) (postamble footer postamble))
 *  Org HTML5 Test
 #+ATTR_HTML: :options html-container article

 note that you just just set #+HTML_CONTAINER: article in the head of the
 file if you want all the containers to be articles.

That would be pretty drastic, though -- it would wrap article around a
whole bunch of stuff that shouldn't be an article! I think ultimately
the HTML exporter should grow a slightly more flexible system for
wrapping document sections in containers, but this patch definitely
shouldn't get hung up on that.

 +(defconst org-html-doctype-alist
 +  '((html4 . !DOCTYPE HTML PUBLIC \-//W3C//DTD HTML 4.01//EN\)
 +(html4-strict . !DOCTYPE HTML PUBLIC \-//W3C//DTD HTML 4.01//EN\
 +\http://www.w3.org/TR/html4/strict.dtd\;)
 +(xhtml . !DOCTYPE HTML PUBLIC \-//W3C//DTD XHTML 1.0 Strict//EN\
 +\http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\;)
 +(html5 . !DOCTYPE HTML))

 I believe that should be (note the lowercase html):

   (xhtml . !DOCTYPE html PUBLIC \-//W3C//DTD XHTML 1.0 Strict//EN\
 +\http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\;)
   (html5 . !DOCTYPE html)

 See http://www.w3schools.com/tags/tag_doctype.asp for a fairly
 complete list of valid doctypes.

Cool, thanks for the reference. If the approach of this patch seems
generally acceptable I'll try to add most of the commonly-used doctypes
in there. I'm waffling on XHTML5, though -- from what I can tell it's a
spec everyone sort of thought ought to be in there, but no one is
actually using.

E




Re: [O] Fix info manual compilation

2013-04-14 Thread Bastien
Suvayu Ali fatkasuvayu+li...@gmail.com writes:

 Thanks!  My fault, I was moving around the time I got the confirmation
 from the FSF and forgot to mention it on the list in all the rush
 :).

No problem, thanks for the heads up!

-- 
 Bastien



Re: [O] Tables for attendance lists - A problem understanding TBLFM?

2013-04-14 Thread Bastien
Hi Michael,

Michael Brand michael.ch.br...@gmail.com writes:

 But in the release notes I would generally, not particularly because
 of the above, write:

 If empty fields are of interest it is recommended to reread the
 section 3.5.2 Formula syntax for Calc of the manual because the
 description for the mode strings has been clarified and new examples
 have been added towards the end.

I updated Changes.org...

 Maybe you could add a footnote in the manual for this?

 Do the attached patches clarify what you had in mind?

... and applied the patches.  Thanks!

PS: you can use .patch as the extension for the patches, 
Emacs reads them using diff-mode and our .gitignore will
DTRT here.

 And to repeat myself: I see the directory testing as part of the
 doc, in this case `test-org-table/empty-field'. ;-)

Mhh... yes, but the tests are not in Emacs yet :)

-- 
 Bastien



Re: [O] Unescape :help-echo in links

2013-04-14 Thread Bastien
Hi Florian,

Florian Beck f...@miszellen.de writes:

 Bastien b...@altern.org writes:

 Can you resend it as a proper patch with a changelog?

 Like this?

I've now applied this, I didn't notice any slowdown too.

Thanks,

-- 
 Bastien



Re: [O] Bug: The `#+CAPTION' isn't documented well [7.9.3f (release_7.9.3f-17-g7524ef @ /usr/local/share/emacs/24.3.50/lisp/org/)]

2013-04-14 Thread Xue Fuqiao
On Sun, 14 Apr 2013 12:04:09 +0200
Bastien b...@gnu.org wrote:

 Hi Xue,

Hi,

  In [info:org#Images and tables]:
 
 Optionally, the caption can take the form:
   #+CAPTION: [Caption for list of figures]{Caption for table (or link).}
 
  The Org manual doesn't explain what this form means clearly.  And I also
  can't find it in the FAQ and the mailing list archives.
 
 The manual has been updated here and now says:
 
   @example
   #+CAPTION: This is the caption for the next table (or link)
   #+NAME:   tab:basic-data
  | ... | ...|
  |-||
   @end example
   
   Optionally, the caption can take the form:
   @example
   #+CAPTION[Caption for list of tables]: Caption for table.
   @end example
 
 Please double-check and tell us if it's clearer.

Looks clearer to me, thanks.

-- 
Xue Fuqiao
http://www.gnu.org/software/emacs/



Re: [O] New exporter and dates in tables

2013-04-14 Thread Bastien


Sebastien Vauban
wxhgmqzgwmuf-genee64ty+gs+fvcfc7...@public.gmane.org writes:

 Wouldn't it be a good moment to introduce

   APPT: 2013-04-13 Sat

 or maybe better named

   EVENT: 2013-04-13 Sat

 for things that only apply for today?

In master, there is the new agenda entry type :scheduled* and the
new agenda type agenda*.  So you can have an agenda* view with a
local value of `org-scheduled-past-days' set to 0: this will list
appointments (i.e. a scheduled item with an hour) only on the date
they are set.

PS: Wrt the good moment pattern, I think we abused it already too
much: just because there is a big release to come does not mean we
should include more big changes.  I'm guilty of indulging too much
in this direction... so I'm now more cautious.  Especially when
the change is quite orthogonal to other features, in which case
there is no problem for waiting another release.

-- 
 Bastien




Re: [O] Tables for attendance lists - A problem understanding TBLFM?

2013-04-14 Thread Michael Brand
Hi Bastien

On Sun, Apr 14, 2013 at 12:11 PM, Bastien b...@gnu.org wrote:
 PS: you can use .patch as the extension for the patches,
 Emacs reads them using diff-mode and our .gitignore will
 DTRT here.

Yes, but I do this hack of .patch.txt as a workaround to get the right
email Content-Type: text/plain when attaching with the web interface
of Google Gmail. There .patch or .diff results in Content-Type:
application/octet-stream which has to be avoided even more. I know,
but using the web interface helps me to keep it simple and usable on
any machine/device.

Michael



Re: [O] C-o now mapped to org-ctrl-o surprise

2013-04-14 Thread Sean O'Halpin
Gosh, that was quick!

Thanks,
Sean


On Sun, Apr 14, 2013 at 9:31 AM, Bastien b...@gnu.org wrote:
 Hi Sean,

 Sean O'Halpin sean.ohal...@gmail.com writes:

 I was quite surprised after pulling down master to find that C-o has
 been bound to org-ctrl-o (commit 45d6d8f8 2013-04-05 11:14:20 +0200).

 I personally don't use open-line much myself so remap this key for my own 
 use.

 Wouldn't it be better to do something like:

 (define-key org-mode-map [remap open-line] 'org-ctrl-o)

 and let the user choose which key does open-line rather than create a
 new keybinding which might override a user definition? Also, perhaps
 the function should be called org-open-line rather than org-ctrl-o.

 Indeed.  I renamed the command and used remap as you suggest.

 --
  Bastien



Re: [O] [BUG] org-clock-in menu scrolls off the top of the window

2013-04-14 Thread Bernt Hansen
Bastien b...@gnu.org writes:

 Bernt Hansen be...@norang.ca writes:

 I don't like the additional timestamp information.

 It is now removed.

Thanks!



Re: [O] More generic taskjuggler export proposal

2013-04-14 Thread Suvayu Ali
Hi Christian,

On Fri, Apr 12, 2013 at 03:08:17PM +0200, Christian Egli wrote:
 Buddy Butterfly buddy.butter...@web.de writes:
  Here I would suggest that one can place this data inbetween
 
   #+BEGIN_TASKJUGGLER
   #+END_TASKJUGGLER
 
 This is something I'd like to add support for. I just never got around
 to look at how this could be implemented. It has some implications as
 you could destroy your otherwise valid tjp file. But it might cover some
 of your use cases above. Do you know how this could be done in the new
 exporter?

I believe you can use the :export-block property when defining the
backend to specify blocks.

Quoting from the docstring of org-export-define-backend:

  :export-block

String, or list of strings, representing block names that
will not be parsed.  This is used to specify blocks that will
contain raw code specific to the back-end.  These blocks
still have to be handled by the relative `export-block' type
translator.

Hope this helps,

-- 
Suvayu

Open source is the future. It sets us free.



[O] GNU Emacs 24.3.1 creates macro-expansion failure messages

2013-04-14 Thread Charles Cave
I am running Org-mode version 7.9.4 and recently upgraded to Gnu Emacs 24.3.1.

Now when I start Emacs I get an error message which causes my Emacs to give 
the following message:

Eager macro-expansion failure: (error Invalid agenda key) [2 times]
(lambda (x) ...) quoted with ' rather than with #'

Org-mode works but Emacs starts with a split window with a *scratch* buffer 
and a GNU Emacs buffer (which is the only window I expected).

My Lisp skills are almost non-existent. Who can help please?

Thank you
Charles





Re: [O] New exporter and dates in tables

2013-04-14 Thread Nicolas Goaziou
Hello,

Bastien b...@gnu.org writes:

 Let's not implement my proposal and stick to your implementation of
 the exceptions you first proposed.

Before we throw the baby out with the bath water, I want to make sure we
are understanding each other.

 I expect users will want a way to get rid of time-stamp in

 * Task
   time-stamp

 without getting rid of time-stamps in paragraphs, but this can be
 tackled later on I guess.

According to your suggestion, with `org-export-with-timestamps' set to
`not-standalone', in the following example:

--8---cut here---start-8---
* Task
  timestamp

At timestamp, I must do that.
--8---cut here---end---8---

the first timestamp would be ignored, not the second one. Isn't it
what you want?

Also, we can do it the TDD way: just throw in a bunch of examples and
we'll come up with an implementation that conforms to all of them (if
they are reasonable enough).


Regards,

-- 
Nicolas Goaziou



Re: [O] GNU Emacs 24.3.1 creates macro-expansion failure messages

2013-04-14 Thread Bastien
Hi Charles,

Charles Cave charles.c...@gmail.com writes:

 I am running Org-mode version 7.9.4 and recently upgraded to Gnu Emacs 24.3.1.

 Now when I start Emacs I get an error message which causes my Emacs to give 
 the following message:

 Eager macro-expansion failure: (error Invalid agenda key) [2 times]
 (lambda (x) ...) quoted with ' rather than with #'

 Org-mode works but Emacs starts with a split window with a *scratch* buffer 
 and a GNU Emacs buffer (which is the only window I expected).

 My Lisp skills are almost non-existent. Who can help please?

I gather this is not with emacs -Q.

Can you narrow down to what causes this in your configuration?

-- 
 Bastien



Re: [O] New exporter and dates in tables

2013-04-14 Thread Bastien
Hi Nicolas,

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

 According to your suggestion, with `org-export-with-timestamps' set to
 `not-standalone', in the following example:

 * Task
   timestamp

 At timestamp, I must do that.

 the first timestamp would be ignored, not the second one. Isn't it
 what you want?

Yes, exactly.

-- 
 Bastien



Re: [O] New exporter and dates in tables

2013-04-14 Thread Nicolas Goaziou
Bastien b...@gnu.org writes:

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

 According to your suggestion, with `org-export-with-timestamps' set to
 `not-standalone', in the following example:

 * Task
   timestamp

 At timestamp, I must do that.

 the first timestamp would be ignored, not the second one. Isn't it
 what you want?

 Yes, exactly.

Then why do you suggest to drop the idea (for now)?


Regards,

-- 
Nicolas Goaziou



Re: [O] New exporter and dates in tables

2013-04-14 Thread Bastien
Nicolas Goaziou n.goaz...@gmail.com writes:

 Then why do you suggest to drop the idea (for now)?

Because IIUC, the time-stamps would not be ignored here

* Task
  2013-04-14 dim.
  2013-04-16 dim.

because

  2013-04-14 dim.
  2013-04-16 dim.

is a paragraph.  (The agenda takes both time-stamps into
account in a simple `org-agenda-list'.)  If we can remove
the one-time-stamp only case, but not the case with two,
it is too confusing IMHO.

What do you think?

-- 
 Bastien



Re: [O] New exporter and dates in tables

2013-04-14 Thread Nicolas Goaziou
Bastien b...@gnu.org writes:

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

 Then why do you suggest to drop the idea (for now)?

 Because IIUC, the time-stamps would not be ignored here

 * Task
   2013-04-14 dim.
   2013-04-16 dim.

 because

   2013-04-14 dim.
   2013-04-16 dim.

 is a paragraph.  (The agenda takes both time-stamps into
 account in a simple `org-agenda-list'.)  If we can remove
 the one-time-stamp only case, but not the case with two,
 it is too confusing IMHO.

Correct.

 What do you think?

We can widen the definition of `standalone': a standalone timestamp is
a timestamp belonging to a paragraph that contains only timestamps
objects.


Regards,

-- 
Nicolas Goaziou



Re: [O] Org-mode as a replacement for Google Reader

2013-04-14 Thread Steinar Bang
 Karl Voit devn...@karl-voit.at:

 On the one hand, I do not have any Gnus experience

It doesn't have to be Gnus.  Any NNTP client will work with feeds on
gwene.  On the PC you could eg. use Thunderbird.

 and from the things I already read about Gnus configuration, I want to
 keep it that way.

There is a big difference in what you _can_ do, and what you have to do.

If you just want to read news with NNTP you basically only have to point
it to at least one NNTP server (eg. gwene).

 On the other hand, Gnus does not offer something to sync with for the
 Android platform AFAIK.

If you want a gwene reader for the android platform you will have to
find an NNTP client for android.  I don't know if there is one... well
seems to be a couple:
 https://play.google.com/store/apps/details?id=ken.android.nntpreader.prohl=no




Re: [O] New exporter and dates in tables

2013-04-14 Thread Bastien
Nicolas Goaziou n.goaz...@gmail.com writes:

 We can widen the definition of `standalone': a standalone timestamp is
 a timestamp belonging to a paragraph that contains only timestamps
 objects.

Great.  If that's possible, then I think that's the best solution.

-- 
 Bastien



Re: [O] minor bug in babel with silent output and remote R session

2013-04-14 Thread Eric Schulte
It is a shame that this can't be handled gracefully either through ESS
or R code.

I agree it would be nice to raise a warning rather than hang waiting for
a file which won't ever exist.  So, how can we tell from the Babel
source if the R session is remote?

Thanks,

Thomas Alexander Gerds t...@biostat.ku.dk writes:

 yes, I am using ESS. ess-remote allows me to evaluate R-code from the local
 emacs-session on a remote machine connected to via ssh.

 there are two problems:

 1) the remote machine cannot write to org-babel-temp-file because the
tmp-directory exists on the local machine. here we could add


 if(!file.exists(dirname(transfer.file))){dir.create(dirname(transfer.file))}

 in the middle of the variable org-babel-R-write-object-command
 this would achieve that the file is at least  generated on the remote host.

 2) however, still the transfer file does not exist on the local
 machine. there are several possiblities:

 a) tell org-babel-comint-eval-invisibly-and-wait-for-file
  that the file is remote and then test if
  (concat / username @ host : file) exists instead of file.

 b) use tramp to transfer the file from the remote to the local
 machine. the function ssh does define ssh-host and ssh-username,
 however, calling ess-remote removes these variables again.

 c) tell org-babel-comint-eval-invisibly-and-wait-for-file not to wait
  for file if it is remote

 my conclusion: it would be nice to have this functionality, but perhaps
 it is not worth the efforts and it would be sufficient to avoid the
 endless loop when waiting for a file which never will generated.

 cheers thomas


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

 Bastien b...@gnu.org writes:

 Hi Thomas,
 thanks for the follow-up.
 Thomas Alexander Gerds t...@biostat.ku.dk writes:

 I think that I can describe the problem a bit better now. It is not
 related to the silent option but occurs whenever :results value.
 Emacs freezes due to the following line in
 org-babel-comint-eval-invisibly-and-wait-for-file
 (while (not (file-exists-p file)) (sit-for (or period 0.25)))
 it seems that R cannot transfer the file and hence this is an
 endless loop.
 I'm not knowledgeable enough in this area to provide a fix, maybe
 someone else will.


 Could this be a problem with whatever tool (I'm assuming ESS) you are
 using to maintain the R session and generate the R file?

 Perhaps babel needs to modify the R code used to create the file (held
 in the `org-babel-R-write-object-command' variable).  Could you take a
 shot at providing another version of this variable?  I don't really
 use R myself.

 Thanks,
 --
 Thomas A. Gerds -- Assoc. Prof. Department of Biostatistics
 University of Copenhagen, Øster Farimagsgade 5, 1014 Copenhagen, Denmark
 Office: CSS-15.2.07 (Gamle Kommunehospital)
 tel: 35327914 (sec: 35327901) 

-- 
Eric Schulte
http://cs.unm.edu/~eschulte



Re: [O] having problems exporting to Beamer

2013-04-14 Thread Eric Schulte
Nicolas Goaziou n.goaz...@gmail.com writes:

 Hello,

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

 When I attempt to export a .org file to Beamer (with C-c C-e l b after
 requiring ox-beamer) I get the following error [1].  From the info page
 (info (org)Beamer export) it looks like I shouldn't have to do any
 special buffer preparation.

 What am I doing wrong?

 It looks like `org-beamer-outline-frame-options' is nil, but it must be
 a string (possibly empty).


Thanks, with this variable set to an empty string I am making it further
in the export process.  I would suggest that either the initial value of
this variable be set to an empty string, or a nil value should be
handled gracefully.

After fixing the above I reached a new error.  There was no beamer
class defined in my `org-latex-classes'.  The attached patch ensures
that when ox-beamer is loaded a beamer entry is added to
`org-latex-classes' if none already exists.

From 540bcddb50b746f4f2de910a199e4d13e8ddad11 Mon Sep 17 00:00:00 2001
From: Eric Schulte schulte.e...@gmail.com
Date: Sun, 14 Apr 2013 09:16:24 -0600
Subject: [PATCH 1/2] ensure a beamer entry exists in org-latex-classes

This ensures that whenever ox-beamer is required it is possible to
export to beamer.  Otherwise it is required to find the
org-latex-classes variable and add a beamer entry, something which is
not mentioned in the beamer page of the manual and will be confusing to
users just getting going with Beamer export.

* lisp/ox-beamer.el (assoc): Ensure a beamer entry exists in
  org-latex-classes.
---
 lisp/ox-beamer.el | 9 +
 1 file changed, 9 insertions(+)

diff --git a/lisp/ox-beamer.el b/lisp/ox-beamer.el
index 63dad5c..87458f0 100644
--- a/lisp/ox-beamer.el
+++ b/lisp/ox-beamer.el
@@ -126,6 +126,15 @@
   :group 'org-export
   :version 24.2)
 
+(unless (assoc beamer org-latex-classes)
+  (add-to-list 'org-latex-classes
+	   '(article \\documentclass[bigger]{beamer}
+		 (\\section{%s} . \\section*{%s})
+		 (\\subsection{%s} . \\subsection*{%s})
+		 (\\subsubsection{%s} . \\subsubsection*{%s})
+		 (\\paragraph{%s} . \\paragraph*{%s})
+		 (\\subparagraph{%s} . \\subparagraph*{%s}
+
 (defcustom org-beamer-frame-level 1
   The level at which headlines become frames.
 
-- 
1.8.2.1


I leave it to you to apply or not, but I think it makes things much
clearer for new users.  I think this patch is especially useful because
it is no longer required to place

  #+LaTeX_Class: beamer

at the top of the Org-mode file for beamer export.  At least the
beamer class and `org-latex-classes' should be mentioned in the beamer
section of the manual.

Additionally, I ran into another nil vs. empty string problem, which was
fixed by the second patch attached.

From ae7f4de7a04c9fac9fa36836370711cdb7f12fa7 Mon Sep 17 00:00:00 2001
From: Eric Schulte schulte.e...@gmail.com
Date: Sun, 14 Apr 2013 10:28:27 -0600
Subject: [PATCH 2/2] Ensure nil is not passed to regexp function

* lisp/ox-beamer.el (org-beamer--format-frame): If contents is nil, then
  replace it with an empty string.
---
 lisp/ox-beamer.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/ox-beamer.el b/lisp/ox-beamer.el
index 87458f0..d1cfbfd 100644
--- a/lisp/ox-beamer.el
+++ b/lisp/ox-beamer.el
@@ -513,7 +513,7 @@ used as a communication channel.
 	;; remove the first word from the contents in the PDF
 	;; output.
 	(if (not fragilep) contents
-	  (replace-regexp-in-string \\`\n* \\  contents))
+	  (replace-regexp-in-string \\`\n* \\  (or contents )))
 	\\end{frame})))
 
 (defun org-beamer--format-block (headline contents info)
-- 
1.8.2.1


Finally, I ran into a third and even more minor problem.  Illustrated by
the following example.

#+TITLE: Example Presentation
#+Options: ^:nil toc:nil

* Breeders Equation
\begin{equation*}
  R = h^{2}S
\end{equation*}

- R :: response
- h^{2} :: heritability
- S :: selective distance

When exported to a beamer presentation, what should be h squared is
instead exported as h^{2}.

Thanks,



 Regards,

-- 
Eric Schulte
http://cs.unm.edu/~eschulte


Re: [O] having problems exporting to Beamer

2013-04-14 Thread Nicolas Goaziou
Eric Schulte schulte.e...@gmail.com writes:

 Thanks, with this variable set to an empty string I am making it further
 in the export process.  I would suggest that either the initial value of
 this variable be set to an empty string, or a nil value should be
 handled gracefully.

The default value for this variable is already the empty string.

 After fixing the above I reached a new error.  There was no beamer
 class defined in my `org-latex-classes'.  

This is already the case. You should update Org.

 Finally, I ran into a third and even more minor problem.  Illustrated by
 the following example.

 #+TITLE: Example Presentation
 #+Options: ^:nil toc:nil

 * Breeders Equation
 \begin{equation*}
   R = h^{2}S
 \end{equation*}

 - R :: response
 - h^{2} :: heritability
 - S :: selective distance

 When exported to a beamer presentation, what should be h squared is
 instead exported as h^{2}.

You explicitly tell the exporter to not export sub/superscript with
^:nil. Just set it to t.

Thanks for testing this.


Regards,

-- 
Nicolas Goaziou



Re: [O] having problems exporting to Beamer

2013-04-14 Thread Nicolas Goaziou
Eric Schulte schulte.e...@gmail.com writes:

 Additionally, I ran into another nil vs. empty string problem, which was
 fixed by the second patch attached.

I had overlooked this one. I applied it. Thank you.


Regards,

-- 
Nicolas Goaziou



[O] [patch] ox-latex.el to allow customization of verbatim environments (e.g., to use fancyvrb)

2013-04-14 Thread Eric Schulte
Please see the attached patch, I'd love for this to be applied.

Cheers,

From 04358f2eecf99e43f79956f0d3bc66aa0ab4b95d Mon Sep 17 00:00:00 2001
From: Eric Schulte schulte.e...@gmail.com
Date: Sun, 14 Apr 2013 11:43:30 -0600
Subject: [PATCH 3/3] customizable verbatim export for LaTeX (fancyvrb)

  This patch allows custom export of verbatim environments to LaTeX.
  Allowing the usage of packages such as fancyvrb.

* lisp/ox-latex.el (org-latex-verbatim-env): New defcustom allowing
  customization of verbatim export for latex.
  (org-latex-example-block): Use new defcustom verbatim environment.
  (org-latex-fixed-width): Use new defcustom verbatim environment.
  (org-latex-quote-section): Use new defcustom verbatim environment.
  (org-latex-src-block): Use new defcustom verbatim environment.
  (org-latex-table): Use new defcustom verbatim environment.
---
 lisp/ox-latex.el | 40 
 1 file changed, 28 insertions(+), 12 deletions(-)

diff --git a/lisp/ox-latex.el b/lisp/ox-latex.el
index 5975ce2..91747c3 100644
--- a/lisp/ox-latex.el
+++ b/lisp/ox-latex.el
@@ -957,6 +957,14 @@ log of a latex-run.
 	   (string :tag Regexp)
 	   (string :tag Message
 
+(defcustom org-latex-verbatim-env
+  verbatim
+  Environment to use for verbatim markup in latex export.
+To use the fancyvrb package set this variable to \Verbatim\.
+  :group 'org-export-latex
+  :version 24.4
+  :package-version '(Org . 8.0)
+  :type 'string)
 
 
 ;;; Internal Functions
@@ -1320,8 +1328,10 @@ information.
   (when (org-string-nw-p (org-element-property :value example-block))
 (org-latex--wrap-label
  example-block
- (format \\begin{verbatim}\n%s\\end{verbatim}
-	 (org-export-format-code-default example-block info)
+ (format \\begin{%s}\n%s\\end{%s}
+	 org-latex-verbatim-env
+	 (org-export-format-code-default example-block info)
+	 org-latex-verbatim-env
 
 
  Export Block
@@ -1349,9 +1359,11 @@ CONTENTS is nil.  INFO is a plist holding contextual information.
 CONTENTS is nil.  INFO is a plist holding contextual information.
   (org-latex--wrap-label
fixed-width
-   (format \\begin{verbatim}\n%s\\end{verbatim}
+   (format \\begin{%s}\n%s\\end{%s}
+	   org-latex-verbatim-env
 	   (org-remove-indentation
-	(org-element-property :value fixed-width)
+	(org-element-property :value fixed-width))
+	   org-latex-verbatim-env)))
 
 
  Footnote Reference
@@ -2098,8 +2110,8 @@ holding contextual information.
 CONTENTS is nil.  INFO is a plist holding contextual information.
   (let ((value (org-remove-indentation
 		(org-element-property :value quote-section
-(when value (format \\begin{verbatim}\n%s\\end{verbatim} value
-
+(when value (format \\begin{%s}\n%s\\end{%s}
+			org-latex-verbatim-env value org-latex-verbatim-env
 
  Radio Target
 
@@ -2171,8 +2183,10 @@ contextual information.
    caption-str
 	  (format
 	   (or float-env %s)
-	   (concat (format \\begin{verbatim}\n%s\\end{verbatim}
-			   (org-export-format-code-default src-block info))
+	   (concat (format \\begin{%s}\n%s\\end{%s}
+			   org-latex-verbatim-env
+			   (org-export-format-code-default src-block info)
+			   org-latex-verbatim-env)
;; Case 2.  Custom environment.
(custom-env (format \\begin{%s}\n%s\\end{%s}\n
 			   custom-env
@@ -2377,10 +2391,12 @@ contextual information.
   (cond
;; Case 1: Verbatim table.
((string= type verbatim)
-	(format \\begin{verbatim}\n%s\n\\end{verbatim}
+	(format \\begin{%s}\n%s\n\\end{%s}
+		org-latex-verbatim-env
 		;; Re-create table, without affiliated keywords.
 		(org-trim (org-element-interpret-data
-			   `(table nil ,@(org-element-contents table))
+			   `(table nil ,@(org-element-contents table
+		org-latex-verbatim-env))
;; Case 2: Matrix.
((or (string= type math) (string= type inline-math))
 	(org-latex--math-table table info))
@@ -2741,8 +2757,8 @@ holding contextual information.
   Transcode a VERBATIM object from Org to LaTeX.
 CONTENTS is nil.  INFO is a plist used as a communication
 channel.
-  (org-latex--text-markup (org-element-property :value verbatim) 'verbatim))
-
+  (org-latex--text-markup (org-element-property :value verbatim)
+			  org-latex-verbatim-env))
 
  Verse Block
 
-- 
1.8.2.1


-- 
Eric Schulte
http://cs.unm.edu/~eschulte


Re: [O] having problems exporting to Beamer

2013-04-14 Thread Eric Schulte
 Finally, I ran into a third and even more minor problem.  Illustrated by
 the following example.

 #+TITLE: Example Presentation
 #+Options: ^:nil toc:nil

 * Breeders Equation
 \begin{equation*}
   R = h^{2}S
 \end{equation*}

 - R :: response
 - h^{2} :: heritability
 - S :: selective distance

 When exported to a beamer presentation, what should be h squared is
 instead exported as h^{2}.

 You explicitly tell the exporter to not export sub/superscript with
 ^:nil. Just set it to t.


Oh, this must be a bug in the old exporter which I grew to depend upon.
FWIW I always set ^:nil to t, so that I can use underscores w/o
exporting subscript words.  Previously even with ^:nil, superscripts
using curly braces would be exported as superscripts.  I guess I'll have
to find a new mode of operation with the new exporter.

Thanks,

-- 
Eric Schulte
http://cs.unm.edu/~eschulte



Re: [O] Attributes on HTML tables?

2013-04-14 Thread Rick Frankel
On Sun, Apr 14, 2013 at 06:13:40PM +0800, Eric Abrahamsen wrote:
 Rick Frankel r...@rickster.com writes:
 
  On Sat, Apr 13, 2013 at 01:31:17PM +0800, Eric Abrahamsen wrote:
  *  Org HTML5 Test
  #+ATTR_HTML: :options html-container article
  - a :: foo
  - b :: bar

  note that you just just set #+HTML_CONTAINER: article in the head of the
  file if you want all the containers to be articles.
 
 That would be pretty drastic, though -- it would wrap article around a
 whole bunch of stuff that shouldn't be an article! I think ultimately
 the HTML exporter should grow a slightly more flexible system for
 wrapping document sections in containers, but this patch definitely
 shouldn't get hung up on that.

It specifies the element for the top-level container---by default,
something like:

  div id=outline-container-sec-1 class=outline-2

In the case of e.g., a blog or slideshow, article is an appropriate
top-level wrapper lelement.

Regardless, I'm not sure which object you are expecting the
#+ATTR_HTML to apply to in the example above. Here's the html the
above section generates:

#+BEGIN_HTML
div id=outline-container-sec-5 class=outline-2
  h2 id=sec-5span class=section-number-25/span A definiton list/h2
  div class=outline-text-2 id=text-5
dl class=org-dl
  dt a /dtddfoo
  /dd
  dt b /dtddbar
  /dd
/dl
  /div
/div

Where the 'outline-text-2' div is actually around the entire body of
the section, not just the definition list (there is no explicit
wrapper around the definition list).

I would argue that to set the element type fro the outer
(outline-container) div or the inner (outline-text) div, a property
setting would make more sense. I can see using a (headline level)
:HTML_CONTAINER property to set the container on a given headline
(which i think i will impliment as it is very low impact), and perhaps
either an :HTML_CHILD_CONTAINER or :HTML_TEXT_CONTAINER to specify the
wrapper on the inner section.

rick



Re: [O] having problems exporting to Beamer

2013-04-14 Thread Nicolas Goaziou
Eric Schulte schulte.e...@gmail.com writes:

 Oh, this must be a bug in the old exporter which I grew to depend upon.
 FWIW I always set ^:nil to t, so that I can use underscores w/o
 exporting subscript words.  Previously even with ^:nil, superscripts
 using curly braces would be exported as superscripts.  I guess I'll have
 to find a new mode of operation with the new exporter.

What about using:

  ^:{} 


Regards,

-- 
Nicolas Goaziou



Re: [O] [patch] ox-latex.el to allow customization of verbatim environments (e.g., to use fancyvrb)

2013-04-14 Thread Nicolas Goaziou
Eric Schulte schulte.e...@gmail.com writes:

 Please see the attached patch, I'd love for this to be applied.

You can use a filter function that will replace default verbatim with
whatever you want:

#+begin_src emacs-lisp
(defun my-latex-custom-verbatim (element backend info)
  (when (org-export-derived-backend-p backend 'latex)
(replace-regexp-in-string
 \\`begin{\\(verbatim\\)} Verbatim
 (replace-regexp-in-string
  end{\\(verbatim\\)}\n*\\' Verbatim element nil nil 1)
 nil nil 1)))

(add-to-list 'org-export-filter-example-block-functions
 'my-latex-custom-verbatim)
(add-to-list 'org-export-filter-fixed-width-functions
 'my-latex-custom-verbatim)
(add-to-list 'org-export-filter-quote-section-functions
 'my-latex-custom-verbatim)
(add-to-list 'org-export-filter-src-block-functions
 'my-latex-custom-verbatim)
(add-to-list 'org-export-filter-table-functions
 'my-latex-custom-verbatim)
#+end_src

I'm not sure a new variable is needed here. After all, that's what
filters are for.


Regards,

-- 
Nicolas Goaziou



Re: [O] [patch] ox-latex.el to allow customization of verbatim environments (e.g., to use fancyvrb)

2013-04-14 Thread Daimrod
Eric Schulte schulte.e...@gmail.com writes:

 -(concat (format \\begin{verbatim}\n%s\\end{verbatim}
 -(org-export-format-code-default src-block info))
 +(concat (format \\begin{%s}\n%s\\end{%s}
 +org-latex-verbatim-env
 +(org-export-format-code-default src-block info)
 +org-latex-verbatim-env)

IIUC you don't need concat+format here.

-- 
Daimrod/Greg


pgp1eukSKehML.pgp
Description: PGP signature


Re: [O] phone links...

2013-04-14 Thread Michael Strey
On Tue, Apr 09, 2013 at 09:31:40AM +0200, Michael Strey wrote:

[...]

 The problem is on the side of org-contacts.  Org-contacts does not
 support links in its properties.
[...]

 This shortcoming effects not only the phone links but email links as
 well.

Attached is a patch to allow org links in org-contacts properties.
It allows entries like in the following example without effecting
org-contacts current functions.

#+BEGIN_SRC org
* Surname, Name
:PROPERTIES:
:EMAIL:mailto:te...@test.de; [[mailto:n...@test.de]] f...@bar.biz
:PHONE:[[tel:+49 351 4129535]], +491766626196 [[+49 (351) 41295-35]]
:END:
#+END_SRC

Phone links of the form [[tel:+49 351 412 95-35][My phone number]] or
[[tel:+49 351 41295-35]] are expected.  `-', `/', `(', `)' and
whitespace characters are allowed in telephone numbers.


-- 
Michael Strey 
www.strey.biz

From 69ae791cd552bacdcbc99af99a82ab699fa16d36 Mon Sep 17 00:00:00 2001
From: Michael Strey mst...@strey.biz
Date: Fri, 12 Apr 2013 12:33:16 +0200
Subject: [PATCH 174/174] Org-contacts: Allow org links in properties

* org-contacts.el (org-contacts-split-property, chomp): Introduce a custom
  version of split-string that keeps org links intact. `chomp' is a
  helper function for `org-contacts-split-property'.
* org-contacts.el (org-contacts-strip-link): Introduce a new function
  that removes brackets, description, link type and colon from an org
  link string returning the pure link key.
* org-contacts.el (org-contacts-complete-group)
(org-contacts-complete-name, org-contacts-view-send-email)
(org-contacts-get-icon, org-contacts-vcard-format): Apply the
  new functions to the already existing functions extracting telephone numbers
  and email addresses from the properties.

Allowed separators for email addresses and phone numbers are `,', `;'
and whitespace.  `:' is not allowed anymore as separator to avoid
confusion with implizit links.

Examples of properties that are possible after those changes:

* Surname, Name
:PROPERTIES:
:EMAIL:mailto:te...@test.de; [[mailto:n...@test.de]] f...@bar.biz
:PHONE:[[tel:+49 351 4129535]], +491766626196 [[+49 (351) 41295-35]]
:END:

Phone links of the form [[tel:+49 351 412 95-35][My phone number]] or
[[tel:+49 351 41295-35]] are expected.  `-', `/', `(', `)' and
whitespace characters are allowed in telephone numbers.
---
 contrib/lisp/org-contacts.el | 83 
 5 files changed, 106 insertions(+), 28 deletions(-)

diff --git a/contrib/lisp/org-contacts.el b/contrib/lisp/org-contacts.el
index 65eeea8..a502674 100644
--- a/contrib/lisp/org-contacts.el
+++ b/contrib/lisp/org-contacts.el
@@ -218,7 +218,7 @@ This overrides `org-email-link-description-format' if set.
 org-contacts-db))
 
 (defun org-contacts-filter (optional name-match tags-match)
-  Search for a contact maching NAME-MATCH and TAGS-MATCH.
+  Search for a contact matching NAME-MATCH and TAGS-MATCH.
 If both match values are nil, return all contacts.
   (if (and (null name-match)
   (null tags-match))
@@ -426,7 +426,7 @@ A group FOO is composed of contacts with the tag FOO.
(or (cdr (assoc-string ALLTAGS (caddr 
contact))) ) :)))
(list start end
  (if (= (length completion-list) 1)
- ;; We've foudn the correct group, returns the address
+ ;; We've found the correct group, returns the address
  (lexical-let ((tag (get-text-property 0 'org-contacts-group
(car completion-list
(lambda (string pred optional to-ignore)
@@ -438,11 +438,11 @@ A group FOO is composed of contacts with the tag FOO.
   ;; returned by `org-contacts-filter'.
   for contact-name = (car contact)
   ;; Grab the first email of the contact
-  for email = (car (split-string
+  for email = (org-contacts-strip-link 
(car (org-contacts-split-property
 (or
  (cdr (assoc-string 
org-contacts-email-property
 
(caddr contact)))
- )))
+ 
   ;; If the user has an email address, 
append USER EMAIL.
   if email collect 
(org-contacts-format-email contact-name email))
 , )))
@@ -459,14 +459,14 @@ A group FOO is composed of contacts with the tag FOO.
;; returned by `org-contacts-filter'.
for contact-name = (car contact)
;; Build the list of 

[O] Date-tree capture confused when nearby trees have dates

2013-04-14 Thread Suvayu Ali
Hi Orgers,

I came a cross a curious problem.  When I try to capture with the
following template:

(setq org-capture-templates
  '((m Meeting notes entry (file+datetree ~/tmp/tests/target.org)
  %^{prompt} %U\n%?)
))

Capture gets confused and cannot find the real date-tree if there are
nearby trees with headlines like this:

  ** 2013 June - Event 2
  ** 2013 March - Event 1

You can replicate this by using the file target_before.org (attached) as
a capture target.  I expect the captured entry to go under

  * 2013
  ** 2013-04 April
  *** 2013-04-15 Monday

Instead it goes under Topical lectures as shown by target_after.org
(attached).

Is this a bug, or am I making a mistake?  Any ideas?

-- 
Suvayu

Open source is the future. It sets us free.
* Topical lectures
** 2013 June - Dark Matter
   2013-06-10 Mon--2013-06-12 Wed
** 2013 March - Accelerators
   2013-03-20 Wed--2013-03-22 Fri


* 2013
** 2013-04 April
*** 2013-04-12 Friday
 Some meeting notes [2013-04-12 Fri 14:37]
Stuff ... and more stuff.
* Topical lectures
** 2013 June - Dark Matter
   2013-06-10 Mon--2013-06-12 Wed
** 2013-04 April
*** 2013-04-15 Monday
 Testing meeting notes [2013-04-15 Mon 00:53]
Really important notes!
** 2013 March - Accelerators
   2013-03-20 Wed--2013-03-22 Fri


* 2013
** 2013-04 April
*** 2013-04-12 Friday
 Some meeting notes [2013-04-12 Fri 14:37]
Stuff ... and more stuff.


[O] void-function copy-seq

2013-04-14 Thread Thomas S. Dye
Aloha all,

After a fresh pull from git, I get this when exporting to LaTeX:

Debugger entered--Lisp error: (void-function copy-seq)
  copy-seq((org-fill-paragraph-separate-nobreak-p
  org-fill-line-break-nobreak-p
  org-fill-paragraph-with-timestamp-nobreak-p)) org-setup-filling()
  org-mode()

All the best,
Tom

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




Re: [O] void-function copy-seq

2013-04-14 Thread Bastien
t...@tsdye.com (Thomas S. Dye) writes:

 After a fresh pull from git, I get this when exporting to LaTeX:

 Debugger entered--Lisp error: (void-function copy-seq)
   copy-seq((org-fill-paragraph-separate-nobreak-p
   org-fill-line-break-nobreak-p
   org-fill-paragraph-with-timestamp-nobreak-p)) org-setup-filling()
   org-mode()

I just fixed this, thanks!

-- 
 Bastien



Re: [O] C-o now mapped to org-ctrl-o surprise

2013-04-14 Thread Suvayu Ali
On Sat, Apr 13, 2013 at 10:28:30PM +0100, Sean O'Halpin wrote:
 Hi,
 
 I was quite surprised after pulling down master to find that C-o has
 been bound to org-ctrl-o (commit 45d6d8f8 2013-04-05 11:14:20 +0200).
 
 I personally don't use open-line much myself so remap this key for my own use.
 
 Wouldn't it be better to do something like:
 
 (define-key org-mode-map [remap open-line] 'org-ctrl-o)
 
 and let the user choose which key does open-line rather than create a
 new keybinding which might override a user definition? Also, perhaps
 the function should be called org-open-line rather than org-ctrl-o.

I would agree too.  I think there are few other instances of this kind
of remappings; can't recall which though.

-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] [patch] ox-latex.el to allow customization of verbatim environments (e.g., to use fancyvrb)

2013-04-14 Thread Bastien
Nicolas Goaziou n.goaz...@gmail.com writes:

 I'm not sure a new variable is needed here. After all, that's what
 filters are for.

Filters are for advanced Emacs users, not normal Emacs users.

A normal Emacs users is someone who knows how to set an option
but who doesn't know how to write a function.

This is always a trade-off: if something is badly needed by users,
let's have an option.  If something is needed only for a few users,
let's encourage someone to share her/his filter(s)*.

I don't really have an opinion here: my impression is that the
filter is correct in this case.

* Btw, maybe we should consider gathering filters in some unique
place, so that users can search and find them easily?  Either a
new directory in Worg or a new repository on the server?  This
is powerful enough to deserve a separate place IMO.

-- 
 Bastien



Re: [O] Tables for attendance lists - A problem understanding TBLFM?

2013-04-14 Thread Bastien
Michael Brand michael.ch.br...@gmail.com writes:

 Yes, but I do this hack of .patch.txt as a workaround to get the right
 email Content-Type: text/plain when attaching with the web interface
 of Google Gmail. There .patch or .diff results in Content-Type:
 application/octet-stream which has to be avoided even more. I know,
 but using the web interface helps me to keep it simple and usable on
 any machine/device.

No problem!  The message is the message, not the medium.  :)

-- 
 Bastien



Re: [O] Latex export of tables

2013-04-14 Thread Suvayu Ali
Hello Vikas,

On Fri, Apr 12, 2013 at 01:36:01PM +0530, Vikas Rawal wrote:
 I am using org-mode version 8.0-pre (release_8.0-pre-247-gbc3ccd @
 /home/vikas/lisp/org-mode/lisp/).
 
 I have a table generated by a source block in a document that I would
 like to export to latex. In the exported tex file, I would like org to
 insert a line like the following between \end(tabular} and \end{table}
 
 \begin{minipage}{\textwidth} \tiny Note: Some descriptive text here. 
 \end{minipage}

I do not think this is possible.  You have to realise that Org does not
aim to support everything you can do with a backend natively.  One of
the primary reasons for that is the backend agnostic abstraction
provided by Org.

When in need of specific needs like this, I resort to writing LaTeX
natively.

Hope this helps somehow,

-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] void-function copy-seq

2013-04-14 Thread Thomas S. Dye
Bastien b...@gnu.org writes:

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

 After a fresh pull from git, I get this when exporting to LaTeX:

 Debugger entered--Lisp error: (void-function copy-seq)
   copy-seq((org-fill-paragraph-separate-nobreak-p
   org-fill-line-break-nobreak-p
   org-fill-paragraph-with-timestamp-nobreak-p)) org-setup-filling()
   org-mode()

 I just fixed this, thanks!

Confirmed fixed.  Thanks!

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



Re: [O] [patch] ox-latex.el to allow customization of verbatim environments (e.g., to use fancyvrb)

2013-04-14 Thread Thomas S. Dye
Bastien b...@gnu.org writes:

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

 I'm not sure a new variable is needed here. After all, that's what
 filters are for.

 Filters are for advanced Emacs users, not normal Emacs users.

 A normal Emacs users is someone who knows how to set an option
 but who doesn't know how to write a function.

 This is always a trade-off: if something is badly needed by users,
 let's have an option.  If something is needed only for a few users,
 let's encourage someone to share her/his filter(s)*.

 I don't really have an opinion here: my impression is that the
 filter is correct in this case.

 * Btw, maybe we should consider gathering filters in some unique
 place, so that users can search and find them easily?  Either a
 new directory in Worg or a new repository on the server?  This
 is powerful enough to deserve a separate place IMO.

Perhaps the Library of Babel would be a good place?

All the best,
Tom

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



Re: [O] [patch] ox-latex.el to allow customization of verbatim environments (e.g., to use fancyvrb)

2013-04-14 Thread Eric Schulte
Bastien b...@gnu.org writes:

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

 I'm not sure a new variable is needed here. After all, that's what
 filters are for.

 Filters are for advanced Emacs users, not normal Emacs users.

 A normal Emacs users is someone who knows how to set an option
 but who doesn't know how to write a function.

 This is always a trade-off: if something is badly needed by users,
 let's have an option.  If something is needed only for a few users,
 let's encourage someone to share her/his filter(s)*.

 I don't really have an opinion here: my impression is that the
 filter is correct in this case.


Yea, a filter seems appropriate here to me as well.  I hadn't thought of
this option when proposing the patch.


 * Btw, maybe we should consider gathering filters in some unique
 place, so that users can search and find them easily?  Either a
 new directory in Worg or a new repository on the server?  This
 is powerful enough to deserve a separate place IMO.

Here's my fancyvrb filter for when such a place is created.

(defun org-latex-filter-fancyvrb (text backend info)
  Convert begin/end{verbatim} to begin/end{Verbatim}.
Allows use of the fancyvrb latex package.
  (when (or (org-export-derived-backend-p backend 'beamer)
(org-export-derived-backend-p backend 'latex))
(replace-regexp-in-string
 \\(begin\\|end\\){verbatim}
 \\1{Verbatim}
 text)))

(add-to-list 'org-export-filter-final-output-functions
 'org-latex-filter-fancyvrb)

Cheers,

-- 
Eric Schulte
http://cs.unm.edu/~eschulte



Re: [O] having problems exporting to Beamer

2013-04-14 Thread Eric Schulte
Nicolas Goaziou n.goaz...@gmail.com writes:

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

 Oh, this must be a bug in the old exporter which I grew to depend upon.
 FWIW I always set ^:nil to t, so that I can use underscores w/o
 exporting subscript words.  Previously even with ^:nil, superscripts
 using curly braces would be exported as superscripts.  I guess I'll have
 to find a new mode of operation with the new exporter.

 What about using:

   ^:{} 


Beautiful, Thanks.


 Regards,

-- 
Eric Schulte
http://cs.unm.edu/~eschulte



Re: [O] New exporter and dates in tables

2013-04-14 Thread Jambunathan K

Nicolas

You may want to extract the below function as a useful API.

You can then plug that in into `org-odt--standalone-link-p' and it's
counterpart in ox-html.el.  

I am not closely tracking changes in ox-html.el, so things might have
moved since.

Jambunathan K.

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

 + (lambda (ts)
 +   ;; Return a non-nil value when TS is a timestamp object
 +   ;; in a paragraph with only timestamps and whitespaces.
 +   (let ((parent (org-export-get-parent-element ts)))
 + (when (memq (org-element-type parent) '(paragraph verse-block))
 +   (not
 +(org-element-map parent
 +(cons 'plain-text
 +  (remq 'timestamp org-element-all-objects))
 +  (lambda (obj)
 +(or (not (stringp obj)) (org-string-nw-p obj)))
 +  options t)



[O] Specify file name on commandline in batch export

2013-04-14 Thread Wiskey 5 Alpha
Hello all,
   I am using org from 'org-plus-contrib-20130121' on emacs 24.1

What I would like to do is export an org-mode file to odt format from the
commandline , but specify an 'output file name' .  I currently call the
export process like so
#+BEGIN_SRC sh
  emacs --batch --load=org.el --visit ${SRC} --funcall=org-export-as-odt
#+END_SRC

this works well for exporting, but it will only output the file to the
directory where the original org file is, and it will be named orgfile
basename.odt

Is there anyway to specify the output directory and filename at the time
that I call the function ?

thank you.

-Tim


Re: [O] phone links...

2013-04-14 Thread Feng Shu
Bastien b...@gnu.org writes:

 Hi Feng,

 Feng Shu tuma...@gmail.com writes:

 [update diff] make output format more beautiful

 thanks for the patch -- at first sight, the formatting should be
 fixed, let's try to avoid lines longer than 80 characters.  But in
 general, I'd be more comfortable with someone taking org-contacts.el
 in charge: I copy Grégoire as he proposed to do this.

 Thanks,

Hi Bastien,

I don't think this patch should be include into master,
I don't want people run between two different format.

Now org-mobile can't show propertiy quickly ,may be it's only a tmp
solution of the problem.

I want org-contact.el can manage this kind of format directly instead of 
exporting, but it's beyond my ability for I'm not a programmer


Feng Shu

-- 



Re: [O] [patch] ox-latex.el to allow customization of verbatim environments (e.g., to use fancyvrb)

2013-04-14 Thread Nicolas Goaziou
Hello,

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

 Here's my fancyvrb filter for when such a place is created.

 (defun org-latex-filter-fancyvrb (text backend info)
   Convert begin/end{verbatim} to begin/end{Verbatim}.
 Allows use of the fancyvrb latex package.
   (when (or (org-export-derived-backend-p backend 'beamer)
 (org-export-derived-backend-p backend 'latex))

`beamer' is derived from `latex' so a back-end derived from `beamer'
will ultimately be derived from `latex'. Hence:

  (org-export-derived-backend-p backend 'beamer)

can be removed.


Regards,

-- 
Nicolas Goaziou