From mboxrd@z Thu Jan 1 00:00:00 1970 From: Robert Horn Subject: Re: Habits bug? Date: Thu, 11 Nov 2010 19:49:50 -0500 Message-ID: <4CDC8F2E.1000808@alum.mit.edu> References: <4CD97293.2060002@alum.mit.edu> <8739r8gj2s.fsf@fastmail.fm> Reply-To: rjhorn@alum.mit.edu Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------080702030608000606040807" Return-path: Received: from [140.186.70.92] (port=33094 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PGhpY-00031w-Ad for emacs-orgmode@gnu.org; Thu, 11 Nov 2010 19:49:29 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PGhpV-0004Xz-Sn for emacs-orgmode@gnu.org; Thu, 11 Nov 2010 19:49:27 -0500 Received: from mail1.panix.com ([166.84.1.72]:56716) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PGhpV-0004Xi-QB for emacs-orgmode@gnu.org; Thu, 11 Nov 2010 19:49:25 -0500 In-Reply-To: <8739r8gj2s.fsf@fastmail.fm> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Matt Lundin Cc: emacs-orgmode@gnu.org, rjhorn@alum.mit.edu This is a multi-part message in MIME format. --------------080702030608000606040807 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit On 11/11/2010 07:07 AM, Matt Lundin wrote: > Robert Horn 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 --------------080702030608000606040807 Content-Type: text/plain; name=".emacs" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=".emacs" ;; 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"))))) --------------080702030608000606040807 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ 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 --------------080702030608000606040807--