[O] Bug: Babel Tramp python [8.2.10 (release_8.2.10 @ /usr/share/emacs/25.3/lisp/org/)]

2017-09-19 Thread emacswatcher

Given emacs -Q with this file:

+++ test.org
#+TITLE:  Babel remote processing test
#+AUTHOR: jjh
#+EMAIL:  emacswatc...@gmail.com

* python

#+BEGIN_SRC python :dir /ssh:root@[some remote host]:
  import socket
  return ("Hostname is %s" % socket.gethostname())
#+END_SRC
--- test.org

and with python added to org-babel-language-list:

(setq org-babel-load-languages
 ((python . t)
  (sh . t)
  (emacs-lisp . t)))

executing the source block with a valid remote host returns in *Messsages*:

executing Python code block...
Tramp: Encoding local file ‘/tmp/tramp.1353PZN’ using 
‘base64-encode-region’...done
Tramp: Decoding remote file ‘/ssh:root@[my remote host]:/tmp/python-1353CPH’ 
using ‘base64 -d -i >%s’...done
org-babel-local-file-name: Invalid function: with-parsed-tramp-file-name



n.b.:a similar sh source block remotely executed on the same host works
as expected.

Emacs  : GNU Emacs 25.3.1 (x86_64-redhat-linux-gnu, GTK+ Version 3.22.19)
 of 2017-09-14
Package: Org-mode version 8.2.10 (release_8.2.10 @ 
/usr/share/emacs/25.3/lisp/org/)

current state:
==
(setq
 org-tab-first-hook '(org-hide-block-toggle-maybe 
org-src-native-tab-command-maybe
  org-babel-hide-result-toggle-maybe 
org-babel-header-arg-expand)
 org-speed-command-hook '(org-speed-command-default-hook 
org-babel-speed-command-hook)
 org-occur-hook '(org-first-headline-recenter)
 org-metaup-hook '(org-babel-load-in-session-maybe)
 org-confirm-shell-link-function 'yes-or-no-p
 org-after-todo-state-change-hook '(org-clock-out-if-current)
 org-src-mode-hook '(org-src-babel-configure-edit-buffer 
org-src-mode-configure-edit-buffer)
 org-agenda-before-write-hook '(org-agenda-add-entry-text)
 org-babel-pre-tangle-hook '(save-buffer)
 org-mode-hook '(#[nil "\300\301\302\303\304$\207"
   [org-add-hook change-major-mode-hook org-show-block-all 
append local] 5]
 #[nil "\300\301\302\303\304$\207"
   [org-add-hook change-major-mode-hook 
org-babel-show-result-all append local] 5]
 org-babel-result-hide-spec org-babel-hide-all-hashes)
 org-ctrl-c-ctrl-c-hook '(org-babel-hash-at-point 
org-babel-execute-safely-maybe)
 org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-drawers 
org-cycle-hide-inline-tasks
  org-cycle-show-empty-lines 
org-optimize-window-after-visibility-change)
 org-babel-tangle-lang-exts '(("python" . "py") ("emacs-lisp" . "el"))
 org-confirm-elisp-link-function 'yes-or-no-p
 org-metadown-hook '(org-babel-pop-to-session-maybe)
 org-babel-load-languages '((sh . t) (python . t) (emacs-lisp . t))
 org-clock-out-hook '(org-clock-remove-empty-clock-drawer)
 )



Re: [O] running tests on macOS: 4 unexpected results

2017-09-19 Thread Skip Collins
On Tue, Sep 19, 2017 at 6:53 PM, Stig Brautaset  wrote:
> |FAILED  ob-shell/bash-uses-assoc-arrays

Using homebrew to install a newer bash should help fix this one.



[O] running tests on macOS: 4 unexpected results

2017-09-19 Thread Stig Brautaset

Running tests using the following script:

