* Habits bug?
@ 2010-11-09 16:10 Robert Horn
2010-11-11 12:07 ` Matt Lundin
0 siblings, 1 reply; 4+ messages in thread
From: Robert Horn @ 2010-11-09 16:10 UTC (permalink / raw)
To: emacs-orgmode
I just noticed the following oddity.
1.) I have a custom agenda that consists of:
(setq org-agenda-custom-commands
'(("h" "Agenda and This Week tasks"
((agenda "")
(todo "THISWEEK")))))
2.) I have the default agenda period of 1 week at startup.
The behavior I see is:
a) When I do the C-c a h, I get the entire week, including the habits
and habit bars at the end of the section for today (somewhere mid-week)
b) If I type "d" to go into daily mode, the scheduled and extra todo's
that are "THISWEEK" are shown. But the habits and habit bars are not
present.
c) When I repeat C-c a h to regenerate, it stays in the daily mode (as
it should) and the habits and habit bars re-appear.
This is odd, and probably reflects a subtle bug somewhere in the
regeneration logic for changing the agenda period. It's not a critical
issue, since the work around is so easy, but someone who understands
that stretch of code might see it easily.
R Horn
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Habits bug?
2010-11-09 16:10 Habits bug? Robert Horn
@ 2010-11-11 12:07 ` Matt Lundin
2010-11-12 0:49 ` Robert Horn
0 siblings, 1 reply; 4+ messages in thread
From: Matt Lundin @ 2010-11-11 12:07 UTC (permalink / raw)
To: rjhorn; +Cc: emacs-orgmode
Robert Horn <rjhorn@alum.mit.edu> writes:
> I just noticed the following oddity.
>
> 1.) I have a custom agenda that consists of:
>
> (setq org-agenda-custom-commands
> '(("h" "Agenda and This Week tasks"
> ((agenda "")
> (todo "THISWEEK")))))
>
> 2.) I have the default agenda period of 1 week at startup.
>
> The behavior I see is:
>
> a) When I do the C-c a h, I get the entire week, including the habits
> and habit bars at the end of the section for today (somewhere mid-week)
>
> b) If I type "d" to go into daily mode, the scheduled and extra todo's
> that are "THISWEEK" are shown. But the habits and habit bars are not
> present.
>
> c) When I repeat C-c a h to regenerate, it stays in the daily mode (as
> it should) and the habits and habit bars re-appear.
>
> This is odd, and probably reflects a subtle bug somewhere in the
> regeneration logic for changing the agenda period. It's not a critical
> issue, since the work around is so easy, but someone who understands
> that stretch of code might see it easily.
I cannot reproduce this. I tried your custom command above (tweaked to
use one of my TODO keywords --- STARTED). The habits consistently
appeared when switching back and forth between day and week views. Would
it be possible to provide a minimal file and config that reproduces the
error?
Best,
Matt
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Habits bug?
2010-11-11 12:07 ` Matt Lundin
@ 2010-11-12 0:49 ` Robert Horn
2010-11-15 21:29 ` Robert Horn
0 siblings, 1 reply; 4+ messages in thread
From: Robert Horn @ 2010-11-12 0:49 UTC (permalink / raw)
To: Matt Lundin; +Cc: emacs-orgmode, rjhorn
[-- Attachment #1: Type: text/plain, Size: 2308 bytes --]
On 11/11/2010 07:07 AM, Matt Lundin wrote:
> Robert Horn <rjhorn@alum.mit.edu> writes:
>
>> I just noticed the following oddity.
>>
>> 1.) I have a custom agenda that consists of:
>>
>> (setq org-agenda-custom-commands
>> '(("h" "Agenda and This Week tasks"
>> ((agenda "")
>> (todo "THISWEEK")))))
>>
>> 2.) I have the default agenda period of 1 week at startup.
>>
>> The behavior I see is:
>>
>> a) When I do the C-c a h, I get the entire week, including the habits
>> and habit bars at the end of the section for today (somewhere mid-week)
>>
>> b) If I type "d" to go into daily mode, the scheduled and extra todo's
>> that are "THISWEEK" are shown. But the habits and habit bars are not
>> present.
>>
>> c) When I repeat C-c a h to regenerate, it stays in the daily mode (as
>> it should) and the habits and habit bars re-appear.
>>
>> This is odd, and probably reflects a subtle bug somewhere in the
>> regeneration logic for changing the agenda period. It's not a critical
>> issue, since the work around is so easy, but someone who understands
>> that stretch of code might see it easily.
>
> I cannot reproduce this. I tried your custom command above (tweaked to
> use one of my TODO keywords --- STARTED). The habits consistently
> appeared when switching back and forth between day and week views. Would
> it be possible to provide a minimal file and config that reproduces the
> error?
>
I didn't have time yet to create minimal files, but I learned more:
1) I can create it with a simpler custom command:
(setq org-agenda-custom-commands
'(("h" "Agenda and This Week tasks"
((agenda "")))))
2) The daily schedule stuff is also missing. So this is something in
the agenda processing that is not unique to habits.
3) It only happens the first time after startup that I switch from
weekly to daily mode. If I change the custom commands after that, there
is no problem. This makes it act like some sort of initialization
problem in daily/weekly agenda generation, not something unique to
habits. (Having to type "r" once in the agenda after startup is not
much of a problem.)
4) It happens with version 7.01g, and with the release_7.3-39-g68b5ca3
from git.
I've attached my .emacs in case there is something odd in there that
could be causing this.
R Horn
[-- Attachment #2: .emacs --]
[-- Type: text/plain, Size: 5834 bytes --]
;; Default window size
;;
(setq initial-frame-alist '((top . 1)(left . 10)(width . 120)(height . 45)))
(setq default-frame-alist '((width . 120)(height . 35)(menu-bar-lines . 1)))
;;
;; Always do fill
;;
(add-hook 'text-mode-hook
'(lambda () (visual-line-mode)))
;;
;; bring in remember
;;
;(add-to-list 'load-path "~/elisp/remember-2.0")
;(autoload 'remember "remember" nil t)
;(autoload 'remember-region "remember" nil t)
;;; (define-key global-map [f9] 'remember-region)
;(setq load-path (cons "~/elisp/remember" load-path))
;;
;; org-mode stuff
;;
(setq load-path (cons "~/org-git/org-mode/lisp" load-path))
(setq load-path (cons "~/org-git/org-mode/contrib/lisp" load-path))
(add-to-list 'auto-mode-alist '("\\.org\\'" . org-mode))
(global-set-key "\C-cl" 'org-store-link)
(global-set-key "\C-ca" 'org-agenda)
(define-key global-map [f8] 'org-capture) ; was org-remember
(add-hook 'org-mode-hook 'turn-on-font-lock) ; org-mode buffers only
(require 'org-install)
(require 'org-checklist)
(setq org-directory "~/org/")
(setq org-default-notes-file "~/org/notes")
(setq org-log-done 'time)
(setq org-todo-keywords (quote (
(sequence "TODO(t)" "NEXT(n)" "THISWEEK(h)" "STARTED" "|" "DONE(d!/!)")
(sequence "WAITING(w@/!)" "SOMEDAY(S)" "|" "CANCELLED(c@/!)")
(sequence "DELEGATED" "|" "DONE(d!/!)")
)))
(setq org-tag-alist '( ("agfa" . ?a) ("dicom" . ?d) ("home" . ?h) ("ihe" . ?i) ("computer" . ?c)
))
;;
;; ditaa stuff
;;
(setq org-ditaa-jar-path "/home/hornrj/org-git/org-mode/contrib/scripts/ditaa.jar")
(add-hook 'org-babel-after-execute-hook 'org-display-inline-images)
(setq org-babel-load-languages (quote ((emacs-lisp . t)
(dot . t)
(ditaa . t)
(R . t)
(python . t)
(ruby . t)
(gnuplot . t)
(clojure . t)
(sh . t))))
; Do not prompt to confirm evaluation
; This may be dangerous - make sure you understand the consequences
; of setting this -- see the docstring for details
(setq org-confirm-babel-evaluate nil)
;;
;; Try some interesting colors for tasks
;;
(setq org-todo-keyword-faces (quote (
("TODO" :foreground "red" :weight bold)
("NEXT" :foreground "steelblue" :weight bold)
("THISWEEK" :foreground "blue" :weight bold)
("DONE" :foreground "forestgreen" :weight bold)
("STARTED" :foreground "olivedrab" :weight bold)
("WAITING" :foreground "sienna" :weight bold)
("DELEGATED" :foreground "steelblue" :weight bold)
("SOMEDAY" :foreground "goldenrod" :weight bold)
("CANCELLED" :foreground "orangred" :weight shadow)
)))
;; We'll try using drawers for the logs
;;
(setq org-log-into-drawer "LOGBOOK")
(tool-bar-mode 0) ;; disable tool bars (I hope)
;;
;; Custom agenda
;;
(setq org-agenda-custom-commands
'(("h" "Agenda and This Week tasks"
((agenda "")
(todo "THISWEEK")))))
;;
;; Set up refile stuff
;;
(setq org-completion-use-ido t)
; Targets include this file and any file contributing to the agenda - up to 5 levels deep
(setq org-refile-targets (quote ((org-agenda-files :maxlevel . 5) (nil :maxlevel . 5))))
; Targets start with the file name - allows creating level 1 tasks
(setq org-refile-use-outline-path (quote file))
; Targets complete in steps so we start with filename, TAB shows the next level of targets etc
(setq org-outline-path-complete-in-steps t)
; Allow refile to create parent tasks with confirmation
(setq org-refile-allow-creating-parent-nodes (quote confirm))
;;;
;;; Word count
;;;
(defun word-count nil "Count words in buffer" (interactive)
(shell-command-on-region (point-min) (point-max) "wc -w"))
(custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(delete-selection-mode nil)
'(mark-even-if-inactive t)
'(org-agenda-files (quote ("~/org/dicom.org" "~/org/pomodoro.org" "~/org/people.org" "~hornrj/org/JOURNAL.org" "~hornrj/org/TODO.org" "~hornrj/org/agfa.org" "~hornrj/org/blog.org" "~hornrj/org/home.org" "~hornrj/org/ihe.org" "~hornrj/org/maynard.org" "~hornrj/org/standards.org" "~hornrj/org/travel.org" "~hornrj/org/refile.org")))
'(org-agenda-skip-deadline-prewarning-if-scheduled 1)
'(org-agenda-skip-scheduled-if-deadline-is-shown t)
'(org-agenda-skip-scheduled-if-done t)
'(org-capture-templates (quote (("t" "Task" entry (file "~/org/refile.org") "* TODO %?
%i
%a") ("j" "Journal entry" entry (file+datetree "~/org/JOURNAL.org") "* %U %?
%i
%a") ("i" "IHE Journal" entry (file+datetree "~/org/ihe.org") "* %U %?
%i
%a") ("d" "DICOM Journal" entry (file+datetree "~/org/dicom.org") "* %U %?
%i
%a") ("n" "Ideas" entry (file+datetree "~/org/idea.org") "* %U %^{Title}
%?%i
%a") ("s" "Shopping List item" item (file+headline "~/org/home.org" "RefileSL") "%?"))))
'(org-deadline-warning-days 7)
'(org-modules (quote (org-bbdb org-bibtex org-docview org-gnus org-info org-jsinfo org-habit org-irc org-mew org-mhe org-rmail org-vm org-wl org-w3m)))
'(scroll-bar-mode (quote right))
'(transient-mark-mode 1))
(custom-set-faces
;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(org-upcoming-deadline ((((class color) (min-colors 88) (background light)) (:foreground "dark salmon")))))
[-- Attachment #3: Type: text/plain, Size: 201 bytes --]
_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Habits bug?
2010-11-12 0:49 ` Robert Horn
@ 2010-11-15 21:29 ` Robert Horn
0 siblings, 0 replies; 4+ messages in thread
From: Robert Horn @ 2010-11-15 21:29 UTC (permalink / raw)
To: rjhorn, emacs-orgmode; +Cc: Matt Lundin
I tracked down the problem I was seeing. It's unrelated to habits. I
just connected it with habits because it affects them, as well as other
things.
The default behavior of the built-in agenda is to set the point in the
agenda to be today. This is not the default for custom commands. The
closest that custom commands have is the option to start the agenda with
today. That is actually what I prefer, so I'm happy with that. The
resulting org-agenda-custom-commands is
(setq org-agenda-custom-commands
'(("h" "Agenda and This Week tasks"
((agenda "" ((org-agenda-start-on-weekday nil)))
(todo "THISWEEK|STARTED")))))
What I was seeing was the non-display of today's calendar grid and
habits due to the point being on another day. The combination of "d"
and "r" was to get the day set to today, which caused today's calendar
grid and habits to re-appear.
R Horn
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2010-11-15 21:29 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-09 16:10 Habits bug? Robert Horn
2010-11-11 12:07 ` Matt Lundin
2010-11-12 0:49 ` Robert Horn
2010-11-15 21:29 ` Robert Horn
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).