Re: [O] Release 9.0 test failed: test-ob/indented-cached-org-bracket-link

2016-11-19 Thread Charles C. Berry

On Sat, 19 Nov 2016, John Kitchin wrote:


I have also seen this error on my mac. I guess it is from the trailing
slash as you suggest:


echo $TMPDIR

/var/folders/5q/lllv2yf95hg_n6h6kjttbmdwgn/T/




So,

: testdir=${TMPDIR%/}/tmp-orgtest

in mk/default.mk would handle this on my mac, but I do not know if 
this is fully portable.


OTOH, (expand-file-name "test.txt") resolves double-slashes and seems like 
the right idiom in any case.


Chuck




[O] translating event sexps to org for org-caldav

2016-11-19 Thread Myles English

Hello,

After the recent discussion about org-caldav I thought I would give it a
try.  Unfortunately it won't work for my main diary that uses a lot of
sexps[fn:1]

>From the org-caldav github page[fn:2] :

"""However, sexp-entries are insanely flexible, and there are limits as
to what the icalendar exporter will handle. For example, this here

** Regular event
   <%%(memq (calendar-day-of-week date) '(1 3 5))>

will not be exported at all."""

However, org-agenda uses these sexps to make entries in the agenda.

Would it be possible to reuse something from org-agenda to write these
entries as org items into a file that could be uploaded using
org-caldav?  Maybe org-get-entries-from-diary?  Is there a huge problem
with this that I haven't noticed?

Obviously this would just be a one-way push rather than a sync.

Thanks,
Myles


* Footnotes

[fn:1] I think I started using sexps just because org-mode can't do
e.g. "every Monday, *between these two dates*"

[fn:2] https://github.com/dengste/org-caldav



Re: [O] Formatting dates in org-html postamble

2016-11-19 Thread Nicolas Goaziou
Hello,

Pavel Panchekha  writes:

> I have
>
> #+TITLE: title here
>>
>
> #+DATE: <2016-10-20>
>>
>
> in an org file, with no other "#+" lines set.
>
> In my configuration file, I have set
>
> (setf org-html-postamble-format
>>   (list
>>(list
>> "en"
>>  "By %a on
>> %d.\n")))
>>
> (setf org-html-metadata-timestamp-format "%d %B %Y")
>>
>
> When I publish to HTML, the date is printed directly as "<2016-10-20 Thu>".
>
> I am using Emacs 25.1.1 and Org 9.0.1.
>
> I have looked through the code, and think the error is likely on line 1882
> of ox-html.el, where the date format ought to be passed to
> org-export-get-date as the optional second argument.

Fixed. Thank you for the report and the analysis.

Regards,

-- 
Nicolas Goaziou



Re: [O] Bug: org-export-to-buffer throws error if buffer is empty or contains empty lines only [9.0 (release_9.0-6-gf56456)]

2016-11-19 Thread Nicolas Goaziou
Hello,

"Stefan-W. Hahn"  writes:

> Hello,
>
> when exporting buffers containing nothing or just empty lines, like:
>
> #+BEGIN_SRC emacs-lisp
> (with-temp-buffer
>   (org-mode)
>   (insert "")
>   (org-export-to-buffer 'html "*Formatted Copy*" nil nil t t))
> #+END_SRC
>
>
> then org-export-to-buffer throws an error:
>
> #+BEGIN_QUOTE
> Debugger entered--Lisp error: (wrong-type-argument char-or-string-p nil)

Fixed. Thank you.

Regards,

-- 
Nicolas Goaziou



[O] [PATCH] org-mac-link: Add autoload cookies for all commands

2016-11-19 Thread Chunyang Xu
Hi,

I would like to add autoload cookies for commands in org-mac-link.el, so
I don't have to autoload them manually in my init.el.

>From 5e00fa82001b57051770f0e4854e03ece39cc68d Mon Sep 17 00:00:00 2001
From: Chunyang Xu 
Date: Wed, 16 Nov 2016 21:30:13 +0800
Subject: [PATCH] org-mac-link: Add autoload cookies for all commands

---
 contrib/lisp/org-mac-link.el | 27 +++
 1 file changed, 27 insertions(+)

diff --git a/contrib/lisp/org-mac-link.el b/contrib/lisp/org-mac-link.el
index ae2def3..f8a44c7 100644
--- a/contrib/lisp/org-mac-link.el
+++ b/contrib/lisp/org-mac-link.el
@@ -233,6 +233,7 @@
   (setq return (shell-command-to-string cmd))
   (concat "\"" (org-trim return) "\""
 
+;;;###autoload
 (defun org-mac-grab-link ()
   "Prompt for an application to grab a link from.
 When done, go grab the link, and insert it at point."
@@ -340,11 +341,13 @@ The links are of the form ::split::."
 	   "return links as string\n"
 (car (split-string result "[\r\n]+" t
 
+;;;###autoload
 (defun org-mac-firefox-get-frontmost-url ()
   (interactive)
   (message "Applescript: Getting Firefox url...")
   (org-mac-paste-applescript-links (org-as-mac-firefox-get-frontmost-url)))
 
+;;;###autoload
 (defun org-mac-firefox-insert-frontmost-url ()
   (interactive)
   (insert (org-mac-firefox-get-frontmost-url)))
@@ -378,11 +381,13 @@ The links are of the form ::split::."
 (replace-regexp-in-string
  "\s+-\s+Vimperator" "" (car (split-string result "[\r\n]+" t)
 
+;;;###autoload
 (defun org-mac-vimperator-get-frontmost-url ()
   (interactive)
   (message "Applescript: Getting Vimperator url...")
   (org-mac-paste-applescript-links (org-as-mac-vimperator-get-frontmost-url)))
 
+;;;###autoload
 (defun org-mac-vimperator-insert-frontmost-url ()
   (interactive)
   (insert (org-mac-vimperator-get-frontmost-url)))
@@ -408,11 +413,13 @@ The links are of the form ::split::."
 (replace-regexp-in-string
  "^\"\\|\"$" "" (car (split-string result "[\r\n]+" t)
 
+;;;###autoload
 (defun org-mac-chrome-get-frontmost-url ()
   (interactive)
   (message "Applescript: Getting Chrome url...")
   (org-mac-paste-applescript-links (org-as-mac-chrome-get-frontmost-url)))
 
+;;;###autoload
 (defun org-mac-chrome-insert-frontmost-url ()
   (interactive)
   (insert (org-mac-chrome-get-frontmost-url)))
@@ -430,12 +437,14 @@ The links are of the form ::split::."
 "	return theUrl & \"::split::\" & theName & \"\n\"\n"
 "end tell\n")))
 
+;;;###autoload
 (defun org-mac-safari-get-frontmost-url ()
   (interactive)
   (message "Applescript: Getting Safari url...")
   (org-mac-paste-applescript-links 
(org-as-mac-safari-get-frontmost-url)))
 
+;;;###autoload
 (defun org-mac-safari-insert-frontmost-url ()
   (interactive)
   (insert (org-mac-safari-get-frontmost-url)))
@@ -461,11 +470,13 @@ The links are of the form ::split::."
 "	return theLinkList as string\n"
 "end tell")))
 
+;;;###autoload
 (defun org-mac-together-get-selected ()
   (interactive)
   (message "Applescript: Getting Togther items...")
   (org-mac-paste-applescript-links (as-get-selected-together-items)))
 
+;;;###autoload
 (defun org-mac-together-insert-selected ()
   (interactive)
   (insert (org-mac-together-get-selected)))
@@ -486,11 +497,13 @@ The links are of the form ::split::."
 " return links as string\n"
 "end tell\n")))
 
+;;;###autoload
 (defun org-mac-finder-item-get-selected ()
   (interactive)
   (message "Applescript: Getting Finder items...")
   (org-mac-paste-applescript-links (as-get-selected-finder-items)))
 
+;;;###autoload
 (defun org-mac-finder-insert-selected ()
   (interactive)
   (insert (org-mac-finder-item-get-selected)))
@@ -516,11 +529,13 @@ The links are of the form ::split::."
 "	return links as string\n"
 "end tell\n")))
 
+;;;###autoload
 (defun org-mac-addressbook-item-get-selected ()
   (interactive)
   (message "Applescript: Getting Address Book items...")
   (org-mac-paste-applescript-links (as-get-selected-addressbook-items)))
 
+;;;###autoload
 (defun org-mac-addressbook-insert-selected ()
   (interactive)
   (insert (org-mac-addressbook-item-get-selected)))
@@ -572,11 +587,13 @@ The links are of the form ::split::."
 "end tell\n"
 "return theLink as string\n")))
 
