From: Robert Horn <rjhorn@alum.mit.edu>
To: Matt Lundin <mdl@imapmail.org>
Cc: emacs-orgmode@gnu.org, rjhorn@alum.mit.edu
Subject: Re: Habits bug?
Date: Thu, 11 Nov 2010 19:49:50 -0500 [thread overview]
Message-ID: <4CDC8F2E.1000808@alum.mit.edu> (raw)
In-Reply-To: <8739r8gj2s.fsf@fastmail.fm>
[-- 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
next prev parent reply other threads:[~2010-11-12 0:49 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-09 16:10 Habits bug? Robert Horn
2010-11-11 12:07 ` Matt Lundin
2010-11-12 0:49 ` Robert Horn [this message]
2010-11-15 21:29 ` Robert Horn
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=4CDC8F2E.1000808@alum.mit.edu \
--to=rjhorn@alum.mit.edu \
--cc=emacs-orgmode@gnu.org \
--cc=mdl@imapmail.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).