emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* ANN/RFC: org-sidebar
@ 2018-05-23 14:21 Adam Porter
  2018-06-04  9:03 ` Thomas Holst
  2018-06-04  9:05 ` Holst Thomas (PS-EC/ESE4)
  0 siblings, 2 replies; 8+ messages in thread
From: Adam Porter @ 2018-05-23 14:21 UTC (permalink / raw)
  To: emacs-orgmode

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.

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

* Re: ANN/RFC: org-sidebar
  2018-05-23 14:21 ANN/RFC: org-sidebar Adam Porter
@ 2018-06-04  9:03 ` Thomas Holst
  2018-06-04 10:30   ` Adam Porter
  2018-06-04  9:05 ` Holst Thomas (PS-EC/ESE4)
  1 sibling, 1 reply; 8+ messages in thread
From: Thomas Holst @ 2018-06-04  9:03 UTC (permalink / raw)
  To: Adam Porter; +Cc: emacs-orgmode@gnu.org

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))
  call-interactively@ido-cr+-record-current-command(#<subr call-interactively> org-sidebar record nil)
  apply(call-interactively@ido-cr+-record-current-command #<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))
  call-interactively@ido-cr+-record-current-command(#<subr call-interactively> helm-M-x nil nil)
  apply(call-interactively@ido-cr+-record-current-command #<subr call-interactively> (helm-M-x nil nil))
  call-interactively(helm-M-x nil nil)
  command-execute(helm-M-x)

-- 
  Thomas

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

* Re: ANN/RFC: org-sidebar
  2018-05-23 14:21 ANN/RFC: org-sidebar Adam Porter
  2018-06-04  9:03 ` Thomas Holst
@ 2018-06-04  9:05 ` Holst Thomas (PS-EC/ESE4)
  1 sibling, 0 replies; 8+ messages in thread
From: Holst Thomas (PS-EC/ESE4) @ 2018-06-04  9:05 UTC (permalink / raw)
  To: Adam Porter, emacs-orgmode@gnu.org

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
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 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))
  call-interactively@ido-cr+-record-current-command(#<subr call-interactively> org-sidebar record nil)
  apply(call-interactively@ido-cr+-record-current-command #<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))
  call-interactively@ido-cr+-record-current-command(#<subr call-interactively> helm-M-x nil nil)
  apply(call-interactively@ido-cr+-record-current-command #<subr call-interactively> (helm-M-x nil nil))
  call-interactively(helm-M-x nil nil)
  command-execute(helm-M-x)

-- 
  Thomas

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

* Re: ANN/RFC: org-sidebar
  2018-06-04  9:03 ` Thomas Holst
@ 2018-06-04 10:30   ` Adam Porter
  2018-06-04 12:03     ` Thomas Holst
  0 siblings, 1 reply; 8+ messages in thread
From: Adam Porter @ 2018-06-04 10:30 UTC (permalink / raw)
  To: Thomas Holst; +Cc: emacs-orgmode@gnu.org

Hi Thomas,

On Mon, Jun 4, 2018 at 4:03 AM, Thomas Holst <thomas.holst@de.bosch.com> wrote:
> Hi Adam,
>
> 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)

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.

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

* Re: ANN/RFC: org-sidebar
  2018-06-04 10:30   ` Adam Porter
@ 2018-06-04 12:03     ` Thomas Holst
  2018-06-04 12:15       ` Adam Porter
  0 siblings, 1 reply; 8+ messages in thread
From: Thomas Holst @ 2018-06-04 12:03 UTC (permalink / raw)
  To: Adam Porter; +Cc: emacs-orgmode@gnu.org

Hi Adam,

thank you for looking into this.

· Adam Porter <adam@alphapapa.net> 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))
  call-interactively@ido-cr+-record-current-command(#<subr call-interactively> org-sidebar record nil)
  apply(call-interactively@ido-cr+-record-current-command #<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))
  call-interactively@ido-cr+-record-current-command(#<subr call-interactively> smex nil nil)
  apply(call-interactively@ido-cr+-record-current-command #<subr call-interactively> (smex nil nil))
  call-interactively(smex nil nil)
  command-execute(smex)

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

* Re: ANN/RFC: org-sidebar
  2018-06-04 12:03     ` Thomas Holst
@ 2018-06-04 12:15       ` Adam Porter
  2018-06-04 14:19         ` Holst Thomas (PS-EC/ESE4)
  0 siblings, 1 reply; 8+ messages in thread
