From mboxrd@z Thu Jan 1 00:00:00 1970 From: Memnon Anon Subject: Re: Setting org-agenda-time-grid: My day starts at midnight Date: Sun, 05 Sep 2010 16:59:30 +0200 Message-ID: <87r5h8l0ol.fsf@mean.albasani.net> References: <874oerjgef.fsf@mean.albasani.net> <87zkw01dqw.fsf@gnu.org> <87k4n4fb0r.fsf@mean.albasani.net> <87d3swrvrw.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from [140.186.70.92] (port=60289 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OsGh1-0003XZ-HB for emacs-orgmode@gnu.org; Sun, 05 Sep 2010 10:59:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OsGh0-0007VR-2i for emacs-orgmode@gnu.org; Sun, 05 Sep 2010 10:59:39 -0400 Received: from mail-fx0-f41.google.com ([209.85.161.41]:62582) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OsGgz-0007V9-Ud for emacs-orgmode@gnu.org; Sun, 05 Sep 2010 10:59:38 -0400 Received: by fxm3 with SMTP id 3so2488492fxm.0 for ; Sun, 05 Sep 2010 07:59:36 -0700 (PDT) In-Reply-To: <87d3swrvrw.fsf@gnu.org> (Bastien's message of "Thu, 02 Sep 2010 17:48:51 +0200") 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: Bastien Cc: Org Mode --=-=-= Bastien writes: > Please pull again, this should be fixed now... Still problem here. Please try this: 0. Put attached 2 files into ~ 1. `emacs -Q ~/minimal.el' 2. Adjust path to org-mode git dir and Eval Buffer minimal.el 3. Try 'C-c a a' -> It fails for me 4. Uncomment `org-agenda-add-time-grid-maybe' in minimal.el 5. Eval Buffer 6. Try `C-c a a' -> It works for me If you do it not today, reschedule item1 in test.org to $today. Memnon Tested with: Org-mode version 7.01trans (release_7.01h.441.g798a78) Last commit: commit 798a78fe06daf75bdbc2031a8f49edadd30612e1 Author: Dan Davison Date: Sat Sep 4 13:36:48 2010 -0400 "GNU Emacs 23.2.1 (i486-pc-linux-gnu, GTK+ Version 2.20.0) of 2010-08-14 on raven, modified by Debian" --=-=-= Content-Type: application/emacs-lisp Content-Disposition: attachment; filename=minimal.el Content-Transfer-Encoding: quoted-printable Content-Description: minimal.el ;; Minimal org setup. Adjust path in line 4! (require 'cl) (setq load-path (cons "~/tmp/bin/org-mode/lisp" load-path)) ;;!ADJUST! (require 'org-install) (global-font-lock-mode 1) (setq org-agenda-ndays 1 org-agenda-files (quote ("~/test.org")) ;;!ADJUST! org-agenda-time-grid (quote ((daily weekly today require-timed) "----= ------------" ( 0000 0200 0400 0600 0800 1000 1200 1400 1600 1800 2000 2200= 2359)))) ; org-agenda-time-grid (quote ((daily weekly today require-timed) "---= -------------" ( 0200 0400 0600 0800 1000 1200 1400 1600 1800 2000 2200 235= 9)))) (global-set-key "\C-ca" 'org-agenda) ;; (defun org-agenda-add-time-grid-maybe (list ndays todayp) ;; (catch 'exit ;; (cond ((not org-agenda-use-time-grid) (throw 'exit list)) ;; ((and todayp (member 'today (car org-agenda-time-grid)))) ;; ((and (=3D ndays 1) (member 'daily (car org-agenda-time-grid)))) ;; ((member 'weekly (car org-agenda-time-grid))) ;; (t (throw 'exit list))) ;; (let* ((have (delq nil (mapcar ;; (lambda (x) (get-text-property 1 'time-of-day x)) ;; list))) ;; (string (nth 1 org-agenda-time-grid)) ;; (gridtimes (nth 2 org-agenda-time-grid)) ;; (req (car org-agenda-time-grid)) ;; (remove (member 'remove-match req)) ;; new time) ;; (if (and (member 'require-timed req) (not have)) ;; ;; don't show empty grid ;; (throw 'exit list)) ;; (while (setq time (pop gridtimes)) ;; (unless (and remove (member time have)) ;; (setq time (int-to-string time)) ;; (when (< (length time) 3) (setq time (concat "00" time))) ;;MAN make= sure time is at least 3 characters long or substring will fail ;; (push (org-format-agenda-item ;; nil string "" nil ;; (concat (substring time 0 -2) ":" (substring time -2))) ;; new) ;; (put-text-property ;; 1 (length (car new)) 'face 'org-time-grid (car new)))) ;; (if (member 'time-up org-agenda-sorting-strategy-selected) ;; (append new list) ;; (append list new))))) --=-=-= Content-Type: application/octet-stream Content-Disposition: attachment; filename=test.org Content-Transfer-Encoding: base64 Content-Description: test.org KiBJdGVtIDEKICBTQ0hFRFVMRUQ6IDwyMDEwLTA5LTA1IFNvIDE4OjAwPgo= --=-=-= 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 --=-=-=--