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:48:59 +0200 Message-ID: <87bn2ms990.fsf@bufni.kher> References: <82f0f13a45734a25bb965208bffe5d91@HE1PR01MB1898.eurprd01.prod.exchangelabs.com> <87twgeoeak.fsf@ucl.ac.uk> 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]:43724) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bHcWp-0000p1-8I for emacs-orgmode@gnu.org; Mon, 27 Jun 2016 15:49:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bHcWm-00035o-1h for emacs-orgmode@gnu.org; Mon, 27 Jun 2016 15:49:07 -0400 Received: from mail.wear.jabatus.fr ([109.234.163.64]:59652) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bHcWl-00035I-OS for emacs-orgmode@gnu.org; Mon, 27 Jun 2016 15:49:03 -0400 In-reply-to: <87twgeoeak.fsf@ucl.ac.uk> 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 > Your output looks very strange. This may be due to formatting=20 > of your email.=20 >=20 > In any case, can you send the org agenda files used by your=20 > agenda view? Sorry for the weird output. I=E2=80=99ll investigate that. 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 --8<---------------cut here---------------start------------->8---=20 * Thing on Saturday evening <2016-07-02 Sat 19:00>=20 * Thing on Saturday morning <2016-07-02 Sat 10:30>=20 * Thing on Saturday afternoon <2016-07-02 Sat 14:00>=20 * Lunch on Saturday <2016-07-02 Sat 12:00> --8<---------------cut here---------------end--------------->8---=20 The output of C-c a a is [I added extra blank lines to avoid=20 formatting problems]: --8<---------------cut here---------------start------------->8---=20 Saturday 2 July 2016 =20 test: 19:00...... Thing on Saturday evening =20 test: 10:30...... Thing on Saturday morning =20 test: 14:00...... Thing on Saturday afternoon =20 test: 12:00...... Lunch on Saturday --8<---------------cut here---------------end--------------->8---=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 the=20 events by day, but then doesn=E2=80=99t sort them by time within a day.=20 In the org section of my .emacs/init.el (I dont=E2=80=99t use .emacs)=20 I have the following: =20 --8<---------------cut here---------------start------------->8---=20 (global-set-key (kbd "C-c a") 'org-agenda) =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 (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) ;; ensures=20 that repeating events appear on all relevant 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) ;; ensures=20 that repeating events appear on all relevant dates=20 (org-agenda-files '("~/org/")) ;; All agenda files=20 (org-agenda-skip-function '(org-agenda-skip-entry-if=20 'deadline 'scheduled))))=20 =20 ("v" "Agenda just vic" agenda "" ((org-agenda-entry-types=20 '(vic)) )) ("n" "Agenda and all TODOs" ((agenda "" nil)=20 (alltodo "" nil)) nil) ("c" "Calendar view"=20 vic/cfw:open-org-calendar "" nil) ))=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]=20 %i %?\nSCHEDULED: %^t\n %a\n") ;; For mu4e.=20 From=20 http://pragmaticemacs.com/emacs/master-your-inbox-with-mu4e-and-org-mode= /=20 (see above) ("m" "todo mails" entry (file+headline=20 "~/org/todo.org" "Mails") "* TODO [#A] %? :mails:=20 \nSCHEDULED: %(org-insert-time-stamp (org-read-date nil=20 t \"+0d\"))\n%a\n") ("r" "todo terrain" entry=20 (file+headline "~/org/todo.org" "Terrain") "* TODO [#B] %i=20 %?\nSCHEDULED: %^t\n %a\n") ("l" "todo site lesc" entry=20 (file+headline "~/org/sitelesc_todo.org" "New") "* TODO=20 [#B] %i %? :site: \nSCHEDULED: %^t\n %a\n") ("c" "todo=20 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)=20 (require 'org-mime) (setq org-mime-library 'mml) ;; sort=20 tasks in order of when they are due and then by priority=20 (setq 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) --8<---------------cut here---------------end--------------->8--- Thanks for reading through! Victor