I have an org-file with a todo list organised by weeks, like the following:
* Sunday
** DONE Ask in StackExchange.
SCHEDULED: <2019-06-28 Fri 13:00-14:00>
* Monday
** TODO Get an answer
** TODO Get solved my problem
* Tuesday
* Wednesday
* Thursday
* Friday
* Saturday
However, suddely and automatically it rearrange eliminating my order by days in a week to the following format:
* Ask in StackExchange
:PROPERTIES:
:LINK: Go to gcal web page
:ID: 07llhrrtc5s20ea89gqqrs90g5_20190725T210000Z
:END:
<2019-06-28 Fri 13:00-14:00>
* Get an answer
* Get solved my problem
Why is it changing automatically?, and how can I avoid this behavior and keep my order by weeks?
Thanks,
Here is my org-config.
;; ORG MODE
;;
(add-to-list 'load-path (expand-file-name "~/git/org-mode/lisp"))
(add-to-list 'auto-mode-alist '("\\.\\(org\\|org_archive\\|txt\\)$" . org-mode))
(require 'org)
;; new line at 80th column
(add-hook 'org-mode-hook '(lambda () (setq fill-column 80)))
(add-hook 'org-mode-hook 'turn-on-auto-fill)
;;
;; ORG alert
;;
(setq alert-default-style 'libnotify)
;;
;;; Standard key bindings
;;(global-set-key "\C-cl" 'org-store-link)
;;(global-set-key "\C-ca" 'org-agenda)
;;(global-set-key "\C-cb" 'org-iswitchb)
;;
;;directory of agenda files
;;
(setq org-agenda-files '("~/Documents/Agenda/"))
;;
;; group all elements of agenda
;;
(setq org-agenda-custom-commands
'(("c" "Simple agenda view"
((agenda "")
(alltodo "")))))
;;; Sync with google calendar
(require 'org-gcal)
(setq org-gcal-client-id "" ;; here Personal_info
org-gcal-client-secret "" ;; here Secret_key
org-gcal-file-alist '(("" . "~/Documents/Agenda/todo.org") ;; email account
))
;;(add-hook 'org-agenda-mode-hook (lambda () (org-gcal-sync) ))
;;(add-hook 'org-capture-after-finalize-hook (lambda () (org-gcal-sync) ))
;;; Org calfw
;;(add-to-list 'load-path "~/.emacs.d/emacs-calfw")
;;(require 'calfw)
;;(require 'calfw-org)
;;; Org-ref
;;;; This is for make available org-ref in Melpa
(add-to-list 'package-archives
'("melpa" . "http://melpa.org/packages/") t)
(when (< emacs-major-version 24)
;; For compatibility
(add-to-list 'package-archives '("gnu" . "http://elpa.gnu.org/packages/")))
(package-initialize)
(require 'org-ref)
Additional info: The message when this behavior occurs is:
OAuth token expired. Now trying to refresh-token
~/Documents/Agenda/todo.org
that you mention inorg-gcal-file-alist
? If so, I would turn off theorg-gcal
stuff and see if the problem goes away. [Disclaimer: I know nothing aboutorg-gcal
] – NickD Jun 29 '19 at 23:27