emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* ordering events by hour in the agenda
@ 2016-06-27 14:33 Victor A. Stoichita
  0 siblings, 0 replies; 7+ messages in thread
From: Victor A. Stoichita @ 2016-06-27 14:33 UTC (permalink / raw)
  To: orgmode list

Hi,

I need some help to understand the way the hour grid works in 
agenda displays. I read this page from the doc :

[1] 
http://orgmode.org/manual/Time_002dof_002dday-specifications.html

But my agenda doesn’t look like the examples there. Its timed 
events appear in seemingly random order and they are not reflected 
in the hourly grid when I display it.

Here’s a snippet from my weekly agenda without the grid:

--8<---------------cut here---------------start------------->8--- 
Monday     27 June 2016 W26 
  vic:        17:00...... Docteur Dupont vic:         9:00...... 
  Appeler Dupond 
Tuesday    28 June 2016 
  vic:        10:00...... Rencontrer Pierre vic: 
  14:00...... Voir Jacques vic:        14:00...... Rdv Paul?  vic: 
  12:00...... Visite Julie

--8<---------------cut here---------------end--------------->8---

Based on [1] I’d expect Appeler Dupond to appear before Docteur 
Dupont on Monday. There seems to be no logic in the order of the 
events on Tuesday either. All these events come from the same org 
file. None has a specific tag or something.

Here’s the same snippet with the hourly grid turned on:

--8<---------------cut here---------------start------------->8--- 
Monday     27 June 2016 W26 
  vic:        17:00...... Docteur Dupont vic:         9:00...... 
  Appeler Dupond 
              16:04...... 
              now - - - - - - - - - - - - - - - - - - - - - - - - - 
              20:00...... ---------------- 
              18:00...... ---------------- 
              16:00...... ---------------- 
              14:00...... ---------------- 
              12:00...... ---------------- 
              10:00...... ---------------- 
               8:00...... ---------------- 
Tuesday    28 June 2016 
  vic:        10:00...... Rencontrer Pierre vic: 
  14:00...... Voir Jacques vic:        14:00...... Rdv Paul?  vic: 
  12:00...... Visite Julie
  --8<---------------cut 
  here---------------end--------------->8---

Based on [1] I’d expect the two events at 9:00 and 17:00 on Monday 
to appear in the grid. I’d also expect the grid to progress from 
early at the top to late at the bottom. I’m not sure whether the 
line with "Now" should appear at the top (rather than at its place 
in the hour listing).

C-h v says that the value of org-agenda-time-grid is ((daily today 
require-timed) "----------------" (800 1000 1200 1400 1600 1800 
2000))
This is the default setting I think. I have not set any variable 
related to the time grid in my .emacs file.

Where else should I look to get the timed events arranged in their 
chrolonogical order?

I have Org-mode 8.3.4 with Emacs 24.5.1

Best regards,
Victor

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: ordering events by hour in the agenda
       [not found] <82f0f13a45734a25bb965208bffe5d91@HE1PR01MB1898.eurprd01.prod.exchangelabs.com>
@ 2016-06-27 15:13 ` Eric S Fraga
  2016-06-27 19:47   ` Victor A. Stoichita
  2016-06-27 19:48   ` Victor A. Stoichita
  0 siblings, 2 replies; 7+ messages in thread
From: Eric S Fraga @ 2016-06-27 15:13 UTC (permalink / raw)
  To: Victor A.Stoichita; +Cc: orgmode list

Your output looks very strange.  This may be due to formatting of your
email.

In any case, can you send the org agenda files used by your agenda view?

-- 
: Eric S Fraga (0xFFFCF67D), Emacs 25.0.94.1, Org release_8.3.4-869-gf2c421

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: ordering events by hour in the agenda
  2016-06-27 15:13 ` ordering events by hour in the agenda Eric S Fraga
