Re: [O] Filters not working

2013-08-10 Thread Nicolas Goaziou
Hello,

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

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

 The changes introduced in commit

   cea0434c4f7f7f1fc1547e6790b96a76bc217e15
   ox: Change back-ends internal representation to structures

 necessitate extracting the name of the back-end from a vector.

 So, this bit of code 

  (memq backend '(beamer latex)) 

 will never return t, because backend is a vector.

 Probably what you want is 

  (memq (org-export-backend-name backend) '(latex beamer))

 Yes, got it now.

Actually, I didn't mean to introduce a type change in filter arguments.

I fixed it: BACKEND is again a symbol. `org-export-derived-backend-p'
still works, and so does `memq'.


Regards,

-- 
Nicolas Goaziou



Re: [O] [PATCH v2] Timestamps: Handle sub-10-min ranges when updating timestamps

2013-08-10 Thread Nicolas Goaziou
Hello,

Trevor Murphy trevor.m.mur...@gmail.com writes:

 * lisp/org.el (org-get-compact-tod): Always pad minutes to two places.

 TINYCHANGE

Applied. Thank you.


Regards,

-- 
Nicolas Goaziou



Re: [O] Org-Mode 8.07 LaTeX Beamer export does not parse headings to frames during export

2013-08-10 Thread Nicolas Goaziou
Hello,

Tom Slee ts...@web.ca writes:

 I have struggled with this myself. The answer is that the following line
 will give what you want:

 #+OPTIONS: H:2

 I'm not sure why the BEAMER_FRAME_LEVEL instruction doesn't handle that,
 but the OPTIONS seems needed.

BEAMER_FRAME_LEVEL doesn't exist anymore. Worg is not up-to-date wrt exporter
documentation. Org manual is.


Regards,

-- 
Nicolas Goaziou



Re: [O] [BUG] Infinite loop in org-agenda-show-new-time

2013-08-10 Thread Nick Dokos
Matt Lundin m...@imapmail.org writes:

 ...
 In other words, within the agenda buffer, move-to-column and
 move-end-of-line will move to the point to the end of the entire
 invisible region. That is why removing the local binding of
 buffer-invisibility-spec to nil triggers this bug, because when that
 variable is nil, the function org-agenda-show-new-time temporarily
 treats the agenda buffer as if it were visible (i.e., it ignores the
 invisible overlay).


I haven't been able to work on the problem, but assuming that your
diagnosis above is correct, perhaps the thing to do is to bind
buffeer-invisibility-spec to nil inside org-move-to-column:

--8---cut here---start-8---
(defun org-move-to-column (column optional force buffer)
  (let ((buffer-invisibility-spec nil))
(if (featurep 'xemacs)
(org-xemacs-without-invisibility (move-to-column column force 
buffer))
  (move-to-column column force
--8---cut here---end---8---

What do you think?
-- 
Nick




Re: [O] Filters not working

2013-08-10 Thread Thomas S. Dye
Nicolas Goaziou n.goaz...@gmail.com writes:

 Actually, I didn't mean to introduce a type change in filter arguments.

 I fixed it: BACKEND is again a symbol. `org-export-derived-backend-p'
 still works, and so does `memq'.

Thanks Nicolas. I can confirm that my old filters with memq work again
and that the new ones with org-export-derived-backend-p work for me,
too.

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] skip:t option not working

2013-08-10 Thread Scott Randby
On 08/09/2013 10:58 PM, Nick Dokos wrote:
 Scott Randby sran...@gmail.com writes:
 
 I cannot get the skip:t option to work with HTML export. This option is
 listed in the manual, and it worked before Org-8. Am I missing
 something? Below is a simple sample in which skip:t doesn't work, even
 with emacs -q. I'm using Emacs 24.2.1 with Org 8.0.3.

 
 I don't think it exists any longer.
 

If the option no longer exists, then it might be a good idea to remove
it from the manual.



Re: [O] how to handle svg files when exporting orgmode to html and pdf?

2013-08-10 Thread Cook, Malcolm
Thomas, Suvayu, Aaron, Nick, Eric, Carsten, Phil, et al,

Thanks for all your help.

I am now satisfied with approach for exporting images to inline html and inline 
latex=pdf.

In my hands, the following code block will produce in-line images in html and 
be included in exported pdf.

#+LATEX_HEADER: \usepackage{svg}
#+begin_src R :results  graphics output :exports both :file mtcars.svg
with(mtcars,plot(wt, mpg))
#+end_src 

I am using:
Emacs 24.3.1
Suvayus orgmode export filter:

(defun my-svg-graphics (contents backend info)
  (when (eq backend 'latex)
  (replace-regexp-in-string \\`includegraphics.+\\({.+\.svg}\\)
   includesvg\1 contents))
)
(add-to-list 'org-export-filter-link-functions 'my-svg-graphics)

* svg latex package v1.0 2004/11/05

 * customize the emacs variable `org-latex-pdf-process` to include
'--shell-escape' (following advice in
http://orgmode.org/worg/org-dependencies.html, which outlines some
other options)

* customize org-export-html-inline-image-extensions to include  svg 

 * upgrade to inkscape version 0.48.+ (which is more recent than our
centOS repos proffered, but, hey) since the --export-latex switch that
svg.sty depends upon is not implemented till this version

* upgrade org-mode version 8.0.7-377 built from git pull yesterday

I think I've covered all the pieces.

I have not explored how/whether any options passed to includegraphics are 
interpreted by includesvg.

Now, if I could get .svg images to display inline in my emacs buffer.  The 
following is not respected, at least in my hands.  
'(org-export-latex-inline-image-extensions (quote (pdf jpeg jpg 
png ps eps svg)))
Any takers?


~ Malcolm



 -Original Message-
 From: emacs-orgmode-bounces+mec=stowers@gnu.org 
 [mailto:emacs-orgmode-bounces+mec=stowers@gnu.org] On
 Behalf Of Malcolm Cook
 Sent: Thursday, August 08, 2013 9:05 PM
 To: Malcolm Cook; emacs-orgmode@gnu.org; Nick Dokos
 Subject: Re: [O] how to handle svg files when exporting orgmode to html and 
 pdf?
 
 Aaron,
 
 Thanks for staying with me on this.
 
 I'm not sure what you're suggesting.
 
 Nonetheless, I just updated org from `git clone 
 git://orgmode.org/org-mode.git`
 
 So, now I'm got org-version  release_8.0.7-377-gef2d47.dirty.
 
 Are you suggesting that  with this patch.svg created with exporting
 graphics :file should now display in the emacs buffer when I toggle
 display of inline images?  I wish they would.  They do not, despite my
 adding svg to org-export-latex-inline-image-extensions.
 
 Are you suggesting that such a .svg created by org code block would be
 appear in the pdf created when I export to latex - pdf?  I wish that
 also... that's what I've been trying to accomplish.
 
 Thanks!,
 
 
 Malcolm
 
 
 PS - I see you are/were in PA in linguistics.   My first job after my
 masters in AI from U Mass was at CMU's psych dept as a lisp programmer
 for John Anderson's intelligent tutoring systems.  I then went on in
 computational linguistics a bit, working on a marcus parser based
 natural language processing system at wang labs.  Ages ago.  Now I'm
 in computational biology.  The one commonality through it all?  Emacs!
 --
 Malcolm Cook
 h - 913.642.5257
 c - 913.226.1542
 w - 816.926.4449
 
 
 On Thu, Aug 8, 2013 at 4:34 PM, Aaron Ecay aarone...@gmail.com wrote:
  Hi Malcom,
 
  There is a patch that was added to the master branch of the org git
  repository on Jul 27, which turns this from a link into a real inclusion
  of the image.  So, it will only work as intended if you are using a git
  checkout from after that date.
 
  My apologies, I should have made this more prominent in my earlier
  mails.
 
  --
  Aaron Ecay




Re: [O] skip:t option not working

2013-08-10 Thread Nick Dokos
Scott Randby sran...@gmail.com writes:

 On 08/09/2013 10:58 PM, Nick Dokos wrote:
 Scott Randby sran...@gmail.com writes:
 
 I cannot get the skip:t option to work with HTML export. This option is
 listed in the manual, and it worked before Org-8. Am I missing
 something? Below is a simple sample in which skip:t doesn't work, even
 with emacs -q. I'm using Emacs 24.2.1 with Org 8.0.3.

 
 I don't think it exists any longer.
 

 If the option no longer exists, then it might be a good idea to remove
 it from the manual.


Indeed, but afaict, it's no longer in the current (8.0.7) manual. Are
you looking at an older version of the manual perhaps? I might have
missed the reference of course, in which case if you post the details,
somebody will fix it.

-- 
Nick




Re: [O] skip:t option not working

2013-08-10 Thread Scott Randby
On 08/10/2013 02:00 PM, Nick Dokos wrote:
 Scott Randby sran...@gmail.com writes:
 
 On 08/09/2013 10:58 PM, Nick Dokos wrote:
 Scott Randby sran...@gmail.com writes:

 I cannot get the skip:t option to work with HTML export. This option is
 listed in the manual, and it worked before Org-8. Am I missing
 something? Below is a simple sample in which skip:t doesn't work, even
 with emacs -q. I'm using Emacs 24.2.1 with Org 8.0.3.


 I don't think it exists any longer.


 If the option no longer exists, then it might be a good idea to remove
 it from the manual.

 
 Indeed, but afaict, it's no longer in the current (8.0.7) manual. Are
 you looking at an older version of the manual perhaps? I might have
 missed the reference of course, in which case if you post the details,
 somebody will fix it.
 

You can find a reference to the skip option on this page:

http://orgmode.org/manual/Export-options.html

It seems that this is the old 12.2 page, but it still links up to the
8.0.7 manual. No wonder I've been confused. The correct 12.2 page is
given by this link:

http://orgmode.org/manual/Export-back_002dends.html#Export-back_002dends

The current export options (which I missed before) are now in section 12.3:

http://orgmode.org/manual/Export-settings.html#Export-settings

I think the website needs to be cleaned up a bit.

Scott Randby



[O] [PATCH] ox-icalendar: fix handling of timestamps

2013-08-10 Thread Viktor Rosenfeld
  * ox-icalendar.el (org-icalendar-entry): Honor setting of
  `org-icalendar-with-timestamps' for timestamps on headlines
  and checkboxes.

  The setting `org-icalendar-with-timestamps' was only applied
  to timestamps which do not appear on a heading or on a
  checkbox. E.g., with `org-icalendar-with-timestamps' set to
  'active, an heading containing an inactive timestamp on would
  be exported. This patch fixes this.

TINYCHANGE
---
 lisp/ox-icalendar.el | 15 ---
 1 file changed, 12 insertions(+), 3 deletions(-)

diff --git a/lisp/ox-icalendar.el b/lisp/ox-icalendar.el
index c6ab295..8f15124 100644
--- a/lisp/ox-icalendar.el
+++ b/lisp/ox-icalendar.el
@@ -580,15 +580,24 @@ inlinetask within the section.
  ;; When collecting plain timestamps from a headline and
  ;; its title, skip inlinetasks since collection will
  ;; happen once ENTRY is one of them.
- (let ((counter 0))
+ (let ((counter 0)
+ (with-timestamps (plist-get info :with-timestamps)))
(mapconcat
 'identity
 (org-element-map (cons (org-element-property :title entry)
  (org-element-contents inside))
   'timestamp
 (lambda (ts)
-  (let ((uid (format TS%d-%s (incf counter) uid)))
-(org-icalendar--vevent entry ts uid summary loc desc cat)))
+  (let ((type (org-element-property :type ts))
+  (uid (format TS%d-%s (incf counter) uid)))
+(when (or (eq with-timestamps 'all)
+(and (eq with-timestamps 'active)
+   (or (eq type 'active)
+ (eq type 'active-range)))
+(and (eq with-timestamps 'inactive)
+   (or (eq type 'inactive)
+ (eq type 'inactive-range
+  (org-icalendar--vevent entry ts uid summary loc desc cat
 info nil (and (eq type 'headline) 'inlinetask))
 ))
  ;; Task: First check if it is appropriate to export it.
-- 
1.8.3.4




[O] [PATCH] org-mobile.el: Skip after and before elements

2013-08-10 Thread Viktor Rosenfeld
  * org-mobile.el (org-mobile-add-after): Variable to turn off
  printing of information inside after element.
  (org-mobile-add-before): Variable to turn off printing of
  information inside before element.
  (org-mobile-sumo-agenda-command): Optionally skip printing of
  information inside after element.
  (org-mobile-write-agenda-for-mobile): Optionally skip printing
  of information inside before element.

  The MobileOrg push command adds some information inside an
  after element on the heading, e.g., the agenda key and name,
  and inside a before element in the body, e.g., the category
  and time information. This patch adds the ability to disable
  this behavior. It is not very sophisticated; a better way
  would be to support custom layouts of the data shown in
  MobileOrg.

TINYCHANGE
---
 lisp/org-mobile.el | 30 ++
 1 file changed, 22 insertions(+), 8 deletions(-)

diff --git a/lisp/org-mobile.el b/lisp/org-mobile.el
index 7cdaf34..a866293 100644
--- a/lisp/org-mobile.el
+++ b/lisp/org-mobile.el
@@ -255,6 +255,16 @@ using `rsync' or `scp'.)
 (defvar org-mobile-files-alist nil)
 (defvar org-mobile-checksum-files nil)
 
+(defcustom org-mobile-add-after t
+  Add information inside after element.
+  :group 'org-mobile
+  :type 'boolean)
+
+(defcustom org-mobile-add-before t
+  Add information inside before element.
+  :group 'org-mobile
+  :type 'boolean)
+
 (defun org-mobile-prepare-file-lists ()
   (setq org-mobile-files-alist (org-mobile-files-alist))
   (setq org-mobile-checksum-files nil))
@@ -581,10 +591,11 @@ The table of checksums is written to the file 
mobile-checksums.
settings (nth 4 e))
  (setq settings
(cons (list 'org-agenda-title-append
-   (concat afterKEYS= key  TITLE: 
- (if (and (stringp desc) ( (length desc) 0))
- desc (symbol-name type))
- /after))
+   (when org-mobile-add-after
+ (concat afterKEYS= key  TITLE: 
+   (if (and (stringp desc) ( (length desc) 0))
+ desc (symbol-name type))
+   /after)))
settings))
  (push (list type match settings) new))
((or (functionp (nth 2 e)) (symbolp (nth 2 e)))
@@ -601,9 +612,10 @@ The table of checksums is written to the file 
mobile-checksums.
(setq settings (append gsettings settings))
(setq settings
(cons (list 'org-agenda-title-append
- (concat afterKEYS= gkey # (number-to-string
-  (setq cnt (1+ cnt)))
-TITLE:  atitle /after))
+ (when org-mobile-add-after
+   (concat afterKEYS= gkey # (number-to-string
+(setq cnt (1+ cnt)))
+  TITLE:  atitle /after)))
  settings))
(push (list type match settings) new)
 (and new (list X SUMO (reverse new)
@@ -650,7 +662,9 @@ The table of checksums is written to the file 
mobile-checksums.
  pl
  (point-at-eol
(delete-region (point-at-bol) (point-at-eol))
-   (insert line before prefix /before)
+   (insert line)
+   (when org-mobile-add-before
+ (insert before prefix /before))
(beginning-of-line 1))
  (and (looking-at [ \t]+) (replace-match )))
(insert (if in-date ***   **  ))
-- 
1.8.3.4




Re: [O] [PATCH] ox-icalendar: fix handling of timestamps

2013-08-10 Thread Aaron Ecay
Hi Viktor,

Thanks for this patch; I had also noticed this problem.

2013ko abuztuak 10an, Viktor Rosenfeld-ek idatzi zuen:
 
   * ox-icalendar.el (org-icalendar-entry): Honor setting of
   `org-icalendar-with-timestamps' for timestamps on headlines
   and checkboxes.
 
   The setting `org-icalendar-with-timestamps' was only applied
   to timestamps which do not appear on a heading or on a
   checkbox. E.g., with `org-icalendar-with-timestamps' set to
   'active, an heading containing an inactive timestamp on would
   be exported. This patch fixes this.
 
 TINYCHANGE
 ---
  lisp/ox-icalendar.el | 15 ---
  1 file changed, 12 insertions(+), 3 deletions(-)
 
 diff --git a/lisp/ox-icalendar.el b/lisp/ox-icalendar.el
 index c6ab295..8f15124 100644
 --- a/lisp/ox-icalendar.el
 +++ b/lisp/ox-icalendar.el
 @@ -580,15 +580,24 @@ inlinetask within the section.
   ;; When collecting plain timestamps from a headline and
   ;; its title, skip inlinetasks since collection will
   ;; happen once ENTRY is one of them.
 - (let ((counter 0))
 + (let ((counter 0)
 + (with-timestamps (plist-get info :with-timestamps)))
 (mapconcat
  'identity
  (org-element-map (cons (org-element-property :title entry)
   (org-element-contents inside))
'timestamp
  (lambda (ts)
 -  (let ((uid (format TS%d-%s (incf counter) uid)))
 -(org-icalendar--vevent entry ts uid summary loc desc cat)))
 +  (let ((type (org-element-property :type ts))
 +  (uid (format TS%d-%s (incf counter) uid)))
 +(when (or (eq with-timestamps 'all)

Here, I think you want to compare with t, not 'all (check the defcustom
for ‘org-icalendar-with-timestamps’).

 +(and (eq with-timestamps 'active)
 +   (or (eq type 'active)
 + (eq type 'active-range)))

This is only a cosmetic comment, so feel free to disregard it, but:
might the ‘(or ...)’ be cleaner as ‘(memq type '(active active-range))’?

-- 
Aaron Ecay