emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: John Hendy <jw.hendy@gmail.com>
To: Bastien <bzg@altern.org>
Cc: emacs-orgmode <emacs-orgmode@gnu.org>
Subject: Re: Odd behavior in custom agenda (was "done" keyword red)
Date: Wed, 24 Aug 2011 14:15:02 -0500	[thread overview]
Message-ID: <CA+M2ft9PyfBTjqMyTadMd2qM5x3idgav1N+6deUQSTNe5CDoPw@mail.gmail.com> (raw)
In-Reply-To: <871uwak67r.fsf@gnu.org>

On Wed, Aug 24, 2011 at 1:35 PM, Bastien <bzg@altern.org> wrote:
> Hi John,
>
> John Hendy <jw.hendy@gmail.com> writes:
>
>> It's as if the face changes based both on whether it's scheduled or
>> deadlined and what day it's showing up on. Any input on this, or is it
>> normal? I guess I'd expect the todo keyword "done" to be green no
>> matter what, but perhaps the headline is shown as red because the
>> deadline is soon/tomorrow?
>
> Can you hit `C-u C-x =' on the word displaying the wrong face,
> report what the buffer says, and tell what face do you expect
> instead?
>

Here is the output on the "d" in a red "done":
----------
        character: d (100, #o144, #x64)
preferred charset: ascii (ASCII (ISO646 IRV))
       code point: 0x64
           syntax: w 	which means: word
         category: .:Base, a:ASCII, l:Latin, r:Roman
      buffer code: #x64
        file code: #x64 (encoded by coding system iso-latin-1-dos)
          display: by this font (glyph code)
    uniscribe:-outline-Courier
New-bold-normal-normal-mono-13-*-*-*-c-*-iso8859-1 (#x47)

Character code properties: customize what to show
  name: LATIN SMALL LETTER D
  general-category: Ll (Letter, Lowercase)

There are text properties here:
  date                 734372
  day                  734372
  done-face            org-agenda-done
  dotime               time
  duration             nil
  effort               ""
  effort-minutes       nil
  extra                "Deadline:  "
  face                 org-todo
  format               [Show]
  help-echo            "mouse-2 or RET jump to org file ~/org/tf.org"
  mouse-face           highlight
  org-agenda-type      agenda
  org-category         "tf"
  org-complex-heading-regexp [Show]
  org-day-cnt          2
  org-hd-marker        #<marker at 4866 in tf.org>
  org-heading          t
  org-highest-priority 65
  org-lowest-priority  67
  org-marker           #<marker at 4948 in tf.org>
  org-not-done-regexp  "\\<\\(todo\\|next\\|proj\\)\\>"
  org-todo-regexp
"\\<\\(todo\\|next\\|proj\\|waiting\\|done\\|cancelled\\)\\>"
  priority             1000
  tags                 [Show]
  time                 ""
  time-of-day          nil
  todo-state           [Show]
  txt                  [Show]
  type                 "deadline"
  undone-face          org-warning
----------

I don't know what I expect as I have never played with faces before. I
expect the done should be green, even if it's scheduled/deadlined...
because it's done and that's how done shows up everywhere else. I'm
trying to figure out why it would show up as red even though it's
done. The description for "done" shows up in green despite "done"
being red. The description of "todo" shows up in red and "todo" is
also in red.

> Also, do you have the same problem when only using uppercase
> DONE keywords?

The screenshot in the original post and the example file should reveal
everything. Here is a new one from today: http://i.imgur.com/HyjAj.png

And here is a commented basic org file that produces that picture for me:

#+begin_src org
#+todo: todo(t) next(n!) proj(p) | waiting(w@/@) done(d/@) cancelled(c@/@)

* done no schedule/no deadline
- in org buffer: green "done"
- does not show in agenda buffer (as expected)

* done scheduled
 SCHEDULED: <2011-08-24 Wed>
- in org buffer: green "done"
- agenda buffer 8/24: red "done", lt. green title
- agenda buffer 8/25: not shown (as expected)

* done deadline
 DEADLINE: <2011-08-25 Thu>
- in org buffer: green "done"
- agenda buffer 8/24: red "done", lt. green title
- agenda buffer 8/25: red "done", lt. green title

* done deadline + scheduled
 DEADLINE: <2011-08-25 Thu> SCHEDULED: <2011-08-24 Wed>
- in org buffer: green "done"
- agenda buffer 8/24: not shown (as expected)
- agenda buffer 8/25: red "done", lt. green title

* DONE no schedule/no deadline
- in org buffer: blue "DONE" (not registered as todo keyword)
- does not show in agenda buffer (as expected)

* DONE scheduled
 SCHEDULED: <2011-08-24 Wed
- in org buffer: blue "DONE"
- agenda buffer 8/24: dark green "DONE", dark green title
- agenda buffer 8/25: not shown (as expected)

* DONE deadline
 DEADLINE: <2011-08-25 Thu>
- in org buffer: blue "DONE"
- agenda buffer 8/24: not shown (as expected)
- agenda buffer 8/24: shown again with "In 1d." with brown "DONE" and title
- agenda buffer 8/25: red "DONE", red title

* DONE deadline + scheduled
 DEADLINE: <2011-08-25 Thu> SCHEDULED: <2011-08-24 Wed>
- in org buffer: blue "DONE"
- agenda buffer 8/24: dark green "DONE", dark green title
- agenda buffer 8/24: shown again with "In 1d." with brown "DONE" and title
- agenda buffer 8/25: red "DONE", red title

#+end_src

My .emacs contains this relevant section:

----------
(setq org-todo-keywords '((sequence
      "todo(t)" "next(n)" "proj(p)" "|"
      "waiting(w@/@)" "done(d)" "cancelled(c@/@)")))
----------

So, to sum up...
- "done" is recognized by the org buffer, but seems to trigger the
"todo" face in agenda. It also isn't seeming to trigger advance
warnings for deadlines (In 1d.).
- "DONE" is not recognized by the org buffer as a todo keyword,
registers with agenda to give an advance deadline warning, shows up
with a green todo keyword on the day before, but shows up in all red
on the day of.

Is this weird or as expected? I'm still not sure. My eyes gravitate
toward red keywords and so it really perplexed me that done's were
showing up in red on their scheduled/deadlined days despite being
done. Since writing this email and since no one responded for a couple
weeks, I hunted and found these options, which are now in my .emacs:

----------
(setq org-agenda-skip-scheduled-if-done t)
(setq org-agenda-skip-deadline-if-done t)
----------

It hasn't been a problem since.

I'm still interested in the answer on this, though.



Thanks,
John



> Thanks for further input!
>
> --
>  Bastien
>

      reply	other threads:[~2011-08-24 19:15 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-10 21:21 Odd behavior in custom agenda (was "done" keyword red) John Hendy
2011-08-24 18:35 ` Bastien
2011-08-24 19:15   ` John Hendy [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CA+M2ft9PyfBTjqMyTadMd2qM5x3idgav1N+6deUQSTNe5CDoPw@mail.gmail.com \
    --to=jw.hendy@gmail.com \
    --cc=bzg@altern.org \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).