Re: [O] function for inserting a block

2017-11-09 Thread James Harkins
One more vote in favor of not removing my own use, I added 

Anyway, just an opinion. "<" macros save me tons of time with ox-latex 
markup. I like them.


hjh

Sent with AquaMail for Android
http://www.aqua-mail.com






[O] The new function org-insert-structure-template is not following option org-babel-capitalize-example-region-markers

2017-11-09 Thread numbch...@gmail.com
RT.
Hope Org-mode can fix this issue.

[stardiviner] GPG key ID: 47C32433
IRC(freeenode): stardiviner Twitter:  @numbchild
Key fingerprint = 9BAA 92BC CDDD B9EF 3B36  CB99 B8C4 B8E5 47C3 2433
Blog: http://stardiviner.github.io/


Re: [O] Bizarre gnuplot file creation error

2017-11-09 Thread Eric S Fraga
On Tuesday,  7 Nov 2017 at 09:42, Lawrence Bottorff wrote:
> Still haven't tracked down the exact steps to reproduce this problem, but
> it happened again recently -- and starting a new emacs from the command
> line solved it, i.e., my usual daemon-run emacs seems to be "crudding up"
> somehow.

The issue is that gnuplot mode uses a gnuplot session (in the *gnuplot*
buffer).  If you start gnuplot by executing a src block somewhere in
your file system and then move to another org file elsewhere in the file
system, the same *gnuplot* buffer will be used, placing the file in the
wrong place as far as the second file is concerned.  The working
directory of the gnuplot buffer is not updated.

The immediate solution is to kill the *gnuplot* buffer...  messy but works.

The proper solution would be to update ob-gnuplot to change the working
directory at every invocation of gnuplot to be the directory where the
org file is found.  (gnuplot has a "cd" command for this purpose)

-- 
: Eric S Fraga via Emacs 27.0.50, Org release_9.1.2-117-g5b2b8f


signature.asc
Description: PGP signature


[O] org-babel oz?

2017-11-09 Thread Johannes Brauer
Hi,

I am looking for a working configuration for using oz code blocks in org-mode 
file. I've installed Mozart2 on macOS 10.12.6 and use org-mode version 9.0.9. 
I've put
(org-babel-do-load-languages
 'org-babel-load-languages
 '((emacs-lisp . t)
   (oz . t)))
into my Aquamacs initialization and the ob-z.el in a path where Emacs can read 
it.
If I try to execute (C-C C-C) the following code block

#+begin_src oz :results value
  39 + 3
#+end_src

I get the following error messages:

executing Oz code block...
Org-babel: executing Oz expression
Create OPI socket for evaluating expressions
open-network-stream: make client process failed: Connection refused, :name, 
*Org-babel-OPI-socket*, :buffer, nil, :host, localhost, :service, 6001, 
:nowait, nil

I cannot figure out, what to do?
Any hints?

Johannes


Re: [O] function for inserting a block

2017-11-09 Thread Eric Abrahamsen
Rasmus  writes:

> Rasmus  writes:
>
>> Nicolas Goaziou  writes:
>>
>>> Takaaki Ishikawa  writes:
>>>
 I also support the idea of keeping ">>
>>> I explained why I thought it could be removed. I also suggested
>>> solutions to get an equivalent feature without implementing it in Org.
>>
>> Which sounds fair.
>>
>>> What is wrong with Abbrev mode, skeletons, tempo.el, expand.el, all
>>> bundled with Emacs, or YASnippet, in the Emacs ecosystem? It sounds like
>>> NIH. Or, to put it differently: why in the world would Org implement its
>>> own template system?
>>
>> tempo.el, which I was unaware of, will be able to do this.  Thanks for the
>> pointer.
>>
>> I have started to write a replacement.  It seems to work fairly OK so far.
>> Not all keywords have been added, and no mechanism for adding additional
>> keywords is there yet.
>>
>> Nicolas, what would be the best way to hook ‘tempo-complete-tag’ into
>> "space"?  Should I add support directly in org-self-insert-command or add
>> it to post-command-hook?
>
> Actually, it should just hook into TAB (doh).
>
> The attached version seems to replicate the old behavior more or less.  I
> had to add a new custom variable to store keywords.
>
> Also, Eric, it seems that org-structure-template-alist only supports a
> single letter for short-hands (the car of an entry in
> org-structure-template-alist is a char).  I used to have blocks like " expanding to an "abstract" special-block, which I guess isn’t possible
> anymore?

I hadn't thought of that. Really, all I ever wanted was to wrap things
in blocks...

I don't see any reason why org-structure-template-alist couldn't go back
to using string keys. Then we could use read-string, and wouldn't have
to have special  behavior -- a string that didn't exist in the
alist could just be used literally to make a block.

Eric




[O] ox-html: Opt out of htmlize.el

2017-11-09 Thread Chunyang Xu
Hi,

I think htmlize.el should be optional for ox-html. Although htmlize.el
is cool, there are still reasons to don't use it, e.g.,

- Colors looks nice in Emacs looks bad in the web browser
- No color at all in batch mode
- I want to use third party solutions such pygmentize and highlight.js

