[O] empty search causes infinite loop?

2017-01-24 Thread Pete Siemsen
I use Org mode version 8.2.10 under Aquamacs version 3.3 on Mac Sierra 10.12.3.

When I do "C-c a s" to search my org files for a keyword, it works
fine, except when I mistakenly search for nothing. In other words, if
when prompted for a search string, I hit RETURN, Aquamacs dives into
an infinite loop. I have to force-quit Aquamacs and restart.

-- Pete



Re: [O] org-babel-capitalize-example-region-markers

2017-01-24 Thread Kyle Meyer
Kyle Meyer  writes:

[...]

>> Shouldn't this variable be public through the customize interface?
>
> Yes, I think it should be.  And it would be consistent with
> org-babel-results-keyword being a defcustom.

[...]

>> Also, it seems "capitalize" is the wrong verb here?
>
> Something with "upcase" or "uppercase" would have been better given the
> behavior of upcase and capitalize.

Here's a patch.  I'll apply it to master in a day or two if there are no
objections.

-- >8 --
Subject: [PATCH] ob-core: Add org-babel-uppercase-example-markers option

* lisp/ob-core.el (org-babel-capitalize-example-region-markers): Mark
as obsolete.
(org-babel-uppercase-example-markers): New defcustom to replace defvar
org-babel-capitalize-example-region-markers.
(org-babel-examplify-region): Use new option.

Rather than moving org-babel-capitalize-example-region-markers to a
defcustom, give the option a new name that makes it clearer that all
characters, not just the first, will be in upper case.

Suggested-by: Vicente Vera 

---
 etc/ORG-NEWS   |  7 +++
 lisp/ob-core.el| 13 +
 lisp/org-compat.el |  3 +++
 3 files changed, 19 insertions(+), 4 deletions(-)

diff --git a/etc/ORG-NEWS b/etc/ORG-NEWS
index fdce28b1d..58875009f 100644
--- a/etc/ORG-NEWS
+++ b/etc/ORG-NEWS
@@ -218,6 +218,13 @@ document with ~org-mark-ring-goto~ (default binding =C-c 
&=).
 *** ~org-get-heading~ accepts two more optional arguments
 
 See docstring for details.
+
+*** New option ~org-babel-uppercase-example-markers~
+
+This variable is a ~defcustom~ and replaces the variable
+~org-babel-capitalize-example-region-markers~, which is a ~defvar~ and
+is now obselete.
+
 * Version 9.0
 
 ** Incompatible changes