+;;;###autoload
 (defun org-mac-skim-get-page ()
   (interactive)
   (message "Applescript: Getting Skim page link...")
   (org-mac-paste-applescript-links (as-get-skim-page-link)))
 
+;;;###autoload
 (defun org-mac-skim-insert-page ()
   (interactive)
   (insert (org-mac-skim-get-page)))
@@ -623,11 +640,13 @@ The links are of the form ::split::."
 "set theResult to \"acrobat:\" & thePath & \"::\" & thePage & \"::split::\" & theTitle & \", p.\" & theLabel\n"
 "return theResult as string\n")))
 
+;;;###autoload
 (defun org-mac-acrobat-get-page ()
   (interactive)
   (message "Applescript: Getting Acrobat page link...")
   (org-mac-paste-applescript-links (org-mac-as-get-a

[O] How to format dates in org-table-export (Format: orgtbl-to-csv)

2016-11-19 Thread debaditya

Hi,

I am trying to export an org table to csv, which contain dates in the 
format <%m-%d-%Y>, this i have achieved by including


(custom-set-variables
 '(org-time-stamp-custom-formats (quote ("<%m-%d-%Y>" . "<%Y-%m-%d>"

in my init file.

Now as this is an overlay, when I am trying to export the org table, the 
output dates are getting formatted as the default orgmode date format 
<%Y-%m-%d %a>. Naively, I tried to add in the init file


(custom-set-variables '(org-export-date-timestamp-format "%m-%d-%Y" ))

which does not change the default date format being exported.

I guess the default formatting of the orgtbl-to-csv needs to be tweaked 
for this purpose, but I may be wrong.


Any input will be very much appreciated.

Thanks
Deb




Re: [O] Release 9.0 test failed: test-ob/indented-cached-org-bracket-link

2016-11-19 Thread John Kitchin
I have also seen this error on my mac. I guess it is from the trailing
slash as you suggest:

> echo $TMPDIR
/var/folders/5q/lllv2yf95hg_n6h6kjttbmdwgn/T/


Achim Gratz writes:

> Charles C. Berry writes:
>> Doing this with `make test', I see that default-directory is let bound to
>>
>> "/var/folders/kb/2hchpbyj7lb6z76l0q73w_fhgn/T//tmp-orgtest/"
>>
>> and (concat default-directory "test.txt") will retain the double slash.
>
> Not to sound facetious, but it seems that the make variable testdir gets
> set to a path that has a trailing slash.  Fix that and the problem
> should go away (most likely TMPDIR has a trailing slash).  Check with
>
> : make config
>
> or even
>
> : make config-all
>
> that the variable is set correctly.
>
> Regards,
> Achim.


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



Re: [O] Formatting dates in org-html postamble

2016-11-19 Thread Pavel Panchekha
I'm sorry, let me give a full bug report:

I have

#+TITLE: title here
>
#+DATE: <2016-10-20>
>

in an org file, with no other "#+" lines set.

In my configuration file, I have set

(setf org-html-postamble-format
>   (list
>(list
> "en"
>  "By %a on
> %d.\n")))
>
(setf org-html-metadata-timestamp-format "%d %B %Y")
>

When I publish to HTML, the date is printed directly as "<2016-10-20 Thu>".

I am using Emacs 25.1.1 and Org 9.0.1.

I have looked through the code, and think the error is likely on line 1882
of ox-html.el, where the date format ought to be passed to
org-export-get-date as the optional second argument.

As a workaround, I am currently setting org-export-date-timestamp-format,
but it seems like this ought to be HTML-specific.

—Pavel Panchekha

On Sat, Nov 19, 2016 at 1:33 AM, Nicolas Goaziou 
wrote:

> Hello,
>
> Pavel Panchekha  writes:
>
> > I've been trying to set the date format in the HTML postamble. It looks
> > like a date given in #+DATE is not being formatted according to the date
> > format specification, but if no #+DATE is given, the format specification
> > is used.
> >
> > Is this intended behavior—should I write formatted dates in #+DATE?
>
> We need more information to answer this.
>
> What exactly did you try (configured variables, #+DATE keyword ...)?
> What Org version are you using? What did you expect?
>
> If you have some spare time,
>  may be a good
> read.
>
> Regards,
>
> --
> Nicolas Goaziou
>


Re: [O] Release 9.0 test failed: test-ob/indented-cached-org-bracket-link

2016-11-19 Thread Achim Gratz
Charles C. Berry writes:
> Doing this with `make test', I see that default-directory is let bound to
>
> "/var/folders/kb/2hchpbyj7lb6z76l0q73w_fhgn/T//tmp-orgtest/"
>
> and (concat default-directory "test.txt") will retain the double slash.

Not to sound facetious, but it seems that the make variable testdir gets
set to a path that has a trailing slash.  Fix that and the problem
should go away (most likely TMPDIR has a trailing slash).  Check with

: make config

or even

: make config-all

that the variable is set correctly.

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

SD adaptations for KORG EX-800 and Poly-800MkII V0.9:
http://Synth.Stromeko.net/Downloads.html#KorgSDada




Re: [O] Release 9.0 test failed: test-ob/indented-cached-org-bracket-link

2016-11-19 Thread Charles C. Berry

On Fri, 18 Nov 2016, Nicolas Goaziou wrote:


Hello,

"Charles C. Berry"  writes:


On Fri, 18 Nov 2016, Nicolas Goaziou wrote:


Hello,

David Talmage  writes:


I built org 9.0 on my Mac today.  'make test' reported one failed test.  I
don't know if it is important or not.  Please advise me.

'make test' said:

1 unexpected results:
   FAILED  test-ob/indented-cached-org-bracket-link




[snip]




Another option is to modify the test so it prints some useful debugging
information before failing (e.g., contents of default-directory and
return value of (org-babel-execute-src-block)).



Doing this with `make test', I see that default-directory is let bound to

"/var/folders/kb/2hchpbyj7lb6z76l0q73w_fhgn/T//tmp-orgtest/"

and (concat default-directory "test.txt") will retain the double slash.

The return value from the second (org-babel-execute-src-block) has only a 
single slash between 'T' and 'tmp'. Hence the failure.


When run interactively, there is no double slash and the test succeeds.

Using

: (expand-file-name "test.txt")

in place of

: (concat default-directory "test.txt)

cleans out the double slash and succeeds either with `make test' or 
interactively.


So, maybe make that change?

Chuck



[O] Bug: org-export-to-buffer throws error if buffer is empty or contains empty lines only [9.0 (release_9.0-6-gf56456)]

2016-11-19 Thread Stefan-W. Hahn
Hello,

when exporting buffers containing nothing or just empty lines, like:

#+BEGIN_SRC emacs-lisp
(with-temp-buffer
  (org-mode)
  (insert "")
  (org-export-to-buffer 'html "*Formatted Copy*" nil nil t t))
#+END_SRC

then org-export-to-buffer throws an error:

#+BEGIN_QUOTE
Debugger entered--Lisp error: (wrong-type-argument char-or-string-p nil)
  org-export-to-buffer(html "*Formatted Copy*" nil nil t t)
  (progn (org-mode) (insert "") (org-export-to-buffer (quote html) "*Formatted 
Copy*" nil nil t t))
  (unwind-protect (progn (org-mode) (insert "") (org-export-to-buffer (quote 
html) "*Formatted Copy*" nil nil t t)) (and (buffer-name temp-buffer) 
(kill-buffer temp-buffer)))
  (save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn 
(org-mode) (insert "") (org-export-to-buffer (quote html) "*Formatted Copy*" 
nil nil t t)) (and (buffer-name temp-buffer) (kill-buffer temp-buffer
  (let ((temp-buffer (generate-new-buffer " *temp*"))) (save-current-buffer 
(set-buffer temp-buffer) (unwind-protect (progn (org-mode) (insert "") 
(org-export-to-buffer (quote html) "*Formatted Copy*" nil nil t t)) (and 
(buffer-name temp-buffer) (kill-buffer temp-buffer)
  eval((let ((temp-buffer (generate-new-buffer " *temp*"))) 
(save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn (org-mode) 
(insert "") (org-export-to-buffer (quote html) "*Formatted Copy*" nil nil t t)) 
(and (buffer-name temp-buffer) (kill-buffer temp-buffer) nil)
  elisp--eval-last-sexp(nil)
  eval-last-sexp(nil)
  funcall-interactively(eval-last-sexp nil)
  call-interactively(eval-last-sexp nil nil)
  command-execute(eval-last-sexp)
#+END_QUOTE

Reason for this is located here:

#+BEGIN_SRC emacs-lisp
(defun org-export-to-buffer
  (backend buffer
   &optional async subtreep visible-only body-only ext-plist
   post-process)
..
(let ((output
   (org-export-as backend subtreep visible-only body-only ext-plist))
  (buffer (get-buffer-create buffer))
  (encoding buffer-file-coding-system))
  (when (and (org-string-nw-p output) (org-export--copy-to-kill-ring-p))
(org-kill-new output))
  (with-current-buffer buffer
(erase-buffer)
(setq buffer-file-coding-system encoding)
--> (insert output)
(goto-char (point-min))
(and (functionp post-process) (funcall post-process)))
  (when org-export-show-temporary-export-buffer
(switch-to-buffer-other-window buffer))
  buffer)))

#+END_SRC

In the explained case the output is nil. This gives the error.

With kind regards,
Stefan


Emacs  : GNU Emacs 25.1.50.1 (x86_64-pc-linux-gnu, GTK+ Version 3.18.9)
 of 2016-10-23
Package: Org mode version 9.0 (release_9.0-6-gf56456 @ 
/home/hs/.emacs.d/git/org-mode/lisp/)


-- 
Stefan-W. Hahn  It is easy to make things.
It is hard to make things simple.



Re: [O] Formatting dates in org-html postamble

2016-11-19 Thread Nicolas Goaziou
Hello,

Pavel Panchekha  writes:

> I've been trying to set the date format in the HTML postamble. It looks
> like a date given in #+DATE is not being formatted according to the date
> format specification, but if no #+DATE is given, the format specification
> is used.
>
> Is this intended behavior—should I write formatted dates in #+DATE?

We need more information to answer this. 

What exactly did you try (configured variables, #+DATE keyword ...)?
What Org version are you using? What did you expect?

If you have some spare time,
 may be a good
read.

Regards,

-- 
Nicolas Goaziou



Re: [O] project website from org

2016-11-19 Thread Thibault Marin

Hi,

I recently research that a little.  I think a good place to start is the
worg tutorial at:
http://orgmode.org/worg/org-tutorials/org-publish-html-tutorial.html.

I decided to use org without jekyll to avoid intermediaries, but that is
one option.

I found the following blog posts about blogging in org useful:

http://bastibe.de/2013-11-13-blogging-with-emacs.html
http://emacs-doctor.com/blogging-from-emacs.html

http://endlessparentheses.com/how-i-blog-one-year-of-posts-in-a-single-org-file.html
https://github.com/howardabrams/dot-files/blob/master/emacs-blog.org
http://www.john2x.com/blog/blogging-with-orgmode.html
https://ogbe.net/blog/blogging_with_org.html
http://nicolas.petton.fr/blog/blogging-with-org-mode.html

and mine:
https://thibaultmarin.github.io/blog/posts/2016-11-13-Personal_website_in_org.html

Hope it helps.

thibault


Julian M. Burgos writes:

> Dear list,
>
> I have given the task to set up a website to display the research in one
> of our projects.  I have little experience with html and website
> maintenance, so I think this would be a good opportunity to learn.  I
> would like to create the content for the website in org-mode (of
> course).  Do you have any recommendations for tools to generate a static
> website from org-mode?  Is a combo of Jekyll and GitHub pages a good
> option?
>
> Many thanks,
>
> Julian




[O] project website from org

2016-11-19 Thread Julian M. Burgos
Dear list,

I have given the task to set up a website to display the research in one
of our projects.  I have little experience with html and website
maintenance, so I think this would be a good opportunity to learn.  I
would like to create the content for the website in org-mode (of
course).  Do you have any recommendations for tools to generate a static
website from org-mode?  Is a combo of Jekyll and GitHub pages a good
option?

Many thanks,

Julian

--
Julian Mariano Burgos, PhD
Hafrannsóknastofnun, rannsókna- og ráðgjafarstofnun hafs og vatna/
Marine and Freshwater Research Institute
Skúlagata 4, 121 Reykjavík, Iceland
Sími/Telephone : +354-5752037
Bréfsími/Telefax:  +354-5752001
Netfang/Email: julian.bur...@hafogvatn.is



[O] Formatting dates in org-html postamble

2016-11-19 Thread Pavel Panchekha
I've been trying to set the date format in the HTML postamble. It looks
like a date given in #+DATE is not being formatted according to the date
format specification, but if no #+DATE is given, the format specification
is used.

Is this intended behavior—should I write formatted dates in #+DATE?

—Pavel Panchekha