Re: [O] two simple derived backend questions

2015-10-23 Thread Matt Price
Hi, I realize I never responded to say thank you.

This is a big help, and I now have things working the way I like!
matt


On Wed, Oct 14, 2015 at 11:35 PM, Charles C. Berry  wrote:

> On Wed, 14 Oct 2015, Matt Price wrote:
>
> On Wed, Oct 14, 2015 at 6:55 PM, Rasmus  wrote:
>>
>> Hi Matt,
>>>
>>> Matt Price  writes:
>>>
>>> a) add a horizontal rule

 pandoc expects a horizontal rule at each slide division.  So, if

>>> possible,
>>>
 I would like to add an hhr element at the end of every headline.

>>>
>>> What’s a hhr element?
>>>
>>> , I meant
>>>
>>
>> Can you just use something like
>>> ---
>>>
>>> for a horizontal rule?  AFAIK, it’s inserted as "---".
>>>
>>> yes.  but then I will have to take out all the "-"
>>>
>> elements if I want to go back to using my original org documents again.
>> The point is that I have lots of these lecture notes, and would prefer not
>> to alter them too severely if possible.
>>
>
>
> Err, what about
>
>
>
> --8<---cut here---start->8---
> #+MACRO: hhr #+MD: ---
>
> * abc
>
> first slide
>
> {{{hhr}}}
>
> * def
>
> second slide
>
> {{{hhr}}}
>
> --8<---cut here---end--->8---
>
>
>> b) speaker notes
>>>

 More importantly, org-reveal allows the use of speaker notes, thus:

 #+BEGIN_NOTES

 whatever I put here

 #+ END_NOTES

 is exported as:

 
 whaever I put here
 

