* Bug: agenda text search with buffer restriction fails [9.1.5 (9.1.5-1-gb3ddb0-elpaplus @ /home/ionasal/.emacs.d/elpa/org-plus-contrib-20171225/)] @ 2017-12-30 11:38 Allen Li 2017-12-30 11:45 ` Allen Li 0 siblings, 1 reply; 5+ messages in thread From: Allen Li @ 2017-12-30 11:38 UTC (permalink / raw) To: emacs-orgmode Doing a text agenda search with org-agenda-text-search-extra-files set to (agenda-archives) and with a buffer restriction results in an error: Debugger entered--Lisp error: (wrong-type-argument stringp agenda-archives) file-exists-p(agenda-archives) #[(a b) "\302 !\205 \302 !\205 \303 \"\207" [a b file-exists-p file-equal-p] 3]("/tmp/tmp.org" agenda-archives) cl--position("/tmp/tmp.org" (agenda-archives) 0 1) cl--delete-duplicates(("/tmp/tmp.org" agenda-archives) (:test #[(a b) "\302 !\205 \302 !\205 \303 \"\207" [a b file-exists-p file-equal-p] 3]) t) cl-remove-duplicates(("/tmp/tmp.org" agenda-archives) :test #[(a b) "\302 !\205 \302 !\205 \303 \"\207" [a b file-exists-p file-equal-p] 3]) org-search-view(nil) funcall-interactively(org-search-view nil) call-interactively(org-search-view) org-agenda(nil) funcall-interactively(org-agenda nil) call-interactively(org-agenda nil nil) command-execute(org-agenda) Emacs : GNU Emacs 25.3.1 (x86_64-pc-linux-gnu, GTK+ Version 3.22.26) of 2017-12-04 Package: Org mode version 9.1.5 (9.1.5-1-gb3ddb0-elpaplus @ /home/ionasal/.emacs.d/elpa/org-plus-contrib-20171225/) ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Bug: agenda text search with buffer restriction fails [9.1.5 (9.1.5-1-gb3ddb0-elpaplus @ /home/ionasal/.emacs.d/elpa/org-plus-contrib-20171225/)] 2017-12-30 11:38 Bug: agenda text search with buffer restriction fails [9.1.5 (9.1.5-1-gb3ddb0-elpaplus @ /home/ionasal/.emacs.d/elpa/org-plus-contrib-20171225/)] Allen Li @ 2017-12-30 11:45 ` Allen Li 2017-12-30 12:10 ` Bastien 0 siblings, 1 reply; 5+ messages in thread From: Allen Li @ 2017-12-30 11:45 UTC (permalink / raw) To: emacs-orgmode [-- Attachment #1: Type: text/plain, Size: 1446 bytes --] On Sat, Dec 30, 2017 at 3:38 AM, Allen Li <vianchielfaura@gmail.com> wrote: > Doing a text agenda search with org-agenda-text-search-extra-files > set to (agenda-archives) and with a buffer restriction results in an error: > > Debugger entered--Lisp error: (wrong-type-argument stringp agenda-archives) > file-exists-p(agenda-archives) > #[(a b) "\302 !\205 \302 !\205 \303 \"\207" [a b file-exists-p > file-equal-p] 3]("/tmp/tmp.org" agenda-archives) > cl--position("/tmp/tmp.org" (agenda-archives) 0 1) > cl--delete-duplicates(("/tmp/tmp.org" agenda-archives) (:test #[(a > b) "\302 !\205 \302 !\205 \303 \"\207" [a b file-exists-p > file-equal-p] 3]) t) > cl-remove-duplicates(("/tmp/tmp.org" agenda-archives) :test #[(a b) > "\302 !\205 \302 !\205 \303 \"\207" [a b file-exists-p file-equal-p] > 3]) > org-search-view(nil) > funcall-interactively(org-search-view nil) > call-interactively(org-search-view) > org-agenda(nil) > funcall-interactively(org-agenda nil) > call-interactively(org-agenda nil nil) > command-execute(org-agenda) I made a patch for this (attached), which works when evaluated in my working session. We were not removing the agenda-archives symbol if a restriction is in effect. > > > Emacs : GNU Emacs 25.3.1 (x86_64-pc-linux-gnu, GTK+ Version 3.22.26) > of 2017-12-04 > Package: Org mode version 9.1.5 (9.1.5-1-gb3ddb0-elpaplus @ > /home/ionasal/.emacs.d/elpa/org-plus-contrib-20171225/) [-- Attachment #2: 0001-Remove-agenda-archives-even-with-buffer-restriction.patch --] [-- Type: text/x-patch, Size: 1120 bytes --] From ea7602a50ce258eeb4833962f91150d401303171 Mon Sep 17 00:00:00 2001 From: Allen Li <darkfeline@felesatra.moe> Date: Sat, 30 Dec 2017 03:41:51 -0800 Subject: [PATCH] Remove agenda-archives even with buffer restriction --- lisp/org-agenda.el | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el index 888818630..7f3b9d0ca 100644 --- a/lisp/org-agenda.el +++ b/lisp/org-agenda.el @@ -4482,9 +4482,9 @@ is active." (setq files (org-agenda-files nil 'ifmode)) ;; Add `org-agenda-text-search-extra-files' unless there is some ;; restriction. - (unless (get 'org-agenda-files 'org-restrict) - (when (eq (car org-agenda-text-search-extra-files) 'agenda-archives) - (pop org-agenda-text-search-extra-files) + (when (eq (car org-agenda-text-search-extra-files) 'agenda-archives) + (pop org-agenda-text-search-extra-files) + (unless (get 'org-agenda-files 'org-restrict) (setq files (org-add-archive-files files)))) ;; Uniquify files. However, let `org-check-agenda-file' handle ;; non-existent ones. -- 2.15.1 ^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: Bug: agenda text search with buffer restriction fails [9.1.5 (9.1.5-1-gb3ddb0-elpaplus @ /home/ionasal/.emacs.d/elpa/org-plus-contrib-20171225/)] 2017-12-30 11:45 ` Allen Li @ 2017-12-30 12:10 ` Bastien 2017-12-30 21:39 ` Allen Li 0 siblings, 1 reply; 5+ messages in thread From: Bastien @ 2017-12-30 12:10 UTC (permalink / raw) To: Allen Li; +Cc: emacs-orgmode Hi Allen, thanks for the patch, it looks good. Can you provide it with a changelog? Like for those two: https://code.orgmode.org/bzg/org-mode/commit/b9b921716ba1d2a564bb9443427dfb21bb609e05 https://code.orgmode.org/bzg/org-mode/commit/da83e7d583895976a2398becbb995bcce1f729be I assume the email address darkfeline AT felesatra DOT moe belongs to you, in which case you don't need to add "TINYCHANGE" at the end of the changelog message since your FSF papers are signed. Thanks! -- Bastien ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Bug: agenda text search with buffer restriction fails [9.1.5 (9.1.5-1-gb3ddb0-elpaplus @ /home/ionasal/.emacs.d/elpa/org-plus-contrib-20171225/)] 2017-12-30 12:10 ` Bastien @ 2017-12-30 21:39 ` Allen Li 2018-04-26 23:34 ` Bastien 0 siblings, 1 reply; 5+ messages in thread From: Allen Li @ 2017-12-30 21:39 UTC (permalink / raw) To: Bastien; +Cc: emacs-orgmode [-- Attachment #1: Type: text/plain, Size: 839 bytes --] On Sat, Dec 30, 2017 at 4:10 AM, Bastien <bzg@gnu.org> wrote: > Hi Allen, > > thanks for the patch, it looks good. > > Can you provide it with a changelog? Like for those two: > > https://code.orgmode.org/bzg/org-mode/commit/b9b921716ba1d2a564bb9443427dfb21bb609e05 > https://code.orgmode.org/bzg/org-mode/commit/da83e7d583895976a2398becbb995bcce1f729be Oops, done. Attached new patch. > I assume the email address darkfeline AT felesatra DOT moe belongs > to you, in which case you don't need to add "TINYCHANGE" at the end > of the changelog message since your FSF papers are signed. Yes, that's under a domain that I own so I don't rely on Gmail to receive email (although I often send with Gmail to avoid spam filter issues, alas). You can find my public key/identity on, e.g. the MIT key servers. > > Thanks! > > -- > Bastien [-- Attachment #2: 0001-Remove-agenda-archives-even-with-buffer-restriction.patch --] [-- Type: text/x-patch, Size: 1214 bytes --] From 21d8d507474ac3faa5b1ea9dfa7aa3647cddd8af Mon Sep 17 00:00:00 2001 From: Allen Li <darkfeline@felesatra.moe> Date: Sat, 30 Dec 2017 03:41:51 -0800 Subject: [PATCH] Remove agenda-archives even with buffer restriction * lisp/org-agenda.el (org-search-view): Remove agenda-archives even with buffer restriction --- lisp/org-agenda.el | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el index 888818630..7f3b9d0ca 100644 --- a/lisp/org-agenda.el +++ b/lisp/org-agenda.el @@ -4482,9 +4482,9 @@ is active." (setq files (org-agenda-files nil 'ifmode)) ;; Add `org-agenda-text-search-extra-files' unless there is some ;; restriction. - (unless (get 'org-agenda-files 'org-restrict) - (when (eq (car org-agenda-text-search-extra-files) 'agenda-archives) - (pop org-agenda-text-search-extra-files) + (when (eq (car org-agenda-text-search-extra-files) 'agenda-archives) + (pop org-agenda-text-search-extra-files) + (unless (get 'org-agenda-files 'org-restrict) (setq files (org-add-archive-files files)))) ;; Uniquify files. However, let `org-check-agenda-file' handle ;; non-existent ones. -- 2.15.1 ^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: Bug: agenda text search with buffer restriction fails [9.1.5 (9.1.5-1-gb3ddb0-elpaplus @ /home/ionasal/.emacs.d/elpa/org-plus-contrib-20171225/)] 2017-12-30 21:39 ` Allen Li @ 2018-04-26 23:34 ` Bastien 0 siblings, 0 replies; 5+ messages in thread From: Bastien @ 2018-04-26 23:34 UTC (permalink / raw) To: Allen Li; +Cc: emacs-orgmode Hi Allen, Allen Li <vianchielfaura@gmail.com> writes: >> https://code.orgmode.org/bzg/org-mode/commit/b9b921716ba1d2a564bb9443427dfb21bb609e05 >> https://code.orgmode.org/bzg/org-mode/commit/da83e7d583895976a2398becbb995bcce1f729be > > Oops, done. Attached new patch. applied in maint, thanks and sorry for the delay! -- Bastien ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2018-04-26 23:34 UTC | newest] Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2017-12-30 11:38 Bug: agenda text search with buffer restriction fails [9.1.5 (9.1.5-1-gb3ddb0-elpaplus @ /home/ionasal/.emacs.d/elpa/org-plus-contrib-20171225/)] Allen Li 2017-12-30 11:45 ` Allen Li 2017-12-30 12:10 ` Bastien 2017-12-30 21:39 ` Allen Li 2018-04-26 23:34 ` Bastien
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).