Re: [O] Filtering org-clock-display
Hello Bastien, I can't get this to work. (org-clock-display '(16)) -- this works fine! (let ((org-clock-display-default-range 'thisweek)) (org-clock-display)) ^ This however just runs org-clock-display for all time without a prompt. I have updated to HEAD and ran `make`. On 28 July 2014 17:45, Bastien b...@gnu.org wrote: Hi Noah, Noah Slater nsla...@tumbolia.org writes: Can I pass in the range when calling it from a function? Not directly. (org-clock-display '(16)) will interactively prompt for a range. (let ((org-clock-display-default-range 'thisweek)) (org-clock-display)) will display the clock with the new option `org-clock-display-default-range' set to thisweek. HTH, -- Bastien
Re: [O] Filtering org-clock-display
Hi Noah, Noah Slater nsla...@tumbolia.org writes: Can I pass in the range when calling it from a function? Not directly. (org-clock-display '(16)) will interactively prompt for a range. (let ((org-clock-display-default-range 'thisweek)) (org-clock-display)) will display the clock with the new option `org-clock-display-default-range' set to thisweek. HTH, -- Bastien
Re: [O] Filtering org-clock-display
I'm getting an error on HEAD now: Debugger entered--Lisp error: (void-function org-add-props) (org-add-props WARNING: No org-loaddefs.el file could be found from where org.el is loaded. nil (quote face) (quote org-warning)) (message (org-add-props WARNING: No org-loaddefs.el file could be found from where org.el is loaded. nil (quote face) (quote org-warning))) (condition-case nil (load (concat (file-name-directory load-file-name) org-loaddefs.el) nil t t t) (error (message (org-add-props WARNING: No org-loaddefs.el file could be found from where org.el is loaded. nil (qu$ (or (equal this-command (quote eval-buffer)) (condition-case nil (load (concat (file-name-directory load-file-name) org-loaddefs.el) nil t t t) (error (message (org-add-props WARNING: No org-loaddefs.el file could b$ eval-buffer(#buffer *load*-416952 nil /Users/nslater/.emacs.d/vendor/org-mode/lisp/org.el nil t) ; Reading at buffer position 3681 load-with-code-conversion(/Users/nslater/.emacs.d/vendor/org-mode/lisp/org.el /Users/nslater/.emacs.d/vendor/org-mode/lisp/org.el nil t) require(org) eval-buffer(#buffer *load*-693116 nil /Users/nslater/.emacs.d/lisp/init-org.el nil t) ; Reading at buffer position 127 load-with-code-conversion(/Users/nslater/.emacs.d/lisp/init-org.el /Users/nslater/.emacs.d/lisp/init-org.el nil t) require(init-org) eval-buffer(#buffer *load* nil /Users/nslater/.emacs.d/init.el nil t) ; Reading at buffer position 2043 load-with-code-conversion(/Users/nslater/.emacs.d/init.el /Users/nslater/.emacs.d/init.el t t) load(/Users/nslater/.emacs.d/init t t) #[0 ^H\205\262^@ \306=\203^Q^@\307^H\310Q\202;^@ \311=\204^^^@\307^H\312Q\202;^@\313\307\314\315#\203*^@\316\202;^@\313\307\314\317#\203:^@\320\nB^R\321\202;^@\316\322^S\323^A\322\211#\210^K\322=\203a^@\324\325\32$ command-line() normal-top-level() On 30 May 2014 14:15, Bastien b...@gnu.org wrote: Hi Noah, Noah Slater nsla...@tumbolia.org writes: That's pretty cool. Any reason it doesn't use the same syntax as the :tstart param though? I first want to see if the new feature is useful before adding up more subfeatures. So let's wait until 8.3 is released and see if (more) people want more flexibility here. In the meantime, I think it makes sense to offer the predefined ranges that we can use in org clock tables. This breaks a function I had written (and perhaps other people's functions). This is now fixed, thanks, -- Bastien
Re: [O] Filtering org-clock-display
Noah Slater nsla...@tumbolia.org writes: I'm getting an error on HEAD now: Please run `make' or `make autoloads'. See http://orgmode.org/manual/Installation.html -- Bastien
Re: [O] Filtering org-clock-display
Works! Thanks! Can I pass in the range when calling it from a function? At the moment, I'm calling org-clock-display from a wrapper function that does some other things. It would be cool to configure a default range when calling it in that function. On 31 May 2014 16:48, Bastien b...@gnu.org wrote: Noah Slater nsla...@tumbolia.org writes: I'm getting an error on HEAD now: Please run `make' or `make autoloads'. See http://orgmode.org/manual/Installation.html -- Bastien
Re: [O] Filtering org-clock-display
Hi Noah, Noah Slater nsla...@tumbolia.org writes: That's pretty cool. Any reason it doesn't use the same syntax as the :tstart param though? I first want to see if the new feature is useful before adding up more subfeatures. So let's wait until 8.3 is released and see if (more) people want more flexibility here. In the meantime, I think it makes sense to offer the predefined ranges that we can use in org clock tables. This breaks a function I had written (and perhaps other people's functions). This is now fixed, thanks, -- Bastien
Re: [O] Filtering org-clock-display
Aha! Sorry, I hadn't updated my checkout to HEAD. I see that when I run that command now, I get a prompt asking me for Range with the following options: lastmonth lastweek lastyear thismonth thisweek thisyear today yesterday And the new doc: With one universal prefix argument, show the total time for today. With two universal prefix arguments, show the total time for a custom range, entered at the prompt. With three universal prefix arguments, show the total time in the echo area. That's pretty cool. Any reason it doesn't use the same syntax as the :tstart param though? This breaks a function I had written (and perhaps other people's functions). To replicate this breakage, I wrote this function: (defun clock-display-test () (interactive) (org-clock-display)) Before this change, that would successfully call org-clock-display. Now it displays this error in *Messages*: clock-display-test: Wrong number of arguments: (lambda (arg) Show subtree times in the entire buffer. With one universal prefix argument, show the total time for today. With two universal prefix arguments, show the total time for a custom range, entered at the prompt. With three universal prefix arguments, show the total time in the echo area. Use \\[org-clock-remove-overlays] to remove the subtree times. (interactive P) (org-clock-remove-overlays) (let* ((todayp (equal arg (quote (4 (customp (equal arg (quote (16 (prop (cond (todayp :org-clock-minutes-today) (customp :org-clock-minutes-custom) (t :org-clock-minutes))) time h m p) (cond (todayp (org-clock-sum-today)) (customp (org-clock-sum-custom)) (t (org-clock-sum))) (if (eq arg (quote (64))) nil (save-excursion (goto-char (point-min)) (while (or (and (equal (setq p (point)) (point-min)) (get-text-property p prop)) (setq p (next-single-property-change (point) prop))) (goto-char p) (if (setq time (get-text-property p prop)) (progn (org-clock-put-overlay time (setq h (/ org-clock-file-total-minutes 60) m (- org-clock-file-total-minutes (* 60 h))) (if org-remove-highlights-with-change (progn (org-add-hook (quote before-change-functions) (quote org-clock-remove-overlays) nil (quote local)) (message (concat (format Total file time%s: (cond (todayp for today) (customp (custom)) (t ))) (org-minutes-to-clocksum-string org-clock-file-total-minutes) (%d hours and %d minutes)) h m))), 0 That doesn't look right to me. Should an error be printing out all that stuff like that? How should I change my function to call org-clock-display? Can I pass in the range as an argument somehow? Does it make sense for this function to behave like it used to if you just call it like (org-clock-display) with no other arguments? (i.e. Make this great new functionality backwards compatible, and off-by-default.) On 26 May 2014 07:14, Bastien b...@gnu.org wrote: Hi Noah, Noah Slater nsla...@tumbolia.org writes: How do I configure the filtering? What filtering? Please re-read the whole thread (where I mention that we *could* have an option for the default filtering option). Also put more context in your questions -- such terse sentences makes me feel like I'm just an answering machine. Thanks, -- Bastien
Re: [O] Filtering org-clock-display
On 25 May 2014 07:26, Bastien b...@gnu.org wrote: Hi Noah, Noah Slater nsla...@tumbolia.org writes: 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. What does this do? (What changed?) Does it let me filter the display by time period? Yes -- try it, you'll see. How do I configure the filtering?
Re: [O] Filtering org-clock-display
Hi Noah, Noah Slater nsla...@tumbolia.org writes: How do I configure the filtering? What filtering? Please re-read the whole thread (where I mention that we *could* have an option for the default filtering option). Also put more context in your questions -- such terse sentences makes me feel like I'm just an answering machine. Thanks, -- Bastien
Re: [O] Filtering org-clock-display
On 20 April 2014 15:18, Bastien b...@gnu.org wrote: Noah Slater nsla...@tumbolia.org 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. Okay, I'll consider that, thanks. 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. What does this do? (What changed?) Does it let me filter the display by time period? Sorry it took me so long to respond.
Re: [O] Filtering org-clock-display
Hi Noah, Noah Slater nsla...@tumbolia.org writes: 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. What does this do? (What changed?) Does it let me filter the display by time period? Yes -- try it, you'll see. Sorry it took me so long to respond. No problem! -- Bastien
Re: [O] Filtering org-clock-display
Noah Slater nsla...@tumbolia.org 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] Filtering org-clock-display
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 b...@gnu.org wrote: Noah Slater nsla...@tumbolia.org 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] Filtering org-clock-display
Noah Slater nsla...@tumbolia.org 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