Re: [O] Counting number of children under heading

2014-04-20 Thread Sacha Chua
Sebastien Vauban 
writes:

Hello, Seb, all!

> Yes, I almost remembered what you wrote in
> http://sachachua.com/blog/2008/01/outlining-your-notes-with-org/,
> section "Getting a Sense of Progress". Still, it is about counting
> headlines, but with a special cookie you add.

Wow, I totally forgot about that. =) Good thing you remembered!

Anyway, Marvin, you (or someone) will probably be able to update that
code and get it to work for you, if you don't mind having checkboxes
instead of TODO. If you want it to work for plain headings, we could
probably figure out a custom function that updates numbers in
parentheses with the number of child headings. (Assuming you don't have
numbers in parentheses generally, or maybe we should use curly braces
instead? Decisions, decisions...) It's likely to be code that's going to
be in your custom config, since the need seems uncommon. =)

Sacha




Re: [O] How do I chain babel blocks with arguments?

2014-04-20 Thread Eric Schulte
Xebar Saram  writes:

> Hi guys
>
> a related newbie question that occurred to me from reading this thread
> (sorry for "crashing" the thread :)). if i understand correctly from the
> above posts, is there a way to batch evaluate multiple org mode code blocks
> at once?
> My use case is using babel with R statistics where i have multiple code
> blocks and would like to run 10-12 blocks together in a consecutive order,
> is that possible? if so how is this done?
>

Yes.  See `org-babel-execute-buffer' and `org-babel-execute-subtree'.

Best,

>
> best
>
> Z
>
>
> On Sun, Apr 20, 2014 at 4:41 AM, Eric Schulte wrote:
>
>> > --8<---cut here---start->8---
>> > #+name: z
>> > : "bar"
>> > #+name: test3
>> > #+begin_src emacs-lisp :var x="foo"
>> > x
>> > #+end_src
>> >
>> > #+name:test4
>> > #+begin_src emacs-lisp :var y=test1(x=z)
>> > y
>> > #+end_src
>> >
>> > #+results: test4
>> > : "bar"
>> >
>> > #+call: test4(z="BAZ")
>> ^
>> The above line has an error, your "z" should be an "x".
>>
>> Best,
>>
>> --
>> Eric Schulte
>> https://cs.unm.edu/~eschulte
>> PGP: 0x614CA05D
>>
>>

-- 
Eric Schulte
https://cs.unm.edu/~eschulte
PGP: 0x614CA05D



[O] sifted for agenda-view, sparse-tree underlying commands

2014-04-20 Thread Brady Trainor


goal: to make better use of agenda-views and sparse-trees

strategy: to better understand what customization would be possible, 
should I need to consider them at some point (or even to be able to 
think about what commands they each are based on)


difficulty: planning out exactly how I'll use them

strategy: to have made the notes I made today, and keep them for 
reference as I slowly increase my use of these functionalities


action: send a copy of my notes from today to the gmane list, to feel a 
sense of accomplishment, pick a point at which to put this on the 
backburner, and put something up that I think I would have found useful 
as I was developing my use of these.


funny observation: would have been a while before I noticed what happens 
if you hit `C-c / c c c c c c c c c ...'


complement me: please feel free to find a way to parse this perspective 
into the worg or similar, or reinterpret for us.


(oops if someone already did this)

--

** the short list of relevant commands encountered in org-agenda, 
org-agenda-custom-commands and org-sparse-tree:


_org-agenda_
org-agenda-list
org-search-view
org-todo-list
org-tags-view
org-store-agenda-views

_org-agenda-custom-commands:_
org-agenda-list
org-todo-list
org-search-view
org-agenda-list-stuck-projects
org-tags-view
org-match-sparse-tree
org-occur

_org-sparse-tree_
org-sparse-tree
org-check-deadlines
org-check-before-date
org-check-after-date
org-check-dates-range
org-show-todo-tree
org-match-sparse-tree
org-occur

_unmentioned_
org-occur-in-agenda-files

** org-agenda (C-c a)

a org-agenda-list
s org-search-view
S org-search-view
t org-todo-list
T org-todo-list
m org-tags-view
M org-tags-view
e org-store-agenda-views
? org-tags-view nil "+FLAGGED"

** org-agenda-custom-commands (setq)

agenda  org-agenda-list
agenda* org-agenda-list
alltodo org-todo-list
search  org-search-view
stuck   org-agenda-list-stuck-projects
tagsorg-tags-view
tags-todo   org-tags-view
todoorg-todo-list
tags-tree   org-match-sparse-tree
todo-tree   org-occur
occur-tree  org-occur

** org-sparse-tree (C-c /)

corg-sparse-tree (to cycle)
dorg-check-deadlines
borg-check-before-date
aorg-check-after-date
Dorg-check-dates-range
torg-show-todo-tree
Torg-show-todo-tree
T, m org-match-sparse-tree
p, P org-match-sparse-tree
r, R org-occur

*** describe function

t  Show all TODO entries.
T  Show entries with a specific TODO keyword.
m  Show entries selected by a tags/property match.
p  Enter a property name and its value (both with completion on existing
   names/values) and show entries with that property.
r  Show entries matching a regular expression (`/' can be used as well).
b  Show deadlines and scheduled items before a date.
a  Show deadlines and scheduled items after a date.
d  Show deadlines due within `org-deadline-warning-days'.
D  Show deadlines and scheduled items between a date range.

*** brief description in mini-buffer

[/]regexp
[t]odo
[T]odo-kwd
[m]atch
[p]roperty
[d]eadlines
[b]efore-date
[a]fter-date
[D]ates range
[c]ycle through date types:
all"all timestamps"
scheduled  "only scheduled"
deadline   "only deadline"
active "only active timestamps"
inactive   "only inactive timestamps"
scheduled-or-deadline  "scheduled/deadline"
closed "with a closed time-stamp"
nil?   "scheduled/deadline"

--



Brady


PS org markup test: /italics/ _underline_ *bold*




[O] end-of-defun odd behaviour in org mode

2014-04-20 Thread Leo Liu
Hi there,

While adding support for org-mode in easy-kill¹ I have discovered C-M-a
and C-M-e work asymmetrically. C-M-e moves forward 2 headlines while
C-M-a move back 1.

Cheers,
Leo

Footnotes: 
¹  https://github.com/leoliu/easy-kill




[O] Insignificant typo re: `C-c / T' coded cases?

