[O] Easy templates broken with 9.2

2019-01-26 Thread Lawrence Bottorff
It seems my easy templates completion is being ignored. I'm  9.2
(9.2-41-g010a35-elpa ...). I've found a reference or two online but the
fix,  i.e., running (require 'org-tempo) only produced error messages. The
"documentation" doesn't really say exactly what the new format is. Here's a
sample of what my old org-structure-template-alist had:

...
("o" "#+name:\n#+begin_src ocaml :exports both :tangle yes :cache yes
:results silent\n?\n#+end_src")
("G" "#+name:\n#+begin_src gnuplot :exports both :file \n?\n#+end_src")
("r" "\\rightarrow")
...

What do I need to change about my old easy templates to work with 9.2? I
understand "

Re: [O] [PATCH] Add feature to org-drill to auto pronounce word

2019-01-26 Thread stardiviner


Nicolas Goaziou  writes:

> Hello,
>
> stardiviner  writes:
>
>> A gentle ping..
>
> I'm not sure "org-drill.el" is still actively maintained. I'm Cc'ing
> Paul Sexton. In the long run, I think this package could be packaged
> through ELPA instead.

It is indeed not actively maintained. But still has some user are using
it. I found some recently used in Org Mode ML mentioned it.

I will ping the author Paul Sexton, I would like to particited in
maintain it. If he agree to publish it to MELPA, I could help.

>
>>> * etc/ORG-NEWS: mentioned this new feature.
>
> Changes to "contrib/" directory are usually not mentioned in this
> file.

Removed now.

>
>>> +(defun org-drill-pronounce-word ()
>>> +  "Pronounce word after querying."
>>> +  (if org-drill-auto-pronounce
>>> +  (shell-command-to-string
>>> +   (format "%s %s %s &"
>>> +  org-drill-pronounce-command org-drill-pronounce-command-args
>
> What are `org-drill-pronounce-command' and
> `org-drill-pronounce-command-args'? I don't see them defined anywhere.
>

I missed that. Now added.

> Also, please prefer `when' to one-armed `if'.

Modified.

>
>>> +  (shell-quote-argument
>>> +   (substring-no-properties
>>> +(org-get-heading 'no-tags 'no-todo 'no-priority 
>>> 'no-comment)))
>>> +
>>> +(add-hook 'org-drill-entry-after-hook #'org-drill-pronounce-word)
>
> Could it be more integrated? Using hook is usually for users. If you can
> modify the code, you probably can do better.

Modified now.

Those two hooks I think is necessary for user to add custom actions. So
keep them.

>
> Regards,

Regards :)

-- 
[ stardiviner ]
   I try to make every word tell the meaning what I want to express.

   Blog: https://stardiviner.github.io/
   IRC(freenode): stardiviner, Matrix: stardiviner
   GPG: F09F650D7D674819892591401B5DF1C95AE89AC3
  



Re: [O] org-tempo violating org-mode conventions since 9.2

2019-01-26 Thread stardiviner


Tim Cross  writes:

> I totally agree that block delimiters should be case
> insensitive. However, I think the ability for a user to set their
> preference for either upper case or lower case is reasonable. It does
> not need to affect the syntactic interpretation, just whether the
> template system does it in upper case or lower case. I have no idea how
> much more complex this would make the tempo definitions though.
>
> Tim
>
> Michael Welle  writes:
>
>> Hello,
>>
>> Amin Bandali  writes:
>> [...]
>>> I think it would be nice to provide a defcusom to allow choosing between
>>> upper vs. lowercase.
>> that would make the exchange of Org files with colleagues and other Org
>> aficionados complicated, wouldn't it? As Nicolas said, blocks are
>> case-insensitive, meaning one could write them down according to one's
>> liking ;). 
>>
>> Regards
>> hmw

I agree. I upvote an option for this option. I remember there is an
option before, but someday it's gone. Now still has a similar option
`org-babel-uppercase-example-markers'. They can be merged if someone
want to add a patch.

-- 
[ stardiviner ]
   I try to make every word tell the meaning what I want to express.

   Blog: https://stardiviner.github.io/
   IRC(freenode): stardiviner, Matrix: stardiviner
   GPG: F09F650D7D674819892591401B5DF1C95AE89AC3
  



Re: [O] [PATCH] Export overlay specification for beamer notes

2019-01-26 Thread Nicolas Goaziou
Jamie Forth  writes:

> Of course, sorry to miss this first time around.

No problem. I applied you patch. Thank you.

Regards,



Re: [O] [PATCH] Export overlay specification for beamer notes

2019-01-26 Thread Jamie Forth
Hello,

Nicolas Goaziou  writes:

> Thank you. Could you also add an entry in ORG-NEWS file?

Of course, sorry to miss this first time around.

Regards,

--
Jamie Forth

>From d2ab748302a72879a348748fbb9d021b32bc3b0a Mon Sep 17 00:00:00 2001
From: Jamie Forth 
Date: Mon, 21 Jan 2019 18:01:13 +
Subject: [PATCH] lisp/ox-beamer.el: Export overlay specification for notes

* ox-beamer.el (org-beamer-headline): Pass overlay specification to
beamer `\note{}' command.

This is useful for animating multiple slides within a single frame and
displaying only the relevant note(s) for each slide.

TINYCHANGE
---
 etc/ORG-NEWS  |  2 ++
 lisp/ox-beamer.el | 23 ---
 2 files changed, 18 insertions(+), 7 deletions(-)

diff --git a/etc/ORG-NEWS b/etc/ORG-NEWS
index e06d0c09b..d1b247ab9 100644
--- a/etc/ORG-NEWS
+++ b/etc/ORG-NEWS
@@ -105,6 +105,8 @@ matches the same structures than 'latex but it calls
 org-src-font-lock-fontify-block instead, thus bringing about full
 LaTeX font locking.
 
+*** Export Beamer overlay specification for notes
+
 ** New functions
 *** ~org-dynamic-block-insert-dblock~
 
diff --git a/lisp/ox-beamer.el b/lisp/ox-beamer.el
index 05894ffab..eaff3ca53 100644
--- a/lisp/ox-beamer.el
+++ b/lisp/ox-beamer.el
@@ -645,13 +645,22 @@ as a communication channel."
 		contents))
;; Case 4: HEADLINE is a note.
((member environment '("note" "noteNH"))
-	(format "\\note{%s}"
-		(concat (and (equal environment "note")
-			 (concat
-			  (org-export-data
-			   (org-element-property :title headline) info)
-			  "\n"))
-			(org-trim contents
+	(concat "\\note"
+		;; Overlay specification.
+		(let ((overlay (org-element-property :BEAMER_ACT headline)))
+		  (when overlay
+		(org-beamer--normalize-argument
+		 overlay
+		 (if (string-match "\\`\\[.*\\]\\'" overlay)
+			 'defaction 'action
+		(format "{%s}"
+			(concat (and (equal environment "note")
+ (concat
+  (org-export-data
+   (org-element-property :title headline)
+   info)
+  "\n"))
+(org-trim contents)
;; Case 5: HEADLINE is a frame.
((= level frame-level)
 	(org-beamer--format-frame headline contents info))
-- 
2.20.1



Re: [O] [PATCH] Add feature to org-drill to auto pronounce word

2019-01-26 Thread Nicolas Goaziou
Hello,

stardiviner  writes:

> A gentle ping..

I'm not sure "org-drill.el" is still actively maintained. I'm Cc'ing
Paul Sexton. In the long run, I think this package could be packaged
through ELPA instead.

>> * etc/ORG-NEWS: mentioned this new feature.

Changes to "contrib/" directory are usually not mentioned in this file.

>> +(defun org-drill-pronounce-word ()
>> +  "Pronounce word after querying."
>> +  (if org-drill-auto-pronounce
>> +  (shell-command-to-string
>> +   (format "%s %s %s &"
>> +   org-drill-pronounce-command org-drill-pronounce-command-args

What are `org-drill-pronounce-command' and
`org-drill-pronounce-command-args'? I don't see them defined anywhere.

Also, please prefer `when' to one-armed `if'.

>> +   (shell-quote-argument
>> +(substring-no-properties
>> + (org-get-heading 'no-tags 'no-todo 'no-priority 
>> 'no-comment)))
>> +
>> +(add-hook 'org-drill-entry-after-hook #'org-drill-pronounce-word)

Could it be more integrated? Using hook is usually for users. If you can
modify the code, you probably can do better.

Regards,

-- 
Nicolas Goaziou



Re: [O] [PATCH] Export overlay specification for beamer notes

2019-01-26 Thread Nicolas Goaziou
Hello,

Jamie Forth  writes:

> Hi,
>
> Sometime I find it useful to align Beamer notes with slide overlays, for
> example, when stepping through a worked example (see attachment).
>
> Beamer permits notes to have overlay specifications but presently these
> are not exported by org.

Thank you. Could you also add an entry in ORG-NEWS file?

Regards,

-- 
Nicolas Goaziou



Re: [O] org-tempo violating org-mode conventions since 9.2

2019-01-26 Thread Michael Welle
Hello,

Tim Cross  writes:

> I totally agree that block delimiters should be case
> insensitive. However, I think the ability for a user to set their
> preference for either upper case or lower case is reasonable. It does
> not need to affect the syntactic interpretation, just whether the
> template system does it in upper case or lower case. I have no idea how
> much more complex this would make the tempo definitions though.
ah, I understand. I had the generating part as well as the parsing part
in mind when I wrote my last posting. But you are right, making
customisable how the blocks are generated wouldn't hurt anyone, I think.
Maybe it is enough to change org-create-dblock, maybe there are more
places to look at.

Regards
hmw



Re: [O] org-tempo violating org-mode conventions since 9.2

2019-01-26 Thread Tim Cross


I totally agree that block delimiters should be case
insensitive. However, I think the ability for a user to set their
preference for either upper case or lower case is reasonable. It does
not need to affect the syntactic interpretation, just whether the
template system does it in upper case or lower case. I have no idea how
much more complex this would make the tempo definitions though.

Tim

Michael Welle  writes:

> Hello,
>
> Amin Bandali  writes:
> [...]
>> I think it would be nice to provide a defcusom to allow choosing between
>> upper vs. lowercase.
> that would make the exchange of Org files with colleagues and other Org
> aficionados complicated, wouldn't it? As Nicolas said, blocks are
> case-insensitive, meaning one could write them down according to one's
> liking ;). 
>
> Regards
> hmw


-- 
Tim Cross



Re: [O] org-tempo violating org-mode conventions since 9.2

2019-01-26 Thread Michael Welle
Hello,

Amin Bandali  writes:
[...]
> I think it would be nice to provide a defcusom to allow choosing between
> upper vs. lowercase.
that would make the exchange of Org files with colleagues and other Org
aficionados complicated, wouldn't it? As Nicolas said, blocks are
case-insensitive, meaning one could write them down according to one's
liking ;). 

Regards
hmw

-- 
FrOSCon? Free and Open Source Software Conference
10th + 11th August 2019, Sankt Augustin, Bonn Area/Germany
https://www.froscon.de/en/