>>>
>>> For me it’s inserted as
>>>
>>>
>>> 
>>> whatever I put here
>>>
>>> 
>>>
>>>
>>> yes, that's right, I was being hasty. In any case, what I would like to
>> do
>> is reproduce this behaviour in the markdown export; I have tried modifying
>> the md export but I am doing something wrong, clearly, and had hoped to
>> get
>> some hints from the list...
>>
>>
>>
> Ok here is a hint. You can add a menu item if you really need it.
>
>
> --8<---cut here---start->8---
> #+BEGIN_SRC emacs-lisp
>   (org-export-define-derived-backend
>'md-plus
>'md
>:translate-alist '(
>   (export-block . org-md-plus-export-block))
>:export-block'("NOTES"))
>
>   (defun org-md-plus-export-block
>   (export-block contents info)
> "Transcode a EXPORT-BLOCK NOTES element from Org to md-plus.
> CONTENTS is nil.  INFO is a plist holding contextual information."
> (if (equal (org-element-property :type export-block) "NOTES")
> (concat "\n"
> (org-element-property :value export-block)
> "\n")
>   (let ((parent-backend (org-export-backend-parent backend)))
> (if parent-backend
> (org-export-with-backend
>  parent-backend export-block contents info)
>
> #+END_SRC
>
>
> #+BEGIN_NOTES
> just for the note takers...
> #+END_NOTES
>
> : Run like this
> : M-x (org-export-to-buffer 'md-plus "***md-plus-out***")
> --8<---cut here---end--->8---
>
>
> HTH,
>
> Chuck
>


Re: [O] [PATCH] org-id-goto doesn't work if buffer is narrowed.

2015-10-23 Thread John Kitchin
It has always bugged me when clicking on an id link does not put the
point on the headline when narrowing is in place. Opening in a new
buffer might  be a nice compromise of preserving the restriction in
place, and getting to the point of interest. I think these are called
indirect buffers
(http://www.gnu.org/software/emacs/manual/html_node/emacs/Indirect-Buffers.html).

Puneeth Chaganti writes:

> Hi Rasmus,
>
> On Fri, Oct 23, 2015 at 8:57 PM, Rasmus  wrote:
>> It's not obvious that org should change a—potentially—carefully selected
>> narrowed region.
>
> I agree. But, am I not explicitly asking to jump to the specified
> item. I don't mind the widening, at least when the call is
> interactive. I agree with you when some other code is calling it,
> though.
>
>> Perhaps you could mimic the way org-edit-special works for this case.
>
> You mean, display the entry in a new buffer, and any changes will be
> applied onto the original entry too?

--
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] org-reveal questions

2015-10-23 Thread Fabrice Popineau
I switched to org-reveal from beamer.
Beamer clutters your slides with too much markup.
(I ended up with much more markup than text in my slides).

Moroever, Reveal offers features that no pdf reader offers at least under
windows :
- separate frame for notes, timer, next slide
- ability to synchronize other clients on the master display
(your students can connect and their slides move as you move yours)
And it is very quick to compile a deck of x100 slides, where beamer can
take minutes.

To answer the first question :
- load bootstrap in the  section of your slides
- then you can add div's with class col-xs-6 for example and split your
frame in 2 columns.

I load bootstrap, mathjax and some personal js and css. It is working
pretty well.
It is not as clean as beamer out of the box, but it is more efficient.
With a good css, it should be  as clean as beamer.

Fabrice

2015-10-23 10:39 GMT+02:00 Eric S Fraga :

> On Friday, 23 Oct 2015 at 09:45, Xebar Saram wrote:
> > Thx Eric
> >
> > ill check out beamer..i guess i need to know latex for that right?
>
> Not necessarily.  You can do a lot without any LaTeX knowledge.  Most of
> the issues you had with org-reveal are solved in ox-beamer.
>
> Check out http://orgmode.org/worg/exporters/beamer/ox-beamer.html
> --
> : Eric S Fraga (0xFFFCF67D), Emacs 25.0.50.2, Org release_8.3.2-161-gd2ac25
>
>


-- 
Fabrice Popineau
-
SUPELEC
Département Informatique
3, rue Joliot Curie
91192 Gif/Yvette Cedex
Tel direct : +33 (0) 169851950
Standard : +33 (0) 169851212
--


Re: [O] [PATCH] org-id-goto doesn't work if buffer is narrowed.

2015-10-23 Thread Puneeth Chaganti
Hi Rasmus,

On Fri, Oct 23, 2015 at 8:57 PM, Rasmus  wrote:
> It's not obvious that org should change a—potentially—carefully selected
> narrowed region.

I agree. But, am I not explicitly asking to jump to the specified
item. I don't mind the widening, at least when the call is
interactive. I agree with you when some other code is calling it,
though.

> Perhaps you could mimic the way org-edit-special works for this case.

You mean, display the entry in a new buffer, and any changes will be
applied onto the original entry too?

-- 
Puneeth



Re: [O] org-reveal questions

2015-10-23 Thread Matt Price
On Fri, Oct 23, 2015 at 5:20 AM, Xebar Saram  wrote:

>
> On Fri, Oct 23, 2015 at 12:09 PM, Fabrice Popineau <
> fabrice.popin...@supelec.fr> wrote:
>
> how do i (for a specific slide) make all text not centered but rather left
> aligned?
>
>
I haven't been following this thread very lcosely, but hopefully this will
help:
org-reveal allows you to specify a local.css file (M-x customize-variable
org-reveal-extra-css).  I keep mine in ~/src/org-reveal/local.css, but you
should choose a location that works for you.  I use this file to define
extra css classes for nededs that reveal doesn't met out of the box.

This is a two step process.  In your local.css, put something like this:

.left p, .left ul, .left li {
text-align:left;
}

and then in your org file:

#+ATTR_HTML: :class left
** Slide Title

some slide content



I *think* this should work.  If it doesn't, please reply and I'll try to
help.


> thx so much again
>
>


Re: [O] org-reveal questions

2015-10-23 Thread Matt Price
On Fri, Oct 23, 2015 at 2:18 AM, Eric S Fraga  wrote:

> On Friday, 23 Oct 2015 at 08:16, Xebar Saram wrote:
> > Hi all
> >
> > for all you org-reveal users, excuse me for these questions that may seem
> > trivial but as a new reveal/org-reveal user i havent been able to address
> > them :)
> >
> > 1) how does one add images not below the text but on the left/right of
> the
> > text?
> > 2) can i change the fonts size per slide or even better per specific
> > line/region?
> > 3) can slide headers be placed higher up on the slide? currently when the
> > text is spares it seems like the header starts in the middle of the slide
>
> I may be wrong but I think you are asking too much from org-reveal.  If
> you want this level of customisation, you may need to go to the HTML
> directly or, if you want to stick with org, use beamer...
>

The response in my last email applies here too -- you will need to do some
css customization.

1. you will need to add css classes & ATTR_HTML headers; it's not too hard,
actually.  something like:
img.float-left {
float:left;
}

ATTR_HTML:  :class float-left

etc.

2. as above, but change the font'size element:
p.small {
fo-nt-size: 0.6em;
}

etc.
3. Getting the headers to move higher up is a little tricky bdecause
javascript is in charge of the vertical alignment; I am not quite satisfied
with the way that reveal.js handles this, and don't have a solution.

Eric's right -- you'll have to learn either CSS or latex, it's up to you
which one to invest in.  I use css in other work, so I've taken that
rouute; latex is still a foreign language to me.

m

> --
> : Eric S Fraga (0xFFFCF67D), Emacs 25.0.50.2, Org release_8.3.2-161-gd2ac25
>
>


Re: [O] BUG in org-lint and tangle

2015-10-23 Thread Rainer M Krug
I just want to bring this bug to attention again.

Confirmed with

GNU Emacs 24.5.1 (x86_64-apple-darwin14.5.0, Carbon Version 157 AppKit 1348.17) 
of 2015-08-28 on Rainers-MacBook-Pro.local

starter with -Q

obviously there only for tangle.

Cheers

Rainer


Rainer M Krug  writes:

> The following R file causes an crash of the org-lint function and of
> tangling -
> backtrace attached. The problem seems to be the missing specification of
> :exports.
>
>
> * Test
> #+begin_src R :exports 
> #+end_src
>
>
> Cheers,
>
> Rainer
>
> ,
> | Debugger entered--Lisp error: (wrong-type-argument stringp nil)
> |   string-match("[ \f\n.]+" nil 0)
> |   split-string(nil)
> |   (funcall e-merge exports-exclusive-groups exports (split-string (cdr 
> pair)))
> |   (setq exports (funcall e-merge exports-exclusive-groups exports 
> (split-string (cdr pair
> | (cond ((eql temp (quote :var)) (let ((name (if (listp (cdr pair))
> (car (cdr pair)) (and (string-match "^\\([^= \f \n.]+\\)[ ]*=" ...)
> (intern ...) (if name (setq vars (append (if (member name ...)
> (progn ... ...) vars) (list (cons name pair (if (and vars (nth
> variable-index vars)) (let ((name ...)) (setq clearnames (cons name
> clearnames)) (prog1 (let* ... ...) (setq variable-index ...))) (error
> "Variable \"%s\" must be assigned a default value" (cdr pair))
> ((eql temp (quote :results)) (setq results (funcall e-merge
> results-exclusive-groups results (split-string (let ((r ...)) (if
> (stringp r) r (eval r))) ((eql temp (quote :file)) (if (cdr pair)
> (progn (setq results (funcall e-merge results-exclusive-groups results
> (quote ("file" (if (or (member "both" exports) (member "none"
> exports) (member "code" exports)) nil (setq exports (funcall e-merge
> exports-exclusive-groups exports (quote ... (setq params (cons
> pair (assq-delete-all (car pair) params)) ((eql temp (quote
> :file-ext)) (if (cdr pair) (progn (setq results (funcall e-merge
> results-exclusive-groups results (quote ("file" (if (or (member
> "both" exports) (member "none" exports) (member "code" exports)) nil
> (setq exports (funcall e-merge exports-exclusive-groups exports (quote
> ... (setq params (cons pair (assq-delete-all (car pair)
> params)) ((eql temp (quote :exports)) (setq exports (funcall
> e-merge exports-exclusive-groups exports (split-string (cdr pair)
> ((eql temp (quote :tangle)) (setq tangle (or (list (cdr pair))
> tangle))) ((eql temp (quote :noweb)) (setq noweb (funcall e-merge
> (quote (("yes" "no" "tangle" "no-export" "strip-export" "eval")))
> noweb (split-string (or (cdr pair) "") ((eql temp (quote :cache))
> (setq cache (funcall e-merge (quote (("yes" "no"))) cache
> (split-string (or (cdr pair) "") ((eql temp (quote :padline))
> (setq padline (funcall e-merge (quote (("yes" "no"))) padline
> (split-string (or (cdr pair) "") ((eql temp (quote :shebang))
> (setq shebang (or (list (cdr pair)) shebang))) ((eql temp (quote
> :comments)) (setq comments (funcall e-merge (quote (("yes" "no")))
> comments (split-string (or (cdr pair) "") (t (setq params (cons
> pair (assq-delete-all (car pair) params)
> | (let* ((temp (car pair))) (cond ((eql temp (quote :var)) (let ((name
> (if (listp ...) (car ...) (and ... ... (if name (setq vars (append
> (if ... ... vars) (list ...))) (if (and vars (nth variable-index
> vars)) (let (...) (setq clearnames ...) (prog1 ... ...)) (error
> "Variable \"%s\" must be assigned a default value" (cdr pair))
> ((eql temp (quote :results)) (setq results (funcall e-merge
> results-exclusive-groups results (split-string (let (...) (if ... r
> ...)) ((eql temp (quote :file)) (if (cdr pair) (progn (setq
> results (funcall e-merge results-exclusive-groups results (quote
> ...))) (if (or (member "both" exports) (member "none" exports) (member
> "code" exports)) nil (setq exports (funcall e-merge
> exports-exclusive-groups exports ...))) (setq params (cons pair
> (assq-delete-all ... params)) ((eql temp (quote :file-ext)) (if
> (cdr pair) (progn (setq results (funcall e-merge
> results-exclusive-groups results (quote ...))) (if (or (member "both"
> exports) (member "none" exports) (member "code" exports)) nil (setq
> exports (funcall e-merge exports-exclusive-groups exports ...))) (setq
> params (cons pair (assq-delete-all ... params)) ((eql temp (quote
> :exports)) (setq exports (funcall e-merge exports-exclusive-groups
> exports (split-string (cdr pair) ((eql temp (quote :tangle)) (setq
> tangle (or (list (cdr pair)) tangle))) ((eql temp (quote :noweb))
> (setq noweb (funcall e-merge (quote (("yes" "no" "tangle" "no-export"
> "strip-export" "eval"))) noweb (split-string (or (cdr pair) "")
> ((eql temp (quote :cache)) (setq cache (funcall e-merge (quote (("yes"
> "no"))) cache (split-string (or (cdr pair) "") ((eql temp (quote
> :padline)) (setq padline (funcall e-merge (quote (("yes" "no")))
> padline (split-string (or 

Re: [O] Can't email multipart/alternative anymore

2015-10-23 Thread Peter Davis
Rasmus  writes:

> Hi Peter,
>
> Thanks for your report.
>
> Peter Davis  writes:
>
>> I just tried running org-mime-org-buffer-htmlize, which I have used
>> successfully in the past. However, this time, I got an empty
>> message buffer, and this in the mini-buffer:
>>
>> org-export-barf-if-invalid-backend: Unknown "nil" back-end: Aborting export
>>
>> Any clues? I haven't used this in a couple of months, but it did work
>> at one time and, as far as I know, I haven't changed anything
>> that should impact this.
>
> This is from the "draft mode" introduced by Nicolas recently.
>
> Perhaps to get your work done for now you can try to change
> org-export-with-broken-links, though I doubt it will work in this
> particular case.
>
> Nicolas will fix this when he’s back, I’m sure.  I haven’t studied the
> "barf code" and I will therefore not attempt to fix it.

Thank you, Rasmus, but I haven't updated anything lately, so I don't think it's 
the result of any org changes.

-pd



Re: [O] org-reveal questions

2015-10-23 Thread Andreas Leha
Hi,

Fabrice Popineau  writes:
> I switched to org-reveal from beamer.
> Beamer clutters your slides with too much markup. 
> (I ended up with much more markup than text in my slides).

... which of course can be changed by customizing the theme ...

It seems that to get close to how you want your slides to look, you need
to customize the theme in either of beamer and reveal.

Depending on whether you prefer to do that in css/js or latex, you might
arrive there quicker.

Andreas


>
> Moroever, Reveal offers features that no pdf reader offers at least under 
> windows :
> - separate frame for notes, timer, next slide
> - ability to synchronize other clients on the master display 
> (your students can connect and their slides move as you move yours)
> And it is very quick to compile a deck of x100 slides, where beamer can take 
> minutes.
>
> To answer the first question :
> - load bootstrap in the  section of your slides
> - then you can add div's with class col-xs-6 for example and split your frame 
> in 2 columns.
>
> I load bootstrap, mathjax and some personal js and css. It is working pretty 
> well.
> It is not as clean as beamer out of the box, but it is more efficient. 
> With a good css, it should be as clean as beamer. 
>
> Fabrice
>
> 2015-10-23 10:39 GMT+02:00 Eric S Fraga :
>
>
>  On Friday, 23 Oct 2015 at 09:45, Xebar Saram wrote:
>  > Thx Eric
>  >
>  > ill check out beamer..i guess i need to know latex for that right?
>
>  Not necessarily. You can do a lot without any LaTeX knowledge. Most of
>  the issues you had with org-reveal are solved in ox-beamer.
>
>  Check out http://orgmode.org/worg/exporters/beamer/ox-beamer.html
>  --
>  : Eric S Fraga (0xFFFCF67D), Emacs 25.0.50.2, Org release_8.3.2-161-gd2ac25




Re: [O] Can't email multipart/alternative anymore

2015-10-23 Thread Aaron Ecay
Hi Peter,

2015ko urriak 23an, Peter Davis-ek idatzi zuen:
> 
> Nick Dokos  writes:
> 
>> Maybe set debug-on-error and try again - send the backtrace if
>> you get one. Or maybe try with -q, load a minimal .emacs with
>> org and org-mime and try that.
> 
> Here's the output from toggling debug-on-error:

Based on the backtrace, I think that if you do M-x load-library RET
ox-org RET your error should disappear.

If that’s the cause, the attached (draft) patch should give a better
error message in cases like this.
>From 4c1b170e181982fb453b87921b39ace474482040 Mon Sep 17 00:00:00 2001
From: Aaron Ecay 
Date: Fri, 23 Oct 2015 13:48:31 +0100
Subject: [PATCH] Improve invalid export backend error messages.

* lisp/ox.el (org-export-get-backend): Add `strict' argument.
(org-export-derived-backend-p, org-export-get-all-transcoders):
(org-export-get-all-filters, org-export-data-with-backend):
(org-export-as, org-export-insert-default-template):
(org-export-with-backend): Use it.
(org-export-barf-if-invalid-backend): Remove function.
---
 lisp/ox.el | 90 +-
 1 file changed, 42 insertions(+), 48 deletions(-)

diff --git a/lisp/ox.el b/lisp/ox.el
index 80cbc37..d68cc3c 100644
--- a/lisp/ox.el
+++ b/lisp/ox.el
@@ -947,13 +947,18 @@ mode."
   (:copier nil))
   name parent transcoders options filters blocks menu)
 
-(defun org-export-get-backend (name)
+(defun org-export-get-backend (name  strict)
   "Return export back-end named after NAME.
-NAME is a symbol.  Return nil if no such back-end is found."
+
+NAME is a symbol.  Return nil if no such back-end is found, or
+signal an error if STRICT is non-nil."
   (catch 'found
 (dolist (b org-export-registered-backends)
   (when (eq (org-export-backend-name b) name)
-	(throw 'found b)
+	(throw 'found b)))
+(when strict
+  (error "Could not locate export backend %s; try loading the library `ox-%s'"
+	 name name
 
 (defun org-export-register-backend (backend)
   "Register BACKEND as a known export back-end.
@@ -976,25 +981,19 @@ BACKEND is a structure with `org-export-backend' type."
 (if old (setcar (memq old org-export-registered-backends) backend)
   (push backend org-export-registered-backends
 
-(defun org-export-barf-if-invalid-backend (backend)
-  "Signal an error if BACKEND isn't defined."
-  (unless (org-export-backend-p backend)
-(error "Unknown \"%s\" back-end: Aborting export" backend)))
-
 (defun org-export-derived-backend-p (backend  backends)
   "Non-nil if BACKEND is derived from one of BACKENDS.
 BACKEND is an export back-end, as returned by, e.g.,
 `org-export-create-backend', or a symbol referring to
 a registered back-end.  BACKENDS is constituted of symbols."
-  (when (symbolp backend) (setq backend (org-export-get-backend backend)))
-  (when backend
-(catch 'exit
-  (while (org-export-backend-parent backend)
-	(when (memq (org-export-backend-name backend) backends)
-	  (throw 'exit t))
-	(setq backend
-	  (org-export-get-backend (org-export-backend-parent backend
-  (memq (org-export-backend-name backend) backends
+  (when (symbolp backend) (setq backend (org-export-get-backend backend t)))
+  (catch 'exit
+(while (org-export-backend-parent backend)
+  (when (memq (org-export-backend-name backend) backends)
+	(throw 'exit t))
+  (setq backend
+	(org-export-get-backend (org-export-backend-parent backend
+(memq (org-export-backend-name backend) backends)))
 
 (defun org-export-get-all-transcoders (backend)
   "Return full translation table for BACKEND.
@@ -1007,15 +1006,14 @@ transcoders.
 Unlike to `org-export-backend-transcoders', this function
 also returns transcoders inherited from parent back-ends,
 if any."
-  (when (symbolp backend) (setq backend (org-export-get-backend backend)))
-  (when backend
-(let ((transcoders (org-export-backend-transcoders backend))
-	  parent)
-  (while (setq parent (org-export-backend-parent backend))
-	(setq backend (org-export-get-backend parent))
-	(setq transcoders
-	  (append transcoders (org-export-backend-transcoders backend
-  transcoders)))
+  (when (symbolp backend) (setq backend (org-export-get-backend backend t)))
+  (let ((transcoders (org-export-backend-transcoders backend))
+	parent)
+(while (setq parent (org-export-backend-parent backend))
+  (setq backend (org-export-get-backend parent))
+  (setq transcoders
+	(append transcoders (org-export-backend-transcoders backend
+transcoders))
 
 (defun org-export-get-all-options (backend)
   "Return export options for BACKEND.
@@ -1026,14 +1024,13 @@ for the shape of the return value.
 
 Unlike to `org-export-backend-options', this function also
 returns options inherited from parent back-ends, if any."
-  (when (symbolp backend) (setq backend (org-export-get-backend backend)))
-  (when backend
-(let ((options 

Re: [O] Can't email multipart/alternative anymore

2015-10-23 Thread Peter Davis
Aaron Ecay  writes:

> Hi Peter,
>
> 2015ko urriak 23an, Peter Davis-ek idatzi zuen:
>> 
>> Nick Dokos  writes:
>> 
>>> Maybe set debug-on-error and try again - send the backtrace if
>>> you get one. Or maybe try with -q, load a minimal .emacs with
>>> org and org-mime and try that.
>> 
>> Here's the output from toggling debug-on-error:
>
> Based on the backtrace, I think that if you do M-x load-library RET
> ox-org RET your error should disappear.

Yes, that did fix it. But I'm puzzled because my .emacs file contains:

(require 'ox-org)

Shouldn't that have the same effect?

> If that’s the cause, the attached (draft) patch should give a better
> error message in cases like this.

Thank you, Aaron!

-pd



Re: [O] Can't email multipart/alternative anymore

2015-10-23 Thread Peter Davis
Nick Dokos  writes:

> Peter Davis  writes:
>
>> I just tried running org-mime-org-buffer-htmlize, which I have used
>> successfully in the past. However, this time, I got an empty
>> message buffer, and this in the mini-buffer:
>>
>> org-export-barf-if-invalid-backend: Unknown "nil" back-end: Aborting export
>>
>> Any clues? I haven't used this in a couple of months, but it did work
>> at one time and, as far as I know, I haven't changed anything
>> that should impact this.
>>
>
> Works here: Org-mode version 8.3.2 (release_8.3.2-178-g96681f @
> /home/nick/elisp/org-mode/lisp/)

Thanks, Nick. From the error, I'm guessing either a variable that's supposed to 
point to the backend got unset, or the backend
itself is missing.

> Maybe set debug-on-error and try again - send the backtrace if
> you get one. Or maybe try with -q, load a minimal .emacs with
> org and org-mime and try that.

Here's the output from toggling debug-on-error:

Debugger entered--Lisp error: (error "Unknown \"nil\" back-end: Aborting 
export")
  signal(error ("Unknown \"nil\" back-end: Aborting export"))
  error("Unknown \"%s\" back-end: Aborting export" nil)
  org-export-barf-if-invalid-backend(nil)
  org-export-as(org nil nil t nil)
  org-export-string-as("#+STARTUP: showeverything logdone\n#+options: toc:nil 
num:nil\n#+title: Org Mime Org Buffer HTMLize test\n\n* Intro\n\nHere's a 
simple graph:\n\n#+BEGIN_SRC dot :file org-test.png :cmdline -Kdot 
-Tpng\ndigraph G {\n  rankdir=LR;\n  node [shape=box];\n  A -> B;\n  B -> C;\n  
C -> A;\n}\n#+END_SRC\n\nWeill org-mime-org-buffer-htmlize automatically 
include the image?" org t)
  (org-mime-multipart (org-export-string-as (org-babel-trim (funcall bhook body 
(if (eq fmt (quote html)) (quote org) (quote ascii (if (eq fmt (quote 
html)) (quote org) (quote ascii)) t) html)
  (insert (org-mime-multipart (org-export-string-as (org-babel-trim (funcall 
bhook body (if (eq fmt (quote html)) (quote org) (quote ascii (if (eq fmt 
(quote html)) (quote org) (quote ascii)) t) html) (mapconcat (quote identity) 
images "\n"))
  (let* ((org-link-file-path-type (quote absolute)) 
(org-export-htmlize-output-type (quote inline-css)) (html-and-images 
(org-mime-replace-images (org-export-string-as (funcall bhook body (quote 
html)) (quote html) t) file)) (images (cdr html-and-images)) (html 
(org-mime-apply-html-hook (car html-and-images (insert (org-mime-multipart 
(org-export-string-as (org-babel-trim (funcall bhook body (if (eq fmt ...) 
(quote org) (quote ascii (if (eq fmt (quote html)) (quote org) (quote 
ascii)) t) html) (mapconcat (quote identity) images "\n")))
  (cond ((eq fmt (quote org)) (require (quote ox-org)) (insert 
(org-export-string-as (org-babel-trim (funcall bhook body (quote org))) (quote 
org) t))) ((eq fmt (quote ascii)) (require (quote ox-ascii)) (insert 
(org-export-string-as (concat "#+Title:\n" (funcall bhook body (quote ascii))) 
(quote ascii) t))) ((or (eq fmt (quote html)) (eq fmt (quote html-ascii))) 
(require (quote ox-ascii)) (require (quote ox-org)) (let* 
((org-link-file-path-type (quote absolute)) (org-export-htmlize-output-type 
(quote inline-css)) (html-and-images (org-mime-replace-images 
(org-export-string-as (funcall bhook body ...) (quote html) t) file)) (images 
(cdr html-and-images)) (html (org-mime-apply-html-hook (car html-and-images 
(insert (org-mime-multipart (org-export-string-as (org-babel-trim (funcall 
bhook body ...)) (if (eq fmt ...) (quote org) (quote ascii)) t) html) 
(mapconcat (quote identity) images "\n")
  (let ((bhook (function (lambda (body fmt) (let ((hook ...)) (if (> ... 0) 
(let ... ...) body) (fmt (if (symbolp fmt) fmt (intern fmt (cond ((eq 
fmt (quote org)) (require (quote ox-org)) (insert (org-export-string-as 
(org-babel-trim (funcall bhook body (quote org))) (quote org) t))) ((eq fmt 
(quote ascii)) (require (quote ox-ascii)) (insert (org-export-string-as (concat 
"#+Title:\n" (funcall bhook body (quote ascii))) (quote ascii) t))) ((or (eq 
fmt (quote html)) (eq fmt (quote html-ascii))) (require (quote ox-ascii)) 
(require (quote ox-org)) (let* ((org-link-file-path-type (quote absolute)) 
(org-export-htmlize-output-type (quote inline-css)) (html-and-images 
(org-mime-replace-images (org-export-string-as ... ... t) file)) (images (cdr 
html-and-images)) (html (org-mime-apply-html-hook (car html-and-images 
(insert (org-mime-multipart (org-export-string-as (org-babel-trim ...) (if ... 
... ...) t) html) (mapconcat (quote identity) images "\n"))
  org-mime-compose(#("#+STARTUP: showeverything logdone\n#+options: toc:nil 
num:nil\n#+title: Org Mime Org Buffer HTMLize test\n\n* Intro\n\nHere's a 
simple graph:\n\n#+BEGIN_SRC dot :file org-test.png :cmdline -Kdot 
-Tpng\ndigraph G {\n  rankdir=LR;\n  node [shape=box];\n  A -> B;\n  B -> C;\n  
C -> A;\n}\n#+END_SRC\n\nWeill org-mime-org-buffer-htmlize automatically 
include the image?\n\n" 0 33 (fontified t 

Re: [O] org-babel-execute:dot -- why doesn't this work?

2015-10-23 Thread Éibhear
Matt Price  gmail.com> writes:

> 
> 
> 
> On Thu, Sep 24, 2015 at 7:10 AM, Matt Price  gmail.com> wrote:
> 
> 
> On Thu, Sep 24, 2015 at 12:00 AM, Nick Dokos  gmail.com> wrote:
> Matt Price  gmail.com> writes:
> 
> 
> 
> -
> 
> it looks about right until the very end; Manually running "dot
/tmp/babel-2749DTL/dot-2749Nkt -Tpng -o /home/matt/example-diagram.png" from
a shell works fine. However, the result of:(org-babel-eval (concat
cmd     " " (org-babel-process-file-name in-file)     " " cmdline   
 " -o " (org-babel-process-file-name out-file)) "")
> 
> is "nil".  Any idea why that might be?  
> 
> 
> 
> Just a quick addendum.  Pausing during debugging and running
(with-temp-file in-file )(org-babel-eval  "dot
/tmp/babel-2749DTL/dot-2749Nkt -Tpng -o /home/matt/example-diagram.png"  "")  
> 
> from a scratch buffer also works.  So I am really confused -- maybe there
is something wrong with ob-dot itself?
> 
> 
> 
> 
> Again, many thanks,
> 
> Matt
> 
> 
> 
> 
> 
> 
> 

Hi Matt,

Did you get this worked out?

Thanks,

Éibhear



Re: [O] org-reveal questions

2015-10-23 Thread Xebar Saram
On Fri, Oct 23, 2015 at 12:09 PM, Fabrice Popineau <
fabrice.popin...@supelec.fr> wrote:

> To answer the first question :
> - load bootstrap in the  section of your slides
> - then you can add div's with class col-xs-6 for example and split your
> frame in 2 columns.
>

Thank you so much Fabrice for your helpful reply.
would it be ok to ask to elaborate more on the technical terms such as
divs, col-xs-6 etc as im not very technical and pretty new to exporting to
slide shows (also have zero html and css knowledge)

also another small question:

how do i (for a specific slide) make all text not centered but rather left
aligned?

thx so much again


[O] Suppress export of Abstract block?

2015-10-23 Thread Lawrence Bottorff
How would I suppress the

#+begin_abstract
...
#+end_abstract

block content, specifically for the HTML export? :exports none doesn't seem
to work. I saw the drawer hide, but this a block, not a drawer

Lb


[O] ox-md export title block

2015-10-23 Thread Matt Price
I don't know that much about markdown, and I know there are many different
flavours.  pandoc can make use of title, author, and date info in a
markdown file -- from what i cna tell, it expects a "title block atthe head
of a file (http://pandoc.org/README.html#extension-pandoc_title_block)

% author
% title
% date

I have a simple, inadequate patch to ox-md-template that inserts this info.
It's a start maybe for a better patch?

m
diff --git a/lisp/ox-md.el b/lisp/ox-md.el
index e4291e5..321539a 100644
--- a/lisp/ox-md.el
+++ b/lisp/ox-md.el
@@ -468,12 +468,26 @@ holding export options."
   ;; footnotes with at least a blank line.
   (org-trim (org-html-inner-template (concat "\n" contents "\n") info)))
 
+ template
 (defun org-md-template (contents info)
   "Return complete document string after Markdown conversion.
 CONTENTS is the transcoded contents string.  INFO is a plist used
 as a communication channel."
-  contents)
-
+  (concat
+   ;;(message (concat info))
+   (and (plist-get info :with-author)
+	(let ((author (org-export-data (plist-get info :author) info)))
+	  (and (org-string-nw-p author)
+	   (concat  "\% " author "\n"
+   (and (plist-get info :with-title)
+	(concat "\% " (org-export-data (plist-get info :title) info) "\n"))
+   (and (plist-get info :with-date)
+	(let ((date (org-export-data (org-export-get-date info) info)))
+	  (and (org-string-nw-p date)
+	   (concat "\% " date "\n"
+   
+   contents)
+  )
 
 
 ;;; Interactive function


Re: [O] org-babel-execute:dot -- why doesn't this work?

2015-10-23 Thread Matt Price
On Fri, Oct 23, 2015 at 8:27 AM, Éibhear  wrote:

> Matt Price  gmail.com> writes:
>
> >
> >
> >
> > On Thu, Sep 24, 2015 at 7:10 AM, Matt Price  gmail.com>
> wrote:
> >
> >
> > On Thu, Sep 24, 2015 at 12:00 AM, Nick Dokos  gmail.com>
> wrote:
> > Matt Price  gmail.com> writes:
> >
> >
> >
> > -
> >
> > it looks about right until the very end; Manually running "dot
> /tmp/babel-2749DTL/dot-2749Nkt -Tpng -o /home/matt/example-diagram.png"
> from
> a shell works fine. However, the result of:(org-babel-eval (concat
> cmd " " (org-babel-process-file-name in-file) " "
> cmdline
>  " -o " (org-babel-process-file-name out-file)) "")
> >
> > is "nil".  Any idea why that might be?
> >
> >
> >
> > Just a quick addendum.  Pausing during debugging and running
> (with-temp-file in-file )(org-babel-eval  "dot
> /tmp/babel-2749DTL/dot-2749Nkt -Tpng -o /home/matt/example-diagram.png"
> "")
> >
> > from a scratch buffer also works.  So I am really confused -- maybe there
> is something wrong with ob-dot itself?
> >
> >
> >
> >
> > Again, many thanks,
> >
> > Matt
> >
> >
> >
> >
> >
> >
> >
>
> Hi Matt,
>
> Did you get this worked out?
>
> Thanks,
>
> Éibhear
>
>
hmm.  It looks like maybe I didn't -- I confess I'd forgotten about this
old email.  Looks like I just generated the diagram from a scratch buffer,
as described in my email.  Sorry I didn't get further!

Matt


Re: [O] [PATCH] org-id-goto doesn't work if buffer is narrowed.

2015-10-23 Thread Puneeth Chaganti
Hi Rasmus,

On Sat, Oct 24, 2015 at 1:52 AM, Rasmus  wrote:
> Hi Puneeth,
>
> Thanks for the followup.
>
> Puneeth Chaganti  writes:
>
>> On Fri, Oct 23, 2015 at 8:57 PM, Rasmus  wrote:
>>> It's not obvious that org should change a—potentially—carefully selected
>>> narrowed region.
>>
>> I agree. But, am I not explicitly asking to jump to the specified
>> item. I don't mind the widening, at least when the call is
>> interactive. I agree with you when some other code is calling it,
>> though.
>
> I see your point, but I also remember being quite annoyed in the past when
> I lost my narrow because of e.g. inserting a footnote.

I see.

>>> Perhaps you could mimic the way org-edit-special works for this case.
>>
>> You mean, display the entry in a new buffer, and any changes will be
>> applied onto the original entry too?
>
> Yeah, I would prefer that.  Would that work for you or would still prefer
> to have your buffer widened?

I agree that widening a buffer that was narrowed on purpose can be
annoying, sometimes. Most times, I think I wouldn't mind the widening.
That said, I'm not quite sure what is the right fix for this.

I find it weird to have a subtly different thing happening depending
on whether or not the target buffer is narrowed -- entry shown in
normal buffer when no narrowing vs. entry shown in a special/indirect
buffer.

Also, given that no other part of org really uses indirect buffers, I
don't know if this function alone should make use of that feature.

Let me know what you think.

-- Puneeth

PS: I've patched my org sources to do indirect buffers for this, and
will try it out for sometime to see how it feels.



Re: [O] [PATCH] org-id-goto doesn't work if buffer is narrowed.

2015-10-23 Thread Matt Lundin
Rasmus  writes:

> Hi Puneeth,
>
> Thanks for your patch.
>
> Puneeth Chaganti  writes:
>
>> I've attached a one-line patch to fix `org-id-goto' if the target
>> buffer is narrowed. Let me know if this fix sounds reasonable or if
>> you have other suggestions!
>
> It's not obvious that org should change a—potentially—carefully selected
> narrowed region.

Org mode already does this aggressively and often. For instance, it
irrevocably widens all buffers associated with org-agenda-files when
generating the agenda. (To replicate, try narrowing to a headline in a
buffer and then calling the agenda.) The same is true of follow mode; it
widens a buffer once one moves to a line in the agenda corresponding to
that buffer. In other words, org currently does not go out of its way to
protect user's narrowed regions.

+1 on my part for widening a buffer if it contains a relevant id target.
If I click org-id-goto and the target is in my buffer, I want it to
widen that buffer.

Matt





Re: [O] Macro question

2015-10-23 Thread Nicolas Goaziou
Hello,

Fabrice Popineau  writes:

> I was wondering if macros could be used to output raw html code, but that
> doesn't seem to be the case.
>
> Namely:
>
> #+macro: bfoo @@html:@@
> #+macro: efoo @@html:@@
>
> The macros {{{bfoo}}} and {{{efoo}}} are expanded surrounded by  ...
> .

Macros can output raw inline HTML code. If you want to generate any HTML
code, you can use some babel block to do that.

Regards,

-- 
Nicolas Goaziou



Re: [O] [PATCH] org-id-goto doesn't work if buffer is narrowed.

2015-10-23 Thread Rasmus
Hi Matt,

Matt Lundin  writes:

>>> I've attached a one-line patch to fix `org-id-goto' if the target
>>> buffer is narrowed. Let me know if this fix sounds reasonable or if
>>> you have other suggestions!
>>
>> It's not obvious that org should change a—potentially—carefully selected
>> narrowed region.
>
> Org mode already does this aggressively and often. For instance, it
> irrevocably widens all buffers associated with org-agenda-files when
> generating the agenda. (To replicate, try narrowing to a headline in a
> buffer and then calling the agenda.) The same is true of follow mode; it
> widens a buffer once one moves to a line in the agenda corresponding to
> that buffer. In other words, org currently does not go out of its way to
> protect user's narrowed regions.
>
> +1 on my part for widening a buffer if it contains a relevant id target.
> If I click org-id-goto and the target is in my buffer, I want it to
> widen that buffer.

It’s not that Org isn’t trying to save narrows, it’s just that you found
another bug (sounds like a missing org-with-wide-buffer to me, but I
haven’t tried to reproduce your example).  It could of course also be that
the same logic is not applied in this case on purpose.

In Org 8.3, you'll (thankfully) not lose your narrow when you click C-c
C-c on a footnote reference outside the current narrow.  Also not when you
insert a new footnote.

Whether it would be better to use an indirect buffer, as John suggests, or
whether it would be possible to utilize the familiar interface of
org-src.el for "remote editing" (or viewing) I don’t know.

Rasmus

-- 
I hear there's rumors on the, uh, Internets. . .




Re: [O] [PATCH] org-id-goto doesn't work if buffer is narrowed.

2015-10-23 Thread Rasmus
Hi Puneeth,

Thanks for the followup.

Puneeth Chaganti  writes:

> On Fri, Oct 23, 2015 at 8:57 PM, Rasmus  wrote:
>> It's not obvious that org should change a—potentially—carefully selected
>> narrowed region.
>
> I agree. But, am I not explicitly asking to jump to the specified
> item. I don't mind the widening, at least when the call is
> interactive. I agree with you when some other code is calling it,
> though.

I see your point, but I also remember being quite annoyed in the past when
I lost my narrow because of e.g. inserting a footnote.

>> Perhaps you could mimic the way org-edit-special works for this case.
>
> You mean, display the entry in a new buffer, and any changes will be
> applied onto the original entry too?

Yeah, I would prefer that.  Would that work for you or would still prefer
to have your buffer widened?

Thanks,
Rasmus

-- 
I almost cut my hair, it happened just the other day




[O] Macro question

2015-10-23 Thread Fabrice Popineau
I was wondering if macros could be used to output raw html code, but that
doesn't seem to be the case.

Namely:

#+macro: bfoo @@html:@@
#+macro: efoo @@html:@@

The macros {{{bfoo}}} and {{{efoo}}} are expanded surrounded by  ...
.

This is quite a limitation. Is it the intended behavior?
If the reason is that the macro could output text that needs the  ...
, then
the problem is the point at which macros are expanded in the flow.
An option would be to allow #+html: in the macro, but that doesn't work.
The #+html:
directive gets straight on the output.

Sorry if this has already been discussed here.
(I vaguely remember some discussions about recursive macros)

Fabrice


Re: [O] ox-md export title block

2015-10-23 Thread Rasmus
Hi Matt,

Thanks for your patch.

Matt Price  writes:

> I don't know that much about markdown, and I know there are many different
> flavours.  pandoc can make use of title, author, and date info in a
> markdown file -- from what i cna tell, it expects a "title block atthe head
> of a file (http://pandoc.org/README.html#extension-pandoc_title_block)
>
> % author
> % title
> % date
>
> I have a simple, inadequate patch to ox-md-template that inserts this info.
> It's a start maybe for a better patch?

I don't think it's inadequate, but I also don't know if this should be
part of ox-md in it’s present form.

The original md specification doesn’t seem to support this syntax:

 https://daringfireball.net/projects/markdown/syntax

(I searched for % and author).

Would it be recognized by say Github or Stack Exchange?  On Github
"^% Rasmus\n"  is printed as just that, so I guess not.

Perhaps it would be better to define a new backend, ox-md-pandoc.el, or
add a "#+MARKDOWN_FLAVOR" keyword to condition such insertions on.

Cheers,
Rasmus

-- 
What will be next?






Re: [O] Can't email multipart/alternative anymore

2015-10-23 Thread Nicolas Goaziou
Hello,

Aaron Ecay  writes:

>
> Based on the backtrace, I think that if you do M-x load-library RET
> ox-org RET your error should disappear.
>
> If that’s the cause, the attached (draft) patch should give a better
> error message in cases like this.

Thank you.

However, `org-export-barf-if-invalid-backend' raises an error, not
a user-error. IOW, it doesn't need to be verbose: it is a bug if a user
sees it anyway.

I suggest to (require 'ox-org) where appropriate and fix the issue.
I didn't look closely at the problem so you know better than me where
this line should be added.

WDYT?


Regards,

-- 
Nicolas Goaziou



Re: [O] org-babel-execute:dot -- why doesn't this work?

2015-10-23 Thread Éibhear
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 23/10/15 18:43, Matt Price wrote:
> 
> 
> On Fri, Oct 23, 2015 at 8:27 AM, Éibhear  > wrote:
> 
> Matt Price  gmail.com > writes:
> 
>> 
>> 
>> 
>> On Thu, Sep 24, 2015 at 7:10 AM, Matt Price 
> gmail.com > wrote:
>> 
>> 
>> On Thu, Sep 24, 2015 at 12:00 AM, Nick Dokos 
>> gmail.com > wrote: Matt Price 
>> gmail.com > writes:
>> 
>> 
>> 
>> -
>> 
>> it looks about right until the very end; Manually running "dot
> /tmp/babel-2749DTL/dot-2749Nkt -Tpng -o 
> /home/matt/example-diagram.png" from a shell works fine. However,
> the result of:(org-babel-eval (concat cmd " "
> (org-babel-process-file-name in-file) " " cmdline " -o "
> (org-babel-process-file-name out-file)) "")
>> 
>> is "nil".  Any idea why that might be?
>> 
>> 
>> 
>> Just a quick addendum.  Pausing during debugging and running
> (with-temp-file in-file )(org-babel-eval  "dot 
> /tmp/babel-2749DTL/dot-2749Nkt -Tpng -o 
> /home/matt/example-diagram.png"  "")
>> 
>> from a scratch buffer also works.  So I am really confused --
>> maybe there
> is something wrong with ob-dot itself?
>> 
>> 
>> 
>> 
>> Again, many thanks,
>> 
>> Matt
>> 
>> 
>> 
>> 
>> 
>> 
>> 
> 
> Hi Matt,
> 
> Did you get this worked out?
> 
> Thanks,
> 
> Éibhear
> 
> 
> hmm.  It looks like maybe I didn't -- I confess I'd forgotten about
> this old email.  Looks like I just generated the diagram from a
> scratch buffer, as described in my email.  Sorry I didn't get
> further!
> 
> Matt
> 

No problems.

I've determined tonight that it was working fine in org 8.2.10, but
the problem you report is in org 8.3.1. There are many changes in
ob-core.el, but little in ob-dot.el or ob-eval.el, so further
investigation is required. I'll continue plugging. I really like
building graphs using dot through org-mode, so I'd love to see this
fixed (e.g. I had to revert to LibreOffice Draw today!).

Thanks,

Éibhear

- -- 
Éibhear Ó hAnluain
Dublin, Ireland.
+---++
| e-mail: eibhear@gmail.com | Web: [http://www.gibiris.org/] |
| Twitter: @eibhear | Google+: +Éibhear Ó hAnluain   |
| Mobile: +353 86 856 5666  | VoIP: sip:eibh...@linphone.org |
+---++
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.12 (GNU/Linux)

iEYEARECAAYFAlYqnQcACgkQ0ST+nPIXcQZurgCggeNdy7yv1hY3ItQ4JhvBYOLm
pnQAoJM0/DNnCmOC1EsWP1C0mqEwDxpr
=KF2z
-END PGP SIGNATURE-



Re: [O] commit 4e864643 breaks org-return

2015-10-23 Thread Stefan-W. Hahn
Mail von Stefan-W. Hahn, Thu, 22 Oct 2015 at 18:57:08 +0200:

Hello,

> commit 4e864643bdb6bba3e000ea51fb746a26e40b1f77
> Author: Nicolas Goaziou 
> Date:   Sun Oct 18 09:36:15 2015 +0200
> 
> changes the behaviour of org-return when positioned right after a link with
> org-return-follows-link set to t.

the following patch seems to repair the behaviour:

#+BEGIN_SRC elisp
diff --git a/lisp/org.el b/lisp/org.el
index a5183aa..3d527ac 100755
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -21354,7 +21354,9 @@ (defun org-return ( indent)
  ((and org-return-follows-link
   (or (org-at-timestamp-p t)
   (org-at-date-range-p t)
-  (org-in-regexp org-any-link-re)))
+  (org-in-regexp org-any-link-re))
+  (< (point)
+ (org-element-property :end context)))
   (call-interactively #'org-open-at-point))
  ;; Insert newline in heading, but preserve tags.
  ((and (not (bolp))
#+END_SRC elisp

With kind regards,
Stefan

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



Re: [O] Suppress export of Abstract block?

2015-10-23 Thread Rasmus
Lawrence Bottorff  writes:

> How would I suppress the
>
> #+begin_abstract
> ...
> #+end_abstract
>
> block content, specifically for the HTML export? :exports none doesn't seem
> to work. I saw the drawer hide, but this a block, not a drawer

Do you want to ax it or just not to display it in the browser?  The second
done with CSS (e.g. display:none).  Otherwise, you can always cut it out
with a filter.

Hope it helps,
Rasmus

-- 
Lasciate ogni speranza, voi che leggete questo.




Re: [O] Org-agenda-leaders

2015-10-23 Thread Nicolas Goaziou
Hello,

Nick Dokos  writes:

> ,
> | (defconst org-clock-string "CLOCK:"
> |   "String used as prefix for timestamps clocking work hours on an item.")
> | 
> | (defvar org-closed-string "CLOSED:"
> |   "String used as the prefix for timestamps logging closing a TODO entry.")
> | 
> | (defvar org-deadline-string "DEADLINE:"
> |   "String to mark deadline entries.
> | A deadline is this string, followed by a time stamp.  Should be a word,
> | terminated by a colon.  You can insert a schedule keyword and
> | a timestamp with \\[org-deadline].")
> | 
> | (defvar org-scheduled-string "SCHEDULED:"
> |   "String to mark scheduled TODO entries.
> | A schedule is this string, followed by a time stamp.  Should be a word,
> | terminated by a colon.  You can insert a schedule keyword and
> | a timestamp with \\[org-schedule].")
> `
>
> Try redefining some or all of these strings.

Please don't. They should be defconst and are kept as defvar for
historical reasons.

Regards,

-- 
Nicolas Goaziou



Re: [O] ox-md export title block

2015-10-23 Thread Nicolas Goaziou
Hello,

Matt Price  writes:

> I don't know that much about markdown, and I know there are many different
> flavours.  pandoc can make use of title, author, and date info in a
> markdown file -- from what i cna tell, it expects a "title block atthe head
> of a file (http://pandoc.org/README.html#extension-pandoc_title_block)
>
> % author
> % title
> % date
>
> I have a simple, inadequate patch to ox-md-template that inserts this info.
> It's a start maybe for a better patch?

Thank you for the patch.

However, "ox-md.el" is for Vanilla Markdown, where such constructs do
not exist. So it cannot be applied there.

ISTR there are a few others export back-ends in contrib/ that may use
this. You may also create ox-md-pandoc.el if it doesn't exist already.

Regards,

-- 
Nicolas Goaziou



[O] feature request: easier style attributes

2015-10-23 Thread Matt Price
OK, one more, again a repeat of an old request.

Pandoc Markdown has this incredibly easy way to specify html attributes (
http://pandoc.org/README.html#header-identifiers):


# My Header {#myid .class1 .class2}


I find this much easier to read, write, and maintain than the org-mode
equivalent:

#+ATTR_HTML: :id myid :class class1 class2
* My Header

I would love to have something like the pandoc syntax available within
org.  What do other people think, and how hard would this be to implement?


[O] [PATCH] org-id-goto doesn't work if buffer is narrowed.

2015-10-23 Thread Puneeth Chaganti
Hello,

I've attached a one-line patch to fix `org-id-goto' if the target
buffer is narrowed. Let me know if this fix sounds reasonable or if
you have other suggestions!

Thanks,
Puneeth
From 3f3deb84fc2e2739307e820cdfa7de1c6fbf4f23 Mon Sep 17 00:00:00 2001
From: Puneeth Chaganti 
Date: Fri, 23 Oct 2015 20:21:59 +0530
Subject: [PATCH] Widen buffer in `org-id-goto'.

When the target buffer for `org-id-goto' is already open and narrowed,
it doesn't work.
---
 lisp/org-id.el | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lisp/org-id.el b/lisp/org-id.el
index f86ef22..149a69b 100644
--- a/lisp/org-id.el
+++ b/lisp/org-id.el
@@ -296,6 +296,7 @@ Move the cursor to that entry in that buffer."
 (unless m
   (error "Cannot find entry with ID \"%s\"" id))
 (org-pop-to-buffer-same-window (marker-buffer m))
+(widen)
 (goto-char m)
 (move-marker m nil)
 (org-show-context)))
-- 
2.1.4



Re: [O] [PATCH] org-id-goto doesn't work if buffer is narrowed.

2015-10-23 Thread Rasmus
Hi Puneeth,

Thanks for your patch.

Puneeth Chaganti  writes:

> I've attached a one-line patch to fix `org-id-goto' if the target
> buffer is narrowed. Let me know if this fix sounds reasonable or if
> you have other suggestions!

It's not obvious that org should change a—potentially—carefully selected
narrowed region.

Perhaps you could mimic the way org-edit-special works for this case.

Thanks,
Rasmus

-- 
And when I’m finished thinking, I have to die a lot




Re: [O] prompt for deadline in capture template?

2015-10-23 Thread Matt Lundin
John Kitchin  writes:

> I just type C-c C-d and add it while the capture is open.
>
> Xebar Saram writes:
>
>> Hi guys
>>
>> i looked in the capture docu but couldn't seem to find it. anyone knows how
>> to prompt for deadline in capture template?

If you want to do it more pragmatically, you could use something like
this (adjust the template as needed).

(add-to-list 'org-capture-templates
 '("d" "Deadline" entry
   (file "~/org/inbox.org")
   "* %^{Headline}\n DEADLINE: %^t"))

See (info "(org) Template expansion")

Matt



Re: [O] org-reveal questions

2015-10-23 Thread Matt Lundin
Xebar Saram  writes:

> On Fri, Oct 23, 2015 at 12:09 PM, Fabrice Popineau
>  wrote:
>
>
> To answer the first question :
> - load bootstrap in the  section of your slides
> - then you can add div's with class col-xs-6 for example and split
> your frame in 2 columns.
>
> Thank you so much Fabrice for your helpful reply. 
> would it be ok to ask to elaborate more on the technical terms such as
> divs, col-xs-6 etc as im not very technical and pretty new to
> exporting to slide shows (also have zero html and css knowledge)

Customizing reveal.js slides does require css and html knowledge. You
can change the theme (or link to your own custom stylesheet in the
header of your reveal html). You might also try searching online for
custom themes that meet your specifications.

Beamer is also great, but customizing beamer to look precisely the way
you want it requires knowledge of LaTeX.

In short, simple slide export from org-mode is fine if you are OK with
the existing themes, templates. But more customization that will
generally require knowledge of the relevant markup.

Matt



[O] [BUG] Use of period in org-read-date broken

2015-10-23 Thread Matt Lundin
The commit e802936f4b39f8b1e56cc015f34aa655565afe7f broke the use of the
period at the beginning of the minibuffer as a means to jump to the
current day.

Steps to replicate:

1. Evaluate (org-read-date)

2. Use Shift-Left to go to the previous date.

3. Type a period at beginning of minibuffer prompt.

Expected behavior:

The calendar should jump to the current day and no period should be
inserted in the minibuffer. That is the behavior that always worked in
the past and the behavior that is intended in lines 16772 to 16777 of
org.el.

Actual behavior:

A period is inserted in the minibuffer and the calendar does not jump to
the current day.

Here is the problematic commit:

--8<---cut here---start->8---
commit e802936f4b39f8b1e56cc015f34aa655565afe7f
Author: Kyle Meyer 
Date:   Sun Sep 27 12:27:52 2015 -0400

Pass LIMIT argument to org-looking-back

* lisp/org-mouse.el (org-mouse-insert-item):
(org-mouse-context-menu):
* lisp/org-pcomplete.el (org-thing-at-point):
* lisp/org.el (org-read-date-minibuffer-local-map):
(org-timestamp-change): Provide LIMIT argument to org-looking-back.
* lisp/org.el (org-read-date-minibuffer-local-map):
(org-insert-heading): Replace looking-back with org-looking-back.

As of Emacs 25, the LIMIT argument to looking-back is advertised as a
required argument.
--8<---cut here---end--->8---

Thanks,
Matt



Re: [O] [BUG] Use of period in org-read-date broken

2015-10-23 Thread Kyle Meyer
Matt Lundin  writes:

> The commit e802936f4b39f8b1e56cc015f34aa655565afe7f broke the use of the
> period at the beginning of the minibuffer as a means to jump to the
> current day.

Thanks.  Fixed by 8c763ab.

--
Kyle



Re: [O] org-reveal questions

2015-10-23 Thread Xebar Saram
Thx Eric

ill check out beamer..i guess i need to know latex for that right?

On Fri, Oct 23, 2015 at 9:18 AM, Eric S Fraga  wrote:

> On Friday, 23 Oct 2015 at 08:16, Xebar Saram wrote:
> > Hi all
> >
> > for all you org-reveal users, excuse me for these questions that may seem
> > trivial but as a new reveal/org-reveal user i havent been able to address
> > them :)
> >
> > 1) how does one add images not below the text but on the left/right of
> the
> > text?
> > 2) can i change the fonts size per slide or even better per specific
> > line/region?
> > 3) can slide headers be placed higher up on the slide? currently when the
> > text is spares it seems like the header starts in the middle of the slide
>
> I may be wrong but I think you are asking too much from org-reveal.  If
> you want this level of customisation, you may need to go to the HTML
> directly or, if you want to stick with org, use beamer...
> --
> : Eric S Fraga (0xFFFCF67D), Emacs 25.0.50.2, Org release_8.3.2-161-gd2ac25
>


Re: [O] org-reveal questions

2015-10-23 Thread Eric S Fraga
On Friday, 23 Oct 2015 at 08:16, Xebar Saram wrote:
> Hi all
>
> for all you org-reveal users, excuse me for these questions that may seem
> trivial but as a new reveal/org-reveal user i havent been able to address
> them :)
>
> 1) how does one add images not below the text but on the left/right of the
> text?
> 2) can i change the fonts size per slide or even better per specific
> line/region?
> 3) can slide headers be placed higher up on the slide? currently when the
> text is spares it seems like the header starts in the middle of the slide

I may be wrong but I think you are asking too much from org-reveal.  If
you want this level of customisation, you may need to go to the HTML
directly or, if you want to stick with org, use beamer...
-- 
: Eric S Fraga (0xFFFCF67D), Emacs 25.0.50.2, Org release_8.3.2-161-gd2ac25



Re: [O] ox-md export title block

2015-10-23 Thread Nick Dokos
Nicolas Goaziou  writes:

> However, "ox-md.el" is for Vanilla Markdown, where such constructs do
> not exist. So it cannot be applied there.

> ISTR there are a few others export back-ends in contrib/ that may use
> this. You may also create ox-md-pandoc.el if it doesn't exist already.

Rasmus  writes:

> I don't think it's inadequate, but I also don't know if this should be
> part of ox-md in it’s present form.
>
> The original md specification doesn’t seem to support this syntax:
>
>  https://daringfireball.net/projects/markdown/syntax
>
> (I searched for % and author).
>
> Would it be recognized by say Github or Stack Exchange?  On Github
> "^% Rasmus\n"  is printed as just that, so I guess not.
>
> Perhaps it would be better to define a new backend, ox-md-pandoc.el, or
> add a "#+MARKDOWN_FLAVOR" keyword to condition such insertions on.
>

Great minds always meet ;-)

--
Nick




Re: [O] commit 4e864643 breaks org-return

2015-10-23 Thread Nicolas Goaziou
Hello,

"Stefan-W. Hahn"  writes:

> Mail von Stefan-W. Hahn, Thu, 22 Oct 2015 at 18:57:08 +0200:
>
> Hello,
>
>> commit 4e864643bdb6bba3e000ea51fb746a26e40b1f77
>> Author: Nicolas Goaziou 
>> Date:   Sun Oct 18 09:36:15 2015 +0200
>> 
>> changes the behaviour of org-return when positioned right after a link with
>> org-return-follows-link set to t.
>
> the following patch seems to repair the behaviour:

But is the current behaviour broken in the first place? At least it is
consistent with `org-open-at-point' (C-c C-o).
>
> #+BEGIN_SRC elisp
> diff --git a/lisp/org.el b/lisp/org.el
> index a5183aa..3d527ac 100755
> --- a/lisp/org.el
> +++ b/lisp/org.el
> @@ -21354,7 +21354,9 @@ (defun org-return ( indent)
>   ((and org-return-follows-link
>(or (org-at-timestamp-p t)
>(org-at-date-range-p t)
> -  (org-in-regexp org-any-link-re)))
> +  (org-in-regexp org-any-link-re))
> +  (< (point)
> + (org-element-property :end context)))

This wouldn't cut it because CONTEXT is wrong when, e.g., point is in
a comment. I think you're after the VISUALLY argument from
`org-in-regexp'. But then, it would require to turn
`org-at-date-range-p' and `org-at-timestamp-p' into `org-in-regexp'
calls.

Regards,

-- 
Nicolas Goaziou



Re: [O] ox-md export title block

2015-10-23 Thread Matt Price
On Fri, Oct 23, 2015 at 5:22 PM, Nick Dokos  wrote:

> Nicolas Goaziou  writes:
>
> > However, "ox-md.el" is for Vanilla Markdown, where such constructs do
> > not exist. So it cannot be applied there.
>
> > ISTR there are a few others export back-ends in contrib/ that may use
> > this. You may also create ox-md-pandoc.el if it doesn't exist already.
>
> Rasmus  writes:
>
> > I don't think it's inadequate, but I also don't know if this should be
> > part of ox-md in it’s present form.
> >
> > The original md specification doesn’t seem to support this syntax:
> >
> >  https://daringfireball.net/projects/markdown/syntax
> >
> > (I searched for % and author).
> >
> > Would it be recognized by say Github or Stack Exchange?  On Github
> > "^% Rasmus\n"  is printed as just that, so I guess not.
> >
> > Perhaps it would be better to define a new backend, ox-md-pandoc.el, or
> > add a "#+MARKDOWN_FLAVOR" keyword to condition such insertions on.
> >
>
> Great minds always meet ;-)
>
> --
> Nick
>
>
> OK, I've written a totally primitive ox-md-pandoc.e.  For now it's up on
github, because it's veyr clumsy and doesn't support enough of the pandoc
syntax.  I put it here:

https://github.com/titaniumbones/org-md-pandoc

I would love it if other people would help me improve it. I put a few ideas
in the README.  Happy to add to contrib if/when people think it's good
enough to be of general use.


[O] feature request: best practices for speaker notes and incremental lists/elements

2015-10-23 Thread Matt Price
In writing ox-md-pandoc, I ad occasion to translate org-reveal's spearker
note syntax into html .  It revived an older concern of mine, that
ox-reveal and ox-deck have different ways of representing near-identical
features within org.

** Speaker notes

Speaker notes are represented thus for export to reveal.js:

#+BEGIN_NOTES
Here are my awesome notes
#+END_NOTES

and for export to deck.js:

* Notes :note:
Here are my awesome notes

-

** incremental lists/elements

incrementally-shown elements are produced thus in reveal:

** My Slide Header
#+ATTR_REVEAL: :frag (appear)
- list 1 is one click away
- list 2 is two clicks away

and in deck:

* My Slide Header
:Properties:
:STEP: t
:END:
- list 1 is one click away
- list 2 is two clicks away



I think the two exporters should use the same syntax! I especially think
that any future exporters should use a single, unified syntax, and that the
older exporters should eventualyl be changed to support that new syntax.
And finally, I think the new syntax should be as simple as humanly
possible.  So I'd like to suggest that the community decide on the best way
forward.

I don't really have an opinion as to which method is better; in fact, I
imagine there's probably a method tjat is better and simpler than any that
have been developed thus far.  Certianly I think what he have right now is
pretty awkward  But I think it's worth figuring out what we want to do, and
then implementing it.

And once we've done that, it wil lbe easier for me to add the proper
functionality to the md-pandoc exporter, too.

Thanks,

Matt


Re: [O] Org-agenda-leaders

2015-10-23 Thread Nick Dokos
Nicolas Goaziou  writes:

> Hello,
>
> Nick Dokos  writes:
>
>> ,
>> | (defconst org-clock-string "CLOCK:"
>> |   "String used as prefix for timestamps clocking work hours on an item.")
>> | 
>> | (defvar org-closed-string "CLOSED:"
>> |   "String used as the prefix for timestamps logging closing a TODO entry.")
>> | 
>> | (defvar org-deadline-string "DEADLINE:"
>> |   "String to mark deadline entries.
>> | A deadline is this string, followed by a time stamp.  Should be a word,
>> | terminated by a colon.  You can insert a schedule keyword and
>> | a timestamp with \\[org-deadline].")
>> | 
>> | (defvar org-scheduled-string "SCHEDULED:"
>> |   "String to mark scheduled TODO entries.
>> | A schedule is this string, followed by a time stamp.  Should be a word,
>> | terminated by a colon.  You can insert a schedule keyword and
>> | a timestamp with \\[org-schedule].")
>> `
>>
>> Try redefining some or all of these strings.
>
> Please don't. They should be defconst and are kept as defvar for
> historical reasons.
>

Oops - sorry: I didn't realize that. I didn't even notice the CLOCK
defconst. As a matter of curiosity, what's the back story here?

-- 
Nick




Re: [O] Macro question

2015-10-23 Thread Nicolas Goaziou
Fabrice Popineau  writes:

> I agree that raw html can be output by macros, but it can easily break
> too.

I think you are missing the "inline part". You cannot use macros to
generate, or even replace a block element in HTML (e.g., a paragraph).

Regards,



Re: [O] Can't email multipart/alternative anymore

2015-10-23 Thread Peter Davis

On 10/23/15 4:44 PM, Nicolas Goaziou wrote:

Hello,

Aaron Ecay  writes:


Based on the backtrace, I think that if you do M-x load-library RET
ox-org RET your error should disappear.

If that’s the cause, the attached (draft) patch should give a better
error message in cases like this.

Thank you.

However, `org-export-barf-if-invalid-backend' raises an error, not
a user-error. IOW, it doesn't need to be verbose: it is a bug if a user
sees it anyway.


Actually, I didn't see the barf part in the mini-buffer. All I saw there 
was:


Unknown "nil" back-end: Aborting export


I copied the rest from *Messages*

I suggest to (require 'ox-org) where appropriate and fix the issue.
I didn't look closely at the problem so you know better than me where
this line should be added.
I replied earlier, but it doesn't seem to have shown up on the list yet. 
Explicitly loading ox-org *did* fix the problem for me, but I already have


(require 'ox-org)

in my .emacs file, so I'm not sure why that was ineffective.

Thanks.
-pd




Re: [O] Macro question

2015-10-23 Thread Fabrice Popineau
Hello Nicolas,

2015-10-23 22:37 GMT+02:00 Nicolas Goaziou :

> Hello,
>
> Fabrice Popineau  writes:
>
> > I was wondering if macros could be used to output raw html code, but that
> > doesn't seem to be the case.
> >
> > Namely:
> >
> > #+macro: bfoo @@html:@@
> > #+macro: efoo @@html:@@
> >
> > The macros {{{bfoo}}} and {{{efoo}}} are expanded surrounded by  ...
> > .
>
> Macros can output raw inline HTML code. If you want to generate any HTML
> code, you can use some babel block to do that.
>
>
I agree that raw html can be output by macros, but it can easily break too.

At the moment :

-
#+macro: bfoo @@html:@@
#+macro: efoo @@html:@@

* Section

{{{bfoo}}}

Some text.

{{{efoo}}}
-

is exported as :

-

Section










Some text.







-

But :

-
#+macro: bfoo @@html:@@
#+macro: efoo @@html:@@

* Section

{{{bfoo}}}
Some text.
{{{efoo}}}
-

is exported as :

-

Section







Some text.




-

In the first case, the  ...  are quite annoying.
In the second case,  the  ...  is spurious, but at least it doesn't
break the structure.

I wonder if there is a way to guess where ox-html could avoid to emit
paragraphs.

Regards,

Fabrice


Re: [O] org-reveal questions

2015-10-23 Thread Eric S Fraga
On Friday, 23 Oct 2015 at 09:45, Xebar Saram wrote:
> Thx Eric
>
> ill check out beamer..i guess i need to know latex for that right?

Not necessarily.  You can do a lot without any LaTeX knowledge.  Most of
the issues you had with org-reveal are solved in ox-beamer.

Check out http://orgmode.org/worg/exporters/beamer/ox-beamer.html
-- 
: Eric S Fraga (0xFFFCF67D), Emacs 25.0.50.2, Org release_8.3.2-161-gd2ac25



Re: [O] Suppress export of Abstract block?

2015-10-23 Thread John Kitchin
use a filter (http://orgmode.org/worg/exporters/filter-markup.html) and
set that text to be ""?

This will probably clobber all special blocks. If you have more than
one, you need to check if it is an abstract block somehow, and return
the text unaltered if it isnt.

This is untested ;)

(defun ox-mrkup-filter-abstract
   (text back-end info)
   "")

you will need a derived backend, maybe something like:

(org-export-define-derived-backend 'my-html 'html
  :filters-alist
  '((:filter-special-block . ox-mrkup-filter-abstract)))

Then run
(org-export-to-file 'my-html "html-marked.html")

Lawrence Bottorff writes:

> How would I suppress the
>
> #+begin_abstract
> ...
> #+end_abstract
>
> block content, specifically for the HTML export? :exports none doesn't seem
> to work. I saw the drawer hide, but this a block, not a drawer
>
> Lb

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