[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] ANN/RFC: org-sidebar
From: |
Thomas Holst |
Subject: |
Re: [O] ANN/RFC: org-sidebar |
Date: |
Mon, 4 Jun 2018 14:03:20 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.1 (windows-nt) |
Hi Adam,
thank you for looking into this.
ยท Adam Porter <address@hidden> wrote:
>> Debugger entered--Lisp error: (void-variable main-window)
>
> Thanks for your email. I wasn't able to reproduce the error on my
> system, even with "emacs -q". I also looked at the code again, and I
> don't know why that error would occur. Can you reproduce the problem
> with "emacs -q"? If so, please let me know what version of Emacs and
> of Org you're using.
Here is what I did to reproduced it.
I tried it with two different emacs / org-versions. Also tested several
org-files. The error happens even with a minimal org-file with just one
heading and one TODO item.
Best regards
Thomas
> emacs -Q
(package-initialize)
(add-to-list 'load-path "~/git-emacs/org-agenda-ng")
(add-to-list 'load-path "~/git-emacs/org-sidebar")
(require 'org-sidebar)
(emacs-version)
"GNU Emacs 25.1.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.18.9) of 2017-05-02"
"GNU Emacs 25.1.1 (x86_64-w64-mingw32) of 2016-09-22"
(org-version)
"8.2.10"
"9.1.13"
system-type
gnu/linux
windows-nt
backtrace:
Debugger entered--Lisp error: (void-variable main-window)
(let ((org-buffer (current-buffer)) (org-buffer-window main-window)) (let
((save-selected-window--state (internal--before-with-selected-window window)))
(save-current-buffer (unwind-protect (progn (select-window (car
save-selected-window--state) (quote norecord)) (switch-to-buffer
(get-buffer-create (format " *%s*" name))) (setq header-line-format (propertize
name (quote face) (quote ...)) mode-line-format nil) (set-window-parameter nil
(quote org-buffer) org-buffer) (set-window-parameter nil (quote
org-buffer-window) org-buffer-window) (use-local-map org-sidebar-map)
(erase-buffer) (insert contents) (goto-char (point-min)) (toggle-truncate-lines
1)) (internal--after-with-selected-window save-selected-window--state)))))
org-sidebar--prepare-window(#<window 32 on *Backtrace*> " org-sidebar.org:
Agenda" "")
(progn (select-frame frame (quote norecord)) (delete-other-windows) (setq
main-window (selected-window)) (setq agenda-window (split-window nil -50 (quote
right))) (setq todo-window (let ((save-selected-window--state
(internal--before-with-selected-window agenda-window))) (save-current-buffer
(unwind-protect (progn (select-window (car save-selected-window--state) (quote
norecord)) (split-window-vertically)) (internal--after-with-selected-window
save-selected-window--state))))) (org-sidebar--prepare-window agenda-window
(format " %s: Agenda" buffer-name-string) agenda-string)
(org-sidebar--prepare-window todo-window (format " %s: Other TODOs"
buffer-name-string) todo-string) (select-window main-window))
(unwind-protect (progn (select-frame frame (quote norecord))
(delete-other-windows) (setq main-window (selected-window)) (setq agenda-window
(split-window nil -50 (quote right))) (setq todo-window (let
((save-selected-window--state (internal--before-with-selected-window
agenda-window))) (save-current-buffer (unwind-protect (progn (select-window ...
...) (split-window-vertically)) (internal--after-with-selected-window
save-selected-window--state))))) (org-sidebar--prepare-window agenda-window
(format " %s: Agenda" buffer-name-string) agenda-string)
(org-sidebar--prepare-window todo-window (format " %s: Other TODOs"
buffer-name-string) todo-string) (select-window main-window)) (if (frame-live-p
old-frame) (progn (select-frame old-frame (quote norecord)))) (if
(buffer-live-p old-buffer) (progn (set-buffer old-buffer))))
(let ((old-frame (selected-frame)) (old-buffer (current-buffer)))
(unwind-protect (progn (select-frame frame (quote norecord))
(delete-other-windows) (setq main-window (selected-window)) (setq agenda-window
(split-window nil -50 (quote right))) (setq todo-window (let
((save-selected-window--state (internal--before-with-selected-window
agenda-window))) (save-current-buffer (unwind-protect (progn ... ...)
(internal--after-with-selected-window save-selected-window--state)))))
(org-sidebar--prepare-window agenda-window (format " %s: Agenda"
buffer-name-string) agenda-string) (org-sidebar--prepare-window todo-window
(format " %s: Other TODOs" buffer-name-string) todo-string) (select-window
main-window)) (if (frame-live-p old-frame) (progn (select-frame old-frame
(quote norecord)))) (if (buffer-live-p old-buffer) (progn (set-buffer
old-buffer)))))
(let* ((buffer (current-buffer)) (agenda-items (let ((it (let (...) (cond ...
... ... ...)))) (let ((it (-map org-sidebar-format-fn it))) (-group-by
--cl-date-header-- it)))) (todo-items (let ((it (let (...) (cond ... ... ...
...)))) (-map org-sidebar-format-fn it))) (agenda-string (let ((temp-buffer
(generate-new-buffer " *temp*"))) (save-current-buffer (set-buffer temp-buffer)
(unwind-protect (progn (let ... ...) (buffer-string)) (and (buffer-name
temp-buffer) (kill-buffer temp-buffer)))))) (todo-string (s-join "\n"
todo-items)) (frame (selected-frame)) (buffer-name-string (concat (if
(buffer-narrowed-p) (progn "[narrowed] ")) (buffer-name))) main-window
agenda-window todo-window) (let ((old-frame (selected-frame)) (old-buffer
(current-buffer))) (unwind-protect (progn (select-frame frame (quote norecord))
(delete-other-windows) (setq main-window (selected-window)) (setq agenda-window
(split-window nil -50 (quote right))) (setq todo-window (let
((save-selected-window--state ...)) (save-current-buffer (unwind-protect ...
...)))) (org-sidebar--prepare-window agenda-window (format " %s: Agenda"
buffer-name-string) agenda-string) (org-sidebar--prepare-window todo-window
(format " %s: Other TODOs" buffer-name-string) todo-string) (select-window
main-window)) (if (frame-live-p old-frame) (progn (select-frame old-frame
(quote norecord)))) (if (buffer-live-p old-buffer) (progn (set-buffer
old-buffer))))))
(progn (let* ((buffer (current-buffer)) (agenda-items (let ((it (let ...
...))) (let ((it ...)) (-group-by --cl-date-header-- it)))) (todo-items (let
((it (let ... ...))) (-map org-sidebar-format-fn it))) (agenda-string (let
((temp-buffer (generate-new-buffer " *temp*"))) (save-current-buffer
(set-buffer temp-buffer) (unwind-protect (progn ... ...) (and ... ...)))))
(todo-string (s-join "\n" todo-items)) (frame (selected-frame))
(buffer-name-string (concat (if (buffer-narrowed-p) (progn "[narrowed] "))
(buffer-name))) main-window agenda-window todo-window) (let ((old-frame
(selected-frame)) (old-buffer (current-buffer))) (unwind-protect (progn
(select-frame frame (quote norecord)) (delete-other-windows) (setq main-window
(selected-window)) (setq agenda-window (split-window nil -50 (quote right)))
(setq todo-window (let (...) (save-current-buffer ...)))
(org-sidebar--prepare-window agenda-window (format " %s: Agenda"
buffer-name-string) agenda-string) (org-sidebar--prepare-window todo-window
(format " %s: Other TODOs" buffer-name-string) todo-string) (select-window
main-window)) (if (frame-live-p old-frame) (progn (select-frame old-frame
(quote norecord)))) (if (buffer-live-p old-buffer) (progn (set-buffer
old-buffer)))))))
(let* ((--cl-date-header-- (function (lambda (item) (propertize
(org-timestamp-format (or ... ...) org-sidebar-date-format) (quote face) (quote
(:inherit variable-pitch :weight bold))))))) (progn (let* ((buffer
(current-buffer)) (agenda-items (let ((it ...)) (let (...) (-group-by
--cl-date-header-- it)))) (todo-items (let ((it ...)) (-map
org-sidebar-format-fn it))) (agenda-string (let ((temp-buffer ...))
(save-current-buffer (set-buffer temp-buffer) (unwind-protect ... ...))))
(todo-string (s-join "\n" todo-items)) (frame (selected-frame))
(buffer-name-string (concat (if (buffer-narrowed-p) (progn "[narrowed] "))
(buffer-name))) main-window agenda-window todo-window) (let ((old-frame
(selected-frame)) (old-buffer (current-buffer))) (unwind-protect (progn
(select-frame frame (quote norecord)) (delete-other-windows) (setq main-window
(selected-window)) (setq agenda-window (split-window nil -50 ...)) (setq
todo-window (let ... ...)) (org-sidebar--prepare-window agenda-window (format "
%s: Agenda" buffer-name-string) agenda-string) (org-sidebar--prepare-window
todo-window (format " %s: Other TODOs" buffer-name-string) todo-string)
(select-window main-window)) (if (frame-live-p old-frame) (progn (select-frame
old-frame ...))) (if (buffer-live-p old-buffer) (progn (set-buffer
old-buffer))))))))
org-sidebar()
funcall-interactively(org-sidebar)
#<subr call-interactively>(org-sidebar record nil)
apply(#<subr call-interactively> org-sidebar (record nil))
address@hidden(#<subr call-interactively> org-sidebar record nil)
apply(address@hidden #<subr call-interactively> (org-sidebar record nil))
call-interactively(org-sidebar record nil)
command-execute(org-sidebar record)
execute-extended-command(nil "org-sidebar")
smex-read-and-run(("org-sidebar" "package-list-packages" "org-version" "cd"
"5x5" "arp" "dbx" "dig" "erc" "ert" "eww" "ftp" "gdb" "irc" "jdb" "man" "mpc"
"pdb" "pwd" "rsh" "sdb" "w3m" "xdb" "calc" "diff" "ffap" "ffip" "ffir" "gnus"
"grep" "help" "ielm" "info" "life" "mail" "mpuz" "ping" "pong" "smex" "talk"
"term" "undo" "yank" "zone" "align" "chmod" "debug" "diary" "dired" "ediff"
...))
smex()
funcall-interactively(smex)
#<subr call-interactively>(smex nil nil)
apply(#<subr call-interactively> smex (nil nil))
address@hidden(#<subr call-interactively> smex nil nil)
apply(address@hidden #<subr call-interactively> (smex nil nil))
call-interactively(smex nil nil)
command-execute(smex)