@ 2016-06-27 19:47   ` Victor A. Stoichita
  2016-06-27 19:58     ` Victor A. Stoichita
  2016-06-27 19:48   ` Victor A. Stoichita
  1 sibling, 1 reply; 7+ messages in thread
From: Victor A. Stoichita @ 2016-06-27 19:47 UTC (permalink / raw)
  To: Eric S Fraga; +Cc: orgmode list



> Your output looks very strange.  This may be due to formatting 
> of your email. 
> 
> In any case, can you send the org agenda files used by your 
> agenda view?


Sorry for the weird output. I’ll investigate that.

I made a test on a fresh file with just 4 entries. The problem 
seems to be that my events are output to the agenda in the same 
order as they are in the file. So if my file has

--8<---------------cut here---------------start------------->8--- 
* Thing on Saturday evening
<2016-07-02 Sat 19:00> 

* Thing on Saturday morning
<2016-07-02 Sat 10:30> 

* Thing on Saturday afternoon
<2016-07-02 Sat 14:00> 

* Lunch on Saturday
<2016-07-02 Sat 12:00>

--8<---------------cut here---------------end--------------->8--- 


The output of C-c a a is [I added extra blank lines to avoid 
formatting problems]:

--8<---------------cut here---------------start------------->8--- 

Saturday    2 July 2016
 
  test:       19:00...... Thing on Saturday evening
   
  test:       10:30...... Thing on Saturday morning
   
  test:       14:00...... Thing on Saturday afternoon
   
  test:       12:00...... Lunch on Saturday

--8<---------------cut here---------------end--------------->8--- 

Now if I move "Lunch on Saturday" to the top of my org file and 
refresh the agenda, it will displayed "Lunch on Saturday" at the 
top Saturday too. So it seems that the agenda correctly sorts the 
events by day, but then doesn’t sort them by time within a day. 

In the org section of my .emacs/init.el (I dont’t use .emacs) 
I have the following:
 
--8<---------------cut here---------------start------------->8--- 
(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)   (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 repeating 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 'scheduled)))) ;; 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 repeating events appear on all relevant dates 
	  (org-agenda-files '("~/org/")) ;; All agenda files 
          (org-agenda-skip-function '(org-agenda-skip-entry-if 
          'deadline 'scheduled)))) 
	 
	("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énéral") "* TODO [#B] 
	%i %?\nSCHEDULED: %^t\n %a\n") ;; For mu4e. 
	From 
	http://pragmaticemacs.com/emacs/master-your-inbox-with-mu4e-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-date 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)

--8<---------------cut here---------------end--------------->8---

Thanks for reading through!

Victor

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: ordering events by hour in the agenda
  2016-06-27 15:13 ` ordering events by hour in the agenda Eric S Fraga
  2016-06-27 19:47   ` Victor A. Stoichita
@ 2016-06-27 19:48   ` Victor A. Stoichita
  1 sibling, 0 replies; 7+ messages in thread
From: Victor A. Stoichita @ 2016-06-27 19:48 UTC (permalink / raw)
  To: Eric S Fraga; +Cc: orgmode list


> Your output looks very strange.  This may be due to formatting 
> of your email. 
> 
> In any case, can you send the org agenda files used by your 
> agenda view?


Sorry for the weird output. I’ll investigate that.

I made a test on a fresh file with just 4 entries. The problem 
seems to be that my events are output to the agenda in the same 
order as they are in the file. So if my file has

--8<---------------cut here---------------start------------->8--- 
* Thing on Saturday evening
<2016-07-02 Sat 19:00> 

* Thing on Saturday morning
<2016-07-02 Sat 10:30> 

* Thing on Saturday afternoon
<2016-07-02 Sat 14:00> 

* Lunch on Saturday
<2016-07-02 Sat 12:00>

--8<---------------cut here---------------end--------------->8--- 


The output of C-c a a is [I added extra blank lines to avoid 
formatting problems]:

--8<---------------cut here---------------start------------->8--- 

Saturday    2 July 2016
 
  test:       19:00...... Thing on Saturday evening
   
  test:       10:30...... Thing on Saturday morning
   
  test:       14:00...... Thing on Saturday afternoon
   
  test:       12:00...... Lunch on Saturday

--8<---------------cut here---------------end--------------->8--- 

Now if I move "Lunch on Saturday" to the top of my org file and 
refresh the agenda, it will displayed "Lunch on Saturday" at the 
top Saturday too. So it seems that the agenda correctly sorts the 
events by day, but then doesn’t sort them by time within a day. 

In the org section of my .emacs/init.el (I dont’t use .emacs) 
I have the following:
 
--8<---------------cut here---------------start------------->8--- 
(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)   (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 repeating 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 'scheduled)))) ;; 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 repeating events appear on all relevant dates 
	  (org-agenda-files '("~/org/")) ;; All agenda files 
          (org-agenda-skip-function '(org-agenda-skip-entry-if 
          'deadline 'scheduled)))) 
	 
	("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énéral") "* TODO [#B] 
	%i %?\nSCHEDULED: %^t\n %a\n") ;; For mu4e. 
	From 
	http://pragmaticemacs.com/emacs/master-your-inbox-with-mu4e-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-date 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)

