Re: [O] HTML/images zipped projects

2015-07-07 Thread Eric Abrahamsen
Rasmus  writes:

> Robert Klein  writes:
>
>> For single file export (cf. the ox-htmlzip example I sent earlier) I
>> have some ideas, but haven't implemented them yet (Vaidheeswaran C's
>> comment about epub being close to zip hit a nerve, so I'll take a shot
>> at extending it to an epub exporter..
>
> BTW: do you know that ox-odt already zips files?  Perhaps you want to take
> a look at it and see if its approach is useful and can be generalized for
> your need.

Last year I started work on an "epub-mode", for editing epubs. I got
distracted and haven't worked on it much, but the zipping/unzipping is
in place, so maybe you could borrow that. When I finally finish it I was
planning on writing an integrated Org exporter, but who knows when that
will happen!

https://github.com/girzel/epub-mode

Eric




Re: [O] [PATCH] ox-odt; make author and date lines optional

2015-07-07 Thread Matt Price
ha!  I thought odt export didn't honor those variables -- but I must have
had something wrong in my environment, because now I see that it does.
Sorry to waste your time!


m

On Tue, Jul 7, 2015, 18:04 Rasmus  wrote:

> Matt Price  writes:
>
> > The simple attached patch adds 2 defcustoms to org-odt, allowing the
> author
> > and date lines to be suppressed in the exported file.  I have wnated this
> > for a really long time, so submitting to the group in cas other people
> also
> > want it.
>
> Can you explain what is the difference between this and something like:
>
> #+options: author:nil date:nil
>
> --
> And I faced endless streams of vendor-approved Ikea furniture. . .
>
>
>


Re: [O] [PATCH] ox-odt; make author and date lines optional

2015-07-07 Thread Rasmus
Matt Price  writes:

> The simple attached patch adds 2 defcustoms to org-odt, allowing the author
> and date lines to be suppressed in the exported file.  I have wnated this
> for a really long time, so submitting to the group in cas other people also
> want it.

Can you explain what is the difference between this and something like:

#+options: author:nil date:nil

-- 
And I faced endless streams of vendor-approved Ikea furniture. . .




[O] [PATCH]: ox-deck

2015-07-07 Thread Matt Price
Do patches for contrib go to the list? this fixes export of checkbox list
items when they are part of a deck.js "build" within a slide.
From dacc39e25f86ddf0cfda5693a4ace3a26cf31e73 Mon Sep 17 00:00:00 2001
From: Matt Price 
Date: Tue, 7 Jul 2015 17:53:03 -0400
Subject: [PATCH] ox-deck: parse checkboxes properly

*ox-deck.el
Previously, list items with checkboxes would not build properly. This
trivial and clumsy patch fixes that.
---
 contrib/lisp/ox-deck.el | 7 +--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/contrib/lisp/ox-deck.el b/contrib/lisp/ox-deck.el
