[O] "Invalid duration format" error after updating to version 9.1
Hello, I'm running Org mode 9.1 under Emacs 25.2 on Windows 10 (version information below) and I've encountered a problem when running my agenda commands that I'm unsure how to troubleshoot. Org mode version 9.1 (9.1-elpaplus @ c:/scimax/elpa/org-plus-contrib-20170906/) GNU Emacs 25.2.1 (x86_64-w64-mingw32) of 2017-04-24 After running a custom agenda command, I'm given an error, "Invalid duration format: ":45". The backtrace is attached. I've tried going through all my agenda files and changing any instances of durations without a leading "0" for minutes. :45 --> 0:45 But this doesn't seem to help. I know that recent changes (see http://orgmode.org/Changes.html) may be related to my issue. I'm just not sure how to troubleshoot from here. I'd appreciate advice on next steps that I might take. Thank you, Will Debugger entered--Lisp error: (error "Invalid duration format: \":45\"") signal(error ("Invalid duration format: \":45\"")) error("Invalid duration format: %S" ":45") org-duration-to-minutes(":45") org-refresh-property(((effort . identity) (effort-minutes . org-duration-to-minutes)) ":45" nil) org-refresh-properties("Effort" ((effort . identity) (effort-minutes . org-duration-to-minutes))) org-refresh-effort-properties() org-agenda-prepare-buffers(("~/Dropbox/org/work.org" "~/Dropbox/org/work.org_archive" "~/Dropbox/org/work-someday.org" "~/Dropbox/org/personal.org" "~/Dropbox/org/personal-someday.org" "~/Dropbox/org/learning.org" "~/Dropbox/org/teaching-and-learning.org" "~/Dropbox/org/refile.txt" "~/Dropbox/org/dotemacs/init.org" "~/Dropbox/org/blog.org" "~/Dropbox/org/writing.org" "~/Dropbox/org/org.org" "~/Dropbox/org/journal.org" "~/Dropbox/org/wiki.org" "c:/Users/Will/Dropbox/org/journal/20161130.org" "~/Dropbox/org/root.org" "~/Dropbox/org/infolit.org")) (if org-agenda-multi (progn (setq buffer-read-only nil) (goto-char (point-max)) (if (or (bobp) org-agenda-compact-blocks (not org-agenda-block-separator)) nil (insert "\n" (if (stringp org-agenda-block-separator) org-agenda-block-separator (make-string (window-width) org-agenda-block-separator)) "\n")) (narrow-to-region (point) (point-max))) (setq org-done-keywords-for-agenda nil) (org-agenda-prepare-window (get-buffer-create org-agenda-buffer-name) filter-alist) (setq buffer-read-only nil) (org-agenda-reset-markers) (let ((inhibit-read-only t)) (erase-buffer)) (org-agenda-mode) (setq org-agenda-buffer (current-buffer)) (setq org-agenda-contributing-files nil) (setq org-agenda-columns-active nil) (org-agenda-prepare-buffers (org-agenda-files nil (quote ifmode))) (setq org-todo-keywords-for-agenda (org-uniquify org-todo-keywords-for-agenda)) (setq org-done-keywords-for-agenda (org-uniquify org-done-keywords-for-agenda)) (setq org-agenda-last-prefix-arg current-prefix-arg) (setq org-agenda-this-buffer-name org-agenda-buffer-name) (and name (not org-agenda-name) (set (make-local-variable (quote org-agenda-name)) name))) (if (org-agenda-use-sticky-p) (progn (put (quote org-agenda-tag-filter) :preset-filter nil) (put (quote org-agenda-category-filter) :preset-filter nil) (put (quote org-agenda-regexp-filter) :preset-filter nil) (org-agenda-prepare-window (get-buffer org-agenda-buffer-name) filter-alist) (message "Sticky Agenda buffer, use `r' to refresh") (or org-agenda-multi (org-agenda-fit-window-to-buffer)) (throw (quote exit) "Sticky Agenda buffer, use `r' to refresh")) (setq org-todo-keywords-for-agenda nil) (put (quote org-agenda-tag-filter) :preset-filter org-agenda-tag-filter-preset) (put (quote org-agenda-category-filter) :preset-filter org-agenda-category-filter-preset) (put (quote org-agenda-regexp-filter) :preset-filter org-agenda-regexp-filter-preset) (put (quote org-agenda-effort-filter) :preset-filter org-agenda-effort-filter-preset) (if org-agenda-multi (progn (setq buffer-read-only nil) (goto-char (point-max)) (if (or (bobp) org-agenda-compact-blocks (not org-agenda-block-separator)) nil (insert "\n" (if (stringp org-agenda-block-separator) org-agenda-block-separator (make-string (window-width) org-agenda-block-separator)) "\n")) (narrow-to-region (point) (point-max))) (setq org-done-keywords-for-agenda nil) (org-agenda-prepare-window (get-buffer-create org-agenda-buffer-name) filter-alist) (setq buffer-read-only nil) (org-agenda-reset-markers) (let ((inhibit-read-only t)) (erase-buffer)) (org-agenda-mode) (setq org-agenda-buffer (current-buffer)) (setq org-agenda-contributing-files nil) (setq org-agenda-columns-active nil) (org-agenda-prepare-buffers (org-agenda-files nil (quote ifmode))) (setq org-todo-keywords-for-agenda (org-uniquify org-todo-keywords-for-agenda)) (setq org-done-keywords-for-agenda (org-uniquify org-done-keywords-for-agenda)) (setq org-agenda-last-prefix-arg current-prefix-arg) (setq org-agenda-this-buffer-name org-agenda-buffer-name) (and name (not org-agenda-name) (set (make-local-variable (quote org-agenda-name)) name))) (setq bu
Re: [O] org-agenda-filter-effort and "invalid face reference"
Works perfectly. Thank you, Nicolas! On Wed, Jan 4, 2017 at 4:40 PM, Nicolas Goaziou wrote: > wtm writes: > >> Wonderful! Is there any elisp that I could add to my config to test >> it? I would love have this capability. > > You need to eval > > (defun org-agenda-compare-effort (op value) > "Compare the effort of the current line with VALUE, using OP. > If the line does not have an effort defined, return nil." > (let ((effort (get-text-property 0 'effort-minutes (org-get-at-bol > 'txt > (funcall op >(or effort (if org-sort-agenda-noeffort-is-high 32767 -1)) >value))) > > Regards,
Re: [O] org-agenda-filter-effort and "invalid face reference"
Wonderful! Is there any elisp that I could add to my config to test it? I would love have this capability. On Wed, Jan 4, 2017 at 4:31 PM, Nicolas Goaziou wrote: > Hello, > > wtm writes: > >> After some additional testing, I was able to isolate the problem: >> org-agenda-filter-by-effort only filtered entries that had no tags or >> tag inheritance. This leads me to believe that I just don't >> understand how this command, org-agenda-filter-by-effort, is actually >> supposed to work. If I have an entry like this: >> >> * TODO task 1 :tag: >> :PROPERTIES: >> :Effort: 0:30 >> :END: >> >> And one like this: >> >> * TODO task 2 >> :PROPERTIES: >> :Effort: 0:30 >> :END: >> >> And I've added the org file to the agenda list and created the >> appropriate org-global-properties: >> >> (setq org-global-properties >> '(("Effort_ALL". "0 0:10 0:30 1:00 2:00 3:00 4:00"))) >> >> Shouldn't org-agenda-filter-by-effort set to = "0:30" show both of >> those tasks? In my case, I'm only seeing this one: >> >> * TODO task 2 >> :PROPERTIES: >> :Effort: 0:30 >> :END: > > Good catch. There was an issue in "org-agenda.el". It is now fixed. > Thank you. > > Regards, > > -- > Nicolas Goaziou
Re: [O] org-agenda-filter-effort and "invalid face reference"
After some additional testing, I was able to isolate the problem: org-agenda-filter-by-effort only filtered entries that had no tags or tag inheritance. This leads me to believe that I just don't understand how this command, org-agenda-filter-by-effort, is actually supposed to work. If I have an entry like this: * TODO task 1 :tag: :PROPERTIES: :Effort: 0:30 :END: And one like this: * TODO task 2 :PROPERTIES: :Effort: 0:30 :END: And I've added the org file to the agenda list and created the appropriate org-global-properties: (setq org-global-properties '(("Effort_ALL". "0 0:10 0:30 1:00 2:00 3:00 4:00"))) Shouldn't org-agenda-filter-by-effort set to = "0:30" show both of those tasks? In my case, I'm only seeing this one: * TODO task 2 :PROPERTIES: :Effort: 0:30 :END: On Tue, Jan 3, 2017 at 3:50 PM, wtm wrote: > Thanks, Nicolas. After adding that code to my config, I tried it > again and although the message "invalid face reference" no longer > displays, I'm still unable to see any of the entries > > I also tried it without any custom configuration except the addition > of the code you sent. I had the same result: no more "invalid face > reference" but no display of expected entries after filtering for > effort. > > Perhaps I'm missing something very simple? If you have any > suggestions, I'd love to try them. > > On Tue, Jan 3, 2017 at 3:29 PM, Nicolas Goaziou > wrote: >> wtm writes: >> >>> I'm installing org-mode from elpa. Until that update is available >>> would using the "org-faces.el" file in the latest git commit >>> (http://orgmode.org/w/org-mode.git?p=org-mode.git;a=commit;h=3bba31ff44033e895fedd99857363dd5b0586b41) >>> work? >> >> Meanwhile, you only need to put the following somewhere in your config: >> >> (defface org-agenda-filter-effort '((t :inherit mode-line)) >> "Face for effort in the mode-line when filtering the agenda." >> :group 'org-faces) >> >> >> Regards,
Re: [O] org-agenda-filter-effort and "invalid face reference"
Thanks, Nicolas. After adding that code to my config, I tried it again and although the message "invalid face reference" no longer displays, I'm still unable to see any of the entries I also tried it without any custom configuration except the addition of the code you sent. I had the same result: no more "invalid face reference" but no display of expected entries after filtering for effort. Perhaps I'm missing something very simple? If you have any suggestions, I'd love to try them. On Tue, Jan 3, 2017 at 3:29 PM, Nicolas Goaziou wrote: > wtm writes: > >> I'm installing org-mode from elpa. Until that update is available >> would using the "org-faces.el" file in the latest git commit >> (http://orgmode.org/w/org-mode.git?p=org-mode.git;a=commit;h=3bba31ff44033e895fedd99857363dd5b0586b41) >> work? > > Meanwhile, you only need to put the following somewhere in your config: > > (defface org-agenda-filter-effort '((t :inherit mode-line)) > "Face for effort in the mode-line when filtering the agenda." > :group 'org-faces) > > > Regards,
Re: [O] org-agenda-filter-effort and "invalid face reference"
Nicolas, Thank you for finding that problem so quickly! It's vexed me for some time. I'm installing org-mode from elpa. Until that update is available would using the "org-faces.el" file in the latest git commit (http://orgmode.org/w/org-mode.git?p=org-mode.git;a=commit;h=3bba31ff44033e895fedd99857363dd5b0586b41) work? Will On Tue, Jan 3, 2017 at 3:15 PM, Nicolas Goaziou wrote: > Hello, > > Jorge Morais Neto writes: > >> On 3 January 2017 at 14:16, Nicolas Goaziou wrote: >>> I cannot reproduce it with, e.g. >>> >>> * TODO test >>> :PROPERTIES: >>> :Effort: 2:00 >>> :END: >>> >>> and a bare configuration. Could you double-check you're really using Org >>> 9.0.3? >> I reproduce it (the behavior and the message in *Messages*) with my own >> files and configuration. I have not tested with a bare configuration. I >> have >> tested org-agenda-filter-by-effort with both operator = and operator <. > > I can reproduce it now. > > Fixed. Thank you. > > Regards, > > -- > Nicolas Goaziou
Re: [O] org-agenda-filter-effort and "invalid face reference"
Nicolas, Thanks for responding. Here's what I get when I enter M-x org-version: Org mode version 9.0.3 (9.0.3-elpa @ c:/Users/Will/.emacs.d/elpa/org-20161224/) Will On Tue, Jan 3, 2017 at 11:16 AM, Nicolas Goaziou wrote: > Hello, > > wtm writes: > >> I'm having trouble using org-agenda-filter-by-effort on existing >> agendas in orgmode 9.0.3 in GNU Emacs 25.1.1 ([x86_64-w64-mingw32] of >> 2016-09-17). Each time I attempt to use org-agenda-filter-by-effort, >> I type "_" and then "=" and I select the one-digit index of the effort >> estimate I want--in my case, I select "3" which corresponds to "0:30". >> >> Instead of seeing only those orgmode TODO headings that have an effort >> property of "0:30" in the agenda buffer as I would expect, all the >> TODO headings disappear. However, every other type of filter on the >> agenda buffer seems to work. I can easily filter by category and tag. >> I have attempted this with my configuration and without any custom >> configuration at all and always gotten the same result. >> >> Although no errors occur (at least none that M-x toggle-debug-on-error >> pick up) the *Messages* buffer provides some feedback: "Invalid face >> reference: org-agenda-filter-effort [2 times]". > > [...] > >> I've attempted to reproduce the problem in Emacs 25.1.1 and orgmode >> 9.0.3 without any configuration and still experienced the same >> problem. To reproduce the problem I think you'd only need to create >> an org file, add an entry with a TODO heading, and then assign an >> effort estimate that corresponds to the array of allowed values (see >> description of org-agenda-filter-by-effort http://bit.ly/2iF4o68). >> After that, you'd need to create an agenda by entering "C-c a" >> (org-agenda) and "t" (List all TODO entries). > > I cannot reproduce it with, e.g. > > * TODO test > :PROPERTIES: > :Effort: 2:00 > :END: > > and a bare configuration. Could you double-check you're really using Org > 9.0.3? > > Regards, > > -- > Nicolas Goaziou
[O] org-agenda-filter-effort and "invalid face reference"
Hello, I'm having trouble using org-agenda-filter-by-effort on existing agendas in orgmode 9.0.3 in GNU Emacs 25.1.1 ([x86_64-w64-mingw32] of 2016-09-17). Each time I attempt to use org-agenda-filter-by-effort, I type "_" and then "=" and I select the one-digit index of the effort estimate I want--in my case, I select "3" which corresponds to "0:30". Instead of seeing only those orgmode TODO headings that have an effort property of "0:30" in the agenda buffer as I would expect, all the TODO headings disappear. However, every other type of filter on the agenda buffer seems to work. I can easily filter by category and tag. I have attempted this with my configuration and without any custom configuration at all and always gotten the same result. Although no errors occur (at least none that M-x toggle-debug-on-error pick up) the *Messages* buffer provides some feedback: "Invalid face reference: org-agenda-filter-effort [2 times]". I've tried searching for information about the "invalid face reference" message and orgmode. I've found a few discussions on the orgmode listserv, one of them that occurred recently (November 4, 2016). However, the version of orgmode in this most recent discussion is 8.3 and I'm using orgmode 9.0.3. And it appears that the patch described has already been applied. I also inspected org-agenda.el for the changes and they appear to be there (although I'm not a very experienced elisp programmer or debugger). [O] [PATCH] org-agenda.el Correct :inherit on org-agenda-fontify-priorit https://lists.gnu.org/archive/html/emacs-orgmode/2016-11/msg00057.html [O] `invalid face reference nil` caused by `org-agenda-fontify-propertie https://lists.gnu.org/archive/html/emacs-orgmode/2015-05/msg00116.html [O] Bug: Priority #B in Agenda causes invalid face reference [8.2.1 (8.2 https://lists.gnu.org/archive/html/emacs-orgmode/2013-10/msg00870.html I've attempted to reproduce the problem in Emacs 25.1.1 and orgmode 9.0.3 without any configuration and still experienced the same problem. To reproduce the problem I think you'd only need to create an org file, add an entry with a TODO heading, and then assign an effort estimate that corresponds to the array of allowed values (see description of org-agenda-filter-by-effort http://bit.ly/2iF4o68). After that, you'd need to create an agenda by entering "C-c a" (org-agenda) and "t" (List all TODO entries). I'm at a loss as to what steps to attempt next to troubleshoot this. I've seen an intriguing discussion on Stack Exchange about "font lock studio" but I couldn't get it to work. I'd appreciate any tips you might have on how to proceed. Thanks and Happy New Year to all my fellow org-mode users! Will
Re: [O] TODO keyword highlighting for headings with properties broken
Erik, Thank you! I just tried this out and it worked perfectly. This is a very useful command. With Emacs, it always seems like it's not whether I can do something but how! Will On Thu, Sep 4, 2014 at 12:01 PM, Erik Hetzner wrote: > At Wed, 3 Sep 2014 21:30:11 -0500, > wtm wrote: > > > > Trevor, > > > > Thanks so much for mentioning this. I considered using these to roll > > back to 8/25 but I wasn't sure how much performance I would lose if > > I used the .el files instead of the compiled .elc versions. Or > > perhaps my assumption is incorrect? Is it ok to just byte-compile > > all of the .el files manually? I'm still very new to org-mode so > > please forgive my ignorance. > > Hi Will, > > You can install those packages using M-x package-install-file and you > will get a byte-compiled version. > > best, Erik > > -- > Sent from my free software system <http://fsf.org/>. >
Re: [O] TODO keyword highlighting for headings with properties broken
Trevor, Thanks so much for mentioning this. I considered using these to roll back to 8/25 but I wasn't sure how much performance I would lose if I used the .el files instead of the compiled .elc versions. Or perhaps my assumption is incorrect? Is it ok to just byte-compile all of the .el files manually? I'm still very new to org-mode so please forgive my ignorance. Will On Wed, Sep 3, 2014 at 7:56 PM, Trevor Murphy wrote: > Bruno Bigras writes: > > It would be nice if the ELPA package could be updated faster than that in >> cases like this. I guess a couple of people must now have a broken org-mode >> unless they switched to git like I did. >> > > Chiming in with an alternative that I was pleased to discover - > https://elpa.gnu.org/packages/org.html. For those who want an easy way > to roll back to the 8/25 snapshot. > -- > Trevor Murphy > GnuPG Key: 0x83881C0A > > >
Re: [O] TODO keyword highlighting for headings with properties broken
Thanks, Nicolas. ELPA seems to update every seven days and the last update appears to have been on Monday, September 1st. Hopefully, it will be incorporated by 9/08! On Wed, Sep 3, 2014 at 2:46 PM, Nicolas Goaziou wrote: > Hello, > > wtm writes: > > > I experienced the same problem. Has the fix been applied to org in ELPA? > > It was not clear from my reading of earlier emails on this topic if the > fix > > had been applied there or elsewhere. > > I applied it on maint, so it should go to ELPA soon. When applied, > `org-property-re' should be: > > "^\\(?4:[ ]*\\)\\(?1::\\(?2:.*?\\):\\)\\(?:\\(?3:$\\)\\|[ > ]+\\(?3:.*?\\)\\)\\(?5:[]*\\)$" > > > Regards, > > -- > Nicolas Goaziou >
Re: [O] TODO keyword highlighting for headings with properties broken
Hello, I experienced the same problem. Has the fix been applied to org in ELPA? It was not clear from my reading of earlier emails on this topic if the fix had been applied there or elsewhere. Thanks, Will On Wed, Sep 3, 2014 at 12:58 PM, Nicolas Goaziou wrote: > Hello, > > Erik Hetzner writes: > > > Highlighting of TODO keywords for headings with properties in my org > > files seems to have broken since I upgraded to org 20140901 (via org > > mode ELPA). Rolling back to 20140825 fixes the problem. Here is a > > sample file I tested after loading the new org-mode using emacs -Q: > > > > * TODO foo > > :PROPERTIES: > > :bar: baz > > :END: > > > > If you remove the properties, the TODO highlights correctly. > > I think I fixed it yesterday. Please update if you can. > > > Regards, > > -- > Nicolas Goaziou > >