From b7a33170a104f71cf36088c7cabd10e145f78673 Mon Sep 17 00:00:00 2001 From: Adam Porter Date: Sun, 19 Jan 2020 00:02:03 -0600 Subject: [PATCH] Fix: (org-ql-view--buffer) Set buffer-read-only Fixes #72. Thanks to @xeijin. --- README.org | 1 + org-ql-view.el | 3 ++- org-ql.info | 27 +++++++++++++++------------ 3 files changed, 18 insertions(+), 13 deletions(-) diff --git a/README.org b/README.org index aa482e0..31c820c 100644 --- a/README.org +++ b/README.org @@ -405,6 +405,7 @@ Expands into a call to ~org-ql-select~ with the same arguments. For convenience + Call =helm-make-source= directly instead of using =helm-build-sync-source= macro. (Fixes [[https://github.com/alphapapa/org-ql/issues/60][#60]]. Thanks to [[https://github.com/matthuszagh][Matt Huszagh]] for reporting.) + Search/view buffers now always end with a newline, which prevents side-scrolling of the window when calling =end-of-buffer=. + Face for done to-do keywords in =org-ql-view= buffers. (Thanks to [[https://github.com/dsdshcym][Yiming Chen]].) ++ Make view buffers read-only. (Fixes [[https://github.com/alphapapa/org-ql/issues/72][#72]]. Thanks to [[https://github.com/xeijin][xeijin]].) *Internal* + Added generic node data cache to speed up recursive, tree-based queries. diff --git a/org-ql-view.el b/org-ql-view.el index 42cf1fe..c0a8207 100644 --- a/org-ql-view.el +++ b/org-ql-view.el @@ -439,7 +439,8 @@ If NAME is non-nil, return buffer by that name instead of using default buffer." (with-current-buffer (get-buffer-create (or name (concat org-ql-view-buffer-name-prefix "*"))) (unless (eq major-mode 'org-agenda-mode) - (org-agenda-mode)) + (org-agenda-mode) + (setf buffer-read-only t)) (current-buffer))) (defun org-ql-view--format-relative-date (difference) diff --git a/org-ql.info b/org-ql.info index 689d1e2..fe8dacc 100644 --- a/org-ql.info +++ b/org-ql.info @@ -738,6 +738,9 @@ File: README.info, Node: 04-pre, Next: 032, Up: Changelog side-scrolling of the window when calling end-of-buffer. • Face for done to-do keywords in org-ql-view buffers. (Thanks to Yiming Chen (https://github.com/dsdshcym).) + • Make view buffers read-only. (Fixes #72 + (https://github.com/alphapapa/org-ql/issues/72). Thanks to xeijin + (https://github.com/xeijin).) *Internal* • Added generic node data cache to speed up recursive, tree-based @@ -1030,18 +1033,18 @@ Node: Agenda-like views18025 Node: Listing / acting-on results19430 Node: Changelog24032 Node: 04-pre24569 -Node: 03226822 -Node: 03127203 -Node: 0327398 -Node: 02330371 -Node: 02230597 -Node: 02130863 -Node: 0231060 -Node: 0135093 -Node: Notes35192 -Node: Comparison with Org Agenda searches35354 -Node: org-sidebar36225 -Node: License36504 +Node: 03226977 +Node: 03127358 +Node: 0327553 +Node: 02330526 +Node: 02230752 +Node: 02131018 +Node: 0231215 +Node: 0135248 +Node: Notes35347 +Node: Comparison with Org Agenda searches35509 +Node: org-sidebar36380 +Node: License36659  End Tag Table