diff --git a/lisp/ob-core.el b/lisp/ob-core.el
index 663fe18b0..d312f2ceb 100644
--- a/lisp/ob-core.el
+++ b/lisp/ob-core.el
@@ -179,6 +179,14 @@ (defcustom org-babel-hash-show-time nil
   :package-version '(Org . "9.0")
   :safe #'booleanp)
 
+(defcustom org-babel-uppercase-example-markers nil
+  "When non-nil, begin/end example markers will be inserted in upper case."
+  :group 'org-babel
+  :type 'boolean
+  :version "25.2"
+  :package-version '(Org . "9.1")
+  :safe #'booleanp)
+
 (defun org-babel-noweb-wrap ( regexp)
   (concat org-babel-noweb-wrap-start
  (or regexp "\\([^ \t\n].+?[^ \t]\\|[^ \t\n]\\)")
@@ -2435,15 +2443,12 @@ (defun org-babel-result-to-file (result  
description)
  result)
(if description (concat "[" description "]") ""
 
-(defvar org-babel-capitalize-example-region-markers nil
-  "Make true to capitalize begin/end example markers inserted by code blocks.")
-
 (defun org-babel-examplify-region (beg end  results-switches inline)
   "Comment out region using the inline `==' or `: ' org example quote."
   (interactive "*r")
   (let ((maybe-cap
 (lambda (str)
-  (if org-babel-capitalize-example-region-markers (upcase str) str
+  (if org-babel-uppercase-example-markers (upcase str) str
 (if inline
(save-excursion
  (goto-char beg)
diff --git a/lisp/org-compat.el b/lisp/org-compat.el
index 152c6e7d5..948bd06fb 100644
--- a/lisp/org-compat.el
+++ b/lisp/org-compat.el
@@ -195,6 +195,9 @@ (define-obsolete-function-alias 'org-agenda-todayp
   'org-agenda-today-p "Org 9.0")
 (define-obsolete-function-alias 'org-babel-examplize-region
   'org-babel-examplify-region "Org 9.0")
+(define-obsolete-variable-alias 'org-babel-capitalize-example-region-markers
+  'org-babel-uppercase-example-markers "Org 9.1")
+
 (define-obsolete-function-alias 'org-babel-trim 'org-trim "Org 9.0")
 (define-obsolete-variable-alias 'org-html-style 'org-html-head "24.4")
 (define-obsolete-function-alias 'org-insert-columns-dblock
-- 
2.11.0





[O] org-insert-link descriptions for id links

2017-01-24 Thread Samuel Wales
i bind h-y to org-insert-link-global.  i use (setq
org-keep-stored-link-after-insertion t).

i often store a link and want to insert it.  i use ido-hacks for completion.

i get prompted with just the id link and a bunch of link prefixes like
file:.  to me this is not meaningful, because it is just numbers and
letters, not the default description.

am i using this command wrong?

or is it possible to get links to insert that are human readable?

thanks.

-- 
The Kafka Pandemic: 

The disease DOES progress. MANY people have died from it. And ANYBODY
can get it.

Denmark: free Karina Hansen NOW.
  UPDATE 2016-10: home, but not fully free



Re: [O] extra paragraph in image export?

2017-01-24 Thread Matt Price
On Tue, Jan 24, 2017 at 4:27 PM, Nicolas Goaziou 
wrote:

> Hello,
>
> Rasmus  writes:
>
> > I'm not an expert of HTML either.  However, the "p" tag inside the
> > "figure" is uncommon looking a bit on the example usages online.  Thus, I
> > agree with Matt that it should probably not be there.
>
> OK.
>
> > AFAIK, the CSS selector still differs so on the output side they are not
> > alike.  I.e. the former is "figure>img" the other is a "p>img".  Aside:
> If
> > anything, removing the "p" tag inside the figure would make it easier to
> > handle images.
>
> So would the following patch fix the issue?
>
>
I'm not sure. Doesn't look like it to me -- I would instead have put:

-(format "\n%s" contents)
+(format "\n%s" contents)

Because we never want the  tag inside the figure. Isn't that right?


Re: [O] extra paragraph in image export?

2017-01-24 Thread Matt Price
On Tue, Jan 24, 2017 at 4:27 PM, Nicolas Goaziou 
wrote:

> Hello,
>
> Rasmus  writes:
>
> > I'm not an expert of HTML either.  However, the "p" tag inside the
> > "figure" is uncommon looking a bit on the example usages online.  Thus, I
> > agree with Matt that it should probably not be there.
>
> OK.
>
> > AFAIK, the CSS selector still differs so on the output side they are not
> > alike.  I.e. the former is "figure>img" the other is a "p>img".  Aside:
> If
> > anything, removing the "p" tag inside the figure would make it easier to
> > handle images.
>
> So would the following patch fix the issue?
>
> Regards,
>
> --
> Nicolas Goaziou
>


Re: [O] org-babel-capitalize-example-region-markers

2017-01-24 Thread Kyle Meyer
Vicente Vera  writes:

> Hello.
>
> Just noticed that example block headings wrapping code evaluation
> results appear downcased (arrows added):
>
> #+RESULTS:
>
> #+begin_example <=
> ... some result...
> #+end_example   <=
>
> In ob-core.el, line 2438 there's a "hidden" variable that controls
> wether the headings appear upcased:
> ‘org-babel-capitalize-example-region-markers’. Setting it to non-nil
> seems to solve the "problem".
>
> Shouldn't this variable be public through the customize interface?

Yes, I think it should be.  And it would be consistent with
org-babel-results-keyword being a defcustom.

I don't see a reason for making it a defvar given in f64a859db (force
cap of auto-inserted begin/end example block, 2012-05-21), the commit
that introduced the variable [1], or in the post [2] that resulted in
the addition.

> Also, it seems "capitalize" is the wrong verb here?

Something with "upcase" or "uppercase" would have been better given the
behavior of upcase and capitalize.


[1] Originally named org-babel-capitalize-examplize-region-markers
[2] https://lists.gnu.org/archive/html/emacs-orgmode/2012-05/msg00607.html

-- 
Kyle



[O] org-babel-capitalize-example-region-markers

2017-01-24 Thread Vicente Vera
Hello.

Just noticed that example block headings wrapping code evaluation
results appear downcased (arrows added):

#+RESULTS:
#+begin_example <=
... some result...
#+end_example   <=

In ob-core.el, line 2438 there's a "hidden" variable that controls
wether the headings appear upcased:
‘org-babel-capitalize-example-region-markers’. Setting it to non-nil
seems to solve the "problem".

Shouldn't this variable be public through the customize interface?

Also, it seems "capitalize" is the wrong verb here?


[O] Release 9.0.4

2017-01-24 Thread Bastien
Hi all,

Org 9.0.4 is out now.

Enjoy!

-- 
 Bastien




Re: [O] git and orgmode: teaching git a bit of orgmode syntax

2017-01-24 Thread Stig Brautaset

Karl Voit  writes:

> Unfortunately, git does not handle diffs in a meaningful way. For
> example, when there are sub-hierarchies added or removed, it ends up
> with many diff-lines like the following:
>
> -* NEXT test with DAVdroid
> +* Lesestoff [1/26]:2read:
>  :PROPERTIES:
> -:CREATED:  [2016-05-08 Sun 12:51]
> +:CREATED: [2012-04-17 Tue 10:39]
> +:ARCHIVE:  %s_archive::* Lesestoff
> +:CATEGORY: reading
>  :END:
>
> The two headings being compared by git are totally unrelated. Git
> did find a match for the :PROPERTIES: and :END: lines and therefore
> assumed that I modified the level five heading "NEXT test with
> DAVdroid" into the first level heading "Lesestoff", not recognizing
> that in fact, there were many org-mode lines moved to the archive
> file, resulting in many deleted lines instead of modified ones.

You may want to try setting =diff.algorithm= (see =man git-config=) to
either =patience= or its variant =histogram=. This Stack Overflow answer
contains an example of how the effects of the diff created with the
patience algorithm, and it looks similar to the case you're describing:
http://stackoverflow.com/questions/4045017/what-is-git-diff-patience-for#4045087

You may also want to check out the option =diff.compactionHeuristic=,
which is described thus:

,
| Set this option to true to enable an experimental heuristic that
| shifts the hunk boundary in an attempt to make the resulting patch
| easier to read.
`

Stig



Re: [O] Table formula from code block

2017-01-24 Thread Eric S Fraga
On Tuesday, 24 Jan 2017 at 14:14, Michael Welle wrote:
> ohschockschwerenot, I found it. I set org-confirm-babel-evaluate to a
> function that does look at the body of the code block and then decides
> if it should be executed without confirmation or not.
>
> I'm not sure, why that is a problem. In the case of the examples, the
> function returns t and that is the default value of o-c-b-evaluate.

Interesting.  I cannot help with this but I would be quite interested in
seeing your function in case it's something I could use!  Would it be
possible to share?

thanks,
eric

-- 
: Eric S Fraga (0xFFFCF67D), Emacs 26.0.50.1, Org release_9.0.3-241-gc3d67b


signature.asc
Description: PGP signature


Re: [O] extra paragraph in image export?

2017-01-24 Thread Nicolas Goaziou
Hello,

Rasmus  writes:

> I'm not an expert of HTML either.  However, the "p" tag inside the
> "figure" is uncommon looking a bit on the example usages online.  Thus, I
> agree with Matt that it should probably not be there.

OK.

> AFAIK, the CSS selector still differs so on the output side they are not
> alike.  I.e. the former is "figure>img" the other is a "p>img".  Aside: If
> anything, removing the "p" tag inside the figure would make it easier to
> handle images.

So would the following patch fix the issue?

Regards,

-- 
Nicolas Goaziou
>From 49ebd5a8406bdee0c0a94b83f7135d94e35bb6ba Mon Sep 17 00:00:00 2001
From: Nicolas Goaziou 
Date: Tue, 24 Jan 2017 22:22:47 +0100
Subject: [PATCH] ox-html: Remove  tag around block images when using HTML5

* lisp/ox-html.el (org-html--wrap-image): Do not add a spurious 
  tag when using  to mark images.
---
 lisp/ox-html.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/ox-html.el b/lisp/ox-html.el
index d3c1b2eb1..fa8476a05 100644
--- a/lisp/ox-html.el
+++ b/lisp/ox-html.el
@@ -1607,7 +1607,7 @@ arguments CAPTION and LABEL are given, use them for caption and
 	;; ID.
 	(if (org-string-nw-p label) (format " id=\"%s\"" label) "")
 	;; Contents.
-	(format "\n%s" contents)
+	(if html5-fancy contents (format "\n%s" contents))
 	;; Caption.
 	(if (not (org-string-nw-p caption)) ""
 	  (format (if html5-fancy "\n%s"
-- 
2.11.0



Re: [O] [bug] ts property uses next entry

2017-01-24 Thread Nicolas Goaziou
Samuel Wales  writes:

> unlikely question, but on a similar topic is there a function that
> will return the most recent ts of any type anywhere in an entry?

I don't think so. You will need to write your own.

Regards,



Re: [O] [bug] ts property uses next entry

2017-01-24 Thread Samuel Wales
thank you.

unlikely question, but on a similar topic is there a function that
will return the most recent ts of any type anywhere in an entry?



Re: [O] [bug] ts property uses next entry

2017-01-24 Thread Nicolas Goaziou
Hello,

Samuel Wales  writes:

> recent maint.
>
> *** (org-entry-get nil "TIMESTAMP_IA") on a header can return
> a ts from the entry below it if a link is on it
>
> i expected it to return nil
> * this header returns nil
> * META [[*B][B]] this header returns a value
> * EXPECT [#A] x
> DEADLINE: <2017-01-27 Fri -2d>
> :LOGBOOK:
> - State "EXPECT" from  [2017-01-13 Fri 15:46]
> :END:

Fixed. Thank you.

Regards,

-- 
Nicolas Goaziou



[O] [bug] ts property uses next entry

2017-01-24 Thread Samuel Wales
recent maint.

*** (org-entry-get nil "TIMESTAMP_IA") on a header can return
a ts from the entry below it if a link is on it

i expected it to return nil
* this header returns nil
* META [[*B][B]] this header returns a value
* EXPECT [#A] x
DEADLINE: <2017-01-27 Fri -2d>
:LOGBOOK:
- State "EXPECT" from  [2017-01-13 Fri 15:46]
:END:


-- 
The Kafka Pandemic: 

The disease DOES progress. MANY people have died from it. And ANYBODY
can get it.

Denmark: free Karina Hansen NOW.
  UPDATE 2016-10: home, but not fully free



Re: [O] bug report: ox-html with coderef links needs a space between attributes in element (with patch)

2017-01-24 Thread D M German
 Nicolas Goaziou twisted the bytes to say:


 >> 
 >> ​I am running version 9.0.3 of org.
 >> 
 >> I believe this patch will solve the issue. It simply adds a space before
 >> the class attribute.

 Nicolas> It works but I eventually applied a slightly different patch. Thank 
you
 Nicolas> for both the report and the patch.

thank you very much!

--daniel

 Nicolas> Regards,

 Nicolas> -- 
 Nicolas> Nicolas Goaziou

--
Daniel M. German  "For indeed who is there alive
   that will not be swayed by his
   bias and partiality to
Jonathan Swift ->  the place of his birth?"
http://turingmachine.org/
http://silvernegative.com/
dmg (at) uvic (dot) ca
replace (at) with @ and (dot) with .

 



Re: [O] VM for org-based reproducible environment?

2017-01-24 Thread Matt Price
I'm really interested in the gitlab-ci part of this -- can you describe? Do
you think it will translate to travis on github? I'd prefer to continue
using github if I can since there's so much infrastructure there, and I
tend to use the web interface in my teaching.

I hadn't even heard of guix, it looks intriguing, thanks.

On Tue, Jan 24, 2017 at 4:19 AM, Rasmus  wrote:

> Matt Price  writes:
>
> > I'd like to provide a way for people to copy my course materials in the
> > easiest possible way. At present my export & grading processes rely on
> some
> > customization of various tools, mostly emacs-based. So I'm thinking the
> > easiest thing might be fore me to define a virtual machine, maybe
> > docker-based, and distribute that.
>
> Docker might be handy if you need a whole array of tools, say R, Org, a
> number of libraries etc etc.  It's not too complicated to created new
> docker images and you can host/compile them on "dockerhub".  You can find
> the files that create docker images on e.g. github.
>
> Personally, I use an external config.el file to publish files against the
> ELPA version of Org.
>
> Something like,
>
> emacs --batch --no-init-file --load paper-config/org-conf.el
> --find-file $1 --funcall $2
>
> In addition, I compile the papers with gitlab-ci.  You can include
> instructions of what software is needed in the .gitlab-ci.yml.
>
> You might also be able to use something like Guix.  I think it can even be
> used to create docker images these days.
>
> Hope it helps,
> Rasmus
>
> --
> History is what should never happen again
>
>
>


Re: [O] git and orgmode: teaching git a bit of orgmode syntax

2017-01-24 Thread Michael Welle
Hello,

Nick Dokos  writes:
[...]
> Thanks. It is quite likely that I misremembered: I found some things on Worg
> about an org-aware merge tool for git:
>
> http://orgmode.org/worg/org-contrib/gsoc2012/student-projects/git-merge-tool/proposal.html
> http://orgmode.org/worg/org-contrib/gsoc2012/student-projects/git-merge-tool/
>
> but not for a diff tool. And I'm not sure it ever saw the light of day.
I will have a look at it later this week.

If you have enough information to perform a semantic merge, there should
be also enough information to spit out a diff. Defining what a
difference is in Org would be a starting point. An implementation will
follow then. Maybe a task for the next winter ;).

Regards
hmw



[O] Bug: clock comments [9.0.2 (9.0.2-elpaplus @ c:/USR/FJM/APP/.emacs.d/elpa/org-plus-contrib-20161214/)]

2017-01-24 Thread Francis J. Monari, Esquire
Nicolas,

I stepped away from this email thread for a while.  I apologize.

The last email in the chain follows:

The question remains "How can I make the notes associated with the Clock
entry follow the Clock entry?

Best regards,

Frank.



I would like all "clock" entries - with associated notes - in the CLOCK
drawer.  With org version 9 time goes to the CLOCK drawer, note goes to
the LOGBOOK drawer.

I would like all other "logbook" entries - separate entries are possible
- in the LOGBOOK drawer.

Segregating the "clock" and "logbook" entries makes drawer easier to
read for my purposes.

In version 8 org behaved in this manner.

Is it possible to retain this behavior?

Regards,

Frank.

On 1/18/2017 4:39 PM, Nicolas Goaziou wrote:
> Hello,
> 
> "Francis J. Monari, Esquire"  writes:
> 
>> Using Clock Mode to track time.
>> Org Mode starts and stops clock.  Clock entry redirected to CLOCK
>> drawer.
>> I expect to see the clock entry (time & note) appear in CLOCK drawer.
>> What happens is that clock time goes to CLOCK drawer, clock note goes to
>> LOGBOOK drawer.
>> This allocation does not make sense.  Time is properly tracked, but no
>> ability to identify activity.
>> org mode clock variables follow:
>> ;;;Org clock settings
>> (add-hook 'org-clock-in-prepare-hook 'org-resolve-clocks)
>> (setq org-clock-history-length 32)
>> (setq org-clock-idle-time 20)
>> (setq org-clock-in-resume t)
>> (setq org-clock-into-drawer "CLOCK")
> 
> Why do you specify a different drawer name if you want notes and clocks
> in the same one?
> 
> Regards,
> 



Re: [O] git and orgmode: teaching git a bit of orgmode syntax

2017-01-24 Thread Nick Dokos
Michael Welle  writes:

> Hello,
>
> Nick Dokos  writes:
> [...]
>> [fn:1] I'd search, but Gmane still seems non-compos-mentis and
>>searching in the archives is just awful (or my fu is too
>>weak). Anybody know what is happening with Gmane?  How do you
>>search the list nowadays?
> I have a mail folder with about 60k mails. The oldest seem to be 10
> years old. I doubt that it is complete, but who knows. What should I
> look for? I searched the subjects for gsoc|summer of code and found one
> from 2013, IIRC. But that doesn't lead to anything. Searching for
> difference in the subject wasn't fruitful either.
>

Thanks. It is quite likely that I misremembered: I found some things on Worg
about an org-aware merge tool for git:

http://orgmode.org/worg/org-contrib/gsoc2012/student-projects/git-merge-tool/proposal.html
http://orgmode.org/worg/org-contrib/gsoc2012/student-projects/git-merge-tool/

but not for a diff tool. And I'm not sure it ever saw the light of day.

-- 
Nick




Re: [O] bug report: ox-html with coderef links needs a space between attributes in element (with patch)

2017-01-24 Thread Nicolas Goaziou
Hello,

dmg  writes:

> I have the following org-snippet:
>
> ---
> This is an example
>
> #+BEGIN_SRC sml -r -l "(*(ref:%s)*)" -n
> val x = 1
> fun f y = x + y (*(ref:f)*)
> val x = 2
> val y = 3
> val z = f(x+y) (*(ref:callf)*)
> #+END_SRC
>
> - Line [[(f)]] defines a function that, when called, evaluates body *x+y*
>   in environment where *x* maps to *1* and *y* maps to the argument
> --
> The HTML that it generates creates invalid HTML (one parser used by my
> university refuses to accept  it :)
>
> I have inspected the code and this is where it fails: Note how there is no
> space between " and class in the  element:
>
>
> Line  onmouseover="CodeHighlightOn(this, 'coderef-f');"
> onmouseout="CodeHighlightOff(this, 'coderef-f');">2 defines a function
> that, when called, evaluates body x+y
> in environment where x maps to 1 and y maps to the
> argument
>
>
> ​I am running version 9.0.3 of org.
>
> I believe this patch will solve the issue. It simply adds a space before
> the class attribute.

It works but I eventually applied a slightly different patch. Thank you
for both the report and the patch.

Regards,

-- 
Nicolas Goaziou



Re: [O] org-stuck-projects confuses a "Next" heading with the NEXT keyword

2017-01-24 Thread Nicolas Goaziou
Hello,

Matt Lundin  writes:

> I find that this commit (7c3e0b0fdfdc0cf1a4724cffe17b6bb160278247)
> causes Org mode no longer to identify stuck projects correctly.
>
> Steps to reproduce:
>
> I am using emacs version 25.1.1 and the most recent commit in the Org
> mode repo.
>
> /usr/bin/emacs -Q -l ~/minimal.el
>
> minimal.el contains...
>
> (add-to-list 'load-path "~/org-mode/lisp/")
> (add-to-list 'load-path "~/org-mode/contrib/lisp/")
>
> (require 'org)
>
> (setq org-agenda-files '("~/config/test.org"))
>
>
> ...and test.org contains...
>
> #+TODO: TODO NEXT | DONE
>
> * Headline
> ** This project should not be stuck
> *** TODO A next action
> *** NEXT Another one

Fixed. Thank you.

Regards,

-- 
Nicolas Goaziou



Re: [O] git and orgmode: teaching git a bit of orgmode syntax

2017-01-24 Thread Brett Viren
Karl Voit  writes:

> -* NEXT test with DAVdroid
> +* Lesestoff [1/26]:2read:
>  :PROPERTIES:
> -:CREATED:  [2016-05-08 Sun 12:51]
> +:CREATED: [2012-04-17 Tue 10:39]
> +:ARCHIVE:  %s_archive::* Lesestoff
> +:CATEGORY: reading
>  :END:

Without seeing before/after versions it's not clear that this diff is
somehow wrong.

Depending on the editing one does to a given file, a diff may seem "non
local" with some chunks appearing to undo something and others redoing
it.  This happens when parts of the file get rearranged.  For example,
do either of your headlines appear elsewhere in your diff with their
"+/-" signs reversed?

-Brett.


signature.asc
Description: PGP signature


Re: [O] is it bad to have both org and org-plus-contrib installed?

2017-01-24 Thread Thomas S. Dye

Alan Schmitt writes:

> Thank you for the suggestion, but I use Spacemacs, which in turn uses
> paradox.
>
> Why couldn't there be an org-contrib package, depending on org? So that
> way org would not be duplicated in two packages.

I've run into the same problem with Spacemacs and would welcome a
solution.

All the best,
Tom

--
Thomas S. Dye
http://www.tsdye.com



Re: [O] git and orgmode: teaching git a bit of orgmode syntax

2017-01-24 Thread Michael Welle
Hello,

Nick Dokos  writes:
[...]
> [fn:1] I'd search, but Gmane still seems non-compos-mentis and
>searching in the archives is just awful (or my fu is too
>weak). Anybody know what is happening with Gmane?  How do you
>search the list nowadays?
I have a mail folder with about 60k mails. The oldest seem to be 10
years old. I doubt that it is complete, but who knows. What should I
look for? I searched the subjects for gsoc|summer of code and found one
from 2013, IIRC. But that doesn't lead to anything. Searching for
difference in the subject wasn't fruitful either.

Regards
hmw



Re: [O] git and orgmode: teaching git a bit of orgmode syntax

2017-01-24 Thread Nick Dokos
Karl Voit  writes:

> Hi!
>
> I am using gitwatch[1] to auto-commit any changes to my org-mode
> files in a git repository.
>
> Unfortunately, git does not handle diffs in a meaningful way. For
> example, when there are sub-hierarchies added or removed, it ends up
> with many diff-lines like the following:
>
> -* NEXT test with DAVdroid
> +* Lesestoff [1/26]:2read:
>  :PROPERTIES:
> -:CREATED:  [2016-05-08 Sun 12:51]
> +:CREATED: [2012-04-17 Tue 10:39]
> +:ARCHIVE:  %s_archive::* Lesestoff
> +:CATEGORY: reading
>  :END:
>
> The two headings being compared by git are totally unrelated. Git
> did find a match for the :PROPERTIES: and :END: lines and therefore
> assumed that I modified the level five heading "NEXT test with
> DAVdroid" into the first level heading "Lesestoff", not recognizing
> that in fact, there were many org-mode lines moved to the archive
> file, resulting in many deleted lines instead of modified ones.
>
> The underlying issue is, to my understanding, that git does not know
> about Org-mode syntax elements. Git does not know that :PROPERTIES:
> and :END: lines should not be used to match similar lines. It does
> not know about headings, identifying CREATED time-stamps, and other
> things.
>
> I am not familiar with git other than from an end user point of
> view. But I do think that git can be taught here via some kind of
> extension so that meaningful changes are recognized and displayed.
>
> Is there somebody with the same issue and/or somebody with a better
> understanding how this issue can be addressed?
>
> Thanks!
>
> [1] https://github.com/nevik/gitwatch

You can plug in a different diff tool into git. The next problem is to
write/find/conjure a diff tool that *does* understand org syntax (at least
to some extent). IIRC, there was a GSOC(?) project to do that some years ago,
but I don't think it got finished (and maybe I'm misremembering in any case).
If that really exists[fn:1], maybe it can form a starting point for another 
push.

* Footnotes

[fn:1] I'd search, but Gmane still seems non-compos-mentis and
   searching in the archives is just awful (or my fu is too
   weak). Anybody know what is happening with Gmane?  How do you
   search the list nowadays?

-- 
Nick




[O] git and orgmode: teaching git a bit of orgmode syntax

2017-01-24 Thread Karl Voit
Hi!

I am using gitwatch[1] to auto-commit any changes to my org-mode
files in a git repository.

Unfortunately, git does not handle diffs in a meaningful way. For
example, when there are sub-hierarchies added or removed, it ends up
with many diff-lines like the following:

-* NEXT test with DAVdroid
+* Lesestoff [1/26]:2read:
 :PROPERTIES:
-:CREATED:  [2016-05-08 Sun 12:51]
+:CREATED: [2012-04-17 Tue 10:39]
+:ARCHIVE:  %s_archive::* Lesestoff
+:CATEGORY: reading
 :END:

The two headings being compared by git are totally unrelated. Git
did find a match for the :PROPERTIES: and :END: lines and therefore
assumed that I modified the level five heading "NEXT test with
DAVdroid" into the first level heading "Lesestoff", not recognizing
that in fact, there were many org-mode lines moved to the archive
file, resulting in many deleted lines instead of modified ones.

The underlying issue is, to my understanding, that git does not know
about Org-mode syntax elements. Git does not know that :PROPERTIES:
and :END: lines should not be used to match similar lines. It does
not know about headings, identifying CREATED time-stamps, and other
things.

I am not familiar with git other than from an end user point of
view. But I do think that git can be taught here via some kind of
extension so that meaningful changes are recognized and displayed.

Is there somebody with the same issue and/or somebody with a better
understanding how this issue can be addressed?

Thanks!

[1] https://github.com/nevik/gitwatch


-- 
get mail|git|SVN|photos|postings|SMS|phonecalls|RSS|CSV|XML into Org-mode:
   > get Memacs from https://github.com/novoid/Memacs <
Personal Information Management > http://Karl-Voit.at/tags/pim/
Emacs-related > http://Karl-Voit.at/tags/emacs/




Re: [O] is it bad to have both org and org-plus-contrib installed?

2017-01-24 Thread Alan Schmitt
On 2017-01-24 12:14, Kaushal Modi  writes:

> I don't recall facing the issue like yours when org gets
> auto-installed as dependency. But I found it annoying to wait for org
> to get installed as dependency magically when some package having that
> as dependency got updated. So I would delete it manually, some package
> would get updated, and it would get installed again.

Unfortunately I cannot deleting it without deleting all the packages
that depend on it :(

> So eventually I came up with this and this has worked fine:
>
> ;; http://emacs.stackexchange.com/a/26513/115
> (defun modi/package-dependency-check-ignore (orig-ret)
> "Remove the `black listed packages' from ORIG-RET.
> Packages listed in the let-bound `pkg-black-list' will not be auto-installed
> even if they are found as dependencies.
> It is known that this advice is not effective when installed packages
> asynchronously using `paradox'. Below is effective on synchronous
> package installations."
> (let ((pkg-black-list '(org))
> new-ret
> pkg-name)
> (dolist (pkg-struct orig-ret)
> (setq pkg-name (package-desc-name pkg-struct))
> (if (member pkg-name pkg-black-list)
> (message (concat "Package `%s' will not be installed. "
> "See `modi/package-dependency-check-ignore'.")
> pkg-name)
> ;; (message "Package to be installed: %s" pkg-name)
> (push pkg-struct new-ret)))
> new-ret))
> (advice-add 'package-compute-transaction :filter-return 
> #'modi/package-dependency-check-ignore)

Thank you for the suggestion, but I use Spacemacs, which in turn uses
paradox.

Why couldn't there be an org-contrib package, depending on org? So that
way org would not be duplicated in two packages.

Thanks again,

Alan

-- 
OpenPGP Key ID : 040D0A3B4ED2E5C7
Monthly Athmospheric CO₂, Mauna Loa Obs. 2016-12: 404.48, 2015-12: 401.85


signature.asc
Description: PGP signature


Re: [O] Table formula from code block

2017-01-24 Thread Michael Welle
Hello,

Eric S Fraga  writes:

> On Tuesday, 24 Jan 2017 at 10:52, Michael Welle wrote:
>> Eric S Fraga  writes:
>>> Works fine for me with relatively recent org from git.
>> that's strange. I pulled last sunday.
>
> Well, I have just this minute updated and tried again.  It still works
> for me.  
ohschockschwerenot, I found it. I set org-confirm-babel-evaluate to a
function that does look at the body of the code block and then decides
if it should be executed without confirmation or not.

I'm not sure, why that is a problem. In the case of the examples, the
function returns t and that is the default value of o-c-b-evaluate.

Regards
hmw




Re: [O] org-stuck-projects confuses a "Next" heading with the NEXT keyword

2017-01-24 Thread Matt Lundin
Hi Nicholas,

Nicolas Goaziou  writes:

> Hello,
>
> Guy Mayraz  writes:
>
>> I want every project to have a NEXT or WAIT keyword, and have defined
>> org-stuck-projects as follows:
>>
>> (setq org-stuck-projects '("+LEVEL=2/-INACTIVE-DONE" ("NEXT" "WAIT") nil
>> ""))
>>
>> It mostly works, but it does not identify as stuck a project that has a
>> "Next items" subheading and no NEXT keyword.
>
> Fixed. Thank you.

I find that this commit (7c3e0b0fdfdc0cf1a4724cffe17b6bb160278247)
causes Org mode no longer to identify stuck projects correctly.

Steps to reproduce:

I am using emacs version 25.1.1 and the most recent commit in the Org
mode repo.

/usr/bin/emacs -Q -l ~/minimal.el

minimal.el contains...

--8<---cut here---start->8---
(add-to-list 'load-path "~/org-mode/lisp/")
(add-to-list 'load-path "~/org-mode/contrib/lisp/")

(require 'org)

(setq org-agenda-files '("~/config/test.org"))
--8<---cut here---end--->8---

...and test.org contains...

--8<---cut here---start->8---
#+TODO: TODO NEXT | DONE

* Headline
** This project should not be stuck
*** TODO A next action
*** NEXT Another one
--8<---cut here---end--->8---

I am using the default value of org-stuck-projects:

--8<---cut here---start->8---
org-stuck-projects is a variable defined in ‘org-agenda.el’.
Its value is ("+LEVEL=2/-DONE" ("TODO" "NEXT" "NEXTACTION") nil "")
--8<---cut here---end--->8---

M-x org-agenda-list-stuck-projects produces the following:

--8<---cut here---start->8---
List of stuck projects: 
  test:   This project should not be stuck
--8<---cut here---end--->8---

Thanks,
Matt




Re: [O] Table formula from code block

2017-01-24 Thread Michael Welle
Hello,

Roger Mason  writes:
[...]
> #+tblname: display-results
> | skribilo path   | infile | engine| To Engine | To 
> Typeset |
>
> |-++---+---+|
> | "/opt/skribilo-git/bin" | "skribilo-input-1" | "context" | Success |
> | Success |
>
> #+TBLFM: $4='(org-sbe "skribilo_to_engine" (path $1) (infile $2) (engine  $3) 
> )::$5='(org-sbe "engine_to_typeset" (path $1) (infile $2) (engine  $3) )
>
> Maybe emacs has a means of doing that wrapping, but the things I tried
> (like concatenating the quotes with the table entry with (concat...)) did
> not work.
There is a thread of Karl and me talking about that, maybe in last
november or december.


> I see that in your example you refer to the column heading in the
> #+TBLFM line.  In my working code I refer to the columns by number ($1,
> $2 etc).
Uhm, no ;). Unfortunately the column and the script block share the same
name in the example. That should be no problem, I changed that and still
no success with current Org. Org 8 works as expected.

Regards
hmw



Re: [O] Table formula from code block

2017-01-24 Thread Michael Welle
Hello,

Eric S Fraga  writes:

> On Tuesday, 24 Jan 2017 at 10:52, Michael Welle wrote:
>> Eric S Fraga  writes:
>>> Works fine for me with relatively recent org from git.
>> that's strange. I pulled last sunday.
>
> Well, I have just this minute updated and tried again.  It still works
> for me.  
I must doing something wrong. But what? I've changed org-bbdb, but that
shouldn't interfere.

Regards
hmw



Re: [O] Table formula from code block

2017-01-24 Thread Eric S Fraga
On Tuesday, 24 Jan 2017 at 10:52, Michael Welle wrote:
> Eric S Fraga  writes:
>> Works fine for me with relatively recent org from git.
> that's strange. I pulled last sunday.

Well, I have just this minute updated and tried again.  It still works
for me.  

-- 
: Eric S Fraga (0xFFFCF67D), Emacs 26.0.50.1, Org release_9.0.3-262-g5210de


signature.asc
Description: PGP signature


Re: [O] is it bad to have both org and org-plus-contrib installed?

2017-01-24 Thread Kaushal Modi
I don't recall facing the issue like yours when org gets auto-installed as
dependency. But I found it annoying to wait for org to get installed as
dependency magically when some package having that as dependency got
updated. So I would delete it manually, some package would get updated, and
it would get installed again.

So eventually I came up with this and this has worked fine:

;; http://emacs.stackexchange.com/a/26513/115
(defun modi/package-dependency-check-ignore (orig-ret)
  "Remove the `black listed packages' from ORIG-RET.
Packages listed in the let-bound `pkg-black-list' will not be auto-installed
even if they are found as dependencies.
It is known that this advice is not effective when installed packages
asynchronously using `paradox'. Below is effective on synchronous
package installations."
  (let ((pkg-black-list '(org))
new-ret
pkg-name)
(dolist (pkg-struct orig-ret)
  (setq pkg-name (package-desc-name pkg-struct))
  (if (member pkg-name pkg-black-list)
  (message (concat "Package `%s' will not be installed. "
   "See `modi/package-dependency-check-ignore'.")
   pkg-name)
;; (message "Package to be installed: %s" pkg-name)
(push pkg-struct new-ret)))
new-ret))
(advice-add 'package-compute-transaction :filter-return
#'modi/package-dependency-check-ignore)

On Tue, Jan 24, 2017, 3:55 AM Alan Schmitt 
wrote:

> Hello,
>
> I recently had one of those transient problems that go away when
> reinstalling org (the one where no code block can be executed). As I was
> doing so, I noticed that I had both org and org-plus-contrib installed,
> visibly because some packages depend on org.
>
> Is this a bad thing? And is there a way to make sure package
> dependencies pick up org-plus-contrib when it is installed, and do not
> install org as well?
>
> Thanks,
>
> Alan
>
> --
> OpenPGP Key ID : 040D0A3B4ED2E5C7
> Monthly Athmospheric CO₂, Mauna Loa Obs. 2016-12: 404.48, 2015-12: 401.85
>
-- 

Kaushal Modi


Re: [O] Table formula from code block

2017-01-24 Thread Michael Welle
Hello,

Eric S Fraga  writes:

> On Monday, 23 Jan 2017 at 12:04, Michael Welle wrote:
>> Hello,
>>
>> I think there are several problems, starting with BEGIN_SRC sh and some
>> more. But fixing them doesn't bring success. I even have trouble to get
>> a minimal example to work:
>>
>> #+NAME: foo
>> #+BEGIN_SRC emacs-lisp
>> (+ 4 4)
>> #+END_SRC
>>
>>
>> |  bar   | foo|
>> |+|
>> | 42 | #ERROR |
>> #+TBLFM: $2='(org-sbe "foo")::$1=42
>
> Works fine for me with relatively recent org from git.

I just tried the Org version, that comes with Emacs (8.2.10) and there
the above example works as expected.

Regards
hmw



Re: [O] Table formula from code block

2017-01-24 Thread Michael Welle
Hello,

Michael Welle  writes:
...
> #+NAME: foo
> #+BEGIN_SRC emacs-lisp
>
> (+ 4 4)
> #+END_SRC
>
>
> |  bar   | foo|
> |+|
> | 42 | #ERROR |
>
> #+TBLFM: $2='(org-sbe "foo")::$1=42
>
> I'm not sure, what the problem is. Looking at org-sbe there is
> something, I don't understand. In the end org-babel-execute-src-block is
> called. That executes the _current_ source code block. But I don't
> understand, how foo (in this example) becomes the current source code
> block.
well, the docstring is a bit misleading, IMHO. Current source code block
means that the function looks around to find a source code block. I
though, it means the source code block 'I am in' at the moment.

I've tracked it down to org-babel-check-confirm-evaluate so far. In the
let*, export and eval are nil. The 5. element of info is nil, that means
(goto-char (nth 5 info)) will barf. Hmm.

Regards
hmw



Re: [O] Table formula from code block

2017-01-24 Thread Roger Mason
Hello Roland and Michael,

Thank you both for looking at this.

Roland Everaert  writes:

> I will try to look at how I used org-sbe, but I do remind that I had to do 
> the following (exerpt from a post on
> the list by me on the same subjet):
>
> "It works. But I had to set some headers in the code block itself as 
> following:
>
> :exports results :results value"

I will give that a try, thank you.

Michael Welle  writes:

> I think there are several problems, starting with BEGIN_SRC sh and some
> more. But fixing them doesn't bring success. I even have trouble to get
> a minimal example to work:
>
> #+NAME: foo
> #+BEGIN_SRC emacs-lisp
>
> (+ 4 4)
> #+END_SRC
>
>
> |  bar   | foo|
> |+|
> | 42 | #ERROR |
>
> #+TBLFM: $2='(org-sbe "foo")::$1=42
>
> I'm not sure, what the problem is. Looking at org-sbe there is
> something, I don't understand. In the end org-babel-execute-src-block is
> called. That executes the _current_ source code block. But I don't
> understand, how foo (in this example) becomes the current source code
> block. Can someone explain, please? Is there a side effect, I don't see?
> Or maybe a regression?

I have experimented some more and discovered that I can get the code to
work if I wrap the table entries in quotes, i.e. making them into
explicit strings:

#+tblname: display-results
| skribilo path   | infile | engine| To Engine | To 
Typeset |
|-++---+---+|
| "/opt/skribilo-git/bin" | "skribilo-input-1" | "context" | Success   | 
Success|
#+TBLFM: $4='(org-sbe "skribilo_to_engine" (path $1) (infile $2) (engine  $3) 
)::$5='(org-sbe "engine_to_typeset" (path $1) (infile $2) (engine  $3) )

Maybe emacs has a means of doing that wrapping, but the things I tried
(like concatenating the quotes with the table entry with (concat...)) did
not work.

I see that in your example you refer to the column heading in the
#+TBLFM line.  In my working code I refer to the columns by number ($1,
$2 etc).

I'm appending the current version of the code, in case anyone is
interested.

Cheers,
Roger

===
# RunTests.org --- 

# Author: rma...@cryptoperthite.esd.mun.ca
# Version: $Id: Results.org,v 0.0 2016/12/07 15:01:38 rmason Exp$

#+TITLE: Skribe Input Format: Whatever

#+OPTIONS: toc:nil num:nil author:nil
#+LATEX_HEADER: \usepackage{natbib}  \usepackage{apalike} \usepackage{lineno}
#+LATEX_HEADER: \usepackage{sectsty} \usepackage{setspace}  \usepackage{parskip}
# Turned OFF #+LATEX: \linenumbers \doublespacing \usepackage{ulem} 
\usepackage{titlecaps} 
#+LATEX: \subsubsectionfont{\itshape}
# #+LATEX: \subsectionfont{\titlecap} -- buggers up en-dashes in
# subsection titles
#+LATEX: \sectionfont{\MakeUppercase}

* Setup :exports none
#+BEGIN_SRC emacs-lisp :results none :exports none
(setq org-confirm-babel-evaluate nil)
#+END_SRC

I'd like a default input filename, but I could not get this to do anything.
#+PROPERTY: infile "skribilo-input"

* The input document
When I call this with name =skribilo-input= rather than tangling the
file, Org opens a Geiser REPL and the processing fails.  I'm not sure
Guile can process the Skribe syntax.

#+NAME: skribilo-input
#+BEGIN_SRC scheme :tangle "skribilo-input.skb"
; Whatever.skb

#+END_SRC

* The scripts
** Skribilo to supported engine format
#+NAME: skribilo_to_engine
#+BEGIN_SRC bash :results output replace :var path="" :var engine="" :var 
infile=""
  skribilo=$path/skribilo

  rm -rf $engine; mkdir -p $engine

  result="Failed"
  $skribilo  -t $engine -o $engine/$infile.$engine $infile.skb
  [ "$(ls -A $engine)" ] && result="Success"

  if [ -e "setup.tex" ]
  then
  mv setup.tex $engine/
  fi
  echo "$result"
#+END_SRC

*** Example
#+CALL: skribilo_to_engine(engine="context", path="/opt/skribilo-git/bin", 
infile="skribilo-input")

** Engine to typeset document
#+NAME: engine_to_typeset
#+BEGIN_SRC bash :results output replace :var engine="" :var infile=""
  outfile=$infile"_"$engine
  wd=$(pwd)
  result="Failure"
  if [ $engine = "context" ]; then
  cd context
  source /opt/context/tex/setuptex 2>&1 > /tmp/log 
  context --purgeall --result="$outfile.pdf" "$infile.$engine" 2>&1 > 
/tmp/log
  [ -e  "$outfile.pdf" ] && result="Success"
  elif [ $engine = "latex" ]; then
  cd latex
  pdflatex $infile.$engine 2>&1 > /tmp/log
  mv $infile.pdf $outfile.pdf
  [ -e  "$outfile.pdf" ] && result="Success"
  elif [ $engine = "lout" ];then
  cd lout
  lout $infile.$engine > $outfile.ps
  ps2pdf $outfile.ps
  [ -e  "$outfile.pdf" ] && result="Success"
  else
  result="n.a."
  fi

  cd $wd
  echo "$result"
#+END_SRC

*** Example
#+CALL: engine_to_typeset(engine="context", infile="skribilo-input")

* The result table
Should be able to run the tests from the table.  See

[O] bug report: ox-html with coderef links needs a space between attributes in element (with patch)

2017-01-24 Thread dmg
Hi everybody,

I have the following org-snippet:

---
This is an example

#+BEGIN_SRC sml -r -l "(*(ref:%s)*)" -n
val x = 1
fun f y = x + y (*(ref:f)*)
val x = 2
val y = 3
val z = f(x+y) (*(ref:callf)*)
#+END_SRC

- Line [[(f)]] defines a function that, when called, evaluates body *x+y*
  in environment where *x* maps to *1* and *y* maps to the argument
--
The HTML that it generates creates invalid HTML (one parser used by my
university refuses to accept  it :)

I have inspected the code and this is where it fails: Note how there is no
space between " and class in the  element:


Line 2 defines a function
that, when called, evaluates body x+y
in environment where x maps to 1 and y maps to the
argument


​I am running version 9.0.3 of org.

I believe this patch will solve the issue. It simply adds a space before
the class attribute.

​
diff --git a/lisp/ox-html.el b/lisp/ox-html.el
index a741142..9b40cc9 100644
--- a/lisp/ox-html.el
+++ b/lisp/ox-html.el
@@ -3058,7 +3058,7 @@ INFO is a plist holding contextual information.  See
   (let ((fragment (concat "coderef-" (org-html-encode-plain-text
path
(format "%s"
fragment
-   (format "class=\"coderef\"
onmouseover=\"CodeHighlightOn(this, \
+   (format " class=\"coderef\"
onmouseover=\"CodeHighlightOn(this, \
 '%s');\" onmouseout=\"CodeHighlightOff(this, '%s');\""
fragment fragment)
attributes

-- 
--dmg

---
Daniel M. German
http://turingmachine.org


Re: [O] Table formula from code block

2017-01-24 Thread Michael Welle
Hello,

Eric S Fraga  writes:

> On Monday, 23 Jan 2017 at 12:04, Michael Welle wrote:
>> Hello,
>>
>> I think there are several problems, starting with BEGIN_SRC sh and some
>> more. But fixing them doesn't bring success. I even have trouble to get
>> a minimal example to work:
>>
>> #+NAME: foo
>> #+BEGIN_SRC emacs-lisp
>> (+ 4 4)
>> #+END_SRC
>>
>>
>> |  bar   | foo|
>> |+|
>> | 42 | #ERROR |
>> #+TBLFM: $2='(org-sbe "foo")::$1=42
>
> Works fine for me with relatively recent org from git.
that's strange. I pulled last sunday.

Regards
hmw



Re: [O] extra paragraph in image export?

2017-01-24 Thread Rasmus
Hi,

>> with org-html-html5-fancy is non-nil, images are exported with something
>> like this code:
>>
>> 
>> https://imgs.xkcd.com/comics/proof_2x.png; alt="proof_2x.png"
>> class="fragment (appear) visible current-fragment"
>> data-fragment-index="0">
>> 

I'm not an expert of HTML either.  However, the "p" tag inside the
"figure" is uncommon looking a bit on the example usages online.  Thus, I
agree with Matt that it should probably not be there.

> I'm not well-versed enough in HTML to answer this, but, from Org POV,
> there should be a difference between
>
>   A paragraph
>
>   #+caption: foo
>   [[block-image.png]]
>
>   Another paragraph
>
>
> and
>
>   A paragraph with an [[inline-image.png]] and some text following.
>
> Would removing the  tag blur the difference between the two examples
> above ?

(I hope I understand your concern correctly).

AFAIK, the CSS selector still differs so on the output side they are not
alike.  I.e. the former is "figure>img" the other is a "p>img".  Aside: If
anything, removing the "p" tag inside the figure would make it easier to
handle images.

Rasmus

-- 
Vote for proprietary math!




Re: [O] Table formula from code block

2017-01-24 Thread Eric S Fraga
On Monday, 23 Jan 2017 at 12:04, Michael Welle wrote:
> Hello,
>
> I think there are several problems, starting with BEGIN_SRC sh and some
> more. But fixing them doesn't bring success. I even have trouble to get
> a minimal example to work:
>
> #+NAME: foo
> #+BEGIN_SRC emacs-lisp
> (+ 4 4)
> #+END_SRC
>
>
> |  bar   | foo|
> |+|
> | 42 | #ERROR |
> #+TBLFM: $2='(org-sbe "foo")::$1=42

Works fine for me with relatively recent org from git.

-- 
: Eric S Fraga (0xFFFCF67D), Emacs 26.0.50.1, Org release_9.0.3-191-g7404e3


signature.asc
Description: PGP signature


Re: [O] Link type for HTML5 videos

2017-01-24 Thread Rasmus
Arun Isaac  writes:

> It would be nice to have a link type to export HTML5 videos. Currently,
> the only way to insert videos is to use the #+BEGIN_video, #+END_video
> block with literal #+HTML in them. This seems a little kludgy. Thoughts?

I think this is a good idea.  You can check if HTML5 is expected output.
IMO, it's not much different from doing the "right thing" for tikz files
in LaTeX.

Rasmus

-- 
This space is left intentionally blank




Re: [O] VM for org-based reproducible environment?

2017-01-24 Thread Rasmus
Matt Price  writes:

> I'd like to provide a way for people to copy my course materials in the
> easiest possible way. At present my export & grading processes rely on some
> customization of various tools, mostly emacs-based. So I'm thinking the
> easiest thing might be fore me to define a virtual machine, maybe
> docker-based, and distribute that.

Docker might be handy if you need a whole array of tools, say R, Org, a
number of libraries etc etc.  It's not too complicated to created new
docker images and you can host/compile them on "dockerhub".  You can find
the files that create docker images on e.g. github.

Personally, I use an external config.el file to publish files against the
ELPA version of Org.

Something like,

emacs --batch --no-init-file --load paper-config/org-conf.el --find-file $1 
--funcall $2

In addition, I compile the papers with gitlab-ci.  You can include
instructions of what software is needed in the .gitlab-ci.yml.

You might also be able to use something like Guix.  I think it can even be
used to create docker images these days.

Hope it helps,
Rasmus

-- 
History is what should never happen again




[O] is it bad to have both org and org-plus-contrib installed?

2017-01-24 Thread Alan Schmitt
Hello,

I recently had one of those transient problems that go away when
reinstalling org (the one where no code block can be executed). As I was
doing so, I noticed that I had both org and org-plus-contrib installed,
visibly because some packages depend on org.

Is this a bad thing? And is there a way to make sure package
dependencies pick up org-plus-contrib when it is installed, and do not
install org as well?

Thanks,

Alan

-- 
OpenPGP Key ID : 040D0A3B4ED2E5C7
Monthly Athmospheric CO₂, Mauna Loa Obs. 2016-12: 404.48, 2015-12: 401.85


signature.asc
Description: PGP signature


Re: [O] run a function during capture

2017-01-24 Thread Alan Schmitt
On 2017-01-23 13:56, Nick Dokos  writes:

> Alan Schmitt  writes:
>
>> ...
>> - I added a hook to org-capture-after-finalize-hook
>   ^
>>   #+begin_src emacs-lisp
>>   (defun as/do-org-board-dl-hook ()
>> (when (equal (buffer-name) (concat "CAPTURE-" as/org-board-capture-file))
>>   (org-board-archive)))
>>
>>   (add-hook 'org-capture-before-finalize-hook 'as/do-org-board-dl-hook)
>^^
>>   #+end_src
>>
>> (Note: I mistakenly said that the "prepare" hook worked, but that would
>  ^^^
>> download the file even when cancelling, which was wrong)
>
> Make up your mind, will you? :-)

As you can guess, I was testing as I was editing the message. As always,
the code is the truth™.

For the record, here is what I discovered:
- the prepare hook is run even when cancelling
- the before hook is run with the buffer widened, but the point is still
in the same position as when confirming pointer
- when the after hook is run, I did not get access to the captured data
(I may have done it wrong, but since the before hook worked, I did not
look further)

Best,

Alan

-- 
OpenPGP Key ID : 040D0A3B4ED2E5C7
Monthly Athmospheric CO₂, Mauna Loa Obs. 2016-12: 404.48, 2015-12: 401.85


signature.asc
Description: PGP signature