Re: [O] Link type for HTML5 videos

2017-01-22 Thread Arun Isaac

I was thinking of something like

#+ATTR_HTML: controls
#+POSTER: quadratic.png
video:quadratic.webm

exporting to the following HTML.



> That looks too rich for a link to me unless alot of it is always the
> same, or derived, e.g. the id tags.

It is quite rich. But, note that even img tags, especially with the
newer 'srcset' and 'sizes' attributes, are quite rich. Yet, we use links
to insert inline images. If videos cannot be properly handled by links,
neither can images.

> Something like this is what a link would look like:
>
> video:quadratic.webm
>
> and the html export could certainly generate what you put in the html
> block below.
>
> See
> http://kitchingroup.cheme.cmu.edu/blog/2016/11/04/New-link-features-in-org-9/
> for how to make a link, try it and report back if it is useful.

I can use the new link features to develop something that works for my
particular use case. No issues with that. But, I was wondering if a more
general video link type can be developed for inclusion into org mode itself.


signature.asc
Description: PGP signature


[O] bug#25132: 26.0.50; emacs hangs when loading org file with python source blocks

2017-01-22 Thread Dmitry Gutov

On 20.01.2017 03:52, npost...@users.sourceforge.net wrote:


My feeling is that inhibit-modification-hooks should usually be buffer
local anyway.


Maybe you're right.

inhibit-read-only, bound nearby, seems to be in the same situation.


If we are not, why not make inhibit-modification-hooks always
buffer-local instead?


