emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "Holst Thomas (PS-EC/ESE4)" <Thomas.Holst@de.bosch.com>
To: Adam Porter <adam@alphapapa.net>,
	"emacs-orgmode@gnu.org" <emacs-orgmode@gnu.org>
Subject: Re: ANN/RFC: org-sidebar
Date: Mon, 4 Jun 2018 09:05:07 +0000	[thread overview]
Message-ID: <750a3f4db3a6468a894a64ea4ab154b4@de.bosch.com> (raw)
In-Reply-To: <87d0xm8ncb.fsf@alphapapa.net>

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

      parent reply	other threads:[~2018-06-04  9:13 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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) [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=750a3f4db3a6468a894a64ea4ab154b4@de.bosch.com \
    --to=thomas.holst@de.bosch.com \
    --cc=adam@alphapapa.net \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).