From mboxrd@z Thu Jan 1 00:00:00 1970 From: Victor A. Stoichita Subject: Re: ordering events by hour in the agenda Date: Mon, 27 Jun 2016 21:58:50 +0200 Message-ID: <87a8i6s8sl.fsf@bufni.kher> References: <82f0f13a45734a25bb965208bffe5d91@HE1PR01MB1898.eurprd01.prod.exchangelabs.com> <87twgeoeak.fsf@ucl.ac.uk> <87d1n2s9bc.fsf@bufni.kher> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:46336) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bHcgU-0004mO-Po for emacs-orgmode@gnu.org; Mon, 27 Jun 2016 15:59:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bHcgQ-0005Vg-VU for emacs-orgmode@gnu.org; Mon, 27 Jun 2016 15:59:06 -0400 Received: from mail.senat.jabatus.fr ([109.234.163.56]:50594) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bHcgQ-0005VL-F9 for emacs-orgmode@gnu.org; Mon, 27 Jun 2016 15:59:02 -0400 In-reply-to: <87d1n2s9bc.fsf@bufni.kher> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: Eric S Fraga Cc: orgmode list --=-=-= Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable I=E2=80=99m afraid the last part of my previous message got reformatted=20 again by mu4e. I really need to look better into its handling of=20 hard/newlines.=20 Meanwhile please find attached my org config which I was trying=20 to yank. Thanks for your help! Victor --=-=-= Content-Type: application/emacs-lisp Content-Disposition: attachment; filename=vic_emacs_org-config.el Content-Transfer-Encoding: quoted-printable (global-set-key (kbd "C-c a") 'org-agenda) ;;set priority range from A to C with default A (setq org-highest-priority ?A) (setq org-lowest-priority ?C) (setq org-default-priority ?A) ;;set colours for priorities (setq org-priority-faces '((?A . (:foreground "#F0DFAF" :weight bold)) (?B . (:foreground "LightSteelBlue")) (?C . (:foreground "OliveDrab")))) ;;open agenda in current window (setq org-agenda-window-setup (quote reorganize-frame)) (setq org-agenda-restore-windows-after-quit ) ; (setq org-deadline-warning-days 7) (setq org-agenda-start-on-weekday 1)=20 (setq org-agenda-custom-commands '(("v" "Mon agenda" agenda "" ((org-agenda-ndays 7) ;; agenda will start in week view (org-agenda-repeating-timestamp-show-all t) ;; ensures that rep= eating events appear on all relevant dates (org-agenda-files '("~/org/vic.org")) ;; Only my own agenda (org-agenda-skip-function '(org-agenda-skip-entry-if 'deadline 's= cheduled)))) ;; limits agenda view to timestamped items ("e" "Avec Estelle et Arthur" agenda "" ((org-agenda-ndays 7) ;; agenda will start in week view (org-agenda-repeating-timestamp-show-all t) ;; ensures that rep= eating events appear on all relevant dates (org-agenda-files '("~/org/")) ;; All agenda files (org-agenda-skip-function '(org-agenda-skip-entry-if 'deadline 's= cheduled)))) =09 ("v" "Agenda just vic" agenda "" ((org-agenda-entry-types '(vic)) )) ("n" "Agenda and all TODOs" ((agenda "" nil) (alltodo "" nil)) nil) ("c" "Calendar view" vic/cfw:open-org-calendar "" nil) )) ;;capture todo items using C-c c t (define-key global-map (kbd "C-c c") 'org-capture) (setq org-default-notes-file (concat org-directory "/notes.org")) (setq org-capture-templates '(("e" "event" entry (file "vic.org") "* %^{Heading} %i %?\n %^t \n %a\n") ("t" "todo" entry (file+headline "~/org/todo.org" "En g=C3=A9n=C3=A9ral") "* TODO [#B] %i %?\nSCHEDULED: %^t\n %a\n") ;; For mu4e. From http://pragmaticemacs.com/emacs/master-your-inbox-with-m= u4e-and-org-mode/ (see above) ("m" "todo mails" entry (file+headline "~/org/todo.org" "Mails") "* TODO [#A] %? :mails: \nSCHEDULED: %(org-insert-time-stamp (org-read-da= te nil t \"+0d\"))\n%a\n") ("r" "todo terrain" entry (file+headline "~/org/todo.org" "Terrain") "* TODO [#B] %i %?\nSCHEDULED: %^t\n %a\n") ("l" "todo site lesc" entry (file+headline "~/org/sitelesc_todo.org" "New") "* TODO [#B] %i %? :site: \nSCHEDULED: %^t\n %a\n") ("c" "todo crem" entry (file+headline "~/org/todo.org" "Crem") "* TODO [#B] %i %? :crem: \nSCHEDULED: %^t\n %a\n"))) (global-set-key "\C-c L" 'org-insert-link-global) (global-set-key "\C-c o" 'org-open-at-point-global) (require 'org-mime) (setq org-mime-library 'mml) ;; sort tasks in order of when they are due and then by priority (setq org-agenda-sorting-strategy (quote ((agenda deadline-up priority-down) (todo priority-down category-keep) (tags priority-down category-keep) (search category-keep)))) (setq org-agenda-files '("~/org") org-icalendar-include-todo (quote t) ;; org-icalendar-store-UID t org-icalendar-timezone "GMT+2 CEST" org-icalendar-use-scheduled (quote (event-if-not-todo todo-start)) ;; org-icalendar-use-scheduled (quote (nil)) org-log-done (quote time) org-replace-disputed-keys nil) --=-=-= Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable Le 27 Jun 2016, Victor A. Stoichita a =C3=A9crit : >> Your output looks very strange. This may be due to formatting=20 >> of your email. In any case, can you send the org agenda=20 >> files used by your agenda view?=20 > =20 > Sorry for the weird output. I=E2=80=99ll investigate that.=20 >=20 > I made a test on a fresh file with just 4 entries. The problem=20 > seems to be that my events are output to the agenda in the same=20 > order as they are in the file. So if my file has=20 >=20 > --8<---------------cut=20 > here---------------start------------->8--- * Thing on Saturday=20 > evening <2016-07-02 Sat 19:00> =20 >=20 > * Thing on Saturday morning <2016-07-02 Sat 10:30> =20 >=20 > * Thing on Saturday afternoon <2016-07-02 Sat 14:00> =20 >=20 > * Lunch on Saturday <2016-07-02 Sat 12:00>=20 >=20 > --8<---------------cut=20 > here---------------end--------------->8--- =20 > =20 > The output of C-c a a is [I added extra blank lines to avoid=20 > formatting problems]:=20 >=20 > --8<---------------cut=20 > here---------------start------------->8--- =20 >=20 > Saturday 2 July 2016=20 > =20 > test: 19:00...... Thing on Saturday evening=20 > =20 > test: 10:30...... Thing on Saturday morning=20 > =20 > test: 14:00...... Thing on Saturday afternoon=20 > =20 > test: 12:00...... Lunch on Saturday=20 >=20 > --8<---------------cut=20 > here---------------end--------------->8--- =20 >=20 > Now if I move "Lunch on Saturday" to the top of my org file and=20 > refresh the agenda, it will displayed "Lunch on Saturday" at the=20 > top Saturday too. So it seems that the agenda correctly sorts=20 > the events by day, but then doesn=E2=80=99t sort them by time within=20 > a day. =20 >=20 > In the org section of my .emacs/init.el (I dont=E2=80=99t use .emacs)=20 > I have the following:=20 > =20 > --8<---------------cut=20 > here---------------start------------->8--- (global-set-key (kbd=20 > "C-c a") 'org-agenda)=20 > =20 > ;;set priority range from A to C with default A (setq=20 > org-highest-priority ?A) (setq org-lowest-priority ?C) (setq=20 > org-default-priority ?A) ;;set colours for priorities (setq=20 > org-priority-faces '((?A . (:foreground "#F0DFAF" :weight bold)) =20 > (?B . (:foreground "LightSteelBlue"))=20 > (?C . (:foreground "OliveDrab")))) =20 > =20 > ;;open agenda in current window (setq org-agenda-window-setup=20 > (quote reorganize-frame)) (setq=20 > org-agenda-restore-windows-after-quit ) ;=20 > (setq org-deadline-warning-days 7)=20 > =20 > (setq org-agenda-start-on-weekday 1) (setq=20 > org-agenda-custom-commands =20 > '(("v" "Mon agenda" agenda "" =20 > ((org-agenda-ndays 7) ;; agenda will start in=20 > week view =20 > (org-agenda-repeating-timestamp-show-all t) ;;=20 > ensures that repeating events appear on all relevant=20 > dates =20 > (org-agenda-files '("~/org/vic.org")) ;; Only my own=20 > agenda =20 > (org-agenda-skip-function '(org-agenda-skip-entry-if=20 > 'deadline 'scheduled)))) ;; limits agenda view to=20 > timestamped items =20 > ("e" "Avec Estelle et Arthur" agenda "" =20 > ((org-agenda-ndays 7) ;; agenda will start in=20 > week view =20 > (org-agenda-repeating-timestamp-show-all t) ;;=20 > ensures that repeating events appear on all relevant=20 > dates =20 > (org-agenda-files '("~/org/")) ;; All agenda files =20 > (org-agenda-skip-function '(org-agenda-skip-entry-if=20 > 'deadline 'scheduled)))) =20 > ("v" "Agenda just vic" agenda ""=20 > ((org-agenda-entry-types '(vic)) )) ("n" "Agenda and all TODOs"=20 > ((agenda "" nil) (alltodo "" nil)) nil) ("c" "Calendar view"=20 > vic/cfw:open-org-calendar "" nil) )) =20 >=20 > ;;capture todo items using C-c c t (define-key global-map (kbd=20 > "C-c c") 'org-capture) (setq org-default-notes-file (concat=20 > org-directory "/notes.org")) (setq org-capture-templates =20 > '(("e" "event" entry (file "vic.org") =20 > "* %^{Heading} %i %?\n %^t \n %a\n") ("t" "todo" entry=20 > (file+headline "~/org/todo.org" "En g=C3=A9n=C3=A9ral") "* TODO [#B] %= i=20 > %?\nSCHEDULED: %^t\n %a\n") ;; For mu4e.=20 > From=20 > http://pragmaticemacs.com/emacs/master-your-inbox-with-mu4e-and-org-mod= e/=20 > (see above) ("m" "todo mails" entry (file+headline=20 > "~/org/todo.org" "Mails") "* TODO [#A] %? :mails: \nSCHEDULED:=20 > %(org-insert-time-stamp (org-read-date nil t \"+0d\"))\n%a\n")=20 > ("r" "todo terrain" entry (file+headline "~/org/todo.org"=20 > "Terrain") "* TODO [#B] %i %?\nSCHEDULED: %^t\n %a\n") ("l"=20 > "todo site lesc" entry (file+headline "~/org/sitelesc_todo.org"=20 > "New") "* TODO [#B] %i %? :site: \nSCHEDULED: %^t\n %a\n") ("c"=20 > "todo crem" entry (file+headline "~/org/todo.org" "Crem") "*=20 > TODO [#B] %i %? :crem: \nSCHEDULED: %^t\n %a\n")))=20 > (global-set-key "\C-c L" 'org-insert-link-global)=20 > (global-set-key "\C-c o" 'org-open-at-point-global) (require=20 > 'org-mime) (setq org-mime-library 'mml) ;; sort tasks in=20 > order of when they are due and then by priority (setq=20 > org-agenda-sorting-strategy =20 > (quote =20 > ((agenda deadline-up priority-down) =20 > (todo priority-down category-keep) (tags priority-down=20 > category-keep) (search category-keep)))) =20 > =20 > (setq =20 > org-agenda-files '("~/org") org-icalendar-include-todo (quote=20 > t) ;; org-icalendar-store-UID t org-icalendar-timezone "GMT+2=20 > CEST" org-icalendar-use-scheduled (quote (event-if-not-todo=20 > todo-start)) ;; org-icalendar-use-scheduled (quote (nil))=20 > org-log-done (quote time) org-replace-disputed-keys nil)=20 >=20 > --8<---------------cut=20 > here---------------end--------------->8---=20 >=20 > Thanks for reading through!=20 >=20 > Victor --=-=-=--