It would have to be in addition to, because even after doing
(make-variable-buffer-local 'var), (let ((var 'foo))...) still makes a
global binding.  `make-variable-buffer-local' only has effect for
`setq', which I think will hardly ever happen for
`inhibit-modification-hooks'.


You're right, and that sounds a little too complicated for my taste.

So, personally, I'd try to fix the particular instance first. Switching 
buffers inside with-silent-modifications is not a very common usage, I 
think.


Maybe org-src should itself let-bind the aforementioned variable(s) 
where it visits other buffers.


Up to you, of course, since you've already been given the go-ahead for 
the proposed fix.






Re: [O] Link type for HTML5 videos

2017-01-22 Thread Scott Randby
On 01/22/2017 04:59 PM, John Kitchin wrote:
> That looks too rich for a link to me unless alot of it is always the
> same, or derived, e.g. the id tags.

That is why I said that agreeing on the default HTML export for the link
type will be difficult.

Scott

> 
> Something like this is what a link would look like:
> 
> video:quadratic.webm
> 
> and the html export could certainly generate what you put in the html
> block below.
> 
> See
> http://kitchingroup.cheme.cmu.edu/blog/2016/11/04/New-link-features-in-org-9/
> for how to make a link, try it and report back if it is useful
> 
> Scott Randby writes:
> 
>> On 01/22/2017 01:22 PM, John Kitchin wrote:
>>> What would these links look like? And what should they render too?
>>
>> I wasn't suggesting support for the idea, I was just suggesting that it
>> makes sense to to both video and audio if they are to be done.
>>
>> However, I currently use export blocks to do video and audio export. I
>> don't have a problem with continuing that practice since it works well
>> for me. Here are two examples:
>>
>> #+begin_export html
>> 
>>   > id="audio-tag"
>> controls
>> preload="metadata">
>> 
>> Your browser does not support the audio tag.
>>   
>> 
>> #+end_export
>>
>> #+begin_export html
>> 
>>   > id="video-tag"
>> src="quadratic.webm"
>> controls
>> preload="metadata">
>> Your browser does not support the video tag.
>>   
>> 
>> #+end_export
>>
>> Styling is done via a CSS file.
>>
>> It might be difficult to agree on what a video or audio link type
>> renders to by default.
>>
>> Scott
>>
>>>
>>>
>>> On Sun, Jan 22, 2017 at 1:09 PM Scott Randby >> > wrote:
>>>
>>> On 01/22/2017 12:15 PM, Arun Isaac wrote:
>>>
>>> >
>>>
>>> > 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?
>>>
>>>
>>>
>>> If there is to be a link type to videos, then I think there should be
>>>
>>> one for audio too.
>>>
>>>
>>>
>>> Scott Randby
>>>
>>>
>>>
>>> >
>>>
>>> > Thanks,
>>>
>>> > Arun Isaac.
>>>
>>> >
>>>
>>>
>>>
> 
> 



[O] jit-lock org-goto

2017-01-22 Thread edgar

Hello,

This is not very important, and I apologise in advance for not sending 
all the information that you may need. I was RTFM, and tried `C-c C-j' 
(`org-goto'). Instead of the desired function, I got this in my 
*Messages* stack:



Making org-startup-folded buffer-local while locally let-bound!
run-hooks: Symbol's function definition is void: latex-math-mode
Not enabling jit-lock: it does not work in indirect buffer


I don't care too much about it right now, but it would be nice to know 
why this happens. If you need more information, I can provide it. I just 
don't know what you need :) . Thanks!




-

ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the 
NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!  
15GB disk! No bandwidth quotas!
Commercial and Bulk Mail Options!  



Re: [O] Link type for HTML5 videos

2017-01-22 Thread John Kitchin
That looks too rich for a link to me unless alot of it is always the
same, or derived, e.g. the id tags.

Something like this is what a link would look like:

video:quadratic.webm

and the html export could certainly generate what you put in the html
block below.

See
http://kitchingroup.cheme.cmu.edu/blog/2016/11/04/New-link-features-in-org-9/
for how to make a link, try it and report back if it is useful.

Scott Randby writes:

> On 01/22/2017 01:22 PM, John Kitchin wrote:
>> What would these links look like? And what should they render too?
>
> I wasn't suggesting support for the idea, I was just suggesting that it
> makes sense to to both video and audio if they are to be done.
>
> However, I currently use export blocks to do video and audio export. I
> don't have a problem with continuing that practice since it works well
> for me. Here are two examples:
>
> #+begin_export html
> 
>id="audio-tag"
> controls
> preload="metadata">
> 
> Your browser does not support the audio tag.
>   
> 
> #+end_export
>
> #+begin_export html
> 
>id="video-tag"
> src="quadratic.webm"
> controls
> preload="metadata">
> Your browser does not support the video tag.
>   
> 
> #+end_export
>
> Styling is done via a CSS file.
>
> It might be difficult to agree on what a video or audio link type
> renders to by default.
>
> Scott
>
>> 
>> 
>> On Sun, Jan 22, 2017 at 1:09 PM Scott Randby > > wrote:
>> 
>> On 01/22/2017 12:15 PM, Arun Isaac wrote:
>> 
>> >
>> 
>> > 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?
>> 
>> 
>> 
>> If there is to be a link type to videos, then I think there should be
>> 
>> one for audio too.
>> 
>> 
>> 
>> Scott Randby
>> 
>> 
>> 
>> >
>> 
>> > Thanks,
>> 
>> > Arun Isaac.
>> 
>> >
>> 
>> 
>> 


-- 
Professor John Kitchin
Doherty Hall A207F
Department of Chemical Engineering
Carnegie Mellon University
Pittsburgh, PA 15213
412-268-7803
@johnkitchin
http://kitchingroup.cheme.cmu.edu



Re: [O] Link type for HTML5 videos

2017-01-22 Thread Scott Randby
On 01/22/2017 01:22 PM, John Kitchin wrote:
> What would these links look like? And what should they render too?

I wasn't suggesting support for the idea, I was just suggesting that it
makes sense to to both video and audio if they are to be done.

However, I currently use export blocks to do video and audio export. I
don't have a problem with continuing that practice since it works well
for me. Here are two examples:

#+begin_export html

  

Your browser does not support the audio tag.
  

#+end_export

#+begin_export html

  
Your browser does not support the video tag.
  

#+end_export

Styling is done via a CSS file.

It might be difficult to agree on what a video or audio link type
renders to by default.

Scott

> 
> 
> On Sun, Jan 22, 2017 at 1:09 PM Scott Randby  > wrote:
> 
> On 01/22/2017 12:15 PM, Arun Isaac wrote:
> 
> >
> 
> > 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?
> 
> 
> 
> If there is to be a link type to videos, then I think there should be
> 
> one for audio too.
> 
> 
> 
> Scott Randby
> 
> 
> 
> >
> 
> > Thanks,
> 
> > Arun Isaac.
> 
> >
> 
> 
> 



Re: [O] [PATCH] import org2tc scripts from John Wiegly into org-mode

2017-01-22 Thread Antoine Beaupré
On 2017-01-22 14:13:30, Nicolas Goaziou wrote:
> Hello,
>
> Antoine Beaupré  writes:
>
>> this was taken from this Github repo with the author's approval:
>>
>> https://github.com/jwiegley/org2tc
>>
>> this is very useful to convert org-mode clock entries into the more
>> easily parseable timeclock.el format, a fundamental step in automating
>> billing with org-mode.
>
> Thank you.
>
> However, I don't see any particular reason to distribute it within Org
> (or within "timeclock.el", for that matter). It can happily live on
> github (or somewhere else), can't it?
>
> If it were written in Elisp, it could also go into GNU ELPA.

The main reason for this is that it's just this one tiny little
script. It seems silly to have a whole repo for it - and there are other
such scripts in contrib/scripts already...

I do not, unfortunately, have time to rewrite this in elisp just now. ;)

A.

-- 
People arbitrarily, or as a matter of taste, assigning numerical values
to non-numerical things. And then they pretend that they haven't just
made the numbers up, which they have. Economics is like astrology in
that sense, except that economics serves to justify the current power
structure, and so it has a lot of fervent believers among the powerful.
- Kim Stanley Robinson, Red Mars



[O] more global keys in ox-bibtex

2017-01-22 Thread Sébastien Le Maguer
Dear All,

I did a mini-patch to capture completely the key in bibtex export. For example 
for the following key, in the bibtex2html produced file:

Balestri etal., 1999

only Balestri will be captured instead of Balestri etal., 1999

As it is 3 characters, I just submit the patch here and hope it might help :)

Kind regards,
Sébastien
diff --git a/contrib/lisp/ox-bibtex.el b/contrib/lisp/ox-bibtex.el
index 56dec38..fb34a5e 100644
--- a/contrib/lisp/ox-bibtex.el
+++ b/contrib/lisp/ox-bibtex.el
@@ -235,7 +235,7 @@ Return new parse tree."
 	  ;; Update `org-bibtex-html-entries-alist'.
 	  (goto-char (point-min))
 	  (while (re-search-forward
-		  "a name=\"\\([-_a-zA-Z0-9:]+\\)\">\\(\\w+\\)" nil t)
+		  "a name=\"\\([-_a-zA-Z0-9:]+\\)\">\\([^<]+\\)" nil t)
 		(push (cons (match-string 1) (match-string 2))
 		  org-bibtex-html-entries-alist)))
 	;; Open produced HTML file, wrap references within a block and