When user sets org-html-htmlize-output-type to nil, don't use
htmlize.el.

>From 902e6cea48912bd291c1d3192cb30dc9a1a41fa3 Mon Sep 17 00:00:00 2001
From: Chunyang Xu 
Date: Thu, 9 Nov 2017 23:43:32 +0800
Subject: [PATCH] ox-html: Allow disabling htmlize

* lisp/ox-html.el (org-html-fontify-code): Do it.

Disable htmlize by setting org-html-htmlize-output-type to nil.

TINYCHANGE
---
 lisp/ox-html.el | 10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/lisp/ox-html.el b/lisp/ox-html.el
index 1c3dd8090..d0fe33f2a 100644
--- a/lisp/ox-html.el
+++ b/lisp/ox-html.el
@@ -2158,7 +2158,11 @@ is the language used for CODE, as a string, or nil."
  ((not lang)
   ;; Simple transcoding.
   (org-html-encode-plain-text code))
- ;; Case 2: No htmlize or an inferior version of htmlize
+ ;; Case 2: plain text explicitly set
+ ((not org-html-htmlize-output-type)
+  ;; Simple transcoding.
+  (org-html-encode-plain-text code))
+ ;; Case 3: No htmlize or an inferior version of htmlize
  ((not (and (or (require 'htmlize nil t)
 		(error "Please install htmlize from https://github.com/hniksic/emacs-htmlize;))
 		(fboundp 'htmlize-region-for-paste)))
@@ -2166,10 +2170,6 @@ is the language used for CODE, as a string, or nil."
   (message "Cannot fontify src block (htmlize.el >= 1.34 required)")
   ;; Simple transcoding.
   (org-html-encode-plain-text code))
- ;; Case 3: plain text explicitly set
- ((not org-html-htmlize-output-type)
-  ;; Simple transcoding.
-  (org-html-encode-plain-text code))
  (t
   ;; Map language
   (setq lang (or (assoc-default lang org-src-lang-modes) lang))
-- 
2.14.2



Re: [O] function for inserting a block

2017-11-09 Thread Rasmus
Rasmus  writes:

> Nicolas Goaziou  writes:
>
>> Takaaki Ishikawa  writes:
>>
>>> I also support the idea of keeping ">> Please give importance to the backward compatibility in this case.
>>
>> I explained why I thought it could be removed. I also suggested
>> solutions to get an equivalent feature without implementing it in Org.
>
> Which sounds fair.
>
>> What is wrong with Abbrev mode, skeletons, tempo.el, expand.el, all
>> bundled with Emacs, or YASnippet, in the Emacs ecosystem? It sounds like
>> NIH. Or, to put it differently: why in the world would Org implement its
>> own template system?
>
> tempo.el, which I was unaware of, will be able to do this.  Thanks for the
> pointer.
>
> I have started to write a replacement.  It seems to work fairly OK so far.
> Not all keywords have been added, and no mechanism for adding additional
> keywords is there yet.
>
> Nicolas, what would be the best way to hook ‘tempo-complete-tag’ into
> "space"?  Should I add support directly in org-self-insert-command or add
> it to post-command-hook?

Actually, it should just hook into TAB (doh).

The attached version seems to replicate the old behavior more or less.  I
had to add a new custom variable to store keywords.

Also, Eric, it seems that org-structure-template-alist only supports a
single letter for short-hands (the car of an entry in
org-structure-template-alist is a char).  I used to have blocks like "

Re: [O] function for inserting a block

2017-11-09 Thread Rasmus
Nicolas Goaziou  writes:

> Takaaki Ishikawa  writes:
>
>> I also support the idea of keeping "> Please give importance to the backward compatibility in this case.
>
> I explained why I thought it could be removed. I also suggested
> solutions to get an equivalent feature without implementing it in Org.

Which sounds fair.

> What is wrong with Abbrev mode, skeletons, tempo.el, expand.el, all
> bundled with Emacs, or YASnippet, in the Emacs ecosystem? It sounds like
> NIH. Or, to put it differently: why in the world would Org implement its
> own template system?

tempo.el, which I was unaware of, will be able to do this.  Thanks for the
pointer.

I have started to write a replacement.  It seems to work fairly OK so far.
Not all keywords have been added, and no mechanism for adding additional
keywords is there yet.

Nicolas, what would be the best way to hook ‘tempo-complete-tag’ into
"space"?  Should I add support directly in org-self-insert-command or add
it to post-command-hook?

> The onbly argument so far is "<" cannot be expanded since it not word
> constituent. Seriously. "<" has no meaning anyway. You can use "@",
> which is word constituent and just as meaningless. So, you can define,
> e.g., a skeleton, that will expand "@s" to "#+begin_src\n#+end_src".

A small aside: on my keyboard layout < is easy to type.  I don’t like
typing @.

> We can even document how to do it in the manual.

Of course.

Thanks,
Rasmus

-- 
I feel emotional landscapes they puzzle me


org-tempo.el
Description: application/emacs-lisp