[O] Feature request for clocktable step

2018-10-11 Thread Marcin Borkowski
Hi Org,

the manual says that I can say ":step day" or ":step week" in my clock
reports.  Could I also be able to say ":step month" or ":step year"?

TIA,

-- 
Marcin Borkowski
http://mbork.pl



Re: [O] Branch "next" garbled

2018-10-11 Thread Kaushal Modi
On Thu, Oct 11, 2018, 9:46 PM Adrian Bradd  wrote:

>
> Sorry if this is obvious, but what is the next branch
>

Simply put, the next branch is even more bleeding edge than the master.

Bleeding-edgeness: next > master > maint

- maint :: gets published to Org Elpa, etc. Right now the version there is
9.1.x. This branch only takes bug and doc fixes right now
- master :: this is the soon(TM)-to-be released Org 9.2 version. This has
quite a many features (including few breaking) on top of Org 9.1.x. As this
version is planned to be released soon, the plan is to not touch this
branch for the time being as it gets tested out more. Touch this only for
doc and bug fixes for Org 9.2.
- next :: This branch is open to all sorts of commits. Changes here won't
be visible until the next to next major Org release (probably 9.3?).

In general, you would always commit to the most stable branch first and
then merge that to the next less stable branch in succession.

The less stable branch always contains all commits (as-is or merged) from
the more stable branch.