--
Dr. Sébastien Le Maguer
Postdoctorate researcher

Saarland University
Campus C7.4 - room 2.03
D-66123 Saarbrücken
Germany

phone : +49-681-302-70030
Mail: slemag...@coli.uni-saarland.de
website :  http://www.coli.uni-saarland.de/~slemaguer/


Re: [O] Link type for HTML5 videos

2017-01-22 Thread John Kitchin
What would these links look like? And what should they render too?


On Sun, Jan 22, 2017 at 1:09 PM Scott Randby  wrote:

> On 01/22/2017 12:15 PM, Arun Isaac wrote:
>
> >
>
> > 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?
>
>
>
> If there is to be a link type to videos, then I think there should be
>
> one for audio too.
>
>
>
> Scott Randby
>
>
>
> >
>
> > Thanks,
>
> > Arun Isaac.
>
> >
>
>
>
>


Re: [O] Link type for HTML5 videos

2017-01-22 Thread Scott Randby
On 01/22/2017 12:15 PM, Arun Isaac wrote:
> 
> 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?

If there is to be a link type to videos, then I think there should be
one for audio too.

Scott Randby

> 
> Thanks,
> Arun Isaac.
> 



[O] Can a Latex Image size be configurable?

2017-01-22 Thread Young-whan
Hi,

