From: Allen Li <darkfeline@felesatra.moe>
To: Org Mode List <emacs-orgmode@gnu.org>
Subject: Re: Bug: org-agenda-overriding-columns-format destroyed on revert [9.2.1 (9.2.1-2-gc6d37c-elpaplus)]
Date: Wed, 13 Feb 2019 08:37:59 +0000 [thread overview]
Message-ID: <CADbSrJwEjRNFxn=QEYxPAJx0nSbrh3p2YgxwF42X1bm7g+4BWw@mail.gmail.com> (raw)
In-Reply-To: <808syk5cis.fsf@felesatra.moe>
On Wed, Feb 13, 2019 at 8:17 AM Allen Li <darkfeline@felesatra.moe> wrote:
>
> 0. Make /tmp/tmp.org containing
>
> * TODO foo bar
>
> 1. emacs -Q
> 2. Eval (setq org-agenda-custom-commands '(("n" "n" alltodo "" ((org-agenda-overriding-columns-format "%TODO")))))
> 3. Eval (setq org-agenda-files '("/tmp/tmp.org"))
> 4. M-x org-agenda RET n
> 5. Move point to item
> 6. C-c C-x C-c (column view)
> 7. g
>
> Expected:
>
> Column format is preserved
>
> Actual:
>
> Column format is reset
>
> (The example uses the version of Org shipped with Emacs, but I can
> reproduce with my personal config using latest org-contrib-plus)
I'm suspicious of org-agenda-mode -> kill-all-local-variables
Debugger entered--killing local value of
org-agenda-overriding-columns-format in buffer *Org
Agenda(f:SCHEDULED>"<today>")*:
debug--implement-debug-watch(org-agenda-overriding-columns-format
nil makunbound #<buffer *Org Agenda(f:SCHEDULED>"<today>")*>)
kill-all-local-variables()
org-agenda-mode()
org-agenda-prepare("TAGS SCHEDULED>\"<today>\"")
org-tags-view((4) "SCHEDULED>\"<today>\"")
(let ((org-agenda-sorting-strategy '(scheduled-up))
(org-agenda-overriding-columns-format "%TODO %60ITEM %SCHEDULED"))
(org-tags-view '(4) (if current-prefix-arg nil
"SCHEDULED>\"<today>\"")))
eval((let ((org-agenda-sorting-strategy '(scheduled-up))
(org-agenda-overriding-columns-format "%TODO %60ITEM %SCHEDULED"))
(org-tags-view '(4) (if current-prefix-arg nil
"SCHEDULED>\"<today>\""))))
org-let(((org-agenda-sorting-strategy '(scheduled-up))
(org-agenda-overriding-columns-format "%TODO %60ITEM %SCHEDULED"))
(org-tags-view '(4) (if current-prefix-arg nil
"SCHEDULED>\"<today>\"")))
(if series-redo-cmd (eval series-redo-cmd) (org-let lprops redo-cmd))
(let* ((p (or (and (looking-at "\\'") (1- (point))) (point))) (cpa
(if (eq all t) nil current-prefix-arg)) (org-agenda-doing-sticky-redo
org-agenda-sticky) (org-agenda-sticky nil) (org-agenda-buffer-name (or
org-agenda-this-buffer-name org-agenda-buffer-name))
(org-agenda-keep-modes t) (tag-filter org-agenda-tag-filter)
(tag-preset (get 'org-agenda-tag-filter :preset-filter))
(top-hl-filter org-agenda-top-headline-filter) (cat-filter
org-agenda-category-filter) (cat-preset (get
'org-agenda-category-filter :preset-filter)) (re-filter
org-agenda-regexp-filter) (re-preset (get 'org-agenda-regexp-filter
:preset-filter)) (effort-filter org-agenda-effort-filter)
(effort-preset (get 'org-agenda-effort-filter :preset-filter))
(org-agenda-tag-filter-while-redo (or tag-filter tag-preset)) (cols
org-agenda-columns-active) (line (org-current-line)) (window-line (-
line (org-current-line (window-start)))) (lprops (get
'org-agenda-redo-command 'org-lprops)) (redo-cmd (get-text-property p
'org-redo-cmd)) (last-args (get-text-property p 'org-last-args))
(org-agenda-overriding-cmd (get-text-property p 'org-series-cmd))
(org-agenda-overriding-cmd-arguments (if (eq all t) nil (cond ((listp
last-args) (cons (or cpa (car last-args)) (cdr last-args))) ((stringp
last-args) last-args)))) (series-redo-cmd (get-text-property p
'org-series-redo-cmd))) (put 'org-agenda-tag-filter :preset-filter
nil) (put 'org-agenda-category-filter :preset-filter nil) (put
'org-agenda-regexp-filter :preset-filter nil) (put
'org-agenda-effort-filter :preset-filter nil) (and cols
(org-columns-quit)) (message "Rebuilding agenda buffer...") (if
series-redo-cmd (eval series-redo-cmd) (org-let lprops redo-cmd))
(setq org-agenda-undo-list nil org-agenda-pending-undo-list nil
org-agenda-tag-filter tag-filter org-agenda-category-filter cat-filter
org-agenda-regexp-filter re-filter org-agenda-effort-filter
effort-filter org-agenda-top-headline-filter top-hl-filter) (message
"Rebuilding agenda buffer...done") (put 'org-agenda-tag-filter
:preset-filter tag-preset) (put 'org-agenda-category-filter
:preset-filter cat-preset) (put 'org-agenda-regexp-filter
:preset-filter re-preset) (put 'org-agenda-effort-filter
:preset-filter effort-preset) (let ((tag (or tag-filter tag-preset))
(cat (or cat-filter cat-preset)) (effort (or effort-filter
effort-preset)) (re (or re-filter re-preset))) (if tag (progn
(org-agenda-filter-apply tag 'tag t))) (if cat (progn
(org-agenda-filter-apply cat 'category))) (if effort (progn
(org-agenda-filter-apply effort 'effort))) (if re (progn
(org-agenda-filter-apply re 'regexp)))) (and top-hl-filter
(org-agenda-filter-top-headline-apply top-hl-filter)) (and cols
(called-interactively-p 'any) (org-agenda-columns)) (org-goto-line
line) (recenter window-line))
org-agenda-redo()
One oddity is that repeatedly reverting the buffer swaps between the
"correct" overriding column format and the default.
next prev parent reply other threads:[~2019-02-13 8:51 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-13 8:16 Bug: org-agenda-overriding-columns-format destroyed on revert [9.2.1 (9.2.1-2-gc6d37c-elpaplus)] Allen Li
2019-02-13 8:37 ` Allen Li [this message]
2019-02-13 9:11 ` Allen Li
2019-02-13 9:25 ` Allen Li
2019-02-17 1:24 ` Allen Li
2019-02-18 21:16 ` Nicolas Goaziou
2019-02-25 8:01 ` Allen Li
2019-02-25 12:48 ` Nicolas Goaziou
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='CADbSrJwEjRNFxn=QEYxPAJx0nSbrh3p2YgxwF42X1bm7g+4BWw@mail.gmail.com' \
--to=darkfeline@felesatra.moe \
--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).