Re: [O] Inserting todo time range

2019-06-29 Thread Spenser Truex
Michael Welle  writes:

> Hello,
>
> Raimund Kohl-Füchsle  writes:
> [...]
>> If instead I would use
>>
>>** TODO Test Time range
>>
>>     <2004-08-23 Mon>--<2004-08-26 Thu>
>>
>> then this for org-mode would just be one todo; if I mark it done on
>> Mon all other days are marked as done, too.
>>
>> So how would I schedule a daily TODO only, say, this week from Mo -
>> Fr?
> well, I think there are only wuerg-arounds to gain the desired
> behaviour. First, you can use a sexp to specify the days on which your
> task will be inserted into your agenda:
>
> SCHEDULED: <%%(memq (calendar-day-of-week date) '(1 2 3 4 5))>
>
> But with that your task is done when you set it to done. Something
> like the following isn't perfect, but seems to work:
>
>
> ** TODO foobar
>DEADLINE: <2020-01-04 Sat +1d>
>SCHEDULED: <%%(memq (calendar-day-of-week date) '(1 2 3 4 5))>
>[2019-03-31 Sun] 

I have also been wanting to be able to do this in my agenda, so I can
have my daily M-F schedule in my org-agenda buffer.

What would it take to write ORG to behave properly on a TODO range like that?
-- 
Spenser Truex
use...@spensertruex.com
https://spensertruex.com/
San Francisco, USA




Re: [O] Insert time in Org-mode

2019-06-29 Thread Spenser Truex
Daniele Nicolodi  writes:

> On 25/06/2019 22:54, Spenser Truex wrote:
>> "Fraga, Eric"  writes:
>> 
>>> On Tuesday, 25 Jun 2019 at 18:41, gmx wrote:
 How to insert the current time? 
>>>
>>> Easiest immediate way is to insert an inactive time stamp by C-u C-c !
>>> RET.
>> 
>> Robert Pluim  writes:
>> 
>>> C-u M-x org-time-stamp
>>>
>>> will prompt for a date and insert it along with the current time (I
>>> bind org-time-stamp to "C-c ." for convenience)
>>>
>> 
>> Strange, my system does not insert the current time, only the date. I
>> have to insert the time manually. Same for inactive and active stamps.
>> I'm on the latest master versions.
>
> For it to insert the time you need a prefix argument (C-u) to
> org-time-stamp, so it should be "C-u C-c ." to add an active time-stamp
> and "C-u C-c !" for an inactive one.
>

This worked, I must have simply neglected to use the prefix.

Thank you
-- 
Spenser Truex
use...@spensertruex.com
https://spensertruex.com/
San Francisco, USA




Re: [O] org-drill futures

2019-06-29 Thread Phillip Lord
phillip.l...@russet.org.uk (Phillip Lord) writes:

> Nicolas Goaziou  writes:
>
>> Hello,
>>
>> phillip.l...@russet.org.uk (Phillip Lord) writes:
>>
>>> I've launched an fork of org-drill. I have tried to reach Paul Sexton,
>>> the original author, and had some feedback (he was happy for my take
>>> over), but not managed to get the repository moved.
>>>
>>> https://gitlab.com/phillord/org-drill/
>>>
>>> I'd like to have this be the version that ends up in contrib. Can anyone
>>> tell me how to achieve this?
>>
>> I would suggest the opposite: move it to GNU ELPA, for example, so we
>> can remove it from contrib.
>>
>> WDYT?
>
>
> Yes, I am quite happy with that also -- it would save the effort of
> syncing it. It would have to be MELPA though, because I don't think we
> have papers (I can check). This does have the disadvantage of requiring
> people to update their config/installed packages, but it's probably
> okay.
>
> I'd plan to incorporate org-learn into org-drill -- I suspect everyone
> using org-learn is using it via org-drill, so winding it in makes sense,
> so I'd need to remove both.
>
> I'll see how MELPA are with adding my fork there; if they are happy,
> once that it up and running it could be pulled from contrib.



org-drill is up on MELPA now. It's been cleaned up a lot, and a few bugs
fixed. And, I have no doubt, more new ones introduced, as I have touched
about half of the lines of code.

So, I think it can come out of contrib now, and the website updated. I
have also wound in org-learn.el. How many users that on its own I do not
know, so, it's hard to know whether it needs to remain or not;
regardless, org-drill is no longer a reason for keeping it.

Cheers

Phil



Re: [O] Equivalent of timeline?

2019-06-29 Thread James Harkins

On June 29, 2019 06:45:51 Samuel Wales  wrote:


i was going to code the following, and documented it first,
but cannot code it.  maybe it
will be of smoe use in thinking about the problem.


Sure, those are good tips. Much appreciated! I don't mind taking it from 
there (though I probably can't do it quickly). I think my need in this case 
is simpler than yours -- I won't have multiple timestamps per outline node.



i think timeline (L) was retired from org because it
code-rotted as org developed new features, and it only
supported one file, which goes against org's sylvan (forest)
philosophy.


Sure -- features get dropped for legitimate reasons, but that always causes 
some user pain, too. Might have been nice to document an alternative rather 
than just making it a lot harder. (I don't really care if it's specifically 
"timeline" or something else, but I also don't think it should require a 
dive into the API to do something that had been easy.)


hjh

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







Re: [O] Cut and paste an entry programmatically

2019-06-29 Thread Michael Brand
Hi Kyle

On Sat, Jun 29, 2019 at 2:58 AM Kyle Meyer  wrote:

> Hmm I don't consider that a bug.  It's documented behavior for kill
> commands to append to the last kill when called successively.
>
> ,[ C-h f kill-region RET ]
> | [...]
> | Any command that calls this function is a "kill command".
> | If the previous command was also a kill command,
> | the text killed this time appends to the text killed last time
> | to make one entry in the kill ring.
> | [...]
> `

Although I knew of course that ~C-k C-k~ appends it didn't ring the
bell it should have. And I was not aware of the concept of a "kill
command" which can make my function a "kill command", _depending on
how it is invoked_.

> In addition to what Samuel posted, another way for a lisp caller to
> avoid the append behavior if desired is to let-bind this-command so that
> kill-region's attempt to set it to kill-region doesn't work.  Using your
> example, that'd be
>
> #+begin_src emacs-lisp
> (defun temp ()
>   (let (this-command)
> (org-cut-subtree))
>   (org-forward-heading-same-level 2)
>   (org-paste-subtree))
> #+end_src

This is what I have been looking for, thank you.

Michael