kiwanami / emacs-calfw

A calendar framework for Emacs
1.17k stars 102 forks source link

"Selecting deleted buffer" #26

Open ghost opened 11 years ago

ghost commented 11 years ago

I am using calfw to display my org-mode calendar, so basically I run cfw:open-org-calendar and move around from there.

Sometimes something happens (yes, sorry, I will try to find a recipe to make this happen) and I get "Selecting deleted buffer" as an error, and calfw stops working for the remainder of the Emacs session.

I have to quit Emacs completely and start it again, to get calfw to work again!

If I M-x toggle-debug-on error, this is what pops up:

Debugger entered--Lisp error: (error "Selecting deleted buffer") org-compile-prefix-format(nil) (let ((org-agenda-prefix-format " ") (span (quote day))) (org-compile-prefix-format nil) (progn (let* ((--cl-var-- (cfw:enumerate-days begin end)) (date nil) (--cl-var-- nil)) (while (consp --cl-var--) (setq date (car --cl-var--)) (setq --cl-var-- (nconc (reverse (progn ...)) --cl-var--)) (setq --cl-var-- (cdr --cl-var--))) (nreverse --cl-var--)))) cfw:org-collect-schedules-period((9 2 2013) (9 8 2013)) (let* ((cfw:org-todo-keywords-regexp (regexp-opt org-todo-keywords-for-agenda)) (contents nil) (periods nil) (--cl-var-- (cfw:org-collect-schedules-period begin end)) (i nil) (date nil) (line nil) (range nil)) (while (consp --cl-var--) (setq i (car --cl-var--)) (setq date (cfw:org-tp i (quote date))) (setq line (funcall cfw:org-schedule-summary-transformer i)) (setq range (cfw:org-get-timerange line)) (if range (progn (if (member range periods) nil (setq periods (cons range periods)))) (setq contents (cfw:contents-add (cfw:org-normalize-date date) line contents))) (setq --cl-var-- (cdr --cl-var--))) (nconc contents (list (cons (quote periods) periods)))) (progn (let* ((cfw:org-todo-keywords-regexp (regexp-opt org-todo-keywords-for-agenda)) (contents nil) (periods nil) (--cl-var-- (cfw:org-collect-schedules-period begin end)) (i nil) (date nil) (line nil) (range nil)) (while (consp --cl-var--) (setq i (car --cl-var--)) (setq date (cfw:org-tp i (quote date))) (setq line (funcall cfw:org-schedule-summary-transformer i)) (setq range (cfw:org-get-timerange line)) (if range (progn (if (member range periods) nil (setq periods (cons range periods)))) (setq contents (cfw:contents-add (cfw:org-normalize-date date) line contents))) (setq --cl-var-- (cdr --cl-var--))) (nconc contents (list (cons (quote periods) periods))))) cfw:org-schedule-period-to-calendar((9 2 2013) (9 8 2013)) funcall(cfw:org-schedule-period-to-calendar (9 2 2013) (9 8 2013)) [..etc..etc..]

I am using GNU Emacs 24.2.50.1.

Thanks for calfw, it is really nice to be able to display my org-mode calendar in a more visual way than what org-agenda-list does!

kiwanami commented 11 years ago

Thank you for your report. I think that this problem is the same as one discussed at here: http://comments.gmane.org/gmane.emacs.orgmode/59601

Should I remove calling org-compile-prefix-format ?

ghost commented 11 years ago

I don't know - I tried commenting the call out, but I think I still got the error. Looking at the thread you linked to, I tried running M-x org-agenda-list after the error occurred, and then cfw:open-org-calendar succeeded, so that seems to confirm what is said in the thread.

skyer9 commented 11 years ago

i got some code in google --;;

(setq org-agenda-buffer
  (when (buffer-live-p org-agenda-buffer)
    org-agenda-buffer))
(org-compile-prefix-format nil)

it works for me.

skyer9 commented 11 years ago

i got source from here: http://lists.gnu.org/archive/html/emacs-orgmode/2013-01/msg00228.html

kiwanami commented 11 years ago

Thank you for your report. Will you make a patch?