[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 11:03:09 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.1 (windows-nt) |
Hi Adam,
> Hi all,
>
> Inspired by a post on Reddit, which was inspired by the Organized plugin
> for the Atom editor, I came up with this:
>
> https://github.com/alphapapa/org-sidebar
>
> This package presents a helpful sidebar view for Org buffers. At the top
> is a chronological list of scheduled and deadlined tasks in the current
> buffer, and below that is a list of all other non-done to-do items. If
> the buffer is narrowed, the sidebar only shows items in the narrowed
> portion; this allows seeing an overview of tasks in a subtree.
>
> It's in an early stage of development, but I think it may be useful.
> Any feedback would be appreciated.
I really like the idea of org-sidebar. I tried it and followed the
instructions in README.org but I get an error. Here is the
bactrace:
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 86 on *Backtrace*> " ElProjects.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)
(progn (command-execute sym-com (quote record)) (funcall --cl-save-hist--
command-name))
(condition-case err (progn (command-execute sym-com (quote record)) (funcall
--cl-save-hist-- command-name)) ((debug error) (if helm-M-x-always-save-history
(progn (funcall --cl-save-hist-- command-name))) (signal (car err) (cdr err))))
(progn (condition-case err (progn (command-execute sym-com (quote record))
(funcall --cl-save-hist-- command-name)) ((debug error) (if
helm-M-x-always-save-history (progn (funcall --cl-save-hist-- command-name)))
(signal (car err) (cdr err)))))
(let* ((--cl-save-hist-- (function (lambda (command) (setq
extended-command-history (cons command (delete command
extended-command-history))))))) (progn (condition-case err (progn
(command-execute sym-com (quote record)) (funcall --cl-save-hist--
command-name)) ((debug error) (if helm-M-x-always-save-history (progn (funcall
--cl-save-hist-- command-name))) (signal (car err) (cdr err))))))
(let ((prefix-arg (or helm-current-prefix-arg helm-M-x-prefix-argument)))
(let* ((--cl-save-hist-- (function (lambda (command) (setq
extended-command-history (cons command ...)))))) (progn (condition-case err
(progn (command-execute sym-com (quote record)) (funcall --cl-save-hist--
command-name)) ((debug error) (if helm-M-x-always-save-history (progn (funcall
--cl-save-hist-- command-name))) (signal (car err) (cdr err)))))))
(progn (setq this-command sym-com real-this-command sym-com) (let
((prefix-arg (or helm-current-prefix-arg helm-M-x-prefix-argument))) (let*
((--cl-save-hist-- (function (lambda (command) (setq extended-command-history
...))))) (progn (condition-case err (progn (command-execute sym-com (quote
record)) (funcall --cl-save-hist-- command-name)) ((debug error) (if
helm-M-x-always-save-history (progn ...)) (signal (car err) (cdr err))))))))
(if sym-com (progn (setq this-command sym-com real-this-command sym-com) (let
((prefix-arg (or helm-current-prefix-arg helm-M-x-prefix-argument))) (let*
((--cl-save-hist-- (function (lambda ... ...)))) (progn (condition-case err
(progn (command-execute sym-com ...) (funcall --cl-save-hist-- command-name))
((debug error) (if helm-M-x-always-save-history ...) (signal ... ...))))))))
(let ((sym-com (and (stringp command-name) (intern-soft command-name)))) (if
sym-com (progn (setq this-command sym-com real-this-command sym-com) (let
((prefix-arg (or helm-current-prefix-arg helm-M-x-prefix-argument))) (let*
((--cl-save-hist-- (function ...))) (progn (condition-case err (progn ... ...)
(... ... ...))))))))
(if (string= command-name "") nil (let ((sym-com (and (stringp command-name)
(intern-soft command-name)))) (if sym-com (progn (setq this-command sym-com
real-this-command sym-com) (let ((prefix-arg (or helm-current-prefix-arg
helm-M-x-prefix-argument))) (let* ((--cl-save-hist-- ...)) (progn
(condition-case err ... ...))))))))
helm-M-x(nil #("org-sidebar" 0 11 (match-part "org-sidebar")))
funcall-interactively(helm-M-x nil #("org-sidebar" 0 11 (match-part
"org-sidebar")))
#<subr call-interactively>(helm-M-x nil nil)
apply(#<subr call-interactively> helm-M-x (nil nil))
address@hidden(#<subr call-interactively> helm-M-x nil nil)
apply(address@hidden #<subr call-interactively> (helm-M-x nil nil))
call-interactively(helm-M-x nil nil)
command-execute(helm-M-x)
--
Thomas
- Re: [O] ANN/RFC: org-sidebar,
Thomas Holst <=