I'm using ToT org ( Org mode version 9.0.3 (release_9.0.3-261-g4696d6.dirty
@ /Applications/MacPorts/Emacs.app/Contents/Resources/lisp/org/) )

Comparing to 8.2 version, the latex image is too small.

Is there a way to configure the latex image size globally/locally?


[O] Link type for HTML5 videos

2017-01-22 Thread Arun Isaac

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?

Thanks,
Arun Isaac.


signature.asc
Description: PGP signature


Re: [O] Latex Preview Fragment is not working on org 9.0.3 from elpa

2017-01-22 Thread Young-whan
Thank you,

and, could you let me know what version would be gotten this fix, please?

On Sat, Jan 21, 2017 at 2:59 AM, Nicolas Goaziou 
wrote:

> Hello,
>
> Young-whan  writes:
>
> > Looks like it is a bug? Why it is not loaded automatically while 8.2 has
> no
> > issue?
>
> Fixed. Thank you.
>
> Regards,
>
> --
> Nicolas Goaziou
>


Re: [O] How to set the scheduled property programmatically?

2017-01-22 Thread Michael Welle
Hello,

Michael Welle  writes:

> Hello,
>
> what is the correct way to set the property? I tried
>
> (org-entry-put pom "SCHEDULED" "<2017-01-01 Sun ++1w>")
>
> which results in
>
> SCHEDULED: <2017-01-01 Sun>
>
> As you can see, the 'repeater' is missing.
org-cancel-repeater uses regexp search and replace to manipulate the
repeater. I guess that is a hint that I have do to that as well?

Regards
hmw




Re: [O] Recurring tasks and arbitrary properties

2017-01-22 Thread Michael Welle
Hello,

Nicolas Goaziou  writes:

> Michael Welle  writes:
>
>> later means a lot later ;). Maybe months or even years. My personal use
>> case is, that I have dozens of recurring tasks. Now I leave the country
>> for a few months. The tasks only make sense, when I am here. So I want to
>> disable them and enable them, when I'm back. I can't use
>> org-cancel-repeater, because that loses the repeater.
>
> You can also COMMENT them, or archive them.
yes, but that is so I lack the right word ;). I think, the
semantically right way to do it is to set the state of the task to
'Cancelled' or 'Stopped' or something like that. But that doesn't
work as long as the repeater is > 0. That's the reason why I want to
backup the value of the scheduled property and later restore it.

Regards
hmw



Re: [O] Recurring tasks and arbitrary properties

2017-01-22 Thread Nicolas Goaziou
Michael Welle  writes:

> later means a lot later ;). Maybe months or even years. My personal use
> case is, that I have dozens of recurring tasks. Now I leave the country
> for a few months. The tasks only make sense, when I am here. So I want to
> disable them and enable them, when I'm back. I can't use
> org-cancel-repeater, because that loses the repeater.

You can also COMMENT them, or archive them.

Regards,



Re: [O] Recurring tasks and arbitrary properties

2017-01-22 Thread Michael Welle
Hello,

Nicolas Goaziou  writes:

> Michael Welle  writes:
>
>> I want to 'hide' the value of the SCHEDULED property and later restore
>> it. I can use inactive time stamps. But that means that I have to change
>> the value when deactivating the task and again, later when I activate
>> the task again. But it would have been nicer without doing so ;).
>
> It depends on what means "later". If it means "right after doing
> something to the headline", you could also store the actual time stamp
> in the lexical closure of a call-back function, without using a property
> drawer.
>
> There is `org-toggle-timestamp-type', too. We could extend it to process
> time stamp strings.
later means a lot later ;). Maybe months or even years. My personal use
case is, that I have dozens of recurring tasks. Now I leave the country
for a few months. The tasks only make sense, when I am here. So I want to
disable them and enable them, when I'm back. I can't use
org-cancel-repeater, because that loses the repeater.

There was a question on the ml about disabling recurring tasks many
moons ago. I will incorporate my new knowledge about properties into my
functions and then reply to that question.

Regards
hmw






Re: [O] 9.1.3.2 Template expansion: documentation issue

2017-01-22 Thread Nicolas Goaziou
Hello,

Karl Eichwalder  writes:

> In 9.1.3.2 Template expansion, you say:
>
>  %\n Insert the text entered at the nth %^{PROMPT}, where
> ‘n’ is
>
> but in my 25.1.1, you must use "%\\n".

No, you mustn't. The placeholder really is "%\n", but Elisp require
backslash characters to be escaped in strings. So, when you write your
template as a string, you use "%\\n" because it is the only way to have
"%\n".

> Maybe, it is also worth noting that
>
>  %^{PROP}p   Prompt the user for a value for property PROP.
>
> will get inserted at the end of a list of properties, but white-space
> will stay
> in place:
>
>  :PROP_A:   a
>  %^{PROP}p
>  :PROP_Z:   z
>
> ==>
>
>  :PROP_A:   a
>
>  :PROP_Z:   z
>  :PROP: foo
>
> To avoid white-space issues and an unexpected sorting order, you must
> write (and you lose the preset values):
>
>  :PROPERTIES:%^{PROP_A}p%^{PROP}p%^{PROP_Z}p

You are mis-using %^{prop}p. Granted, `org-capture-templates' docstring
is not particularly clear on this point.

Unlike other placeholders %^{prop}p can be used anywhere in the
template, since it delegates its job to `org-entry-put'. As
a consequence, you shouldn't put it where you expect the property to be
inserted.

Besides, there is no order in properties drawers, so there is no
guarantee that `org-entry-put' will preserve yours.

Would you want to suggest a better wording to explain this in
`org-capture-templates' docstring (and in the related part of the
manual)?

Regards,

-- 
Nicolas Goaziou



Re: [O] org-entry-delete vs org-entry-put

2017-01-22 Thread Michael Welle
Hello,

Nicolas Goaziou  writes:

> Hello,
>
> Michael Welle  writes:
>
>> 1. Property names like DISABLED-SCHEDULED seem to be problematic. I
>>guess the regexp matching the scheduled property is too greedy.
>
> What exactly is problematic? Could you expound a bit?
no, I can reproduce it today... My initial idea was to use something
like that: 

(org-entry-put pom "DISABLED-SCHEDULED" "bar")

But the created property was always named DISABLED-SCHED or DISABLED-SCHE
I can't remember exactly how the regexp matching part was meant. I tried
that a few times and every property with SCHEDULED in its name failed
that way. Sorry for the noise. 


>> 2. (org-entry-put pom "SCHEDULED" nil) removes the property, but
>>(org-entry-delete pom "SCHEDULED")  doesn't.
>
> Fixed: `org-entry-delete' now deletes wrong "SCHEDULED" property. Thank
> you.
Thank you.


>
>>On the other hand,   
>>(org-entry-put pom "foo" nil) doesn't remove the property, but
>>(org-entry-delete pom "foo")  does.
>
> I don't see any problem here given the docstring of `org-entry-put'.
No, there is no problem. I just wanted to point out, that o-e-p and
o-e-d behave different, if fed with a well known property like SCHEDULE
and a property like foo. I have no preference if (o-e-d pom "SCHEDULED")
deletes the property (like it is now) or if (o-e-p pom "foo" nil)
deletes the non well known properties. 

Regards
hmw



Re: [O] Recurring tasks and arbitrary properties

2017-01-22 Thread Nicolas Goaziou
Michael Welle  writes:

> I want to 'hide' the value of the SCHEDULED property and later restore
> it. I can use inactive time stamps. But that means that I have to change
> the value when deactivating the task and again, later when I activate
> the task again. But it would have been nicer without doing so ;).

It depends on what means "later". If it means "right after doing
something to the headline", you could also store the actual time stamp
in the lexical closure of a call-back function, without using a property
drawer.