--8<---------------cut here---------------end--------------->8---

Thanks for reading through!

Victor

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: ordering events by hour in the agenda
  2016-06-27 19:47   ` Victor A. Stoichita
@ 2016-06-27 19:58     ` Victor A. Stoichita
  2016-06-27 21:26       ` Nick Dokos
  2016-06-28  7:50       ` Victor A. Stoichita
  0 siblings, 2 replies; 7+ messages in thread
From: Victor A. Stoichita @ 2016-06-27 19:58 UTC (permalink / raw)
  To: Eric S Fraga; +Cc: orgmode list

[-- Attachment #1: Type: text/plain, Size: 265 bytes --]

I’m afraid the last part of my previous message got reformatted 
again by mu4e. I really need to look better into its handling of 
hard/newlines. 

Meanwhile please find attached my org config which I was trying 
to yank.

Thanks for your help!

Victor

[-- Attachment #2: vic_emacs_org-config.el --]
[-- Type: application/emacs-lisp, Size: 3488 bytes --]

[-- Attachment #3: Type: text/plain, Size: 5815 bytes --]



Le 27 Jun 2016, Victor A. Stoichita <victor@svictor.net> a écrit :

>> Your output looks very strange.  This may be due to formatting 
>> of your email.    In any case, can you send the org agenda 
>> files used by your  agenda view? 
>  
> Sorry for the weird output. I’ll investigate that. 
> 
> I made a test on a fresh file with just 4 entries. The problem 
> seems to be that my events are output to the agenda in the same 
> order as they are in the file. So if my file has 
> 
> --8<---------------cut 
> here---------------start------------->8---  * Thing on Saturday 
> evening <2016-07-02 Sat 19:00>  
> 
> * Thing on Saturday morning <2016-07-02 Sat 10:30>  
> 
> * Thing on Saturday afternoon <2016-07-02 Sat 14:00>  
> 
> * Lunch on Saturday <2016-07-02 Sat 12:00> 
> 
> --8<---------------cut 
> here---------------end--------------->8---  
>  
> The output of C-c a a is [I added extra blank lines to avoid 
> formatting problems]: 
> 
> --8<---------------cut 
> here---------------start------------->8---  
> 
> Saturday    2 July 2016 
>   
>   test:       19:00...... Thing on Saturday evening 
>     
>   test:       10:30...... Thing on Saturday morning 
>     
>   test:       14:00...... Thing on Saturday afternoon 
>     
>   test:       12:00...... Lunch on Saturday 
> 
> --8<---------------cut 
> here---------------end--------------->8---  
> 
> Now if I move "Lunch on Saturday" to the top of my org file and 
> refresh the agenda, it will displayed "Lunch on Saturday" at the 
> top Saturday too. So it seems that the agenda correctly sorts 
> the  events by day, but then doesn’t sort them by time within 
> a day.  
> 
> In the org section of my .emacs/init.el (I dont’t use .emacs) 
> I have the following: 
>   
> --8<---------------cut 
> here---------------start------------->8---  (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)   (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 repeating 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 'scheduled)))) ;; 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 repeating events appear on all relevant 
>           dates  
> 	  (org-agenda-files '("~/org/")) ;; All agenda files  
>           (org-agenda-skip-function '(org-agenda-skip-entry-if 
>           'deadline 'scheduled))))  
> 	  ("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énéral") "* TODO [#B]  %i 
> %?\nSCHEDULED: %^t\n %a\n") ;; For mu4e. 
> From 
> http://pragmaticemacs.com/emacs/master-your-inbox-with-mu4e-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-date 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) 
> 
> --8<---------------cut 
> here---------------end--------------->8--- 
> 
> Thanks for reading through! 
> 
> Victor


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: ordering events by hour in the agenda
  2016-06-27 19:58     ` Victor A. Stoichita
@ 2016-06-27 21:26       ` Nick Dokos
  2016-06-28  7:50       ` Victor A. Stoichita
  1 sibling, 0 replies; 7+ messages in thread
From: Nick Dokos @ 2016-06-27 21:26 UTC (permalink / raw)
  To: emacs-orgmode

Victor A. Stoichita <victor@svictor.net> writes:

> ;; 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))))
>

I'm guessing you are missing a time-up specification on your agenda
items:

   ...
   (agenda time-up deadline-up priority-down)
   ...
   
Check the doc for org-agenda-sorting-strategy. Untested.
-- 
Nick

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: ordering events by hour in the agenda
  2016-06-27 19:58     ` Victor A. Stoichita
  2016-06-27 21:26       ` Nick Dokos
@ 2016-06-28  7:50       ` Victor A. Stoichita
  1 sibling, 0 replies; 7+ messages in thread
From: Victor A. Stoichita @ 2016-06-28  7:50 UTC (permalink / raw)
  To: Eric S Fraga; +Cc: orgmode list

Hi.

Got it this morning! The disorder in my timed events came from 
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 
deadline-up
priority-down). I didn’t think of it first because the events in 
my test
file don’t have deadlines or priorities. Turns out that precisely 
for
that reason they were left unordered. Should have been obvious 
probably…

Thanks for reading through. Have a nice day !

Victor





Le 27 Jun 2016, Victor A. Stoichita <victor@svictor.net> a écrit :

> I’m afraid the last part of my previous message got reformatted 
> again by mu4e. I really need to look better into its handling of 
> hard/newlines. 
>
> Meanwhile please find attached my org config which I was trying 
> to yank.
>
> Thanks for your help!
>
> Victor
>
>
> Le 27 Jun 2016, Victor A. Stoichita <victor@svictor.net> 
> a écrit :
>
>>> Your output looks very strange.  This may be due to formatting 
>>> of your email.    In any case, can you send the org agenda 
>>> files used by your  agenda view? 
>>  
>> Sorry for the weird output. I’ll investigate that. 
>> 
>> I made a test on a fresh file with just 4 entries. The problem 
>> seems to be that my events are output to the agenda in the same 
>> order as they are in the file. So if my file has 
>> 
>> --8<---------------cut 
>> here---------------start------------->8---  * Thing on Saturday 
>> evening <2016-07-02 Sat 19:00>  
>> 
>> * Thing on Saturday morning <2016-07-02 Sat 10:30>  
>> 
>> * Thing on Saturday afternoon <2016-07-02 Sat 14:00>  
>> 
>> * Lunch on Saturday <2016-07-02 Sat 12:00> 
>> 
>> --8<---------------cut 
>> here---------------end--------------->8---  
>>  
>> The output of C-c a a is [I added extra blank lines to avoid 
>> formatting problems]: 
>> 
>> --8<---------------cut 
>> here---------------start------------->8---  
>> 
>> Saturday    2 July 2016 
>>   
>>   test:       19:00...... Thing on Saturday evening 
>>     
>>   test:       10:30...... Thing on Saturday morning 
>>     
>>   test:       14:00...... Thing on Saturday afternoon 
>>     
>>   test:       12:00...... Lunch on Saturday 
>> 
>> --8<---------------cut 
>> here---------------end--------------->8---  
>> 
>> Now if I move "Lunch on Saturday" to the top of my org file and 
>> refresh the agenda, it will displayed "Lunch on Saturday" at 
>> the 
>> top Saturday too. So it seems that the agenda correctly sorts 
>> the  events by day, but then doesn’t sort them by time within 
>> a day.  
>> 
>> In the org section of my .emacs/init.el (I dont’t use .emacs) 
>> I have the following: 
>>   
>> --8<---------------cut 
>> here---------------start------------->8---  (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)   (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 repeating 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 'scheduled)))) ;; 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 repeating events appear on all relevant 
>>           dates  
>> 	  (org-agenda-files '("~/org/")) ;; All agenda files  
>>           (org-agenda-skip-function '(org-agenda-skip-entry-if 
>>           'deadline 'scheduled))))  
>> 	  ("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énéral") "* TODO [#B]  %i 
>> %?\nSCHEDULED: %^t\n %a\n") ;; For mu4e. 
>> From 
>> http://pragmaticemacs.com/emacs/master-your-inbox-with-mu4e-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-date 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) 
>> 
>> --8<---------------cut 
>> here---------------end--------------->8--- 
>> 
>> Thanks for reading through! 
>> 
>> Victor

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2016-06-28  7:51 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <82f0f13a45734a25bb965208bffe5d91@HE1PR01MB1898.eurprd01.prod.exchangelabs.com>
2016-06-27 15:13 ` ordering events by hour in the agenda Eric S Fraga
2016-06-27 19:47   ` Victor A. Stoichita
2016-06-27 19:58     ` Victor A. Stoichita
2016-06-27 21:26       ` Nick Dokos
2016-06-28  7:50       ` Victor A. Stoichita
2016-06-27 19:48   ` Victor A. Stoichita
2016-06-27 14:33 Victor A. Stoichita

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).