,
| #!/bin/sh
| emacs -Q --batch \
|   -L lisp/ -L testing/ -L testing/lisp -l lisp/org.el \
|   -l lisp/org-id.el -l testing/org-test.el \
|   --eval "(progn (org-reload) (setq org-confirm-babel-evaluate nil) \
|   (org-babel-do-load-languages 'org-babel-load-languages \
| '((emacs-lisp . t) (shell . t) (org . t" \
|   -f org-test-run-batch-tests
`

I get this result:

,
| Ran 578 tests, 574 results as expected, 4 unexpected (2017-09-19 
23:39:11+0100)
| 19 expected failures
| 
| 4 unexpected results:
|FAILED  ob-exp/evaluate-all-executables-in-order
|FAILED  ob-exp/export-call-line-information
|FAILED  ob-shell/bash-uses-assoc-arrays
|FAILED  test-org-publish/resolve-external-link
`

I'm on macOS Sierra, and using

: GNU Emacs 26.0.50 (build 2, x86_64-apple-darwin16.7.0, NS appkit-1504.83 
Version 10.12.6 (Build 16G29)) of 2017-09-07

I've tried to figure out what the issue was myself, but couldn't make
head or tails of it :-/

Stig
-- 
; GNU Emacs 26.0.50, Org mode version 9.1



Re: [O] (gnus-icalendar-org-setup) not evaluated in .emacs?

2017-09-19 Thread Tim Cross

Management of an emacs init file is a challenge for anyone who has been
using Emacs for a long time. I did this after being a user for over 20
years and like you, was a little daunted by the task. However, I now
realise it was the single best thing I ever did to improve my emacs. I
also had let my config grow organically and what I found out when I
decided to clean it up was that a lot of what I had in there was
unnecessary, was slowing down my Emacs (both startup and runtime) and
that many of my long-term emacs 'annoyances' were actually due to
incorrect or outdated settings in my init file.

A few things I learned which may be of help

1. Put your init in git (or your favourite source control system ) and
do your changes incrementally. You will need to revert to previous
versions, so be methodical with checking in changes and do it
incrementally.

2. Have a look at the use-package macro. This really cleaned up my init
file, helped me make it more modular and really improved both the
structure and maintenance as well as startup times etc.

3. I now use org to manage my init file. In fact, I have a few init
files. I have a bare bones minimal init file which I use when I need to
debug a specific feature/package or generate bug reports, I have an
experimental one where I play with new things and I have my stable
one. Using org, I can just 'tangle' a new init based on one of those
files whenever I need it. I started by just putting all my existing
setup into a block in an org file and exporting that as elisp. As time
permitted, I broke bits off into their own blocks with explanatory
comments/text so that I can remember why/what of the block.

4. Finally, there are some really good 'canned' configurations out
there. I personally quite like purcell's setup (on github). While I
don't use any of these per se, I did 'borrow' some of the ideas.

My setup is now healthier and more stable than it ever has been. The
effort is definitely worth it.

Tim

Loris Bennett writes:

> Eric S Fraga  writes:
>
>> On Thursday, 14 Sep 2017 at 16:02, Loris Bennett wrote:
>>> But should this kind of ordering dependency happen?  Or should my
>>> Customize block just be at the beginning of my .emacs rather than at the
>>> end?
>>
>> I make sure my customizations are loaded before anything else.  I have
>> my customizations in a separate file and "(load custom-file)" as one of
>> the first things in my Emacs init.  Not the first as such as I set the
>> load-path to point to the versions of packages I am using that may
>> conflict with built-in ones in Emacs.
>
> For someone like me, who fails to spot the related variables even
> within a single file, I think hiving customisation off into a separate
> file might set up a few new tripwires for future me.
>
> Having said that, having let my .emacs grow organically (think "rampant
> weeds") for 30 years, maybe I should take the shears to it.  I'm just
> worried that, if I started today, I might not be productive again until
> the New Year :-(
>
> Cheers,
>
> Loris


-- 
Tim Cross



Re: [O] Add ability to force-enable TOC

2017-09-19 Thread Kaushal Modi
On Tue, Sep 19, 2017 at 3:57 PM Nicolas Goaziou 
wrote:

> What is exactly the feature you are missing? Your example is a special
> case where _no_ heading is numbered.


I would not consider this as a special case. It is very common for HTML
exports to not always number the headings.

Blog posts are also very common examples.. we do not have blog posts with
numbered h1/h2 headings. But for long blog posts, it often a norm to
include a TOC. Example:
https://scripter.co/notes/string-functions-nim-vs-python/

I also use the ascii exporter to export notes taken during meetings. I do
not number them, and with a long notes, TOC is helpful.

Numbered headings is more common in texinfo and latex, I believe.


> But we also had to deal with
> situations where only _some_ headings were numbered.
>
> In any case, this change solves two problems:
>
> 1. it makes all export back-ends consistent with TOC;
>

 I understand that. But would like a way to get back the earlier behavior
too.

2. it allows to use, e.g., @heading instead of @unnumberedsec in Texinfo
>export. Thus, we don't need to provide a way to determine which one
>should be used.
>
> I admit the second point is probably only convenient for the lazy me:
> I don't have to find a proper way to support @heading commands in
> Texinfo export anymore.
>

How about this updated patch?

diff --git a/lisp/ox.el b/lisp/ox.el
index 2be77a87b33..7b6170cb832 100644
--- a/lisp/ox.el
+++ b/lisp/ox.el
@@ -5227,7 +5227,8 @@ Footnote sections and unnumbered headlines are
ignored."
 (org-element-map (org-element-contents scope) 'headline
   (lambda (headline)
  (unless (or (org-element-property :footnote-section-p headline)
-(not (org-export-numbered-headline-p headline info)))
+(and (not (numberp (plist-get info :with-toc)))
+ (not (org-export-numbered-headline-p headline info
   (let ((level (org-export-get-relative-level headline info)))
 (and (<= level n) headline
   info)))


That way if the file has:

#+OPTIONS: num:nil

No TOC will be exported (even though the org-export-with-toc default is t).

But if the file has:

#+OPTIONS: num:nil toc:4

As the toc value is a number, the TOC will be exported even though num is
nil.

-- 

Kaushal Modi


Re: [O] [PATCH] ox-html.el: Fix display of language indicators for source blocks

2017-09-19 Thread Nicolas Goaziou
Hello,

"N. Raghavendra"  writes:

> Subject: [PATCH] ox-html.el: Partially revert d5bbf36553

Applied. Thank you.

Regards,

-- 
Nicolas Goaziou



Re: [O] Add ability to force-enable TOC

2017-09-19 Thread Nicolas Goaziou
Kaushal Modi  writes:

> On Tue, Sep 19, 2017 at 3:27 PM Nicolas Goaziou 
> wrote:
>
>> The change was intended. The idea was discussed on the ML. You may want
>> to check the thread.
>>
>> This is on par with, e.g., what LaTeX does.
>>
>
> What would be a good way, though, to bring back that functionality? I don't
> mind if I need to set extra options/variables for that.

What is exactly the feature you are missing? Your example is a special
case where _no_ heading is numbered. But we also had to deal with
situations where only _some_ headings were numbered.

In any case, this change solves two problems:

1. it makes all export back-ends consistent with TOC;

2. it allows to use, e.g., @heading instead of @unnumberedsec in Texinfo
   export. Thus, we don't need to provide a way to determine which one
   should be used.

I admit the second point is probably only convenient for the lazy me:
I don't have to find a proper way to support @heading commands in
Texinfo export anymore.

Regards,



Re: [O] Add ability to force-enable TOC

2017-09-19 Thread Kaushal Modi
On Tue, Sep 19, 2017 at 3:27 PM Nicolas Goaziou 
wrote:

> The change was intended. The idea was discussed on the ML. You may want
> to check the thread.
>
> This is on par with, e.g., what LaTeX does.
>

What would be a good way, though, to bring back that functionality? I don't
mind if I need to set extra options/variables for that.
-- 

Kaushal Modi


Re: [O] Add ability to force-enable TOC

2017-09-19 Thread Nicolas Goaziou
Hello,

Carsten Dominik  writes:

> On Tue, Sep 19, 2017 at 4:49 PM, Kaushal Modi 
> wrote:
>
>> Hello,
>>
>> I have use-cases where I don't like to see the headings numbered but still
>> want the TOC to be generated.
>>
>> I have this in many of my Org files:
>>
>> #+OPTIONS: num:nil H:4
>>
>> But after commit bd23781[1], that has stopped working i.e. no TOC is
>> created because of num:nil.
>>
>
> I would see this as a bug - clearly it makes sense to have a TOC without
> numbering.
>
> Nicolas, was this an oversight, or was this change intended?

The change was intended. The idea was discussed on the ML. You may want
to check the thread.

This is on par with, e.g., what LaTeX does.

Regards,

-- 
Nicolas Goaziou



Re: [O] Bug: org-emphasis-alist not fully applied [9.1.1 (9.1.1-1-g80cbf9-elpa @ x:/folder/user/.emacs.d/elpa/org-20170918/)]

2017-09-19 Thread Nicolas Goaziou
Jens Lange  writes:

> Hmm, but that worked until recently. Without any hook.
>
> Or was your answer like: Good for you that it worked in the past but since
> it ain't supported we won't make it work again?

That's more like it, sorry. The fact that it worked doesn't mean it was
supported. 

As I suggested there are other ways to achieve what you want.

Regards,



[O] Org-babel-lilypond midi output in basic mode

2017-09-19 Thread Fred Gruber
Hi
Is there a way to get org-babel-lilypond to generate midi of music
fragments in basic mode. Ideally when we export the html  the images of the
music fragments should have a link to the corresponding midi of that
fragment.

So far it seems that you can only get midi from the arrange mode.

thanks
Fred


Re: [O] [PATCH] ox-html.el: Fix display of language indicators for source blocks

2017-09-19 Thread N. Raghavendra
At 2017-09-19T06:24:37+05:30, N. Raghavendra wrote:

> Attached is a patch that implements these changes.

Attached is a simplified patch with an unnecessary conditional removed.

Raghu.

-- 
N. Raghavendra , http://www.retrotexts.net/
Harish-Chandra Research Institute, http://www.hri.res.in/

>From 392d26f3c112c51661e494f4cbb0c4b30e2a8302 Mon Sep 17 00:00:00 2001
From: "N. Raghavendra" 
Date: Tue, 19 Sep 2017 22:37:02 +0530
Subject: [PATCH] ox-html.el: Partially revert d5bbf36553

* lisp/ox-html.el (org-html-src-block): Unless klipse is used, export
source code blocks as content of `pre' elements, and not as content of
`code' children of `pre' elements.  Restores the previous way of
exporting source code blocks, and fixes the display of language
indicators while hovering over the blocks in the exported HTML file,
when klipse is not used.
(org-html-keep-old-src): Remove it.  Not needed because it is now the
default, unless klipse is used.
---
 lisp/ox-html.el | 23 ++-
 1 file changed, 10 insertions(+), 13 deletions(-)

diff --git a/lisp/ox-html.el b/lisp/ox-html.el
index ebb233b..d91ca73 100644
--- a/lisp/ox-html.el
+++ b/lisp/ox-html.el
@@ -174,7 +174,6 @@
 (:html-klipsify-src nil nil org-html-klipsify-src)
 (:html-klipse-css nil nil org-html-klipse-css)
 (:html-klipse-js nil nil org-html-klipse-js)
-(:html-klipse-keep-old-src nil nil org-html-keep-old-src)
 (:html-klipse-selection-script nil nil org-html-klipse-selection-script)
 (:infojs-opt "INFOJS_OPT" nil nil)
 ;; Redefine regular options.
@@ -1572,12 +1571,6 @@ https://developer.mozilla.org/en-US/docs/Mozilla/Mobile/Viewport_meta_tag";
   :package-version '(Org . "9.1")
   :type 'string)
 
-(defcustom org-html-keep-old-src nil
-  "When non-nil, use  instead of ."
-  :group 'org-export-html
-  :package-version '(Org . "9.1")
-  :type 'boolean)
-
 
  Todos
 
@@ -3384,12 +3377,16 @@ contextual information."
 			  listing-number
 			  (org-trim (org-export-data caption info))
 		;; Contents.
-		(let ((open (if org-html-keep-old-src "" "")))
-		  (format "%s class=\"src src-%s\"%s%s>%s%s"
-			  open lang label (if (and klipsify (string= lang "html"))
-	  " data-editor-type=\"html\"" "")
-			  code close)))
+		(if klipsify
+		(format "%s"
+			lang
+			label
+			(if (string= lang "html")
+" data-editor-type=\"html\""
+			  "")
+			code)
+		  (format "%s"
+  lang label code)))
 
  Statistics Cookie
 
-- 
2.7.4



Re: [O] Org-babel Java imports

2017-09-19 Thread Eric S Fraga
On Tuesday, 19 Sep 2017 at 09:51, Tim Jones wrote:
> I then tried preceding it with a package statement, which did not work
> either.

No, a package statement should not be required.  The classname matches
the java code.

What worked for me, accessing a class in another package, was to put
".:PATH2OTHERPACKAGE" as the option for the command line.

> It got me thinking that I had now idea how it could resolve dependencies,
> whether for java packages, which you would expect to be on the classpath by
> default and therefore could be found, or for external libraries, which
> would usually be downloaded and put on the classpath by a tool like gradle
> or maven.

classpath management in Java is a nightmare (in my experience)
compounded by tools like maven and gradle.

In any case, could you post a minimal org example including a java block
that you would expect to work, e.g. the HelloWorld example with some
other class reference?  Include any error messages from the
execution of the org block.

Also, what version of org are you using?

-- 
: Eric S Fraga via Emacs 26.0.50, Org release_9.0.9-573-g09e612


signature.asc
Description: PGP signature


Re: [O] Add ability to force-enable TOC

2017-09-19 Thread Carsten Dominik
On Tue, Sep 19, 2017 at 4:49 PM, Kaushal Modi 
wrote:

> Hello,
>
> I have use-cases where I don't like to see the headings numbered but still
> want the TOC to be generated.
>
> I have this in many of my Org files:
>
> #+OPTIONS: num:nil H:4
>
> But after commit bd23781[1], that has stopped working i.e. no TOC is
> created because of num:nil.
>

I would see this as a bug - clearly it makes sense to have a TOC without
numbering.

Nicolas, was this an oversight, or was this change intended?

Carsten


>
> Can we enforce the TOC generation using the "toc:" option. Below does not
> work at the moment, but would like that to work.
>
> #+OPTIONS: num:nil H:4 toc:4
>
> Thanks.
>
> [1]: http://orgmode.org/cgit.cgi/org-mode.git/commit/?id=
> bd2378161e76932103c9ef1f8343ffcc0d275007
> --
>
> Kaushal Modi
>


Re: [O] Add ability to force-enable TOC

2017-09-19 Thread Kaushal Modi
On Tue, Sep 19, 2017 at 10:49 AM Kaushal Modi 
wrote:

> Can we enforce the TOC generation using the "toc:" option. Below does not
> work at the moment, but would like that to work.
>
> #+OPTIONS: num:nil H:4 toc:4
>

Above works after the below patch:

diff --git a/lisp/ox.el b/lisp/ox.el
index 2be77a87b33..1831432df87 100644
--- a/lisp/ox.el
+++ b/lisp/ox.el
@@ -5227,7 +5227,8 @@ Footnote sections and unnumbered headlines are
ignored."
 (org-element-map (org-element-contents scope) 'headline
   (lambda (headline)
  (unless (or (org-element-property :footnote-section-p headline)
-(not (org-export-numbered-headline-p headline info)))
+(and (null (plist-get info :with-toc))
+ (not (org-export-numbered-headline-p headline info
   (let ((level (org-export-get-relative-level headline info)))
 (and (<= level n) headline
   info)))

But I am pretty sure that's not the right way as the default value of
org-export-with-toc is t.
-- 

Kaushal Modi


[O] Add ability to force-enable TOC

2017-09-19 Thread Kaushal Modi
Hello,

I have use-cases where I don't like to see the headings numbered but still
want the TOC to be generated.

I have this in many of my Org files:

#+OPTIONS: num:nil H:4

But after commit bd23781[1], that has stopped working i.e. no TOC is
created because of num:nil.

Can we enforce the TOC generation using the "toc:" option. Below does not
work at the moment, but would like that to work.

#+OPTIONS: num:nil H:4 toc:4

Thanks.

[1]:
http://orgmode.org/cgit.cgi/org-mode.git/commit/?id=bd2378161e76932103c9ef1f8343ffcc0d275007
-- 

Kaushal Modi


[O] test fails: resolve-external-link

2017-09-19 Thread Skip Collins
When compiling Org with
make up2
a failed test prevents successful completion:
   FAILED  555/746  test-org-publish/resolve-external-link

I am running GNU Emacs 25.3.1 (x86_64-apple-darwin16.7.0, Carbon
Version 157 AppKit 1504.83) of 2017-09-12 with Org mode version 9.1.1
(release_9.1.1-54-gff6b38. I am working in MacOS 10.12.6, with bash
4.4.12.

Output from the failed test is:

Publishing file /Users/Shared/git/org-mode/testing/examples/pub/b.org
using ‘(closure ((backend . [cl-struct-org-export-backend nil nil
((headline lambda (h c i) (concat (org-export-get-reference h i)   c))
(paragraph lambda (p c i) c) (section lambda (s c i) c) (link lambda
(l c i) (let ((option (org-element-property :search-option l)) (path
(org-element-property :path l))) (and option
(org-publish-resolve-external-link option path) nil nil nil nil])
(ids) t) (plist filename pub-dir) (org-publish-org-to backend filename
.test plist pub-dir))’
Publishing file /Users/Shared/git/org-mode/testing/examples/pub/a.org
using ‘(closure ((backend . [cl-struct-org-export-backend nil nil
((headline lambda (h c i) (concat (org-export-get-reference h i)   c))
(paragraph lambda (p c i) c) (section lambda (s c i) c) (link lambda
(l c i) (let ((option (org-element-property :search-option l)) (path
(org-element-property :path l))) (and option
(org-publish-resolve-external-link option path) nil nil nil nil])
(ids) t) (plist filename pub-dir) (org-publish-org-to backend filename
.test plist pub-dir))’
Publishing file /Users/Shared/git/org-mode/testing/examples/pub/b.org
using ‘(closure ((backend . [cl-struct-org-export-backend nil nil
((headline lambda (h c i) c) (paragraph lambda (p c i) c) (section
lambda (s c i) c) (link lambda (l c i) (let ((option
(org-element-property :search-option l)) (path (org-element-property
:path l))) (when option (throw :exit
(org-publish-resolve-external-link option path t)) nil nil nil
nil]) (ids) t) (plist filename pub-dir) (setq ids (cons (catch :exit
(org-publish-org-to backend filename .test plist pub-dir)) ids)))’
Publishing file /Users/Shared/git/org-mode/testing/examples/pub/a.org
using ‘(closure ((backend . [cl-struct-org-export-backend nil nil
((headline lambda (h c i) c) (paragraph lambda (p c i) c) (section
lambda (s c i) c) (link lambda (l c i) (let ((option
(org-element-property :search-option l)) (path (org-element-property
:path l))) (when option (throw :exit
(org-publish-resolve-external-link option path t)) nil nil nil
nil]) (ids a1) t) (plist filename pub-dir) (setq ids (cons (catch
:exit (org-publish-org-to backend filename .test plist pub-dir))
ids)))’
Test test-org-publish/resolve-external-link backtrace:
  (if (unwind-protect (setq value-14360 (apply fn-14358 args-14359)) (
  (let (form-description-14362) (if (unwind-protect (setq value-14360
  (let ((value-14360 (quote ert-form-evaluation-aborted-14361))) (let
  (let ((fn-14358 (function equal)) (args-14359 (list "a1" (let* ((ids
  (closure (t) nil (let ((fn-14353 (function apply)) (args-14354 (list
  ert--run-test-internal([cl-struct-ert--test-execution-info [cl-struc
  ert-run-test([cl-struct-ert-test test-org-publish/resolve-external-l
  ert-run-or-rerun-test([cl-struct-ert--stats "\\(org\\|ob\\)" [[cl-st
  ert-run-tests("\\(org\\|ob\\)" #[385 "\306\307\"\203G\211\211G\310
  ert-run-tests-batch("\\(org\\|ob\\)")
  ert-run-tests-batch-and-exit("\\(org\\|ob\\)")
  (let ((org-id-track-globally t) (org-test-selector (if org-test-sele
  org-test-run-batch-tests("\\(org\\|ob\\)")
  eval((org-test-run-batch-tests org-test-select-re))
  command-line-1(("--eval" "(setq vc-handled-backends nil org-startup-
  command-line()
  normal-top-level()
Test test-org-publish/resolve-external-link condition:
(ert-test-failed
 ((should
   (equal "a1"
  (let* ... ... ...)))
  :form
  (equal "a1" "orgbb5a65b")
  :value nil :explanation
  (arrays-of-different-length 2 10 "a1" "orgbb5a65b" first-mismatch-at 0)))
   FAILED  555/746  test-org-publish/resolve-external-link



Re: [O] Bug: org-emphasis-alist not fully applied [9.1.1 (9.1.1-1-g80cbf9-elpa @ x:/folder/user/.emacs.d/elpa/org-20170918/)]

2017-09-19 Thread Jens Lange
Hmm, but that worked until recently. Without any hook.

Or was your answer like: Good for you that it worked in the past but since
it ain't supported we won't make it work again?

With kind regards,
Jens Lange

2017-09-19 8:02 GMT+02:00 Nicolas Goaziou :

> Hello,
>
> Jens Lange  writes:
>
> > What exactly did you do?
> > ===
> > 1. Configure block below in custom-set-variables.
> >
> >  '(org-emphasis-alist
> >(quote
> > (
> >  ("!" org-habit-overdue-face)
> >  ("%" org-habit-alert-face)
> >  ("*" bold)
> >  ("/" italic)
> >  ("_" underline)
> >  ("=" org-verbatim verbatim)
> >  ("~" org-code verbatim)
> >  ("+" (:strike-through t))
> >  )))
> >
> > 2. Type %blabla% and !blabla! in org-mode
>
> Adding new syntax is not supported. The variable exists to allow users
> to change the face of already existing constructs.
>
> You may want to tweak font-lock related variables, e.g.,
> `org-font-lock-hook' to achieve that effect.
>
> Regards,
>
> --
> Nicolas Goaziou
>



-- 
Mit freundlichen Grüssen / With kind regards:
Jens Lange


Re: [O] Org-babel Java imports

2017-09-19 Thread Tim Jones
Eric

Thanks for your reply

No - that's exactly what I did first, but it did not work.

I then tried preceding it with a package statement, which did not work
either.

It got me thinking that I had now idea how it could resolve dependencies,
whether for java packages, which you would expect to be on the classpath by
default and therefore could be found, or for external libraries, which
would usually be downloaded and put on the classpath by a tool like gradle
or maven.

Have you any insight into this or could you suggest whom I might ask?

Regards,

Tim

On Tue, Sep 19, 2017 at 10:10 AM Eric S Fraga  wrote:

> On Friday, 15 Sep 2017 at 14:56, Tim Jones wrote:
> > Hi
> > Want to create org docs with embedded java blocks which will generate
> > testing data
> >
> > I have seen
> > http://ehneilsen.net/notebook/orgExamples/org-examples.html#sec-19
> > but have not been able to find an example where there are any import
> > statements e.g.
> > import java.time.*;
>
> Can you not simply put this line as the first line of the actual source
> block, i.e. after the #+begin_src?  (untested)
> --
> : Eric S Fraga via Emacs 26.0.50, Org release_9.0.10-729-gb792e2
>


Re: [O] (gnus-icalendar-org-setup) not evaluated in .emacs?

2017-09-19 Thread Loris Bennett
Eric S Fraga  writes:

> On Thursday, 14 Sep 2017 at 16:02, Loris Bennett wrote:
>> But should this kind of ordering dependency happen?  Or should my
>> Customize block just be at the beginning of my .emacs rather than at the
>> end?
>
> I make sure my customizations are loaded before anything else.  I have
> my customizations in a separate file and "(load custom-file)" as one of
> the first things in my Emacs init.  Not the first as such as I set the
> load-path to point to the versions of packages I am using that may
> conflict with built-in ones in Emacs.

For someone like me, who fails to spot the related variables even
within a single file, I think hiving customisation off into a separate
file might set up a few new tripwires for future me.

Having said that, having let my .emacs grow organically (think "rampant
weeds") for 30 years, maybe I should take the shears to it.  I'm just
worried that, if I started today, I might not be productive again until
the New Year :-(

Cheers,

Loris

-- 
Dr. Loris Bennett (Mr.)
ZEDAT, Freie Universität Berlin Email loris.benn...@fu-berlin.de




Re: [O] Org-babel Java imports

2017-09-19 Thread Eric S Fraga
On Friday, 15 Sep 2017 at 14:56, Tim Jones wrote:
> Hi
> Want to create org docs with embedded java blocks which will generate
> testing data
>
> I have seen
> http://ehneilsen.net/notebook/orgExamples/org-examples.html#sec-19
> but have not been able to find an example where there are any import
> statements e.g.
> import java.time.*;

Can you not simply put this line as the first line of the actual source
block, i.e. after the #+begin_src?  (untested)
-- 
: Eric S Fraga via Emacs 26.0.50, Org release_9.0.10-729-gb792e2


signature.asc
Description: PGP signature


Re: [O] (gnus-icalendar-org-setup) not evaluated in .emacs?

2017-09-19 Thread Eric S Fraga
On Thursday, 14 Sep 2017 at 16:02, Loris Bennett wrote:
> But should this kind of ordering dependency happen?  Or should my
> Customize block just be at the beginning of my .emacs rather than at the
> end?

I make sure my customizations are loaded before anything else.  I have
my customizations in a separate file and "(load custom-file)" as one of
the first things in my Emacs init.  Not the first as such as I set the
load-path to point to the versions of packages I am using that may
conflict with built-in ones in Emacs.

-- 
: Eric S Fraga via Emacs 26.0.50, Org release_9.0.10-729-gb792e2


signature.asc
Description: PGP signature


Re: [O] speed up exporting to pdf

2017-09-19 Thread Eric S Fraga
On Friday, 15 Sep 2017 at 17:27, Amos Bird wrote:
> Hi,
>
> When doing org to pdf exportation of my 2 pages demo org file, it
> takes nearly 10 seconds. How can I
> speed it up?

What does your org file include?  In any case, you may wish to look at
org-latex-pdf-process to see if unnecessary commands are being executed
to create the PDF from the LaTeX generated by org.

-- 
: Eric S Fraga via Emacs 26.0.50, Org release_9.0.10-729-gb792e2


signature.asc
Description: PGP signature


Re: [O] What is the best way to show inline math formulas in org mode?

2017-09-19 Thread Eric S Fraga
On Tuesday, 19 Sep 2017 at 13:25, Amos Bird wrote:
> Hi,
>
> Hmm, seems org-mime is broken again…
>
> I have an fine working latex env. Though I don't know what a decent
> inline formula looks like :)

It looks pretty much as you have got.  You can customise the actual
image created using org-format-latex-options.  You can change the size,
e.g. ":scale 2.0" and colours.

-- 
: Eric S Fraga via Emacs 26.0.50, Org release_9.0.10-729-gb792e2


signature.asc
Description: PGP signature


[O] use %A to prompt for plain text when there is not file

2017-09-19 Thread Amos Bird
#+OPTIONS: latex:t toc:nil H:3

Hi,

I'm currently using this template,
#+BEGIN_EXAMPLE
* %A [/]

  - [ ] %?
#+END_EXAMPLE

However when capturing in a non-file buffer, %A generates nothing. I'd like to 
have a plain text inserted instead. What can I do?

regards,

--
Amos Bird
amosb...@gmail.com