index 915373f..03d035c 100644
--- a/contrib/lisp/ox-deck.el
+++ b/contrib/lisp/ox-deck.el
@@ -366,7 +366,7 @@ holding export options."
   (concat contents "\n"))
 
 (defun org-deck-headline (headline contents info)
-  (let ((org-html-toplevel-hlevel 2)
+(let ((org-html-toplevel-hlevel 2)
 (class (or (org-element-property :HTML_CONTAINER_CLASS headline) ""))
 (level (org-export-get-relative-level headline info)))
 (when (and (= 1 level) (not (string-match-p "\\" class)))
@@ -382,7 +382,10 @@ the \"slide\" class will be added to the to the list element,
  which will make the list into a \"build\"."
   (let ((text (org-html-item item contents info)))
 (if (org-export-get-node-property :STEP item t)
-(replace-regexp-in-string "^" "" text)
+	(progn
+	  (replace-regexp-in-string "^" "" text)
+	  (replace-regexp-in-string "^" "" text)
+	  )
   text)))
 
 (defun org-deck-link (link desc info)
-- 
2.4.3



[O] [PATCH] ox-odt; make author and date lines optional

2015-07-07 Thread Matt Price
Hi,

The simple attached patch adds 2 defcustoms to org-odt, allowing the author
and date lines to be suppressed in the exported file.  I have wnated this
for a really long time, so submitting to the group in cas other people also
want it.

I would have liked to add this as an option but don't know how!  Thanks,
Matt
From a18716e26db81372af47c57ad3bdf05a648c88d2 Mon Sep 17 00:00:00 2001
From: Matt Price 
Date: Tue, 7 Jul 2015 17:30:58 -0400
Subject: [PATCH] Make date and author lines optional.

* ox-odt.el (org-odt-print-author-line, org-odt-print-date-line)

Adds defcustoms org-odt-print-author-line and
org-odt-print-date-line, which, when non-nil,
suppress these elements in the final exported odt.
---
 lisp/ox-odt.el | 93 +++---
 1 file changed, 57 insertions(+), 36 deletions(-)

diff --git a/lisp/ox-odt.el b/lisp/ox-odt.el
index 163f580..1739c96 100644
--- a/lisp/ox-odt.el
+++ b/lisp/ox-odt.el
@@ -950,7 +950,27 @@ See `org-odt--build-date-styles' for implementation details."
   :type 'boolean)
 
 
-
+
+ First Page Properties
+(defcustom org-odt-print-author-line t
+  "Specify whether or not to include an author line below the title in 
+the exported document. When set to nil, the author line will be 
+suppressed  At present, setting to nil will also suppress 
+printing of author's email."
+  :group 'org-export-odt
+  :version "24.1"
+  :type 'boolean)
+
+(defcustom org-odt-print-date-line t
+  "Specify whether or not to include a date line below the title in 
+the exported document. When set to nil, the author line will be 
+suppressed  At present, setting to nil will also suppress 
+printing of author's email."
+  :group 'org-export-odt
+  :version "24.1"
+  :type 'boolean)
+
+
 ;;; Internal functions
 
  Date
@@ -1543,43 +1563,44 @@ original parsed data.  INFO is a plist holding export options."
 			 "\n"))
 		;; Separator.
 		"\n"
-	  (cond
-	   ((and author (not email))
-	;; Author only.
-	(concat
-	 (format "\n%s"
+	  (when org-odt-print-author-line (cond
+		  ((and author (not email))
+		   ;; Author only.
+		   (concat
+		(format "\n%s"
+			"OrgSubtitle"
+			(format "%s" author))
+		;; Separator.
+		"\n"))
+		  ((and author email)
+		   ;; Author and E-mail.
+		   (concat
+		(format
+		 "\n%s"
 		 "OrgSubtitle"
-		 (format "%s" author))
-	 ;; Separator.
-	 "\n"))
-	   ((and author email)
-	;; Author and E-mail.
-	(concat
-	 (format
-	  "\n%s"
-	  "OrgSubtitle"
-	  (format
-	   "%s"
-	   (concat "mailto:" email)
-	   (format "%s" author)))
-	 ;; Separator.
-	 "\n")))
+		 (format
+		  "%s"
+		  (concat "mailto:" email)
+		  (format "%s" author)))
+		;; Separator.
+		"\n"
 	  ;; Date, if required.
-	  (when (plist-get info :with-date)
-	(let* ((date (plist-get info :date))
-		   ;; Check if DATE is specified as a timestamp.
-		   (timestamp (and (not (cdr date))
-   (eq (org-element-type (car date)) 'timestamp)
-   (car date
-	  (when date
-		(concat
-		 (format "\n%s"
-			 "OrgSubtitle"
-			 (if (and (plist-get info :odt-use-date-fields) timestamp)
-			 (org-odt--format-timestamp (car date))
-			   (org-export-data date info)))
-		 ;; Separator
-		 "")))
+	  (when org-odt-print-date-line (when (plist-get info :with-date)
+	  (let* ((date (plist-get info :date))
+		 ;; Check if DATE is specified as a timestamp.
+		 (timestamp (and (not (cdr date))
+ (eq (org-element-type (car date)) 'timestamp)
+ (car date
+	(when date
+	  (concat
+	   (format "\n%s"
+		   "OrgSubtitle"
+		   (if (and (plist-get info :odt-use-date-fields) timestamp)
+			   (org-odt--format-timestamp (car date))
+			 (org-export-data date info)))
+	   ;; Separator
+	   "")
+	  )))
   ;; Table of Contents
   (let* ((with-toc (plist-get info :with-toc))
 	 (depth (and with-toc (if (wholenump with-toc)
-- 
2.4.3



[O] [ox bug] batch export seems to be broken or have changed

2015-07-07 Thread Rasmus
Hi,

I used to be able to something like

emacs -Q --file foo.org  --batch --no-init-file -f org-latex-export-to-pdf
# tex output

And everything would work. 

Now I get something like

 emacs -Q --file foo.org  --batch --no-init-file -f org-latex-export-to-pdf
 Output file: # RET
 Processing LaTeX file ./.tex...
 PDF file ./.tex.pdf wasn't produced

i.e. I'm asked about output file name.  I'm using the git version of
Emacs.  When I downgrade to latest release it works.

Rasmus

-- 
A page of history is worth a volume of logic




Re: [O] ox-latex: default packages cleaning

2015-07-07 Thread Rasmus
Suvayu Ali  writes:

> Yes, but polyglossia is recommended.  In the interest of minimal work on
> the part of Org, this could just be ignored.  I don't think we add babel
> anyway, or do we?

I thought we did, but we don't.  Anyway, babel works across different tex
backends which is nice feature.  That was the point.

-- 
Dung makes an excellent fertilizer




Re: [O] ox-latex: default packages cleaning

2015-07-07 Thread Suvayu Ali
On Tue, Jul 07, 2015 at 10:05:06PM +0200, Rasmus wrote:
> Suvayu Ali  writes:
> 
> >   \usepackage{polyglossia}  % instead of babel
> 
> You can use babel with xelatex.

Yes, but polyglossia is recommended.  In the interest of minimal work on
the part of Org, this could just be ignored.  I don't think we add babel
anyway, or do we?

Cheers,

-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] ox-latex: default packages cleaning

2015-07-07 Thread Rasmus
Suvayu Ali  writes:

> I would like to second microtype.  In fact as far as I know, now a days
> it is recommended to load that for almost all documents with significant
> text on TeX.SX.

It's easy enough to add and we should keep the default minimal.  Though
microtype is certainly a package I would not mind imposing on people.

> I would also suggest removing inputenc.  At the moment, it is loaded
> with the AUTO option.  AFAIK, this is redundant since most recent
> (meaning for quite a few years) TeX engines already use the encoding of
> the file if nothing is specified.

I think you might be right, but I haven't looked into it.

> The next one would be fontenc, now it is loaded with T1.  I'm not sure
> if this is needed.  Maybe LaTeX experts like Marcin or Fabrice could
> comment.

I thought it was needed for some symbols, but it seems it might not be.


>> * marvosym¹ 
>> * Wasysym² 
>
> Agreed.  On top of this, wasysym also interferes with integral symbols
> from amsmath[1].

No, the manual notes it has comparability with amsmath build it.  It
installs them under \varint and friends.

> We could also take this opportunity to provide users an easy way to
> switch between TeX engines.

It's already pretty easy.  I bind org-latex-pdf-process to the desired
engine via latexmk in my file.  I also wrap fontenc and inputenc in
\ifpdftex\else\fi or whatever.  In any case, betterᵀᴹ support for xelatex
would be nice.

>   \usepackage{polyglossia}  % instead of babel

You can use babel with xelatex.

Rasmus

-- 
A clever person solves a problem. A wise person avoids it




Re: [O] ox-latex: default packages cleaning

2015-07-07 Thread Suvayu Ali
Hi Rasmus,

On Tue, Jul 07, 2015 at 04:53:35PM +0200, Rasmus wrote:
> 
> If it's a means to archive "high-quality" paragraphs, maybe microtype is
> probably the 'proper' fix...

I would like to second microtype.  In fact as far as I know, now a days
it is recommended to load that for almost all documents with significant
text on TeX.SX.

I would also suggest removing inputenc.  At the moment, it is loaded
with the AUTO option.  AFAIK, this is redundant since most recent
(meaning for quite a few years) TeX engines already use the encoding of
the file if nothing is specified.

The next one would be fontenc, now it is loaded with T1.  I'm not sure
if this is needed.  Maybe LaTeX experts like Marcin or Fabrice could
comment.

> * Fixltx2e
> 
> This packages is depreciated with TL2015 cf. LaTeX News 22.  We can use
> \RequirePackage[current]{latexrelease} but there's no point in that
> AFAIK latexrelease only useful for backwards compatibility.

Didn't know about this.  Thank you.  I would vote for dropping it.

> * marvosym¹ 
> * Wasysym² 

Agreed.  On top of this, wasysym also interferes with integral symbols
from amsmath[1].

We could also take this opportunity to provide users an easy way to
switch between TeX engines.  I have been using XeLaTeX with Org and
outside for quite a few years now.  Originally what used to be very
hacky, is now simply replacing a couple of packages in the header and
calling xelatex instead of pdflatex.  And the list of packages is pretty
much identical for LuaLaTeX.  This is what I would use:

  \usepackage{fontspec}
  \usepackage{microtype}
  \usepackage{polyglossia}  % instead of babel
  % of course this should be something appropriate for the buffer
  \setdefaultlanguage[variant=british]{english}

So an option like tex-engine:xelatex or tex-engine:lualatex adds the
above to the default packages and the right binaries.  Just an idea.

Cheers,


Footnotes:

[1] At least that's what comments in my setup tell me :-p:
https://github.com/suvayu/.emacs.d/blob/master/org-mode-config.el#L136


-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] HTML/images zipped projects

2015-07-07 Thread Rasmus
Robert Klein  writes:

> For single file export (cf. the ox-htmlzip example I sent earlier) I
> have some ideas, but haven't implemented them yet (Vaidheeswaran C's
> comment about epub being close to zip hit a nerve, so I'll take a shot
> at extending it to an epub exporter..

BTW: do you know that ox-odt already zips files?  Perhaps you want to take
a look at it and see if its approach is useful and can be generalized for
your need.

Rasmus

-- 
Vote for proprietary math!




Re: [O] Bug: latex table export fails in master [8.3beta (release_8.3beta-1253-gaa9c4b @ /home/theorie/kleinrob/.emacs.d/org-mode/lisp/)]

2015-07-07 Thread Robert Klein
On Tue, 07 Jul 2015 14:47:49 +0200
Rasmus  wrote:

> >> I can reproduce it: [...]
> 
> Me too.
> 
> >> I think ox-latex.el needs to require org-table.
> > ...
> > When I require org-table in ox-latex.el the export works.
> 
> I added a autoload cookie for the relevant regexp in be019c4339.  It
> solves the problem for me.
> 
> Rasmus 
> 

Thanks a lot.  Works for me, too.

Best regards
Robert



[O] HTML/images zipped projects

2015-07-07 Thread Robert Klein
Hello,

I looked further into this and now have a way to create archives of
projects.  I provide two functions for use in projects preparation and
completion functions (for a project of component projects the former
is to be used in the first projects preparation function and the
latter in the last projects completion function. (See below)

For single file export (cf. the ox-htmlzip example I sent earlier) I
have some ideas, but haven't implemented them yet (Vaidheeswaran C's
comment about epub being close to zip hit a nerve, so I'll take a shot
at extending it to an epub exporter..


Best regards
Robert


**  Archiving Projects
When archiving project you face some issues not present when archiving a
single export.

A export project you want to archive often may be a project composed of
two or more subprojects, e.g. one to publish to HTML, one to PDF and one
to copy the PDF files as well as css files and images created outside of
org to the `publishing-directory'.

As all those files end up in the `publishing-directory' the way
presented here happens before the first project in the components list
is published (clean-up, preparation) and after the last project (removal
of old archive, creation of new one).

To get a multi-project project archive, you call
rk/ox-publish--create-archive-prepare from the preparation-function of
the first project in `:components' project and
rk/ox-publish--create-archive-complete from the completion-function of
the last project.

#+begin_src emacs-lisp
  (defun rk/ox-publish--create-archive-prepare (&optional
delete-pubdir
delete-timestamps
project-list)
"Prepares the creation of an archive of publishing projects.

  To get a archive cleaned up of old files not longer part of the
  project set DELETE-PUBDIR to `t'.

  To be sure everything gets published anew, set DELETE-TIMESTAMPS
  to `t' and provide ad s PROJECT-LIST a list of projects
  publishing the material for the archive."
(let ((pubdir (plist-get project-plist :publishing-directory)))
  (when (and delete-timestamps project-list)
(mapc (function (lambda (project)
  (let ((cache-file
 (concat "~/.org-timestamps/"
 project ".cache")))
(when (file-exists-p cache-file)
  (delete-file cache-file)
  project-list))
  (when delete-pubdir
;; try to only shoot yourself in the foot, not in the head
(if (not (equal (file-truename "~/") 
(file-truename pubdir)))
(when (file-exists-p pubdir)
  (delete-directory pubdir t))

  (defun rk/ox-publish--create-archive-complete (&optional archive
   archiver-program
   archiver-options)
"Creates archive ARCHIVE from published project(s).

  If ARCHIVE is nil, the ARCHIVE name will be the name of the
  publishing-directory plus `.zip'.  The archive is stored in the
  same directory the publishing directory is in.

  The default archive format is zip.

  A optional ARCHIVER-COMMAND (and ARCHIVER-OPTIONS) has to follow
  the syntax

  ARCHIVER-COMMAND ARCHIVER-OPTIONS archive-file files/dirs

  Examples for some archive formats:

| format  | ARHCIVER-COMMAND | ARCHIVER-OPTIONS | needs programs |
|-+--+--++
| zip | zip  | -r   | zip|
| tar.gz  | tar  | -zcvf| tar, gzip  |
| tar.bz2 | tar  | -jcvf| tar, bzip2 |
| tar.xz  | tar  | -Jcvf| tar, xz|
| tar.Z   | tar  | -Zcvf| tar, compress  |
| 7z  | 7z   | a| 7z |"
(let* ((pubdir  (plist-get project-plist :publishing-directory))
   (zip-program (or archiver-program "zip"))
   (zip-options (if archiver-program archiver-options "-r"))
   (zip-file (or archive
 (concat pubdir ".zip")))
   (default-directory (file-truename (concat pubdir "/../")))
   (zip-command (concat zip-program " "
zip-options " "
zip-file " "
(file-name-nondirectory pubdir) " ")))
  (when (file-exists-p zip-file)
(delete-file zip-file))
  (message "Archiving: %s\n" zip-command)
  (shell-command zip-command)))
#+end_src



Re: [O] New Chrome Extension

2015-07-07 Thread Konstantin Kliakhandler
Great - the %i is what gets interpolated into the pasted text.

If you don't specify a template letter, as in the setup pages, then the
link is sent to the same place as it would by org-store-link ("C-c l" if
you use the suggested bindings). Personally, I find it less useful in my
workflow, as I would then need to start a new capture and insert the link.
I can understand however why someone else would find that useful. When I
(or someone else) add a configuration page, this should be easy to change.

Cheers,
Kosta
On Jul 7, 2015 8:13 PM, "Ken Mankoff"  wrote:

>
> Selected text works with your capture templates. Thanks for sending them.
>
> FYI I notice the "test" on the org-protocol.el setup pages uses this:
>
> document.location.href='org-protocol://capture://'+makeUrl();
>
> While yours uses:
>
> capture:/L/...
>
> If you don't specify "L" or "c" then would it let me choose which template
> the capture gets sent to? Seems like it might be an extra keystroke to then
> choose the template, but also more powerful...
>
>   -k.
>
>
> On 2015-07-07 at 12:57, Konstantin Kliakhandler  wrote:
> > Hello Ken,
> >
> > The first user, hurrah!
> >
> > You were right to add the capture templates - I will update the docs to
> be
> > more clear about that. I think the first thing to add to the extension
> now
> > that it is in the open is to add configuration for the targets...
> >
> > Here are the templates that I use (I need to replace the captured on:
> with
> > a property at some point, but this is beside the point):
> >
> >  ("L" "Protocol Link" entry (file+headline ,(concat org-directory "
> notes.org")
> > "Inbox") "* %? [[%:link][%:description]] \nCaptured On: %U")
> >
> > ("p" "Protocol" entry (file+headline ,(concat org-directory "notes.org")
> > "Inbox")
> >  "* %^{Title}\nSource: %u, %c\n
> > #+BEGIN_QUOTE\n%i\n#+END_QUOTE\n\n\n%?")
> >
> > I can't recall at the moment why I use the nicer format replacements for
> > the link and the shorter for the full quote, and it might not matter.
> Could
> > you try to make your "p" template similar to mine and see if it works?
> > Alternatively, can you paste the templates you used?
> >
> > Cheers,
> > Kosta
>
>


Re: [O] Time-zone in dates

2015-07-07 Thread Russell Adams
On Wed, Jul 01, 2015 at 12:22:43PM +0100, Eric S Fraga wrote:
> Michael,
>
> thanks for some brilliant use cases!
>
> I particularly like the single event (a flight) that requires more than
> one time zone to make sense.  My diary is chock full of cases where it
> looks like a flight out somewhere takes 2 hours but coming back takes
> 11!  (strong winds ;-)
>
> --
> : Eric S Fraga (0xFFFCF67D), Emacs 25.0.50.1, Org release_8.3beta-1260-gcedef7
>

I believe this doesn't disprove the need for storing in UTC.

I just think it means that you need a display filter that can specify
a timezone. It sounds like most of your times will be correct using
your system time, and if you have something that needs to be
displayed in a different timezone, specify it for that one entry.

After all there's no data lost in the plane example other than the
relative timezone of the observer. The duration is fixed, and the UTC
times are exact. Only the observer changes timezone.


--
Russell Adamsrlad...@adamsinfoserv.com

PGP Key ID: 0x1160DCB3   http://www.adamsinfoserv.com/

Fingerprint:1723 D8CA 4280 1EC9 557F  66E8 1154 E018 1160 DCB3



Re: [O] Time-zone in dates

2015-07-07 Thread Don Armstrong
On Wed, 01 Jul 2015, Michael Brand wrote:
> On Wed, Jul 1, 2015 at 8:27 AM, Eric S Fraga  wrote:
> > On Tuesday, 30 Jun 2015 at 11:08, Nick Dokos wrote:
> >> In what way are you losing information?
> >
> > Sorry, should have been clear: the time zone information itself.  By
> > reducing to UTC, you lose one bit of information.  Whether that matters
> > or not in practice is not clear but I'm always uncomfortable when
> > considering data representations that lead to information loss.
> >
> > I've been trying to come up with an example that would illustrate the
> > problem but I've failed so far.
> 
> As an example for the above I suggest to consider a non-stop flight
> with a duration of 1:31:00 from Salt Lake City UT to Phoenix AZ, both
> cities in different time zones, here intentionally even the same basic
> time zone but one with daylight saving and one without.

[...]

> 2) When the Org file format would support time zones I would use
> 
>* Flight from Salt Lake City UT to Phoenix AZ
>  <2015-07-01 Wed 10:55 MDT>--<2015-07-01 Wed 11:26 MST>
>  - *Advantage*: Visibility of the time zones where the event takes
>place.

Of course, this is even more complicated, as MST could mean UTC+08,
UTC-07 or UTC+06:30.

That said, lets not make perfect the enemy of the good. I've currently
got emacs running under TZ="America/Los_Angeles" even though my machine
is in TZ="America/Chicago" precisely because org mode can't yet handle
this.

I'd be willing to help out as much as I'm able, too.

-- 
Don Armstrong  http://www.donarmstrong.com

I have no use for "before and after" pictures.
I can't remember starting, and I'm never done.
 -- a softer world #221
http://www.asofterworld.com/index.php?id=221



Re: [O] New Chrome Extension

2015-07-07 Thread Ken Mankoff

Selected text works with your capture templates. Thanks for sending them.

FYI I notice the "test" on the org-protocol.el setup pages uses this:

document.location.href='org-protocol://capture://'+makeUrl();

While yours uses:

capture:/L/...

If you don't specify "L" or "c" then would it let me choose which template the 
capture gets sent to? Seems like it might be an extra keystroke to then choose 
the template, but also more powerful...

  -k.


On 2015-07-07 at 12:57, Konstantin Kliakhandler  wrote:
> Hello Ken,
>
> The first user, hurrah!
>
> You were right to add the capture templates - I will update the docs to be
> more clear about that. I think the first thing to add to the extension now
> that it is in the open is to add configuration for the targets...
>
> Here are the templates that I use (I need to replace the captured on: with
> a property at some point, but this is beside the point):
>
>  ("L" "Protocol Link" entry (file+headline ,(concat org-directory "notes.org")
> "Inbox") "* %? [[%:link][%:description]] \nCaptured On: %U")
>
> ("p" "Protocol" entry (file+headline ,(concat org-directory "notes.org")
> "Inbox")
>  "* %^{Title}\nSource: %u, %c\n
> #+BEGIN_QUOTE\n%i\n#+END_QUOTE\n\n\n%?")
>
> I can't recall at the moment why I use the nicer format replacements for
> the link and the shorter for the full quote, and it might not matter. Could
> you try to make your "p" template similar to mine and see if it works?
> Alternatively, can you paste the templates you used?
>
> Cheers,
> Kosta




Re: [O] New Chrome Extension

2015-07-07 Thread Konstantin Kliakhandler
Hello Ken,

The first user, hurrah!

You were right to add the capture templates - I will update the docs to be
more clear about that. I think the first thing to add to the extension now
that it is in the open is to add configuration for the targets...

Here are the templates that I use (I need to replace the captured on: with
a property at some point, but this is beside the point):

 ("L" "Protocol Link" entry (file+headline ,(concat org-directory "notes.org")
"Inbox") "* %? [[%:link][%:description]] \nCaptured On: %U")

("p" "Protocol" entry (file+headline ,(concat org-directory "notes.org")
"Inbox")
 "* %^{Title}\nSource: %u, %c\n
#+BEGIN_QUOTE\n%i\n#+END_QUOTE\n\n\n%?")

I can't recall at the moment why I use the nicer format replacements for
the link and the shorter for the full quote, and it might not matter. Could
you try to make your "p" template similar to mine and see if it works?
Alternatively, can you paste the templates you used?

Cheers,
Kosta

-- 
Konstantin Kliakhandler
http://slumpy.org
  )°) )°( (°(

On 7 July 2015 at 19:24, Ken Mankoff  wrote:

>
> On 2015-07-07 at 12:16, Ken Mankoff  wrote:
> > Hi Konstantin,
> >
> > On 2015-07-07 at 11:44, Konstantin Kliakhandler 
> wrote:
> >> I wrote up a small chrome extension for org-protocol. Comments,
> >> improvements and positive criticism are all welcome.
> >
> > Thanks for making this. I just set up org-protocol and pass the
> > "install test" on that page. Now when I click on your icon/extension
> > Emacs comes to the foreground and I see the following error in the
> > modeline:
> >
> >> No capture template referred to by "L" keys
> >
> > And in *Messages* I see:
> >
> >> Greedy org-protocol handler.  Killing client.
> >> No server editing buffers exist
> >> No capture template referred to by "L" keys
>
> If I add a capture template with hotkey "L" I get the same message but for
> "p". If I add a capture template with the hotkey "p" then it appears to
> mostly work, but I don't get selected text. I do get a link to the webpage
> as the capture item body.
>
>   -k.
>


Re: [O] New Chrome Extension

2015-07-07 Thread Ken Mankoff

On 2015-07-07 at 12:16, Ken Mankoff  wrote:
> Hi Konstantin,
>
> On 2015-07-07 at 11:44, Konstantin Kliakhandler  wrote:
>> I wrote up a small chrome extension for org-protocol. Comments,
>> improvements and positive criticism are all welcome.
>
> Thanks for making this. I just set up org-protocol and pass the
> "install test" on that page. Now when I click on your icon/extension
> Emacs comes to the foreground and I see the following error in the
> modeline:
>
>> No capture template referred to by "L" keys
>
> And in *Messages* I see:
>
>> Greedy org-protocol handler.  Killing client.
>> No server editing buffers exist
>> No capture template referred to by "L" keys

If I add a capture template with hotkey "L" I get the same message but for "p". 
If I add a capture template with the hotkey "p" then it appears to mostly work, 
but I don't get selected text. I do get a link to the webpage as the capture 
item body.

  -k.



Re: [O] New Chrome Extension

2015-07-07 Thread Ken Mankoff
Hi Konstantin,

On 2015-07-07 at 11:44, Konstantin Kliakhandler  wrote:
> I wrote up a small chrome extension for org-protocol. Comments,
> improvements and positive criticism are all welcome.

Thanks for making this. I just set up org-protocol and pass the "install test" 
on that page. Now when I click on your icon/extension Emacs comes to the 
foreground and I see the following error in the modeline:

> No capture template referred to by "L" keys

And in *Messages* I see:

> Greedy org-protocol handler.  Killing client.
> No server editing buffers exist
> No capture template referred to by "L" keys

Any idea what I might be doing wrong?

  -k.



Re: [O] ox-latex: default packages cleaning

2015-07-07 Thread Eric S Fraga
On Tuesday,  7 Jul 2015 at 16:53, Rasmus wrote:
> Hi,
>
> We could do some cleaning of org-default-package-alist before Org 8.3.

Rasmus,

I'm happy with all of your suggested removals.
-- 
: Eric S Fraga (0xFFFCF67D), Emacs 25.0.50.1, Org release_8.3beta-1260-gcedef7



[O] New Chrome Extension

2015-07-07 Thread Konstantin Kliakhandler
Hello everyone,

I wrote up a small chrome extension for org-protocol. Comments,
improvements and positive criticism are all welcome.

The code is available at https://github.com/sprig/org-capture-extension
The extension can be installed from
https://chrome.google.com/webstore/detail/org-capture/kkkjlfejijcjgjllecmnejhogpbcigdc

Enjoy,
Kosta

-- 
Konstantin Kliakhandler
http://slumpy.org
  )°) )°( (°(


Re: [O] problem with ox-pandoc export

2015-07-07 Thread Rasmus
Fabrice Popineau  writes:

> You are right. I'm curious to see which route is the easiest. I'll try very
> soon.

BTW you might also try tex4ebook, in which case you can go via
ox-latex.el.

Rasmus

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




[O] ox-latex: default packages cleaning

2015-07-07 Thread Rasmus
Hi,

We could do some cleaning of org-default-package-alist before Org 8.3.

* tolerance

Why is "\\tolerance=1000" part of org-default-package-alist?  Is this
value good for all languages?  If we keep it, it should be configurable.
But people who explicitly wants this behavior can probably add it
themselves.

If it's a means to archive "high-quality" paragraphs, maybe microtype is
probably the 'proper' fix...

* Fixltx2e

This packages is depreciated with TL2015 cf. LaTeX News 22.  We can use
\RequirePackage[current]{latexrelease} but there's no point in that
AFAIK latexrelease only useful for backwards compatibility.

* marvosym¹ 

This is used for

 ("EUR" "\\EUR{}" nil "€" "EUR" "EUR" "€")
 ("EURdig" "\\EURdig{}" nil "€" "EUR" "EUR" "€")
 ("EURhv" "\\EURhv{}" nil "€" "EUR" "EUR" "€")
 ("EURcr" "\\EURcr{}" nil "€" "EUR" "EUR" "€")
 ("EURtm" "\\EURtm{}" nil "€" "EUR" "EUR" "€")

We could either call \\texteuro{} or use eurosym.  IMO, if people wants
something more sophisticated than \texteuro (which depends on the current
font) can load marvosym or eurosym.

* Wasysym² 

Wasysym is used for a couple of smileys.

 ("smiley" "\\smiley{}" nil "☺" ":-)" ":-)" "☺")
 ("blacksmile" "\\blacksmiley{}" nil "☻" ":-)" ":-)" "☻")
 ("sad" "\\frownie{}" nil "☹" ":-(" ":-(" "☹")

I don't know why these smileys are blessed when '😱' and '😺' are not.
Ideally, you'd just use unicode smileys, but this requires {xe,lua}tex.
So for now we can could use \(\ddot\smile\) and \(\ddot\frown\) and shave
off the extra dependency.  Put perhaps it's better to just let people
choose themselves which smiley command they will want to use in which case
we could also just remove wasysym.

Rasmus

Footnotes: 
¹ (defun rasmus-next-marvosym ()
  "find marvosym symbols"
  (interactive)
  (let (case-fold-search)
(search-forward-regexp 
 (format "%s\\>" (regexp-opt (mapcar 'symbol-name '(Pickup Letter 
Mobilefone Telefon fax FAX Faxmachine Email Lightning EmailCT Beam Bearing 
LooseBearing FixedBearing LeftTorque RightTorque Lineload MVArrowDown OktoSteel 
HexaSteel SquareSteel RectSteel CircSteel SquarePipe RectPipe CircPipe LSteel 
RoundedLSteel TSteel RoundedTSteel TTsteel RoundedTTSteel FlatSteel Valve 
Industry Coffeecup LeftScissors CuttingLine RightScissors Football Bicycle Info 
ClockLogo CutRight CutLineine CutLeft Wheelchair Gentsroom Ladiesroom 
Checkedbox CrossedBox HollowBox PointingHand WritingHand MineSign Recycling 
PackingWaste WashCotton WashSynthetics WashWool HandWash NoWash Tumbler 
NoTumbler NoChemicalCleaning Bleech NoBleech CleaningA CleaningP CleaningPP 
CleaningF CleaningFF IroningI IroningII IroningIII NoIroning AtNinetyFive 
ShortNinetyFive AtSixty ShortSixty ShortFifty AtForty ShortForty SpecialForty 
ShortThirty EUR EURdig EURhv EURcr EURtm Ecommerce Shilling Denarius Pfund 
EyesDollar Florin EurDig EurHv EurCr EurTm EstimatedSign Deleatur Ecommerce 
Denarius EUR EURdig Stopsign CESign Estatically Explosionsafe Laserbeam 
Biohazard Radioactivity BSEFree RewindToIndex RewindToStart Rewind Forward 
ForwardToEnd ForwardToIndex MoveUp MoveDown ToTop ToBottom ComputerMouse 
SerialInterface Keyboard SerialPort ParallelPort Printer MVZero MVOne MVTwo 
MVThree MVFour MVFive MVSix MVSeven MVEight MVNine MVLeftBracket MVRightBracket 
MVComma MVPeriod MVMinus MVPlus MVDivision MVMultiplication Conclusion 
Equivalence barOver BarOver arrowOver ArrowOver StrikingThrough 
MultiplicationDot LessOrEqual LargerOrEqual AngleSign Corresponds Congruent 
NotCongruent Divides DividesNot Female Male Hermaphrodite Neutral FEMALE MALE 
HERMAPHRODITE FemaleFemale MaleMale FemaleMale Sun Moon Mercury Venus Mars 
Jupiter Saturn Uranus Neptune Pluto Earth Aries Taurus Gemini Cancer Leo Virgo 
Libra Scorpio Sagittarius Capricorn Aquarius Pisces YinYang MVRightArrow MVAt 
BOLogo BOLogoL BALogoP Mundus Cross CeltCross Ankh Heart CircledA Bouquet 
Frowny Smiley PeaceDove Bat WomanFace ManFace
 nil t)))



²   (defun rasmus-next-wasy ()
  "next wasysym symbol"
  (interactive)
  (let (case-fold-search)
(search-forward-regexp
 (format "%s\\>"
 (regexp-opt
  (mapcar 'symbol-name
  '(male female currency phone recorder clock lightning 
pointer RIGHTarrow LEFTarrow UParrow DOWNarrow diameter invdiameter varangle 
wasylozenge kreuz smiley frownie blacksmiley sun checked bell ataribox cent 
permil brokenvert wasytherefore Bowtie agemO AC HF VHF photon gluon Square XBox 
CheckedBox hexagon varhexagon pentagon octagon hexstar varhexstar davidsstar 
eighthnote quarternote u2669 halfnote fullnote twonotes CIRCLE Leftcircle 
LEFTCIRCLE Rightcircle RIGHTCIRCLE LEFTcircle RIGHTcircle leftturn rightturn dh 
DH thorn Thorn openo inve vernal ascnode descnode fullmoon newmoon leftmoon 
rightmoon astrosun mercury venus earth mars jupiter saturn uranus neptune pluto 
aries taurus gemini cancer leo virgo libra scorpio sagittarius capricornus 
aquarius pisce

Re: [O] Bug: latex table export fails in master [8.3beta (release_8.3beta-1253-gaa9c4b @ /home/theorie/kleinrob/.emacs.d/org-mode/lisp/)]

2015-07-07 Thread Nick Dokos
Rasmus  writes:

>>> I can reproduce it: [...]
>
> Me too.
>
>>> I think ox-latex.el needs to require org-table.
>> ...
>> When I require org-table in ox-latex.el the export works.
>
> I added a autoload cookie for the relevant regexp in be019c4339.  It
> solves the problem for me.
>

Confirmed, thanks!

-- 
Nick




Re: [O] Bug: latex table export fails in master [8.3beta (release_8.3beta-1253-gaa9c4b @ /home/theorie/kleinrob/.emacs.d/org-mode/lisp/)]

2015-07-07 Thread Rasmus
>> I can reproduce it: [...]

Me too.

>> I think ox-latex.el needs to require org-table.
> ...
> When I require org-table in ox-latex.el the export works.

I added a autoload cookie for the relevant regexp in be019c4339.  It
solves the problem for me.

Rasmus 

-- 
Don't panic!!!




Re: [O] Bug: latex table export fails in master [8.3beta (release_8.3beta-1253-gaa9c4b @ /home/theorie/kleinrob/.emacs.d/org-mode/lisp/)]

2015-07-07 Thread Robert Klein

On Mon, 06 Jul 2015 22:34:35 -0400
Nick Dokos  wrote:

> Nicolas Goaziou  writes:
> 
> > Hello,
> >
> > Robert Klein  writes:
> >
> >> Hello,
> >>
> >> when I export the attached (ECM'd) file t3.org to LaTeX (C-c C-e l
> >> l) I get the error ``Symbol's value as variable is void:
> >> orgtbl-exp-regexp''
> >
> > FWIW, I cannot reproduce it.
> >
> 
> I can reproduce it:
> 
> emacs -Q -l ~/src/minimal/min.org.el
> ~/src/org/tables/robert-klein-ecm.org
> 
> and C-c C-e l l does it.
> 
> I think ox-latex.el needs to require org-table.


Thanks.  I've been feeling a little hypochondriac.

When I require org-table in ox-latex.el the export works.

Thanks again.

Best regards
Robert