It isn't mentioned on worg in the developers section either
> (https://orgmode.org/worg/dev/index.html).
>

My understanding is that the next branch is not a long term thing.

>


[O] Purpose of and documentation for the next branch (was: Re: Branch "next" garbled)

2018-10-11 Thread Adrian Bradd



Not 5 minutes later did I find this in another thread:

Also, I'd like to avoid making changes to "master" branch. It 
should be
considered frozen while we're waiting for Org 9.2. Please 
install next
new features (that one is OK, I guess) in "next" branch, and 
rebase it

on top of "master".


So the next branch is a temporary replacement for master while 
master is frozen awaiting a release?


It might be worth the effort to document the role of the "next" 
branch somewhere.


Perhaps on the worg developer page?

Adrian Bradd  writes:


Hi all,

To prevent further complications with this branch, I suggest to 
treat is
like master and master like maint. I.e., every commit done in 
master is

duplicated into next so that final merge is easier.


Sorry if this is obvious, but what is the next branch?

This is the first I have heard of it (not that my org-fu is all 
that comprehensive). I took a look around but I couldn't find 
any 
details about it in the mail archives. Granted I wasn't 
expecting 
much from a search that included the phrase "next branch". It 
isn't mentioned on worg in the developers section either 
(https://orgmode.org/worg/dev/index.html).


Cheers,


Cheers,

--
Adrian Bradd



Re: [O] Branch "next" garbled

2018-10-11 Thread Adrian Bradd



Hi all,

To prevent further complications with this branch, I suggest to 
treat is
like master and master like maint. I.e., every commit done in 
master is

duplicated into next so that final merge is easier.


Sorry if this is obvious, but what is the next branch?

This is the first I have heard of it (not that my org-fu is all 
that comprehensive). I took a look around but I couldn't find any 
details about it in the mail archives. Granted I wasn't expecting 
much from a search that included the phrase "next branch". It 
isn't mentioned on worg in the developers section either 
(https://orgmode.org/worg/dev/index.html).


Cheers,

--
Adrian Bradd



Re: [O] Skipping the SUBTREE visibility state

2018-10-11 Thread Adrian Bradd



Hello,

Matthew Palermo  writes:

Thankyou for your reply. Sorry I didn't explain myself 
properly. When using
org-cycle (TAB) I often only want to open  an entry (headline) 
to its
CHILDREN visibility state, look at the subheadings (sub-entry 
headlines),
and then fold it back into its FOLDED state. 


You can use C-c TAB (`org-ctrl-c-tab) to unfold CHILDREN of the 
current heading and then TAB to fold them again. Actually C-c TAB 
takes a numeric argument N that allows you to unfold to the Nth 
level of the subtree and TAB will still fold the entire subtree 
instead of further expanding.


I use this with org-datetree formatted buffers when I want to view 
headings from all days in a month.


Cheers,

--
Adrian Bradd



Re: [O] How to add tblname from ob-shell fragments?

2018-10-11 Thread Adrian Bradd



Hi,

You might find John Kitchin's post [1] for assigning captions and 
names to the results of code blocks helpful. I use the method all 
the time for captioning and referencing results when exporting.


[1] 
https://kitchingroup.cheme.cmu.edu/blog/2016/02/26/Adding-captions-and-attributes-to-figures-and-tables-from-code-blocks-in-org-mode/


Cheers,

--
Adrian Bradd



Re: [O] exporting to latex and docx not honouring carriage returns to tabbing

2018-10-11 Thread Tim Cross


Sharon Kimble  writes:

> The first distro that I used was Red Hat, and I bought a copy as that
> was the only way in which you could get hold of it, and a couple of days
> before I was going to install it, Red Hat made it free to download and
> use! And that did not help my mood at all! But I've been trying to find
> what year that was, can anyone tell me please, as I can't find a date
> for it?
>

I started with Slackware in 1994 and then moved to RedHat in 1996
because of RPM and the benefits it provided over Slackware, which at the
time really just had tar.gz archives. The first really popular RedHat
release was probably Vanderbuilt (1997). Zoot (2000) was the first
release to offer ftp download of ISO images. I switched to Debian in
2001 because deb packages had better dependency handling than RPM (at
the time). In about 2010 I swapped to Ubuntu, mainly because I was no
longer that interested in distros and just wanted a system which
worked. I still prefer deb over rpm.

My first latex document was in 1988/1989. Back then it was a DOS
distribution and a pain to get working well! There use to be DOS
sotfware (name I cannot remember) which you installed to give you a
'Unix' like environment - back then, most of my work was on
mainframe/mins (Dec 20/Ultrix, SunOS/Solaris, OSF/Tru64). 

I also do all my work in org and don't write 'native' latex anymore. All
the info I provided before was from the perspective of using org to
generate Latex and then pdf. My setup and document classes are all
defined within org mode configuration options. I run emacs on OSX for
work and Linux at home. The last time I used MS was Windows 3.1 and I
know little about modern MS platforms. MS Office just make me shudder!


-- 
Tim Cross



Re: [O] An Org-based productivity tool

2018-10-11 Thread Samuel Wales
On 10/11/18, Samuel Wales  wrote:
> huge fan of that document though.  :)

norang, that is.



Re: [O] An Org-based productivity tool

2018-10-11 Thread Samuel Wales
On 10/11/18, Roland Everaert  wrote:
> Regarding auto-clocking, you should look at what norang did.
>
> http://doc.norang.ca/org-mode.html

that does not seem like my proposal.  it seems manual and complex.
i'd never be able to use it.  for a similar reason, i'd never be able
to use gtd.

huge fan of that document though.  :)



Re: [O] How to make agenda generation faster

2018-10-11 Thread Samuel Wales
i too visit all files when emacs starts.

are we saying that the speed depends on the number of headlines total
or the number of headlines in a single file among the agenda files?

On 10/11/18, Marcin Borkowski  wrote:
>
> On 2018-10-11, at 08:48, Michael Welle  wrote:
>
>> Hello,
>>
>> Marcin Borkowski  writes:
>>
>>> On 2018-10-08, at 09:20, Michael Welle  wrote:
>> [...]
 Well, on my laptop the initial agenda run takes about 7s or so (150
 agenda files) using the current day/week agenda ("a"). All subsequent
 (after loading the files) agenda runs are fast (split second I would
 say). I had some performance issues in the past caused by SCM. Emacs
 tried to check if every file is checked out in the latest version. That
 slowed down the process a lot (starting 150 mercurial processes in
 sequential order, checking results, etc.). The initial run doesn't
 bother me much. I bound the initial agenda run to an idle timer at
 Emacs
 start.
>>>
>>> Interesting.  I did not notice such differences between the first and
>>> subsequent runs.
>> I thought that behaviour is natural, scanning dirs for files and opening
>> them is a costly operation. But a week ago I changed from rotating rust
>> to solid state disks and that behaviour did not change much. I expected
>> a speed up, but mee.
>
> Ah, I have /visiting/ all my agenda files (but not generating the agenda
> itself) in my init.el.
>
> That explains a lot.
>
> Best,
>
> --
> Marcin Borkowski
> http://mbork.pl
>
>


-- 
The Kafka Pandemic: 

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

"You’ve really gotta quit this and get moving, because this is murder
by neglect." ---
.



Re: [O] org-table debugging formula - error

2018-10-11 Thread Nicolas Goaziou
Hello,

Joe Corneli  writes:

> Hello,
>
> I got an error when debugging the behaviour of a formula.
>
> You'll need:
>
> (setq org-table-formula-debug t)
>
> Then with any luck this should allow you to reproduce the error: C-c C-c to 
> run formula.
>
> | Task  | Estimated Effort |
> |---+--|
> | INTRODUCTION  | 9:30 |
> |---+--|
> | BACKGROUND|  |
> |---+--|
> | FOO WORKFLOW  |  |
> |---+--|
> | BAR WORKFLOW  |  |
> |---+--|
> | BAZ WORKFLOW  |  |
> |---+--|
> | ADDITIONAL WORKFLOWS  | 1d 4h 0min   |
> |---+--|
> | FINDINGS  |  |
> |---+--|
> | ADDITIONAL ANALYSIS   | 24:00|
> |---+--|
> | DISCUSSION|  |
> |---+--|
> | BIBLIOGRAPHY  |  |
> |---+--|
> | Appendix: Status  |  |
> | TOTAL WORKDAYS NEEDED | 5d 5h 30min  |
>
> #+TBLFM: @>$2='(org-duration-from-minutes (apply '+ (map 'list 
> 'org-duration-to-minutes (list @I+1$2 @II+1$2 @III+1$2 @+1$2 @I+1$2 
> @II+1$2 @III+1$2 @+1$2
>
> I've attached a patch that fixes the problem for me.

I cannot reproduce the problem. Could you explain why you do need this patch?

Regards,

-- 
Nicolas Goaziou



Re: [O] An Org-based productivity tool

2018-10-11 Thread Ihor Radchenko
Well, you could associate a reward to that kind of tasks.
For example, you can allow yourself to work half a day.

Alternatively, you can make a task you would like to do (say, watch a
new movie) to be blocked until the unwanted task is done.

"Peter Neilson"  writes:

> On Thu, 11 Oct 2018 10:03:15 -0400, Bingo  wrote:
>
>> Le 10 octobre 2018 21:45:53 GMT+05:30, Marcin Borkowski   
>> a écrit :
>>
>>>
>>> - a warning when my efficiency is lower than a set value, and info
>>> about
>>>  how much work I need to do to bump it up to that value.
>>>
>>
>> Nice, but it has an anti-feature.  For procrastinators, warnings  
>> frequently have negative effects. It can be understood in multiple ways :
>>
>> 1. "What the hell" effect : As Dr Art Marckman tells in the book "Smart  
>> Change" , there is a "what the hell" effect where the victim goofs off  
>> even more to the extent of giving up a goal if he realizes that he is  
>> falling behind schedule, or has goofed off more than was advisable. The  
>> solution is to forgive oneself, and not beat oneself up. This warning  
>> looks like beating oneself up.
>>
>> 2. Showing how much work needs to be done to catch up goes against some  
>> self improvement philosophies. E.g. dividing work into subtasks helps in  
>> not getting overwhelmed by the amount of work.  Or the recommendation to  
>> plan breaks in addition to planning to slog, otherwise the plan to slog  
>> becomes overwhelming and procrastinators give up.
>>
>> Of course, if it works for you, go for it.
>
> Sabotage of the TODO list ...
>
> Managing the flow of my own work sometimes runs into unintended sabotage,  
> perpetrated by others or by me. The offending tasks are often large,  
> incapable of division, and not immediately crucial. For example, somewhere  
> in the middle of my list of "Get it done some other time, but not now,"  
> tasks is this one: "Repair the International 454 tractor."  It rests  
> comfortably on that list unless I either (1) need to use that tractor, or  
> (2) hear my wife telling me, "Why don't you ever get the 454 running? You  
> never get anything done around here! I need to use its bucket, and the  
> Mahindra doesn't have one." From that point onward, and my "TODO" thoughts  
> about writing, about programming, or about training horses are derailed.  
> In case (1) I need to figure out some other approach, like maybe using the  
> Mahindra. In case (2) my wife is right--as always--and my tendency is to  
> stop doing anything at all.
>
> My org mode TODO list is absolutely no help when I encounter one of these  
> show-stoppers. If anything, the list is an additional albatross adding to  
> my already encroaching depression.
>
> Maybe I need a brain-wave detector, connecting through emacs-lisp AI code  
> to a huge Pomodoro-style graphic display, that will alert me when I am  
> goofing off, falling asleep, or practicing mental evasion.
>


signature.asc
Description: PGP signature


[O] org-table debugging formula - error

2018-10-11 Thread Joe Corneli
Hello,

I got an error when debugging the behaviour of a formula.

You'll need:

(setq org-table-formula-debug t)

Then with any luck this should allow you to reproduce the error: C-c C-c to run 
formula.

| Task  | Estimated Effort |
|---+--|
| INTRODUCTION  | 9:30 |
|---+--|
| BACKGROUND|  |
|---+--|
| FOO WORKFLOW  |  |
|---+--|
| BAR WORKFLOW  |  |
|---+--|
| BAZ WORKFLOW  |  |
|---+--|
| ADDITIONAL WORKFLOWS  | 1d 4h 0min   |
|---+--|
| FINDINGS  |  |
|---+--|
| ADDITIONAL ANALYSIS   | 24:00|
|---+--|
| DISCUSSION|  |
|---+--|
| BIBLIOGRAPHY  |  |
|---+--|
| Appendix: Status  |  |
| TOTAL WORKDAYS NEEDED | 5d 5h 30min  |
#+TBLFM: @>$2='(org-duration-from-minutes (apply '+ (map 'list 
'org-duration-to-minutes (list @I+1$2 @II+1$2 @III+1$2 @+1$2 @I+1$2 
@II+1$2 @III+1$2 @+1$2

I've attached a patch that fixes the problem for me.

I'm on Org mode version 9.1.14 (release_9.1.14-974-ga85ba9 @ 
/Users/joe/org-mode/lisp/)

Joe

diff --git a/lisp/org-table.el b/lisp/org-table.el
index 8eb38ef68..80de97d21 100644
--- a/lisp/org-table.el
+++ b/lisp/org-table.el
@@ -2953,7 +2953,7 @@ $xyz->  %s
 $1->%s\n" orig formula form0 form))
 	(if (consp ev)
 		(princ (format "%s^\nError:  %s"
-			   (make-string (car ev) ?\-) (nth 1 ev)))
+			   (make-string (floor (car ev)) ?\-) (nth 1 ev)))
 	  (princ (format "Result: %s\nFormat: %s\nFinal:  %s"
 			 ev (or fmt "NONE")
 			 (if fmt (format fmt (string-to-number ev)) ev)


Re: [O] An Org-based productivity tool

2018-10-11 Thread Peter Neilson

On Thu, 11 Oct 2018 10:03:15 -0400, Bingo  wrote:

Le 10 octobre 2018 21:45:53 GMT+05:30, Marcin Borkowski   
a écrit :




- a warning when my efficiency is lower than a set value, and info
about
 how much work I need to do to bump it up to that value.



Nice, but it has an anti-feature.  For procrastinators, warnings  
frequently have negative effects. It can be understood in multiple ways :


1. "What the hell" effect : As Dr Art Marckman tells in the book "Smart  
Change" , there is a "what the hell" effect where the victim goofs off  
even more to the extent of giving up a goal if he realizes that he is  
falling behind schedule, or has goofed off more than was advisable. The  
solution is to forgive oneself, and not beat oneself up. This warning  
looks like beating oneself up.


2. Showing how much work needs to be done to catch up goes against some  
self improvement philosophies. E.g. dividing work into subtasks helps in  
not getting overwhelmed by the amount of work.  Or the recommendation to  
plan breaks in addition to planning to slog, otherwise the plan to slog  
becomes overwhelming and procrastinators give up.


Of course, if it works for you, go for it.


Sabotage of the TODO list ...

Managing the flow of my own work sometimes runs into unintended sabotage,  
perpetrated by others or by me. The offending tasks are often large,  
incapable of division, and not immediately crucial. For example, somewhere  
in the middle of my list of "Get it done some other time, but not now,"  
tasks is this one: "Repair the International 454 tractor."  It rests  
comfortably on that list unless I either (1) need to use that tractor, or  
(2) hear my wife telling me, "Why don't you ever get the 454 running? You  
never get anything done around here! I need to use its bucket, and the  
Mahindra doesn't have one." From that point onward, and my "TODO" thoughts  
about writing, about programming, or about training horses are derailed.  
In case (1) I need to figure out some other approach, like maybe using the  
Mahindra. In case (2) my wife is right--as always--and my tendency is to  
stop doing anything at all.


My org mode TODO list is absolutely no help when I encounter one of these  
show-stoppers. If anything, the list is an additional albatross adding to  
my already encroaching depression.


Maybe I need a brain-wave detector, connecting through emacs-lisp AI code  
to a huge Pomodoro-style graphic display, that will alert me when I am  
goofing off, falling asleep, or practicing mental evasion.




Re: [O] a couple tangle questions (tangle a single block, comment syntax)

2018-10-11 Thread Alan Schmitt
On 2018-10-11 16:12, Alan Schmitt  writes:

> Now I just need to find a way to specify the syntax for comments in the
> headers, and I'm all set.

I'm feeling silly. What I need to use is the "conf" language, not
"config". Sorry for the noise.

Alan

-- 
OpenPGP Key ID : 040D0A3B4ED2E5C7
Monthly Athmospheric CO₂, Mauna Loa Obs. 2018-09: 405.51, 2017-09: 403.37


signature.asc
Description: PGP signature


Re: [O] a couple tangle questions (tangle a single block, comment syntax)

2018-10-11 Thread Alan Schmitt
On 2018-10-11 08:06, John Kitchin  writes:

> Do you mean interactively?  With org-babel-tangle you can:
>
> With one universal prefix argument, only tangle the block at point.
>
> When two universal prefix arguments, only tangle blocks for the
> tangle file of the block at point.

Thank you! I looked at the manual but forgot to look at the function's
documentation.

Now I just need to find a way to specify the syntax for comments in the
headers, and I'm all set.

Alan

-- 
OpenPGP Key ID : 040D0A3B4ED2E5C7
Monthly Athmospheric CO₂, Mauna Loa Obs. 2018-09: 405.51, 2017-09: 403.37


signature.asc
Description: PGP signature


Re: [O] An Org-based productivity tool

2018-10-11 Thread Bingo
Le 10 octobre 2018 21:45:53 GMT+05:30, Marcin Borkowski  a 
écrit :

>
>- a warning when my efficiency is lower than a set value, and info
>about
>  how much work I need to do to bump it up to that value.
>

Nice, but it has an anti-feature.  For procrastinators, warnings frequently 
have negative effects. It can be understood in multiple ways :

1. "What the hell" effect : As Dr Art Marckman tells in the book "Smart Change" 
, there is a "what the hell" effect where the victim goofs off even more to the 
extent of giving up a goal if he realizes that he is falling behind schedule, 
or has goofed off more than was advisable. The solution is to forgive oneself, 
and not beat oneself up. This warning looks like beating oneself up.

2. Showing how much work needs to be done to catch up goes against some self 
improvement philosophies. E.g. dividing work into subtasks helps in not getting 
overwhelmed by the amount of work.  Or the recommendation to plan breaks in 
addition to planning to slog, otherwise the plan to slog becomes overwhelming 
and procrastinators give up.

Of course, if it works for you, go for it.



Re: [O] An Org-based productivity tool

2018-10-11 Thread Ihor Radchenko

I mean something like what we have for calendar sync.
The data can be stored/edited both in the service and in relevant org
files. 


Roland Everaert  writes:

> Ihor Radchenko writes:
>
>>> To motivate people focusing on there work, something like the link below 
>>> could be
>>> an idea, especially for gamers ;)
>>>
>>> https://habitica.com/static/home
>>
>> It would be great to integrate it with Org.
>
> What do you mean, create an interface to the service or duplicating the
> service in Emacs/Org Mode?
>
>>
>>
>> Roland Everaert  writes:
>>
>>> Regarding auto-clocking, you should look at what norang did.
>>>
>>> http://doc.norang.ca/org-mode.html
>>>
>>> To motivate people focusing on there work, something like the link below 
>>> could be
>>> an idea, especially for gamers ;)
>>>
>>> https://habitica.com/static/home
>>>
>>> Samuel Wales writes:
>>>
 auto-clocking might be interesting.

 there would be a concept of a dominating clocking entry similar to
 dominating file.  i.e. if where you are is not a clocking entry, go up
 until you find one that is.  if you find none at top level, you create
 a clock entry in the logbook there.

 if you switch buffers or move around, you clock out and in where you
 were and are.  every few minutes, you try to clock in where you are,
 or the dominating clocking entry.  this is done with timers.  idle
 time might go to a special clocking entry.

 or something like that.  the idea is that you don't have to remember
 to clock in and out.

 On 10/10/18, Marcin Borkowski  wrote:
>
> On 2018-10-10, at 18:50, William Denton  wrote:
>
>> On 10 October 2018, Marcin Borkowski wrote:
>>
>>> I am making an Org-mode-based tool to help boost my productivity.
>>> ...
>>> - is anyone interested in something like this?
>>
>> I am---I'd love to see what you come up with.  I'm doing something
>> similar, but much less fancy, with clock tables and some R:
>>
>> https://www.miskatonic.org/2017/11/16/clocktableii/
>>
>> I need to do one more post about that to wrap it up.  It's working
>> well for me, but warnings about not being clocked in to something, and
>> better understanding of what I'm doing based on headings or tags,
>> would be useful.
>
> Thanks for your kind words!
>
> It's not that fancy (yet?), but has one big advantage over clock tables:
> it updates dynamically (using org-clock-out-hook), so it's fast.  Also,
> as you could see, it does some simple calculations.
>
> And for the record: it's based on properties, not tags - but that is
> a minor issue.
>
> Best,
>
> --
> Marcin Borkowski
> http://mbork.pl
>
>
>>>
>>>
>>> -- 
>>> Luke, use the FOSS
>>>
>>> Sent from Emacs
>>>
>
>
> -- 
> Luke, use the FOSS
>
> Sent from Emacs


signature.asc
Description: PGP signature


Re: [O] An Org-based productivity tool

2018-10-11 Thread Roland Everaert


Ihor Radchenko writes:

>> To motivate people focusing on there work, something like the link below 
>> could be
>> an idea, especially for gamers ;)
>>
>> https://habitica.com/static/home
>
> It would be great to integrate it with Org.

What do you mean, create an interface to the service or duplicating the
service in Emacs/Org Mode?

>
>
> Roland Everaert  writes:
>
>> Regarding auto-clocking, you should look at what norang did.
>>
>> http://doc.norang.ca/org-mode.html
>>
>> To motivate people focusing on there work, something like the link below 
>> could be
>> an idea, especially for gamers ;)
>>
>> https://habitica.com/static/home
>>
>> Samuel Wales writes:
>>
>>> auto-clocking might be interesting.
>>>
>>> there would be a concept of a dominating clocking entry similar to
>>> dominating file.  i.e. if where you are is not a clocking entry, go up
>>> until you find one that is.  if you find none at top level, you create
>>> a clock entry in the logbook there.
>>>
>>> if you switch buffers or move around, you clock out and in where you
>>> were and are.  every few minutes, you try to clock in where you are,
>>> or the dominating clocking entry.  this is done with timers.  idle
>>> time might go to a special clocking entry.
>>>
>>> or something like that.  the idea is that you don't have to remember
>>> to clock in and out.
>>>
>>> On 10/10/18, Marcin Borkowski  wrote:

 On 2018-10-10, at 18:50, William Denton  wrote:

> On 10 October 2018, Marcin Borkowski wrote:
>
>> I am making an Org-mode-based tool to help boost my productivity.
>> ...
>> - is anyone interested in something like this?
>
> I am---I'd love to see what you come up with.  I'm doing something
> similar, but much less fancy, with clock tables and some R:
>
> https://www.miskatonic.org/2017/11/16/clocktableii/
>
> I need to do one more post about that to wrap it up.  It's working
> well for me, but warnings about not being clocked in to something, and
> better understanding of what I'm doing based on headings or tags,
> would be useful.

 Thanks for your kind words!

 It's not that fancy (yet?), but has one big advantage over clock tables:
 it updates dynamically (using org-clock-out-hook), so it's fast.  Also,
 as you could see, it does some simple calculations.

 And for the record: it's based on properties, not tags - but that is
 a minor issue.

 Best,

 --
 Marcin Borkowski
 http://mbork.pl


>>
>>
>> -- 
>> Luke, use the FOSS
>>
>> Sent from Emacs
>>


-- 
Luke, use the FOSS

Sent from Emacs



Re: [O] An Org-based productivity tool

2018-10-11 Thread Ihor Radchenko
> To motivate people focusing on there work, something like the link below 
> could be
> an idea, especially for gamers ;)
>
> https://habitica.com/static/home

It would be great to integrate it with Org.


Roland Everaert  writes:

> Regarding auto-clocking, you should look at what norang did.
>
> http://doc.norang.ca/org-mode.html
>
> To motivate people focusing on there work, something like the link below 
> could be
> an idea, especially for gamers ;)
>
> https://habitica.com/static/home
>
> Samuel Wales writes:
>
>> auto-clocking might be interesting.
>>
>> there would be a concept of a dominating clocking entry similar to
>> dominating file.  i.e. if where you are is not a clocking entry, go up
>> until you find one that is.  if you find none at top level, you create
>> a clock entry in the logbook there.
>>
>> if you switch buffers or move around, you clock out and in where you
>> were and are.  every few minutes, you try to clock in where you are,
>> or the dominating clocking entry.  this is done with timers.  idle
>> time might go to a special clocking entry.
>>
>> or something like that.  the idea is that you don't have to remember
>> to clock in and out.
>>
>> On 10/10/18, Marcin Borkowski  wrote:
>>>
>>> On 2018-10-10, at 18:50, William Denton  wrote:
>>>
 On 10 October 2018, Marcin Borkowski wrote:

> I am making an Org-mode-based tool to help boost my productivity.
> ...
> - is anyone interested in something like this?

 I am---I'd love to see what you come up with.  I'm doing something
 similar, but much less fancy, with clock tables and some R:

 https://www.miskatonic.org/2017/11/16/clocktableii/

 I need to do one more post about that to wrap it up.  It's working
 well for me, but warnings about not being clocked in to something, and
 better understanding of what I'm doing based on headings or tags,
 would be useful.
>>>
>>> Thanks for your kind words!
>>>
>>> It's not that fancy (yet?), but has one big advantage over clock tables:
>>> it updates dynamically (using org-clock-out-hook), so it's fast.  Also,
>>> as you could see, it does some simple calculations.
>>>
>>> And for the record: it's based on properties, not tags - but that is
>>> a minor issue.
>>>
>>> Best,
>>>
>>> --
>>> Marcin Borkowski
>>> http://mbork.pl
>>>
>>>
>
>
> -- 
> Luke, use the FOSS
>
> Sent from Emacs
>


signature.asc
Description: PGP signature


[O] How to add tblname from ob-shell fragments?

2018-10-11 Thread Alex Bennée


Hi,

I'm trying to solve a problem with an ob-shell fragment. I want to emit
a table which other blocks are going to consume. As script takes a while
I don't want to dynamically call it when doing additional work with the
data. In fact in my real example I use ob-async's :async so it can run
and collect the data in the background.

Is there any way to get the results to emit a tblname with the result?

--
Alex Bennée



Re: [O] exporting to latex and docx not honouring carriage returns to tabbing

2018-10-11 Thread Sharon Kimble
Tim Cross  writes:

> Sharon Kimble  writes:
>
>> Eric S Fraga  writes:
>>
>>> On Tuesday,  9 Oct 2018 at 12:06, Sharon Kimble wrote:
 Brilliant, thanks very much Robert, you've saved the project as I didn't
 fancy having to work with the document in LibreOffice. These are the
 settings that I've finally gone with -

 #+LaTeX_Header: \parskip=0pt
 #+LaTeX_Header: \parindent=2em
>>>
>>> This is close to the default behaviour for the LaTeX article class.  Did 
>>> you have something setting these to different values?
>>
>> Yes, I have a custom class called 'my-report' which has no packages
>> outlined in it, here it is.
>>
>> --8<---cut here---start->8---
>> #+begin_src emacs-lisp
>> (with-eval-after-load 'ox-latex
>> (add-to-list 'org-latex-classes
>>  '("my-report" "\\documentclass{report}
>>[NO-DEFAULT-PACKAGES]"
>>;;[EXTRA]"
>>;;("\\part{%s}" . "\\part*{%s}")
>>("\\chapter{%s}" . "\\chapter*{%s}")
>>("\\section{%s}" . "\\section*{%s}")
>>("\\subsection{%s}" . "\\subsection*{%s}")
>>("\\subsubsection{%s}" . "\\subsubsection*{%s}")
>>("\\paragraph{%s}" . "\\paragraph*{%s}")
>>("\\subparagraph{%s}" . "\\subparagraph*{%s}"
>>   (custom-set-variables '(org-export-allow-bind-keywords t))
>> #+end_src
>> [2016-04-14 Thu 08:47]
>> [2016-09-09 Fri 00:54]
>> [2017-01-17 Tue 13:17]
>> http://orgmode.org/worg/org-tutorials/org-latex-export.html
>> --8<---cut here---end--->8---
>>
>>
 except for the first paragraph in a new chapter.
>>>
>>> Yes, the first paragraph after any heading will not be indented.  That is 
>>> also default and is actually what most books use.
>>
>> Yes, I'm learning, and checking with the book that I'm currently reading :)
>>
>> Thanks
>> Sharon.
>
> While Eric and Robert have provided some really useful tips on some
> ad-hoc tweaks you can make to latex/pdf output, I would also encourage
> you to look at the many other document styles. As Eric points out, the
> tweaks look to be changing the 'report' class to be more like the
> 'article' class. Have you tried just using the article class instead of
> report? Note also there is a 'book' class as well, which may well
> produce something more in line with what your after if you are wanting
> output which looks more like a published book. Then there are all the
> other 'publishers' styles to consider as well as other style packages
> like KomaScript, HiTec etc. 
>
> While these tweaks are often very useful, they really should be used
> sparingly as they can have unforeseen consequences, especially when you
> begin to use other packages. It is important to remember that some org
> features rely on some of these additional packages to produce good
> export results. Once you start 'tweaking' the output, it can quickly
> spiral out of control. You fix one thing only to create two new issues.
>
> One of the most common mistakes I see when people start using latex as
> the basis for document generation is ad hoc tweaking of the style. This
> is an unfortunate consequence of most of us being exposed to traditional
> word processors such as MS Word or Libre Office. Producing good quality
> documents is a very complex topic and Donald Knuth spent a lot of time
> researching all the aspects of type setting and layout to produce a
> consistently good and reliable system with TeX. Things have evolved and
> we have new requirements (such as on-line documents which are read
> electronically and not printed in hard copy). Additional packages have
> been added to address these types of enhancements. 
>
> The real trick with TeX/LaTeX is to work with the system and not against
> it. If you find it necessary to constantly tweak indent, paragraph
> spacing, line height, line breaks,  etc, then you are probably using the
> wrong document style. Try other styles and look for one which meets the
> majority of your requirements and only then consider tweaking it. As you
> will probably need more than one, you will likely end up with a number
> of custom definitions in addition to 'my-report'. I have around 5 base
> ones as well as a handful of ones specific to particular jobs/clients
> (e.g. include logos, custom headers/footers, title pages etc).
>
> The bad news is that this will probably be somewhat time consuming
> initially (there is a huge number of document styles and packages out
> there). The good news is that once you have the basic definitions, you
> probably won't have to think about this again for ages (my definitions
> have been in place for years now).
>
> good luck
>
> Tim

Thanks Tim, but I've been using Linux since sometime in 2003, and have
moved on from writing various things in 'pure' latex (meaning that it
wasn't exported into latex as it was already there!) to my current state

Re: [O] An Org-based productivity tool

2018-10-11 Thread Roland Everaert
Regarding auto-clocking, you should look at what norang did.

http://doc.norang.ca/org-mode.html

To motivate people focusing on there work, something like the link below could 
be
an idea, especially for gamers ;)

https://habitica.com/static/home

Samuel Wales writes:

> auto-clocking might be interesting.
>
> there would be a concept of a dominating clocking entry similar to
> dominating file.  i.e. if where you are is not a clocking entry, go up
> until you find one that is.  if you find none at top level, you create
> a clock entry in the logbook there.
>
> if you switch buffers or move around, you clock out and in where you
> were and are.  every few minutes, you try to clock in where you are,
> or the dominating clocking entry.  this is done with timers.  idle
> time might go to a special clocking entry.
>
> or something like that.  the idea is that you don't have to remember
> to clock in and out.
>
> On 10/10/18, Marcin Borkowski  wrote:
>>
>> On 2018-10-10, at 18:50, William Denton  wrote:
>>
>>> On 10 October 2018, Marcin Borkowski wrote:
>>>
 I am making an Org-mode-based tool to help boost my productivity.
 ...
 - is anyone interested in something like this?
>>>
>>> I am---I'd love to see what you come up with.  I'm doing something
>>> similar, but much less fancy, with clock tables and some R:
>>>
>>> https://www.miskatonic.org/2017/11/16/clocktableii/
>>>
>>> I need to do one more post about that to wrap it up.  It's working
>>> well for me, but warnings about not being clocked in to something, and
>>> better understanding of what I'm doing based on headings or tags,
>>> would be useful.
>>
>> Thanks for your kind words!
>>
>> It's not that fancy (yet?), but has one big advantage over clock tables:
>> it updates dynamically (using org-clock-out-hook), so it's fast.  Also,
>> as you could see, it does some simple calculations.
>>
>> And for the record: it's based on properties, not tags - but that is
>> a minor issue.
>>
>> Best,
>>
>> --
>> Marcin Borkowski
>> http://mbork.pl
>>
>>


-- 
Luke, use the FOSS

Sent from Emacs



Re: [O] a couple tangle questions (tangle a single block, comment syntax)

2018-10-11 Thread John Kitchin
Do you mean interactively?  With org-babel-tangle you can:

With one universal prefix argument, only tangle the block at point.

When two universal prefix arguments, only tangle blocks for the
tangle file of the block at point.


John

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



On Thu, Oct 11, 2018 at 3:18 AM Alan Schmitt 
wrote:

> Hello,
>
> I'm moving my configuration files to an org file to be tangled, and I
> have a couple questions.
>
> First, is there a command to tangle a single block, or blocks in a
> subtree?
>
> Second, I like to have the :comments link option in my tangled files (to
> reference where they were tangled from), but some files do not have an
> emacs mode, so I use a "config" source block. For these files, org does
> not know the syntax of comments, so it asks me for it. Can I specify the
> syntax for comments in the header of the source block?
>
> Thanks a lot,
>
> Alan
>
> --
> OpenPGP Key ID : 040D0A3B4ED2E5C7
> Monthly Athmospheric CO₂, Mauna Loa Obs. 2018-09: 405.51, 2017-09: 403.37
>


[O] [PATCH] org: Support creating arbitrary headline paths when refiling

2018-10-11 Thread Sebastian Reuße
* org.el (org--refile-new-path): Add.
(org-refile): Use it.
(org-refile-new-child): Support creating new root nodes.

* test-org.el (test-org/org-refile): Add test.

While ‘org-refile’ currently supports creating new headlines when
refiling, only one single headline can be created this way. For
convenience, we now generalize this use-case to support creating
arbitrary headline paths on the fly.
---
 lisp/org.el  | 75 
 testing/lisp/test-org.el | 66 +++
 2 files changed, 112 insertions(+), 29 deletions(-)

diff --git a/lisp/org.el b/lisp/org.el
index e3866c2c0..dd82b005a 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -11450,7 +11450,7 @@ (defun org-refile-get-location ( prompt 
default-buffer new-nodes)
  (concat " (default " (car org-refile-history) 
")"))
 (and (assoc cbnex tbl) (setq cdef cbnex)
  (concat " (default " cbnex ")"))) ": "))
-pa answ parent-target child parent old-hist)
+pa answ old-hist)
 (setq old-hist org-refile-history)
 (setq answ (funcall cfunc prompt tbl nil (not new-nodes)
nil 'org-refile-history (or cdef (car 
org-refile-history
@@ -11467,17 +11467,11 @@ (defun org-refile-get-location ( prompt 
default-buffer new-nodes)
(when (equal (car org-refile-history) (nth 1 org-refile-history))
  (pop org-refile-history)))
  pa)
-  (if (string-match "\\`\\(.*\\)/\\([^/]+\\)\\'" answ)
- (progn
-   (setq parent (match-string 1 answ)
- child (match-string 2 answ))
-   (setq parent-target (org-refile--get-location parent tbl))
-   (when (and parent-target
-  (or (eq new-nodes t)
-  (and (eq new-nodes 'confirm)
-   (y-or-n-p (format "Create new node \"%s\"? "
- child)
- (org-refile-new-child parent-target child)))
+  (if (or (eq new-nodes t)
+ (and (eq new-nodes 'confirm)
+  (y-or-n-p (format "Create new path \"%s\"? "
+answ
+ (org--refile-new-path answ tbl)
(user-error "Invalid target location")
 
 (declare-function org-string-nw-p "org-macs" (s))
@@ -11501,29 +11495,52 @@ (defun org-refile-check-position (refile-pointer)
   (unless (looking-at-p re)
 (user-error "Invalid refile position, please clear the cache with 
`C-0 C-c C-w' before refiling"
 
+(defun org--refile-new-path (path tbl)
+  "Ensure that all parent nodes leading to refile target PATH exist.
+
+Use TBL as a look-up table for existing nodes.
+
+Return the corresponding refile location."
+  (let ((target (org-refile--get-location path tbl)))
+(or target
+   (let (parent child)
+ (if (string-match "\\`\\(.*\\)/\\([^/]+\\)\\'" path)
+ (progn
+   (setq child (match-string 2 path))
+   (setq parent (org--refile-new-path (match-string 1 path) tbl)))
+   (setq child path))
+ (org-refile-new-child parent child)
+
+
 (defun org-refile-new-child (parent-target child)
-  "Use refile target PARENT-TARGET to add new CHILD below it."
-  (unless parent-target
-(error "Cannot find parent for new node"))
-  (let ((file (nth 1 parent-target))
-   (pos (nth 3 parent-target))
-   level)
+  "Use refile target PARENT-TARGET to add new CHILD below it.
+
+When PARENT-TARGET is ‘nil’, child will be added below the
+outline root of the current file."
+  (let (file pos)
+(if parent-target
+   (progn
+ (setq file (nth 1 parent-target))
+ (setq pos (nth 3 parent-target)))
+  (setq file (buffer-file-name)))
 (with-current-buffer (or (find-buffer-visiting file)
 (find-file-noselect file))
   (org-with-wide-buffer
(if pos
-  (goto-char pos)
+  (progn
+(goto-char pos)
+(org-insert-heading-respect-content)
+(org-do-demote))
+;; New node is top-level
 (goto-char (point-max))
-(unless (bolp) (newline)))
-   (when (looking-at org-outline-regexp)
-(setq level (funcall outline-level))
-(org-end-of-subtree t t))
-   (org-back-over-empty-lines)
-   (insert "\n" (make-string
-(if pos (org-get-valid-level level 1) 1) ?*)
-  " " child "\n")
-   (beginning-of-line 0)
-   (list (concat (car parent-target) "/" child) file "" (point))
+(unless (bolp) (newline))
+(org-insert-heading nil t t))
+   (insert child)
+   (beginning-of-line)
+   (list (if parent-target
+(format "%s/%s" (car parent-target) child)
+  child)
+file "" (point))
 
 (defun 

[O] [PATCH] ob-core.el: Fix org-babel--string-to-number

2018-10-11 Thread qijian gong
Hello,

I've write a patch (see attachment) to fix the
`org-babel--string-to-number` function.

In my opinion, if people write the data in the form `0001`, it means that
he wants to treat it as a string:

> #+name: TBL
> |   id | name   | age |
> |--||-|
> | 0001 | Apollo |  16 |
> | 0002 | Bmw|  16 |
>
> #+BEGIN_SRC emacs-lisp :results value pp :var tbl=TBL
> (mapc 'print tbl)
> #+END_SRC
>
> #+RESULTS:
> : (("0001" "Apollo" 16)
> :  ("0002" "Bmw" 16))

Qijian


0001-ob-core.el-Fix-org-babel-string-to-number.patch
Description: Binary data


Re: [O] An Org-based productivity tool

2018-10-11 Thread Ihor Radchenko
Hi,

One suggestion would be to distinguish between different types of work.
For example, you may value more an important project you need to work
on, but do not like, in comparison with another project you really like
doing.
This can be done, for example, by weighting the time spent on
different tasks according to the task urgency/arbitrary multiplier.

A comment on the example output.
Some people (like me) can spend too much time just staring at the kind
of output you provided.
I found it more efficient to have a single number/phrase indication if I
need to work harder or not.
The full output might still be shown to adjust the overall productivity,
but, say, once per day/week.

Best,
Ihor

Marcin Borkowski  writes:

> Hi Orgers,
>
> I am making an Org-mode-based tool to help boost my productivity.
>
> I am constantly fighting a losing battle with distractions.  I figured
> out that showing me how much time I spent goofing around would help me
> stay on track (being a math geek and a gamer, my "let's break my
> yesterday's score" and similar instincts kick in immediately, too).  So
> far, I have these in my prototype:
>
> - a notification (recurring every n seconds) that I'm not clocking
>   anything,
>
> - some stats about what I spent my time on and what my efficiency (i.e.,
>   percentage of time I spent working from the point when I started
>   counting to now) is,
>
> - info about how much work I need to do in order to meet my set goal,
>   and how much will it take if my efficiency remains constant,
>
> - a warning when my efficiency is lower than a set value, and info about
>   how much work I need to do to bump it up to that value.
>
> Here's an example output (with some partially faked data):
>
> --8<---cut here---start->8---
> 39min of your workday (10%) has passed, and you have 5h 31min left.
>
> work - 30min spent (12% of your goal of 4h and 75% of your workday so far)
>3h 30min remaining (4h 39min with your current efficiency of 75%).
>You need 9min of uninterrupted work to get back to 80% efficiency.
>
> eating - 4min spent (10% of your workday so far)
>
> bathroom - 2min spent (5% of your workday so far)
>
> unclassified - 0min spent (0% of your workday so far)
>
> Unclocked time so far: 3min.
> --8<---cut here---end--->8---
>
> My questions are:
>
> - is anyone interested in something like this?
>
> - are there any features you would like to have?  (I have some ideas,
>   too.)
>
> - does anyone have an idea of how to /name/ this project?
>
> TIA,
>
> --
> Marcin Borkowski
> http://mbork.pl
>

-- 
Ihor Radchenko,
PhD Student
Singapore University of Technology and Design,
8 Somapah Road Singapore 487372
Email: yanta...@gmail.com, ihor_radche...@mymail.sutd.edu.sg
Tel: +6584017977


signature.asc
Description: PGP signature


Re: [O] How to make agenda generation faster

2018-10-11 Thread Marcin Borkowski


On 2018-10-11, at 08:48, Michael Welle  wrote:

> Hello,
>
> Marcin Borkowski  writes:
>
>> On 2018-10-08, at 09:20, Michael Welle  wrote:
> [...]
>>> Well, on my laptop the initial agenda run takes about 7s or so (150
>>> agenda files) using the current day/week agenda ("a"). All subsequent
>>> (after loading the files) agenda runs are fast (split second I would
>>> say). I had some performance issues in the past caused by SCM. Emacs
>>> tried to check if every file is checked out in the latest version. That
>>> slowed down the process a lot (starting 150 mercurial processes in
>>> sequential order, checking results, etc.). The initial run doesn't
>>> bother me much. I bound the initial agenda run to an idle timer at Emacs
>>> start.
>>
>> Interesting.  I did not notice such differences between the first and
>> subsequent runs.
> I thought that behaviour is natural, scanning dirs for files and opening
> them is a costly operation. But a week ago I changed from rotating rust
> to solid state disks and that behaviour did not change much. I expected
> a speed up, but mee.

Ah, I have /visiting/ all my agenda files (but not generating the agenda
itself) in my init.el.

That explains a lot.

Best,

--
Marcin Borkowski
http://mbork.pl



[O] a couple tangle questions (tangle a single block, comment syntax)

2018-10-11 Thread Alan Schmitt
Hello,

I'm moving my configuration files to an org file to be tangled, and I
have a couple questions.

First, is there a command to tangle a single block, or blocks in a
subtree?

Second, I like to have the :comments link option in my tangled files (to
reference where they were tangled from), but some files do not have an
emacs mode, so I use a "config" source block. For these files, org does
not know the syntax of comments, so it asks me for it. Can I specify the
syntax for comments in the header of the source block?

Thanks a lot,

Alan

-- 
OpenPGP Key ID : 040D0A3B4ED2E5C7
Monthly Athmospheric CO₂, Mauna Loa Obs. 2018-09: 405.51, 2017-09: 403.37


signature.asc
Description: PGP signature


Re: [O] How to make agenda generation faster

2018-10-11 Thread Michael Welle
Hello,

Marcin Borkowski  writes:

> On 2018-10-08, at 09:20, Michael Welle  wrote:
[...]
>> Well, on my laptop the initial agenda run takes about 7s or so (150
>> agenda files) using the current day/week agenda ("a"). All subsequent
>> (after loading the files) agenda runs are fast (split second I would
>> say). I had some performance issues in the past caused by SCM. Emacs
>> tried to check if every file is checked out in the latest version. That
>> slowed down the process a lot (starting 150 mercurial processes in
>> sequential order, checking results, etc.). The initial run doesn't
>> bother me much. I bound the initial agenda run to an idle timer at Emacs
>> start. 
>
> Interesting.  I did not notice such differences between the first and
> subsequent runs.
I thought that behaviour is natural, scanning dirs for files and opening
them is a costly operation. But a week ago I changed from rotating rust
to solid state disks and that behaviour did not change much. I expected
a speed up, but mee. 

Regards
hmw



Re: [O] How to make agenda generation faster

2018-10-11 Thread Michael Welle
Hello,

Marcin Borkowski  writes:

> On 2018-10-09, at 13:47, Julius Dittmar  wrote:
>
>> Hi Marcin,
>>
>> I can't advise as to profiling to find out what really bogs down agenda
>> building.
>>
>> I found that log messages do bog it down.
>>
>> I have a lot of recurring tasks, which accumulate log entries for every
>> closing (which in fact means rescheduling to the next day). Every two to
>> three months I prune my org files of those log entries. This
>> significantly speeds up agenda building.
>
> By experiments, I found that the main bottleneck was a file with lots (=
> a few thousand) headlines.
ah, interesting. My org files usually aren't that deeply structured, so
I don't get hit by that. Hm, I guess regexps are used to find headlines?

Regards
hmw



Re: [O] [PATCH] org: Support creating arbitrary headline paths when refiling

2018-10-11 Thread Sebastian Reuße



Sebastian Reuße  writes:


+  (if (and (string-match "\\`\\(.*\\)/\\([^/]+\\)\\'" answ)


I realize this is overly restrictive if you don’t have 
‘org-refile-use-outline-path’ set to ‘file’ and want to refile 
under a newly created root headline. AFAICT this would also have 
been an issue in the current master branch, prior to the patch.


I’m going to lift this assumption a bit and extend the test case 
for other values of ‘…-use-outline-path’.


If you notice anything in the mean time let me know.

Kind regards,

S.

--
Insane cobra split the wood
Trader of the lowland breed
Call a jittney, drive away
In the slipstream we will stay