Re: [O] org-agenda-filter-effort and "invalid face reference"
Hello, yanmcbe writes: > Wow, this issue comes very close to something I struggled for hours with > (3h42') last year. > > It finally boiled down to this: sorting by effort in the agenda view only > works (correctly) when org-agenda-remove-tags is t. Here's the (edited) ECM > I created for IRC and eventually the list: http://paste.lisp.org/+7723 > > Is that still expected behaviour? Lack of documentation? The updated > org-agenda-compare-effort Nicolas provided doesn't solve this, at > least. I think this issue was fixed a couple of months ago. At least, I cannot reproduce it in Org 9.0. Regards, -- Nicolas Goaziou
Re: [O] org-agenda-filter-effort and "invalid face reference"
Wow, this issue comes very close to something I struggled for hours with (3h42') last year. It finally boiled down to this: sorting by effort in the agenda view only works (correctly) when org-agenda-remove-tags is t. Here's the (edited) ECM I created for IRC and eventually the list: http://paste.lisp.org/+7723 Is that still expected behaviour? Lack of documentation? The updated org-agenda-compare-effort Nicolas provided doesn't solve this, at least. Thanks Yan On Wed, Jan 4, 2017 at 10:10 PM, wtm wrote: > 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"
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"
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"
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"
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"
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"
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 <. org-version reports Org mode version 9.0.3 (9.0.3-elpaplus @ /home/jorge/.emacs.d/elpa/org-plus-contrib-20161224/) emacs-version reports GNU Emacs 25.1.91.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.18.9) of 2016-12-31 Regards -- • I am Brazilian. I hope my English is correct and I welcome corrections. • Please adopt free formats like PDF, ODF, Org, LaTeX, Opus, WebM and 7z. • Free (as in free speech) software for Android: https://f-droid.org/
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
Re: [O] org-agenda-filter-effort and "invalid face reference"
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