From mboxrd@z Thu Jan 1 00:00:00 1970 From: Victor A. Stoichita Subject: Re: ordering events by hour in the agenda Date: Tue, 28 Jun 2016 09:50:50 +0200 Message-ID: <87vb0tsqed.fsf@bufni.kher> References: <82f0f13a45734a25bb965208bffe5d91@HE1PR01MB1898.eurprd01.prod.exchangelabs.com> <87twgeoeak.fsf@ucl.ac.uk> <87d1n2s9bc.fsf@bufni.kher> <87a8i6s8sl.fsf@bufni.kher> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:46044) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bHnnU-00064u-Gd for emacs-orgmode@gnu.org; Tue, 28 Jun 2016 03:51:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bHnnP-0003So-MH for emacs-orgmode@gnu.org; Tue, 28 Jun 2016 03:51:03 -0400 Received: from mail.coeur.jabatus.fr ([109.234.163.50]:34624) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bHnnP-0003RS-7u for emacs-orgmode@gnu.org; Tue, 28 Jun 2016 03:50:59 -0400 In-reply-to: <87a8i6s8sl.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 Hi. Got it this morning! The disorder in my timed events came from=20 this block: (setq org-agenda-sorting-strategy (quote ((agenda deadline-up priority-down) (todo priority-down category-keep) (tags priority-down category-keep) (search category-keep)))) The agenda line should also have time-up (agenda time-up=20 deadline-up priority-down). I didn=E2=80=99t think of it first because the events in=20 my test file don=E2=80=99t have deadlines or priorities. Turns out that precisely= =20 for that reason they were left unordered. Should have been obvious=20 probably=E2=80=A6 Thanks for reading through. Have a nice day ! Victor Le 27 Jun 2016, Victor A. Stoichita a =C3=A9crit : > 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 > > > Le 27 Jun 2016, Victor A. Stoichita =20 > 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=20 >> 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=20 >> (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=20 >> bold)) =20 >> (?B . (:foreground=20 >> "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=20 >> 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-mo= de/=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=20 >> "~/org/sitelesc_todo.org"=20 >> "New") "* TODO [#B] %i %? :site: \nSCHEDULED: %^t\n %a\n")=20 >> ("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