There is `org-toggle-timestamp-type', too. We could extend it to process
time stamp strings.

Regards,



Re: [O] org-entry-delete vs org-entry-put

2017-01-22 Thread Nicolas Goaziou
Hello,

Michael Welle  writes:

> 1. Property names like DISABLED-SCHEDULED seem to be problematic. I
>guess the regexp matching the scheduled property is too greedy.

What exactly is problematic? Could you expound a bit?

> 2. (org-entry-put pom "SCHEDULED" nil) removes the property, but
>(org-entry-delete pom "SCHEDULED")  doesn't.

Fixed: `org-entry-delete' now deletes wrong "SCHEDULED" property. Thank
you.

>On the other hand,   
>(org-entry-put pom "foo" nil) doesn't remove the property, but
>(org-entry-delete pom "foo")  does.

I don't see any problem here given the docstring of `org-entry-put'.

Regards,

-- 
Nicolas Goaziou



Re: [O] Recurring tasks and arbitrary properties

2017-01-22 Thread Michael Welle
Hello,

Nicolas Goaziou  writes:

> Michael Welle  writes:
>
>> Nicolas Goaziou  writes:
>>>
>>> Michael Welle  writes:
>>>
 a task like this behaves like a recurring task, i.e. if I set the task
 state to DONE it is automatically switched back to TODO. Is that the
 intended behaviour?

 * TODO task1
   :PROPERTIES:
   :FOO: <2017-03-12 Sun ++1w>
   :END:
>>>
>>> Historically, location of regular (i.e., non scheduled non deadline)
>>> active time stamps in an entry has always been sloppy. In particular,
>>> Org Agenda happily processes active time stamps in properties drawers.
>>>
>>> IMO, this shouldn't be the case, but I can see a use for it and doing
>>> otherwise would probably break a lot of documents for little benefit.
>>>
>>> So, yes, this is the intended behaviour.
>>
>> hmm, what's a good way to work around that? Removing, let's say, the
>> brackets before storing that value?
>
> Couldn't you use inactive time stamps?
I want to do something like this:


(defun hmw/org-deactivate-recurring-task ()
  "Deactivate a recurring task. The value of the SCHEDULED property is
stored in the property referenced by `hmw/org-scheduled-property-backup',
so it can be restored later. The task's state is set to the value of
`hmw/org-deactivated-recurring-task-state'." 
  (interactive)
  (when (org-entry-is-todo-p)
(save-excursion
  (org-back-to-heading t)
  (let* ((pom (point-at-bol))
 (val (org-entry-get pom "SCHEDULED")))
(if val
(progn
  (org-entry-put pom hmw/org-scheduled-property-backup val)
  (org-entry-put pom "SCHEDULED" nil)
  (org-todo hmw/org-deactivated-recurring-task-state)))


I want to 'hide' the value of the SCHEDULED property and later restore
it. I can use inactive time stamps. But that means that I have to change
the value when deactivating the task and again, later when I activate
the task again. But it would have been nicer without doing so ;).

Thanks for your help.

Regards
hmw



Re: [O] Recurring tasks and arbitrary properties

2017-01-22 Thread Nicolas Goaziou
Michael Welle  writes:

> Nicolas Goaziou  writes:
>>
>> Michael Welle  writes:
>>
>>> a task like this behaves like a recurring task, i.e. if I set the task
>>> state to DONE it is automatically switched back to TODO. Is that the
>>> intended behaviour?
>>>
>>> * TODO task1
>>>   :PROPERTIES:
>>>   :FOO: <2017-03-12 Sun ++1w>
>>>   :END:
>>
>> Historically, location of regular (i.e., non scheduled non deadline)
>> active time stamps in an entry has always been sloppy. In particular,
>> Org Agenda happily processes active time stamps in properties drawers.
>>
>> IMO, this shouldn't be the case, but I can see a use for it and doing
>> otherwise would probably break a lot of documents for little benefit.
>>
>> So, yes, this is the intended behaviour.
>
> hmm, what's a good way to work around that? Removing, let's say, the
> brackets before storing that value?

Couldn't you use inactive time stamps?

Regards,



Re: [O] extra paragraph in image export?

2017-01-22 Thread Nicolas Goaziou
Hello,

Matt Price  writes:

> 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">
> 
>
>
> At least in ox-reveal, this makes it quite difficult to address images
> separately from text (e.g., to set the text-align property appropriately.
> You can try this if you have ox-reveal installed with any simple image:
> --
> * Test
> [[https://imgs.xkcd.com/comics/proof_2x.png]]
>
> 
> At least on my machine, the image won't be centered in the resultant slide,
> and it will be hard to construct CSS to fix the issue.
>
> Is there a strong reason to include the  tag? I've removed it from
> org-html--wrap-image and haven't noticed any ill effects so far, but
> haven't done much testing.

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 ?


Regards,

-- 
Nicolas Goaziou



Re: [O] Recurring tasks and arbitrary properties

2017-01-22 Thread Michael Welle
Hello,

Nicolas Goaziou  writes:

> Hello,
>
> Michael Welle  writes:
>
>> a task like this behaves like a recurring task, i.e. if I set the task
>> state to DONE it is automatically switched back to TODO. Is that the
>> intended behaviour?
>>
>> * TODO task1
>>   :PROPERTIES:
>>   :FOO: <2017-03-12 Sun ++1w>
>>   :END:
>
> Historically, location of regular (i.e., non scheduled non deadline)
> active time stamps in an entry has always been sloppy. In particular,
> Org Agenda happily processes active time stamps in properties drawers.
>
> IMO, this shouldn't be the case, but I can see a use for it and doing
> otherwise would probably break a lot of documents for little benefit.
>
> So, yes, this is the intended behaviour.
hmm, what's a good way to work around that? Removing, let's say, the
brackets before storing that value? 

Regards
hmw



Re: [O] [PATCH] import org2tc scripts from John Wiegly into org-mode

2017-01-22 Thread Nicolas Goaziou
Hello,

Antoine Beaupré  writes:

> this was taken from this Github repo with the author's approval:
>
> https://github.com/jwiegley/org2tc
>
> this is very useful to convert org-mode clock entries into the more
> easily parseable timeclock.el format, a fundamental step in automating
> billing with org-mode.

Thank you.

However, I don't see any particular reason to distribute it within Org
(or within "timeclock.el", for that matter). It can happily live on
github (or somewhere else), can't it?

If it were written in Elisp, it could also go into GNU ELPA.

Regards,

-- 
Nicolas Goaziou



Re: [O] Recurring tasks and arbitrary properties

2017-01-22 Thread Nicolas Goaziou
Hello,

Michael Welle  writes:

> a task like this behaves like a recurring task, i.e. if I set the task
> state to DONE it is automatically switched back to TODO. Is that the
> intended behaviour?
>
> * TODO task1
>   :PROPERTIES:
>   :FOO: <2017-03-12 Sun ++1w>
>   :END:

Historically, location of regular (i.e., non scheduled non deadline)
active time stamps in an entry has always been sloppy. In particular,
Org Agenda happily processes active time stamps in properties drawers.

IMO, this shouldn't be the case, but I can see a use for it and doing
otherwise would probably break a lot of documents for little benefit.

So, yes, this is the intended behaviour.

Regards,

-- 
Nicolas Goaziou



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

2017-01-22 Thread Nicolas Goaziou
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.

Regards,

-- 
Nicolas Goaziou



[O] Table formula from code block

2017-01-22 Thread Roger Mason
Hello,

I have these code blocks:



#+BEGIN_SRC sh :tangle "skribilo_to_engine.sh"
#!/usr/local/bin/bash
infile=$3
engine=$2
skribilo=$1/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

#+BEGIN_SRC sh :results none
chmod u+x skribilo_to_engine.sh
#+END_SRC

#+NAME: skribilo_to_engine
#+BEGIN_SRC sh :results output replace :var path="/opt/skribilo-git/bin" :var 
engine="" :var infile="Author_7960"
./skribilo_to_engine.sh $path $engine $infile
#+END_SRC
===


I tangle the code block and make it executable.  I think it should be
possible to run the code blocks from the table, but it errors out:

#+tblname: summaries
| engine  | To Engine |
|-+---|
| context | #ERROR|
#+TBLFM: $2='(org-sbe "skribilo_to_engine" (engine $1) )

(See
http://orgmode.org/worg/org-contrib/babel/intro.html#arguments-to-source-code-blocks).

What am I doing wrong?

Thanks,
Roger

GNU Emacs 25.1.1 (i386-portbld-freebsd10.1, GTK+ Version 2.24.29) of
2016-11-04

Org mode version 9.0.3 (release_9.0.3-170-gfed1cf)



Re: [O] remote ref in spreadsheets

2017-01-22 Thread Michael Welle
Hello,

so, two years and two yearly tables later I solved the problem. I
couldn't see how to get that to work with orgaggregate, so I tried a
different approach. My tables look like follows:

* Tables
#+NAME: overview
| Year |  Sum   |
|--+|
| 2017 | 107.90 |
| 2016 |  42.00 |
|--+|
#+TBLFM: $2='(org-table-get-remote-range (concat "BC_" $1) (string ?@ ?I ?I ?$ 
?3));%.2f

** 2017
#+NAME: BC_2017
|+---+|
| 13.01. | foo   |  38.90 |
| 13.01. | bar   |  69.00 |
|+---+|
|| Summe | 107.90 |
#+TBLFM: $3=vsum(@I..@II);%.2f


For every year I have a table named BC_ that sums up some stuff.
What I want is a table that gives an overview about all the sums of
every year. My first approach was to add a new formula to the overview
table every year. That worked for the first couple of years. But I had
to change the cell addresses of every existing formula when adding a new
row and after a few years that became clumsy.

With the above approach I only had to insert a new row into the overview
table and fill in the year into the first column. I could automate that
further and let Org find all tables named BC_. Maybe next year ;).

Regards
hmw



[O] Filter out agenda items using elisp

2017-01-22 Thread Karl Voit
Hi!

I want to write my own flexible narrow function for my agenda using
RegEx.  

I found org-agenda-filter-by-regexp() which seems a perfect hit for
my task. However, I need to call it with a universal prefix in order
to remove lines matching my RegEx:

(defun my-narrow-agenda ()
  "Getting rid of all org-agenda entries matching the RegEx"
  (interactive)
  (setq current-prefix-arg '(4));; "add" prefix C-u
  (org-agenda-filter-by-regexp "\(WAITING\|:reward:\|:lp:\)")
  )

When I call the function when being in my agenda, I get asked for
entering the RegEx string to narrow the items as if I did not state
the prefix-arg nor the regex as parameters.


Then I took a look at org-agenda-filter-by-regexp() (see code
below), found a new best friend in trace-function(), and tried to
mimic the function call for org-agenda-filter-apply() when I do the
task manually/interactive:

(defun my-narrow-agenda ()
  (interactive)
  (org-agenda-filter-apply ("-NEXT.*:\\(@BWG\\|reward\\):" "+") regexp)
  )

This returns wrong number of arguments. But why? I used the exact
output of trace-function().


How can I accomplish my code?



The related code for org-agenda-filter-by-regexp is:

(defun org-agenda-filter-by-regexp (strip)
  "Filter agenda entries by a regular expression.
Regexp filters are cumulative.
With no prefix argument, keep entries matching the regexp.
With one prefix argument, filter out entries matching the regexp.
With two prefix arguments, remove the regexp filters."
  (interactive "P")
  (if (not (equal strip '(16)))
  (let ((flt (concat (if (equal strip '(4)) "-" "+")
 (read-from-minibuffer
  (if (equal strip '(4))
  "Filter out entries matching regexp: "
"Narrow to entries matching regexp: ")
(push flt org-agenda-regexp-filter)
(org-agenda-filter-apply org-agenda-regexp-filter 'regexp))
(org-agenda-filter-show-all-re)
(message "Regexp filter removed")))


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