2014-04-20 Thread Brady Trainor


Org-mode version 8.2.5h (8.2.5h-106-gfaa170-elpa @ 
c:/Users/user-name/AppData/Roaming/.emacs.d/elpa/org-20140414/)


TLDR version: Should `?T' not appear twice?

 
/

(defun org-sparse-tree (&optional arg type)
...
(cond
...
 ((equal ans ?T)
  (org-show-todo-tree '(4)))
 ((member ans '(?T ?m))
  (call-interactively 'org-match-sparse-tree))
 ((member ans '(?p ?P))
...

\


Longer version: (if my confusion was not clear yet.)

In the above code from org.el, I don't understand what the (?T ?m) pair 
are doing, as there is a ?T in the previous block.


Wouldn't the second appearance of T never be checked for? If I press T, 
I should just get

"Show entries with a specific TODO keyword."
and not
"Show entries selected by a tags/property match."
which the m would give. (Sentences from describe function.)

Am I reading the code correctly?



Brady




Re: [O] Bug: clocktable does not respond to :wstart [7.9.3f (release_7.9.3f-17-g7524ef @ /usr/local/Cellar/emacs/24.3/share/emacs/24.3/lisp/org/)]

2014-04-20 Thread Torben Hoffmann
Hi Bastien,

Upgraded org-mode - problem gone!

Thank you!
Torben


On 19 April 2014 07:28, Bastien  wrote:

> Hi Torben,
>
> torben.leh...@gmail.com writes:
>
> > Package: Org-mode version 7.9.3f
>
> I can reproduce the bug with this version, but it has been fixed in
> the meantime and Org version > 8 works fine.
>
> See the manual on how to install non built-in Org :
> http://orgmode.org/manual/Installation.html
>
> Thanks,
>
> --
>  Bastien
>



-- 
http://www.linkedin.com/in/torbenhoffmann
@LeHoff


Re: [O] (org-insert-headline '(4)) should insert new headline before point

2014-04-20 Thread York Zhao
Hi Bastian,

I apologize for missing your reply until I check in the folder "Sent".

I'm sorry that my bug report might not be clear enough. What I meant was that
with one prefix argument, the command `org-insert-heading' should insert a new
heading *before* the current heading, not after. In this regard the behavior
should be exactly the same as when this command is executed with no prefix
argument. I've written a test for this:

--8<---cut here---start->8---
(ert-deftest yz-test-org/org-insert-heading ()
  "Test `org-insert-heading' with one universal prefix argument."
  (org-test-with-temp-text
  "* Headline"
(org-insert-heading '(4)) ; This test will pass without prefix argument
(forward-line)
(should (looking-at "\\* Headline"
--8<---cut here---end--->8---

This test fails on current org-mode version, but will pass if you test it on the
version shipped with Emacs 24.3. Also, if you change `(org-insert-heading '(4))'
to `(org-insert-heading)' this test will pass too.

Also, with current org-mode, if you replace `(forward-line)' in the test with
`(forward-line -1)' (moving to previous line) the test will pass, which means
that the new heading had been inserted after the current heading, not before.

Let me know if this is still not clear.


Thanks,

York

On Thu, Apr 17, 2014 at 10:21 AM, Bastien  wrote:
> Hi York,
>
> York Zhao  writes:
>
>> (org-insert-headline '(4)) used to insert new heading before point. But this 
>> had
>> broken recently. According to the docstring, this command inserts new
>> heading at the end of the parent subtree  ONLY if two universal prefix
>> arguments is given, not one. Here's the reproducer:
>
> Not sure what precise error you're reporting here, but I fixed the
> docstring in the master branch -- please have a look and report if
> the behavior differs from what the docstring says.
>
> Thanks,
>
> --
>  Bastien



Re: [O] Patch for testing `org-open-at-point'

2014-04-20 Thread York Zhao
Hi Bastien,

I apologize that I missed your reply, I discovered it until now when I was
checking the replies in the "Sent" folder.

> The question is this: are we fine handling raw links in properties,
> or do we also need Org links (e.g. bracket links) there?

To me, raw link is hardly useful because too often the web link is really long,
in which case the bracket link acts like a way of abstraction.

Thank you very much for considering this fix.

On Thu, Apr 17, 2014 at 2:48 PM, Bastien  wrote:
> Hi York,
>
> York Zhao  writes:
>
>> * Peter
>> :PROPERTIES:
>> :ADDRESS: xxx xxx  
>> :HOME_PHONE: xxx xxx xxx
>> :WORK_PHONE: xxx xxx xxx
>> :URL: www.foo.bar
>> :END:
>
> The question is this: are we fine handling raw links in properties,
> or do we also need Org links (e.g. bracket links) there?
>
> Speaking for me, raw links is enough, and this is what I plan to
> implement.  But maybe other users have existing use-cases for Org
> links there, I don't know.
>
> --
>  Bastien



Re: [O] Patch for testing `org-open-at-point'

2014-04-20 Thread Michael Strey
Hi Bastien,

On 2014-04-17, Bastien wrote:
> The question is this: are we fine handling raw links in properties,
> or do we also need Org links (e.g. bracket links) there?
>
> Speaking for me, raw links is enough, and this is what I plan to
> implement.  But maybe other users have existing use-cases for Org
> links there, I don't know.

I have.  I'm using phone links (see
http://thread.gmane.org/gmane.emacs.orgmode/69406/focus=70484) in
conjunction with org-contacts in the properties of my contacts.

-- 
Michael Strey 
www.strey.biz




Re: [O] Counting number of children under heading

2014-04-20 Thread Sebastien Vauban
Hello Sacha,

Sacha Chua wrote:
> Sebastien Vauban writes:
>
 I would like to automatically count the number of children under a
 given heading. For example, I would like to have
 * Cars (2)
 ** BMW
 ** Escort
>>>
>>> There is no such feature in Org, but I seem to remember someone
>>> hack something similar -- maybe someone else with a better memory
>>> can tell.
>>
>> IIRC, Sacha Chua had made such a hack -- must be found on her impressive
>> blog.
>
> I don't remember doing something like that - I tend to use [X] for
> automatically counted cookies...
>
> Do you need the number of children to be part of the text, or is it
> okay for that to be temporarily displayed?

Yes, I almost remembered what you wrote in
http://sachachua.com/blog/2008/01/outlining-your-notes-with-org/,
section "Getting a Sense of Progress". Still, it is about counting
headlines, but with a special cookie you add.

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] Bug: Error with org-bibtex export with tags when using custom bibtypes [8.2.5h (8.2.5h-82-gd91d4b-elpaplus @ /Users/leonardaveryrandall/.emacs.d/elpa/org-plus-contrib-20140324/)]

2014-04-20 Thread Leonard Randall
Thanks!


On 20 April 2014 07:31, Bastien  wrote:

> Hi Leonard,
>
> (you forgot to copy the list I think.)
>
> I finally committed your solution, convinced by your tests.
>
> Now we reached the limit for the changes, let's wait until the
> FSF confirms you can contribute more code.
>
> Thanks again,
>
> --
>  Bastien
>


Re: [O] babel and long-running computations

2014-04-20 Thread John Kitchin
You are describing what I see as a need to run processes asynchronously.

We use the Torque queue system for this. It takes care of scheduling and
running jobs on a cluster.

On Thu, Apr 17, 2014 at 6:52 AM, Christoph Groth
wrote:

> Hi Julian,
>
> > Generally, org-babel is suited for long running computations.  Its
> > caching can help you avoid rerunning code chunks.  And long runtime does
> > not conflict with the idea of reproducible research, it just may be not
> > very comfortable for the user.
>
> I agree of course that it’s generally a good idea to structure the
> analysis in small logical steps and to save intermediate results.  Let
> me narrow down my question then: does org-babel support working with
> tasks that take several minutes to execute?  By this I mean (most
> important first):
>
> - Not freezing the editor during the execution of a task
>

You code-block should exit if a job is submitted, and record the job-id so
that you can check it later. Alternatively, you could do this in ipython
notebooks if you have python functions that return jobids.


> - Being able to execute multiple independent tasks in parallel
>

No problem. this is what queue systems were designed for.


> - Being able to interrupt a running task
>

you do this with the queue commands, e.g. qdel jobid


> - Being able to inspect the incomplete output of a running task
>

This is just checking the output files in the running jobs directories.


>
> I’d love to hear about any frameworks or workflows that fulfill these
> requirements.
>
> Cheers
>
> Christoph
>
>
> PS.
>
> I’m using ipython notebooks but I’m not happy with them because of the
> freezing problem and the complete lack of isolation of tasks within a
> single notebook (they live in a common mutable namespace).  I think a
> useful framework must be “functional” at the highest level for caching
> and dependencies to be useful.
>
>
>


Re: [O] babel and long-running computations

2014-04-20 Thread John Kitchin
On Sat, Apr 19, 2014 at 5:49 PM, Christoph Groth
wrote:

> The following message is a courtesy copy of an article
> that has been posted to gmane.emacs.orgmode as well.
>
> Thank you, John, for your detailed reply.
>
> > we routinely do this, in the following way. We run jobs that may take
> > up to a week to finish, and they are usually run on a cluster. Our
> > setup relies on the following behavior for a script.
> >
> > 1. you can run the script anytime you want, and it can tell the state
> > of the calculation by some means. If the script has never been run
> > before, it submits the job to a queue and exits. If the job is still
> > in the queue, it exits, and if the job is done, it gives you the
> > result.
>
> Returning immediately with whatever state the long-running computation
> is in currently seems indeed to be a good solution.  I think I will
> setup something similar.  Would you share your experience on the
> following issues?
>
> - How do you interface such jobs from orgmode?  With org-babel, do
>   you execute Python code, or do you run shell commands?
>

We just have code blocks in org-mode. They are usually python blocks, but
we can also do shell, emacs-lisp, etc... Anything that can run a system
command, and get the output will do.


>
> - Do you run your Emacs on the master node of the cluster?  Or does your
>   setup involve running emacs on the machine you are working on and
>   talking to the cluster over the network?
>

Currently, we run emacs on the master node. Once upon a time I had a
sophisticated ssh setup that would allow me to do this on a local machine,
rsync the necessary files to the cluster, ssh some commands to run the
jobs, and then when they were done to rsync the files back. It was pretty
sweet, but I have stopped used and maintaining it.


>
> Cheers,
> Christoph
>


Re: [O] Filtering org-clock-display

2014-04-20 Thread Bastien
Noah Slater  writes:

> Note: sorting the clock table doesn't work very well. I want each
> level to be sorted recursively.

Yeah, me too -- if you can work on enhancing how the :sort parameters
is handled for clocktables, that'd be great.

As for the rest, please try C-u C-u C-c C-x C-d from master.

We can enhance it by having an option setting the default custom range
for such display, but going further would be too much.

-- 
 Bastien



Re: [O] Problem with org-clock-display

2014-04-20 Thread Bastien


Hi Noah,

Noah Slater  writes:

> I guess Sebastien's point is that without a custom face, the only way to
> turn the dots off is to set the shadow face to be hidden. But that could
> have unintended side-effects. So if there's no custom face, then there
> should be a config so that people can turn it off without having to deal
> with those side-effects.

My point is that all this is not important, I'd rather have us all
focused on more pressing issues.  Hope you both understand,

-- 
 Bastien




Re: [O] Problem with org-clock-display

2014-04-20 Thread Noah Slater
I guess Sebastien's point is that without a custom face, the only way to
turn the dots off is to set the shadow face to be hidden. But that could
have unintended side-effects. So if there's no custom face, then there
should be a config so that people can turn it off without having to deal
with those side-effects.


On 20 April 2014 14:30, Bastien  wrote:

>
>
> Hi Sébastien,
>
> Sebastien Vauban 
> writes:
>
> > If you don't like to add a face, then I'd also favor the possibility to
> > turn off the display of dots -- without having to touch the shadow face

Re: [O] Problem with org-clock-display

2014-04-20 Thread Bastien


Hi Sébastien,

Sebastien Vauban 
writes:

> If you don't like to add a face, then I'd also favor the possibility to
> turn off the display of dots -- without having to touch the shadow face.

Well, I don't want to add a face for the same reasons I don't want
adding an option: we are really in the bikeshed zone here, let's just
live with it.

-- 
 Bastien




Re: [O] Some desktop managers co-opt C-M-right and C-M-left

2014-04-20 Thread Susan Cragin

Thanks, Thorsten, for the <> hint. 

(global-set-key (kbd "C-s-") 'org-demote-subtree)
(global-set-key (kbd "C-s-") 'org-promote-subtree)
(global-set-key (kbd "C-s-") 'org-move-subtree-up)
(global-set-key (kbd "C-s-") 'org-move-subtree-down)


-Original Message-
>From: Thorsten Jolitz 
>Sent: Apr 20, 2014 7:56 AM
>To: emacs-orgmode@gnu.org
>Subject: Re: [O] Some desktop managers co-opt C-M-right and C-M-left
>
>Susan Cragin  writes:
>
>> Aggghhh.
>> I changed to the Enlightenment desktop manager, changed my underlying
>> distro to Lubuntu (LXDE)
>>
>> Both desktop managers co-opt the C-M-right and -left keys to change
>> desktops. (They also co-opt C-S-right.) Ditto -up and -down.
>>
>> I have tried the following: 
>>
>> (global-set-key (kbd "C-S-right") 'org-demote-subtree)
>> (global-set-key (kbd "C-S-left") 'org-promote-subtree)
>>
>> error: C-S- must prefix a single character, not right
>>
>> Have also tried C-M-right, with similar results. 
>>
>> Does anyone have an idea? I have two problems. On-line documentation
>> has told me that I can spell out the word "right" to mean
>> "right-arrow," but clearly that is wrong, and there is one letter that
>> does this. ???
>
>maybe "C-S-"?
>
>> My second problem is this: will a command set in .emacs over-ride a
>> command set by my desktop? 
>
>I don't think so, the command will probably never reach Emacs because
>its used by the WM
>
>> If it does not, should I try the following, and use the Windows /
>> super key?
>
>You could also try to change the WM (or OS) keybindings and free those
>key combinations you want for Emacs. Its an ongoing struggle, I had and
>have these problems/conflict too, its even worse on the console where
>some keyboard keys are just dead by default. 
>
>-- 
>cheers,
>Thorsten
>
>






Re: [O] Some desktop managers co-opt C-M-right and C-M-left

2014-04-20 Thread Susan Cragin
I answered my own question. 
.emacs does not take precedence over my desktop manager. 

Solution: use Super key, as follows.
(global-set-key (kbd "C-s-") 'org-demote-subtree)
(global-set-key (kbd "C-s-") 'org-promote-subtree)
(global-set-key (kbd "C-s-") 'org-move-subtree-up)
(global-set-key (kbd "C-s-") 'org-move-subtree-down)







Re: [O] Some desktop managers co-opt C-M-right and C-M-left

2014-04-20 Thread Thorsten Jolitz
Susan Cragin  writes:

> Aggghhh.
> I changed to the Enlightenment desktop manager, changed my underlying
> distro to Lubuntu (LXDE)
>
> Both desktop managers co-opt the C-M-right and -left keys to change
> desktops. (They also co-opt C-S-right.) Ditto -up and -down.
>
> I have tried the following: 
>
> (global-set-key (kbd "C-S-right") 'org-demote-subtree)
> (global-set-key (kbd "C-S-left") 'org-promote-subtree)
>
> error: C-S- must prefix a single character, not right
>
> Have also tried C-M-right, with similar results. 
>
> Does anyone have an idea? I have two problems. On-line documentation
> has told me that I can spell out the word "right" to mean
> "right-arrow," but clearly that is wrong, and there is one letter that
> does this. ???

maybe "C-S-"?

> My second problem is this: will a command set in .emacs over-ride a
> command set by my desktop? 

I don't think so, the command will probably never reach Emacs because
its used by the WM

> If it does not, should I try the following, and use the Windows /
> super key?

You could also try to change the WM (or OS) keybindings and free those
key combinations you want for Emacs. Its an ongoing struggle, I had and
have these problems/conflict too, its even worse on the console where
some keyboard keys are just dead by default. 

-- 
cheers,
Thorsten




[O] Some desktop managers co-opt C-M-right and C-M-left

2014-04-20 Thread Susan Cragin
Aggghhh.
I changed to the Enlightenment desktop manager, changed my underlying distro to 
Lubuntu (LXDE)

Both desktop managers co-opt the C-M-right and -left keys to change desktops. 
(They also co-opt C-S-right.) Ditto -up and -down.

I have tried the following: 

(global-set-key (kbd "C-S-right") 'org-demote-subtree)
(global-set-key (kbd "C-S-left") 'org-promote-subtree)

error: C-S- must prefix a single character, not right

Have also tried C-M-right, with similar results. 

Does anyone have an idea? I have two problems. On-line documentation has told 
me that I can spell out the word "right" to mean "right-arrow," but clearly 
that is wrong, and there is one letter that does this. ???

My second problem is this: will a command set in .emacs over-ride a command set 
by my desktop? If it does not, should I try the following, and use the Windows 
/ super key?

(global-set-key (kbd "C-s-right") 'org-demote-subtree)







Re: [O] Filtering org-clock-display

2014-04-20 Thread Noah Slater
I suppose, in a way, blurring the line between org-clock-display and
clocktables is what I am trying to do. I think org-clock-display is much
more useful and easier to use. (Though I don't doubt that clocktables work
better for some folks.)

I started out with clocktables, but I found it clumsy to be checking my
clock times in one location, and then clocking times in another location.
This is true even when the clocktable is in the same file as the nodes.

Bit of context: I'm clock times for my own benefit, not for a client. My
primary concern is time allocation. i.e. Making sure that each of the areas
I clock under receives an appropriate amount of attention.

Old workflow:

- Jump to the top of the file or to the index file with my clocktable
- Refresh the clocktable
- Sort the clocktable by time
- Scan the table for the next area that needs my attention
- Either activate the link or manually find the corresponding node
- Clock on to that node

Note: sorting the clock table doesn't work very well. I want each level to
be sorted recursively.

New (and preferred) workflow:

- Sort nodes recursively (thanks Sacha!)
- org-overview
- org-clock-display
- Drill down into the area I that needs the most attention
- Clock on to that node

In this second workflow, notice that:

- Sorting works (because it can be done recursively, either manually as you
expand each node, or with a recursive function)
- The data (i.e. clocked time) is available *in situ* as I navigate around
the file

Wrt the laziness remark :) I am happy to write patches.



On 20 April 2014 12:26, Bastien  wrote:

> Noah Slater  writes:
>
> > What do others think about this idea?
>
> I welcome feedback on this but let's take care not to overengineer
> this: if we add to many features to `org-clock-display', it will blur
> the line between this temporary display and clock tables.
>
> I would first try using temporary clock tables then see if the feature
> is still need for org-clock-display.
>
> Just my 2cts of lets-pretend-laziness-is-carefulness, of course,
>
> --
>  Bastien
>


Re: [O] Problem with org-clock-display

2014-04-20 Thread Sebastien Vauban
Hi Bastien,

Bastien wrote:
> Noah Slater  writes:
>
>> Hmm. Okay. It might be a good idea to have org-clock-shadow or
>> something, so it can be customised separately. I might want to hide
>> the dots, but still have shadow as a useable face.
>
> Let me resist to this for a while: I'm not fan a having a separate
> face for everything in Org, especially transient display.  Also,
> maybe you can try adapting shadow and see where this face is used
> elsewhere?

If you don't like to add a face, then I'd also favor the possibility to
turn off the display of dots -- without having to touch the shadow face.

Best regards,
  Seb

-- 
Sebastien Vauban





Re: [O] Filtering org-clock-display

2014-04-20 Thread Bastien
Noah Slater  writes:

> What do others think about this idea?

I welcome feedback on this but let's take care not to overengineer
this: if we add to many features to `org-clock-display', it will blur
the line between this temporary display and clock tables.

I would first try using temporary clock tables then see if the feature
is still need for org-clock-display.

Just my 2cts of lets-pretend-laziness-is-carefulness, of course,

-- 
 Bastien



Re: [O] How can you sort an Org clock table?

2014-04-20 Thread Bastien
Noah Slater  writes:

> If you add ":link" to the BEGIN blog, the sorting doesn't appear to
> kick in. Bug, I expect.

Please provide a reproducible example.

-- 
 Bastien



Re: [O] Sorting nodes by clocked time

2014-04-20 Thread Noah Slater
Thanks Sacha, that's great!


On 18 April 2014 02:09, Sacha Chua  wrote:

> Noah Slater  writes:
>
> Hello, Noah, all!
>
> > Using this a bit, it doesn't quite do what I want it to do.
> > Is there any way to sort recursively?
> > At the moment, calling org-sort-entries on the whole buffer only sorts
> the
> > top level nodes.
>
> Here's a rather inefficient hack (but hey, it seems to work =) ):
>
> (defun sacha/org-sort-recursively (type)
> (org-map-entries
>  (lambda ()
>  (condition-case nil
>  (org-sort-entries nil type)
>  (error nil)
>
> Call with M-: (sacha/org-sort-recursively ?K) or merge the code into
> your own.
>
> Sacha
>
>
>


Re: [O] How can you sort an Org clock table?

2014-04-20 Thread Noah Slater
Hmm. I'm not sure this is working.

If you add ":link" to the BEGIN blog, the sorting doesn't appear to kick
in. Bug, I expect.

If I remove ":link" I can see that some sorting is taking place. But it's
not what I expect.

With "?t" I am getting this sort order:

- (empty cell)
- "4:02"
- "1d 5:15"
- "1d 9:08"
- "14:19"

With "?T" I am getting this sort order:

- "14:19"
- "1d 9:08"
- "1d 5:15"
- (empty cell)

Note that this isn't the reverse order.



On 16 April 2014 18:26, Bastien  wrote:

> Hi Noah,
>
> from master, you can now use a :sort parameter in clocktable
> to sort a column.  For example:
>
> #+BEGIN: clocktable :maxlevel 2 :scope file :sort (2 . ?t)
> #+CAPTION: Clock summary at [2014-04-16 mer. 18:12]
> | Headline |   Time |
> |--+|
> | *Total time* | *0:34* |
> |--+|
> | STRT abc |   0:15 |
> | STRT def |   0:19 |
> #+END:
>
> The (2 . ?t) means: "sort the second column by time."
>
> Let me know if it works for you,
>
> --
>  Bastien
>


Re: [O] [PATCH] German localization of sections

2014-04-20 Thread Bastien
Hi Julian,

Julian Gehring  writes:

> I have attached the patch for translating the section heading into
> German.

Applied, thanks!

-- 
 Bastien



Re: [O] Possible to always show items in clocktable?

2014-04-20 Thread Noah Slater
Thanks for the help, folks!


On 17 April 2014 10:38, Bastien  wrote:

> Hi Noah,
>
> Noah Slater  writes:
>
> > My intention here is to highlight notes that have received no
> > attention. I want them to show up on my report so that I can see that
> > I need to work on them.*
>
> You can create a dynamic block that does this:
>
> - call org-clock-sum to reset clock sums in the buffer
> - scans for :org-clock-minutes in all headlines
> - create a table from headlines that have no such property
>
> This way you can even add more information in the table.
>
> Happy hacking :)
>
> --
>  Bastien
>


[O] [PATCH] German localization of sections (was: Re: ox-bibtex: Customization of HTML heading)

2014-04-20 Thread Julian Gehring

Hi Batien,

Thank you for extending this!

I have attached the patch for translating the section heading into German.

Best wishes
Julian


On 17.04.2014 17:26, Bastien wrote:

Hi Julian,

Julian Gehring  writes:


Would it be reasonable to have an additional option for customizing the
HTML heading of the reference section for ox-bibtex?


Yes -- I added the word "References" to `org-export-dictionary',
and ox-bibtex.el is now using it.

Can you provide a patch to translate it into german?

Thanks!

>From c4d4ef97f7a61703936386fc446307686a96d89b Mon Sep 17 00:00:00 2001
From: Julian Gehring 
Date: Sun, 20 Apr 2014 10:48:07 +0200
Subject: [PATCH] ox.el: German localization of 'References' section

* lisp/ox.el: Add German localization of the 'References' section

Suggested by Batien Guerry
---
 lisp/ox.el | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lisp/ox.el b/lisp/ox.el
index 35f4972..7c6a96d 100644
--- a/lisp/ox.el
+++ b/lisp/ox.el
@@ -5488,6 +5488,7 @@ them."
  ("zh-CN" :html "代码%d " :utf-8 "代码%d "))
 ("References"
  ("fr" :ascii "References" :default "Références"))
+ ("de" :default "Quellen"))
 ("See section %s"
  ("da" :default "jævnfør afsnit %s")
  ("de" :default "siehe Abschnitt %s")
-- 
1.9.1



[O] Filtering org-clock-display

2014-04-20 Thread Noah Slater
At the start of a clocktable, I can specify a few parameters that allow me
to filter/restrict the time ranges used for display.

For instance, this only shows me clocks from the past 30 days:

:tstart "<-30d>"

What I'd like to do is do this for org-clock-display too.

Perhaps I could specify it at the file level, like:

#+CLOCKPROPS:

Or perhaps this is something I could specify at the node level?

Either way, this would allow me to specify things like :tstart and I could
therefor have my clock display only show me times clocked in the previous
30 days (or whatever).

What do others think about this idea?


Re: [O] Problem with org-clock-display

2014-04-20 Thread Bastien


Noah Slater  writes:

> Hmm. Okay. It might be a good idea to have org-clock-shadow or
> something, so it can be customised separately. I might want to hide
> the dots, but still have shadow as a useable face.

Let me resist to this for a while: I'm not fan a having a separate
face for everything in Org, especially transient display.  Also,
maybe you can try adapting shadow and see where this face is used
elsewhere?

-- 
 Bastien




Re: [O] Org clock cookies

2014-04-20 Thread Noah Slater
Okay, yep. I'm happy with the org-clock-display stuff for now. Thanks for
your responses on this thread.


On 17 April 2014 12:34, Bastien  wrote:

> Hi Noah,
>
> Noah Slater  writes:
>
> > "[01:10]" would mean I had spent 1hr 10m on this node, and all
> > subnodes. Similarly, "[2d 01:10]" would mean I had spent 2d, 1hr, and
> > 10m on this node, and all subnodes.
>
> We can make `org-clock-display' display effort too.
>
> Since `org-clock-display' has been fixed, can you first check
> if the current behavior better fits your needs?
>
> > I've already started hacking on this, and can share the patch if it's
> > something you're interested in reviewing/integrating.
>
> I'm reluctant adding more cookies because they add temporary
> content to the headline.
>
> --
>  Bastien
>


Re: [O] Problem with org-clock-display

2014-04-20 Thread Noah Slater
Hmm. Okay. It might be a good idea to have org-clock-shadow or something,
so it can be customised separately. I might want to hide the dots, but
still have shadow as a useable face.


On 20 April 2014 11:02, Bastien  wrote:

> Noah Slater  writes:
>
> > Can the dots use a custom face? I'd like to customise the colour (by
> > perhaps turning it off).
>
> It uses the shadow face.
>
> M-x customize-face RET shadow RET
>
> --
>  Bastien
>


Re: [O] Problem with org-clock-display

2014-04-20 Thread Noah Slater
Can the dots use a custom face? I'd like to customise the colour (by
perhaps turning it off).


On 19 April 2014 07:18, Bastien  wrote:

>
>
> Hi,
>
> Sebastien Vauban 
> writes:
>
> > See http://screencast.com/t/fmR5TJfa what happens to the size of the
> > titles, when the overlay is applied or removed.
>
> Fixed, although I think this bug was present before I tweaked this
> function.
>
> > Also, I did prefer (unlike Noah) when there were no "reading dots". Is
> > there a way to remove them, or at least to get them in a very light
> > gray, for example?
>
> I reinstalled the dots (different ones) with a shadow background:
> having the dots is good to match the headline visually.
>
> --
>  Bastien
>
>
>


Re: [O] Problem with org-clock-display

2014-04-20 Thread Bastien


Noah Slater  writes:

> Can the dots use a custom face? I'd like to customise the colour (by
> perhaps turning it off).

It uses the shadow face.

M-x customize-face RET shadow RET

-- 
 Bastien




Re: [O] Request for worg page -- escaping questions

2014-04-20 Thread Bastien
Hi Rustom,

Rustom Mody  writes:

> Would such a doc be appropriate for worg?

this looks like a nice blog entry, but that's also fine on Worg: there
is a users directory where people are welcome to put writings of their
own like this one.

Thanks,

-- 
 Bastien



Re: [O] Drawer items showing up on tab cycle

2014-04-20 Thread Nicolas Goaziou
Chris Henderson  writes:

> Sorry but not sure what you mean. I don't seem to have any space character
> in the drawer's name. I inserted the drawer using M-x org-insert-drawer.
>
> Thanks for further clarification.

You are using:

  :book note: <-- no space here.
  
  :END:

Oddly, `org-insert-drawer' doesn't allow spaces in drawer names.


Regards,

-- 
Nicolas Goaziou



Re: [O] Drawer items showing up on tab cycle

2014-04-20 Thread Chris Henderson
Sorry but not sure what you mean. I don't seem to have any space character
in the drawer's name. I inserted the drawer using M-x org-insert-drawer.

Thanks for further clarification.


On Sun, Apr 20, 2014 at 6:08 PM, Nicolas Goaziou wrote:

> Hello,
>
> Chris Henderson  writes:
>
> > According to http://orgmode.org/manual/Drawers.html, drawer items should
> > only show when cursor is on the drawer and tab is pressed. But my drawer
> > items shows up when I do tab cycling.
> >
> > I have * Tasks ** buy book *** Book note :book note: 
> > :END:
> >
> > When I press tab on * Tasks, drawer items show up.
>
> You cannot have a space character in drawer's name.
>
>
> Regards,
>
> --
> Nicolas Goaziou
>


Re: [O] org capture contexts not working?

2014-04-20 Thread Eric Abrahamsen
Bastien  writes:

> Hi Eric,
>
> Eric Abrahamsen  writes:
>
>> This was slightly mis-aligned in the source file, leading me to believe
>> it's just a nesting error. As it is, any template which *isn't using*
>> the not-in-file predicate is going to flag as acceptable for the current
>> context. I think it should just be:
>>
>> (when (and (eq (car rr) 'not-in-file)
>> (buffer-file-name))
>>   (not (string-match (cdr rr) (buffer-file-name
>>
>> Testing indicates it works, am I missing anything?
>
> You are not!
>
> You just nailed down something quite not obvious.
>
> I applied the change in maint, thanks a lot for tracking this,

Oh good -- my pleasure!




Re: [O] Drawer items showing up on tab cycle

2014-04-20 Thread Nicolas Goaziou
Hello,

Chris Henderson  writes:

> According to http://orgmode.org/manual/Drawers.html, drawer items should
> only show when cursor is on the drawer and tab is pressed. But my drawer
> items shows up when I do tab cycling.
>
> I have * Tasks ** buy book *** Book note :book note: 
> :END:
>
> When I press tab on * Tasks, drawer items show up.

You cannot have a space character in drawer's name.


Regards,

-- 
Nicolas Goaziou



Re: [O] Request for worg page -- escaping questions

2014-04-20 Thread Rustom Mody
On Fri, Apr 18, 2014 at 5:30 PM, Bastien  wrote:

> Rustom Mody  writes:
>
> > Trouble is you guys are the hares that make us (me at least) into
> > tortoises --
> > you add significant functionality faster than I can keep with the
> > 'what' (leave aside how and details).
>
> Well, remember that Worg is here to *stay* -- so let's start with
> basic stuff, not bleeding-edge features.  There is a lot of basic
> stuff we still need to document... and we also need to clean-up
> stuff... but agreed that's pretty boring :/
>
> > Still I'll try my hand.
> > What I would like is a graphic -- an automata-diagram made perhaps by
> > dot.
> > Can that easily/conveniently go up onto worg?
>
> Of course!  Thanks in advance,
>
>
Thanks to Alan's dot, Ive come up with something (attached).
Leave aside complete, its not even really work-in-progress :-)
Just a sense of the direction I was asking for.

Would such a doc be appropriate for worg?

Regards,
Rusi


orgdfa.org
Description: Binary data


Re: [O] Bug: org-catch-invisible-edits [8.2.5h (8.2.5h-30-gdd810b-elpa @ ~/.emacs.d/elpa/org/)]

2014-04-20 Thread Bastien
Hi Paul,

Paul Stansell  writes:

> For example, for the org file below, editing the line "level 2" when
> both "Section 1" and "Section 2" are folded (hidden) causes only
> "Section 1" to be unfolded with "Section 2" still folded inside it. 
> Thus, the edits are not visible.
>
> * section 1
>   level 1
> ** section 2
>    level 2

this is now fixed, thanks,

-- 
 Bastien



Re: [O] encrypting file uses revoked key

2014-04-20 Thread Bastien
Hi Daniel,

Daniel Krenn  writes:

> I create a new file test.gpg and write
>
>   # -*- mode:org; epa-file-encrypt-to: ("b...@blub.com") -*-
>
> (b...@blub.com replaced by my mail address) as the first line. Then I
> save this file and I'm asked
>
>   Select recipents for encryption.
>   If no one is selected, symmetric encryption will be performed.
>   - `m' to mark a key on the line
>   - `u' to unmark a key on the line
>   [Cancel][OK]
>
>   
>
> from which I select my current key. The file is saved and I can open it
> again (inserting my passphrase for my key).
>
> Now, when I change something in the file and then want to save it, I get
> the following error:
>
>   byte-code: Opening output file: Encrypt failed: ((exit) (invalid-
>   recipient (reason . 0) (requested-recipient . "2A10BC79E59DAB19")))
>
> The key 2A10BC79E59DAB19 is my old key, which has been revoked.
>
> So what goes wrong here?

Not sure.  Can you check the value of the CRYPTKEY property?
If it looks good, maybe instrument the following functions:

org-decrypt-entry
org-crypt-key-for-heading

M-x find-function RET org-decrypt-entry RET
M-x edebug-defun RET
M-x find-function RET org-crypt-key-for-heading RET
M-x edebug-defun RET

Then proceed with your test.  If the key looks good, maybe
that's an issue with EPA, not Org.

HTH,

-- 
 Bastien



[O] Drawer items showing up on tab cycle

2014-04-20 Thread Chris Henderson
According to http://orgmode.org/manual/Drawers.html, drawer items should
only show when cursor is on the drawer and tab is pressed. But my drawer
items shows up when I do tab cycling.

I have * Tasks ** buy book *** Book note :book note: 
:END:

When I press tab on * Tasks, drawer items show up.

Thanks