From: Adam Porter @ 2018-06-04 12:15 UTC (permalink / raw)
  To: Thomas Holst; +Cc: emacs-orgmode@gnu.org

Hi Thomas,

I just pushed a commit which should fix this problem.  My apologies
for putting you to so much trouble.  It was a simple mistake that I
should have figured out on my own.  I don't know why it didn't happen
on my system; even with "emacs -q" I didn't get it, but when I
followed your steps with "emacs -Q", it did happen--and then it
happened in my main config, too!  Maybe I've been staring at this code
for too long...  ;)

Please let me know if you have any other feedback on the package.
Maybe in a few weeks I will consider publishing it on MELPA, but I
think it needs some more work first.

Thanks,
Adam

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

* Re: ANN/RFC: org-sidebar
  2018-06-04 12:15       ` Adam Porter
@ 2018-06-04 14:19         ` Holst Thomas (PS-EC/ESE4)
  2018-06-08 23:09           ` Adam Porter
  0 siblings, 1 reply; 8+ messages in thread
From: Holst Thomas (PS-EC/ESE4) @ 2018-06-04 14:19 UTC (permalink / raw)
  To: Adam Porter; +Cc: emacs-orgmode@gnu.org

Hello Adam,

No problem. I am not that good in elisp, but I like to help testing. So I am glad I could help here.

After a git pull the error is gone - but I don't get any entries in the sidebar :-(.

In my testfile I have two headlines marked with TODO. The two buffers in the sidebar are empty.

Again I used emacs -Q and the lisp code I posted earlier.

Mit freundlichen Grüßen / Best regards

Thomas Holst
PS-EC/ESE4  

Tel. +49 711 811-40681 



> -----Ursprüngliche Nachricht-----
> Von: alphadeltapapa@gmail.com [mailto:alphadeltapapa@gmail.com] Im Auftrag
> von Adam Porter
> Gesendet: Montag, 4. Juni 2018 14:16
> An: Holst Thomas (PS-EC/ESE4) <Thomas.Holst@de.bosch.com>
> Cc: emacs-orgmode@gnu.org
> Betreff: Re: [O] ANN/RFC: org-sidebar
> 
> Hi Thomas,
> 
> I just pushed a commit which should fix this problem.  My apologies
> for putting you to so much trouble.  It was a simple mistake that I
> should have figured out on my own.  I don't know why it didn't happen
> on my system; even with "emacs -q" I didn't get it, but when I
> followed your steps with "emacs -Q", it did happen--and then it
> happened in my main config, too!  Maybe I've been staring at this code
> for too long...  ;)
> 
> Please let me know if you have any other feedback on the package.
> Maybe in a few weeks I will consider publishing it on MELPA, but I
> think it needs some more work first.
> 
> Thanks,
> Adam

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

* Re: ANN/RFC: org-sidebar
  2018-06-04 14:19         ` Holst Thomas (PS-EC/ESE4)
@ 2018-06-08 23:09           ` Adam Porter
  0 siblings, 0 replies; 8+ messages in thread
From: Adam Porter @ 2018-06-08 23:09 UTC (permalink / raw)
  To: Holst Thomas (PS-EC/ESE4); +Cc: emacs-orgmode@gnu.org

On Mon, Jun 4, 2018 at 9:19 AM, Holst Thomas (PS-EC/ESE4)
<Thomas.Holst@de.bosch.com> wrote:
> Hello Adam,
>
> No problem. I am not that good in elisp, but I like to help testing. So I am glad I could help here.
>
> After a git pull the error is gone - but I don't get any entries in the sidebar :-(.

Hi Thomas,

I just pushed some commits that I think will fix the problems.  I
tested with "emacs -q" this time, so it should work on configs other
than my own.  ;)

Please let me know if you have any other problems or comments.  Thank
you very much for your testing, as it's invaluable for rooting out
problems like this!

Thanks,
Adam

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

end of thread, other threads:[~2018-06-08 23:09 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-05-23 14:21 ANN/RFC: org-sidebar Adam Porter
2018-06-04  9:03 ` Thomas Holst
2018-06-04 10:30   ` Adam Porter
2018-06-04 12:03     ` Thomas Holst
2018-06-04 12:15       ` Adam Porter
2018-06-04 14:19         ` Holst Thomas (PS-EC/ESE4)
2018-06-08 23:09           ` Adam Porter
2018-06-04  9:05 ` Holst Thomas (PS-EC/ESE4)

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