From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Holst Thomas (PS-EC/ESE4)" Subject: Re: ANN/RFC: org-sidebar Date: Mon, 4 Jun 2018 09:05:07 +0000 Message-ID: <750a3f4db3a6468a894a64ea4ab154b4@de.bosch.com> References: <87d0xm8ncb.fsf@alphapapa.net> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:36049) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fPlXr-0006Gc-I8 for emacs-orgmode@gnu.org; Mon, 04 Jun 2018 05:13:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fPlXo-0000hw-8V for emacs-orgmode@gnu.org; Mon, 04 Jun 2018 05:12:55 -0400 Received: from de-deferred1.bosch-org.com ([139.15.180.216]:60632) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fPlXn-0000gP-MD for emacs-orgmode@gnu.org; Mon, 04 Jun 2018 05:12:52 -0400 Received: from de-out1.bosch-org.com (unknown [139.15.180.215]) by si0vms0224.rbdmz01.com (Postfix) with ESMTPS id 40zptH5SXTz5K1 for ; Mon, 4 Jun 2018 11:05:11 +0200 (CEST) In-Reply-To: <87d0xm8ncb.fsf@alphapapa.net> Content-Language: de-DE List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: Adam Porter , "emacs-orgmode@gnu.org" Hi Adam, > Hi all, >=20 > Inspired by a post on Reddit, which was inspired by the Organized plugin > for the Atom editor, I came up with this: >=20 > https://github.com/alphapapa/org-sidebar >=20 > 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. >=20 > 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 windo= w))) (save-current-buffer (unwind-protect (progn (select-window (car save-s= elected-window--state) (quote norecord)) (switch-to-buffer (get-buffer-crea= te (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--aft= er-with-selected-window save-selected-window--state))))) org-sidebar--prepare-window(# " 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 (intern= al--before-with-selected-window agenda-window))) (save-current-buffer (unwi= nd-protect (progn (select-window (car save-selected-window--state) (quote n= orecord)) (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--pre= pare-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-othe= r-windows) (setq main-window (selected-window)) (setq agenda-window (split-= window nil -50 (quote right))) (setq todo-window (let ((save-selected-windo= w--state (internal--before-with-selected-window agenda-window))) (save-curr= ent-buffer (unwind-protect (progn (select-window ... ...) (split-window-ver= tically)) (internal--after-with-selected-window save-selected-window--state= ))))) (org-sidebar--prepare-window agenda-window (format " %s: Agenda" buff= er-name-string) agenda-string) (org-sidebar--prepare-window todo-window (fo= rmat " %s: Other TODOs" buffer-name-string) todo-string) (select-window mai= n-window)) (if (frame-live-p old-frame) (progn (select-frame old-frame (quo= te norecord)))) (if (buffer-live-p old-buffer) (progn (set-buffer old-buffe= r)))) (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 ni= l -50 (quote right))) (setq todo-window (let ((save-selected-window--state = (internal--before-with-selected-window agenda-window))) (save-current-buffe= r (unwind-protect (progn ... ...) (internal--after-with-selected-window sav= e-selected-window--state))))) (org-sidebar--prepare-window agenda-window (f= ormat " %s: Agenda" buffer-name-string) agenda-string) (org-sidebar--prepar= e-window todo-window (format " %s: Other TODOs" buffer-name-string) todo-st= ring) (select-window main-window)) (if (frame-live-p old-frame) (progn (sel= ect-frame old-frame (quote norecord)))) (if (buffer-live-p old-buffer) (pro= gn (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-buf= fer (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 (buf= fer-narrowed-p) (progn "[narrowed] ")) (buffer-name))) main-window agenda-w= indow todo-window) (let ((old-frame (selected-frame)) (old-buffer (current-= buffer))) (unwind-protect (progn (select-frame frame (quote norecord)) (del= ete-other-windows) (setq main-window (selected-window)) (setq agenda-window= (split-window nil -50 (quote right))) (setq todo-window (let ((save-select= ed-window--state ...)) (save-current-buffer (unwind-protect ... ...)))) (or= g-sidebar--prepare-window agenda-window (format " %s: Agenda" buffer-name-s= tring) 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 noreco= rd)))) (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 (le= t ((it (let ... ...))) (-map org-sidebar-format-fn it))) (agenda-string (le= t ((temp-buffer (generate-new-buffer " *temp*"))) (save-current-buffer (set= -buffer temp-buffer) (unwind-protect (progn ... ...) (and ... ...))))) (tod= o-string (s-join "\n" todo-items)) (frame (selected-frame)) (buffer-name-st= ring (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-wind= ow (let (...) (save-current-buffer ...))) (org-sidebar--prepare-window agen= da-window (format " %s: Agenda" buffer-name-string) agenda-string) (org-sid= ebar--prepare-window todo-window (format " %s: Other TODOs" buffer-name-str= ing) 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-time= stamp-format (or ... ...) org-sidebar-date-format) (quote face) (quote (:in= herit variable-pitch :weight bold))))))) (progn (let* ((buffer (current-buf= fer)) (agenda-items (let ((it ...)) (let (...) (-group-by --cl-date-header-= - it)))) (todo-items (let ((it ...)) (-map org-sidebar-format-fn it))) (age= nda-string (let ((temp-buffer ...)) (save-current-buffer (set-buffer temp-b= uffer) (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-wind= ow) (let ((old-frame (selected-frame)) (old-buffer (current-buffer))) (unwi= nd-protect (progn (select-frame frame (quote norecord)) (delete-other-windo= ws) (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) (or= g-sidebar--prepare-window todo-window (format " %s: Other TODOs" buffer-nam= e-string) todo-string) (select-window main-window)) (if (frame-live-p old-f= rame) (progn (select-frame old-frame ...))) (if (buffer-live-p old-buffer) = (progn (set-buffer old-buffer)))))))) org-sidebar() funcall-interactively(org-sidebar) #(org-sidebar record nil) apply(# org-sidebar (record nil)) call-interactively@ido-cr+-record-current-command(# org-sidebar record nil) apply(call-interactively@ido-cr+-record-current-command # (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)) (func= all --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-alwa= ys-save-history (progn (funcall --cl-save-hist-- command-name))) (signal (c= ar err) (cdr err))))) (let* ((--cl-save-hist-- (function (lambda (command) (setq extended-comma= nd-history (cons command (delete command extended-command-history))))))) (p= rogn (condition-case err (progn (command-execute sym-com (quote record)) (f= uncall --cl-save-hist-- command-name)) ((debug error) (if helm-M-x-always-s= ave-history (progn (funcall --cl-save-hist-- command-name))) (signal (car e= rr) (cdr err)))))) (let ((prefix-arg (or helm-current-prefix-arg helm-M-x-prefix-argument)))= (let* ((--cl-save-hist-- (function (lambda (command) (setq extended-comman= d-history (cons command ...)))))) (progn (condition-case err (progn (comman= d-execute sym-com (quote record)) (funcall --cl-save-hist-- command-name)) = ((debug error) (if helm-M-x-always-save-history (progn (funcall --cl-save-h= ist-- command-name))) (signal (car err) (cdr err))))))) (progn (setq this-command sym-com real-this-command sym-com) (let ((prefi= x-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 reco= rd)) (funcall --cl-save-hist-- command-name)) ((debug error) (if helm-M-x-a= lways-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-cas= e err (progn (command-execute sym-com ...) (funcall --cl-save-hist-- comman= d-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) (l= et ((prefix-arg (or helm-current-prefix-arg helm-M-x-prefix-argument))) (le= t* ((--cl-save-hist-- (function ...))) (progn (condition-case err (progn ..= . ...) (... ... ...)))))))) (if (string=3D command-name "") nil (let ((sym-com (and (stringp command-= name) (intern-soft command-name)))) (if sym-com (progn (setq this-command s= ym-com real-this-command sym-com) (let ((prefix-arg (or helm-current-prefix= -arg helm-M-x-prefix-argument))) (let* ((--cl-save-hist-- ...)) (progn (con= dition-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"))) #(helm-M-x nil nil) apply(# helm-M-x (nil nil)) call-interactively@ido-cr+-record-current-command(# helm-M-x nil nil) apply(call-interactively@ido-cr+-record-current-command # (helm-M-x nil nil)) call-interactively(helm-M-x nil nil) command-execute(helm-M-x) --=20 Thomas