From: Nicolas Goaziou <mail@nicolasgoaziou.fr>
To: Allen Li <darkfeline@felesatra.moe>
Cc: 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: Mon, 18 Feb 2019 22:16:21 +0100 [thread overview]
Message-ID: <87r2c4sspm.fsf@nicolasgoaziou.fr> (raw)
In-Reply-To: <CADbSrJxokrUyMTXM8cOrY+TMut0Yg5Kr6TRK=FO-WeU4PLRVdA@mail.gmail.com> (Allen Li's message of "Sun, 17 Feb 2019 01:24:59 +0000")
Hello,
Allen Li <darkfeline@felesatra.moe> writes:
> I have attached a patch implementing this on maint.
Thank you. Some comments follow.
> Subject: [PATCH] Fix buffer local org-agenda-overriding-columns-format bug
>
> Setting org-agenda-overriding-columns-format as a buffer local value
> interferes with how it is used as a dynamically scoped var, so use a
> separate variable for buffer local setting.
You need to include variables and functions modified in the commit
message, so grepping through them more fruitful.
> (defvar org-agenda-overriding-columns-format) ; From org-colview.el
> +(defvar org-agenda-local-overriding-columns-format) ; From org-colview.el
You can remove the inline comment at the end of the line (and the one
above).
> (defun org-agenda-finalize ()
> "Finishing touch for the agenda buffer, called just before displaying it."
> (unless org-agenda-multi
> @@ -3783,7 +3784,7 @@ FILTER-ALIST is an alist of filters we need to apply when
> (unless org-agenda-with-colors
> (remove-text-properties (point-min) (point-max) '(face nil)))
> (when (bound-and-true-p org-agenda-overriding-columns-format)
> - (setq-local org-agenda-overriding-columns-format
> + (setq-local org-agenda-local-overriding-columns-format
Since this is a local variable, `setq' is enough, isn't it?
> org-agenda-overriding-columns-format))
> (when org-agenda-view-columns-initially
> (org-agenda-columns))
> diff --git a/lisp/org-colview.el b/lisp/org-colview.el
> index 746426bc7..2fbb5aa6c 100644
> --- a/lisp/org-colview.el
> +++ b/lisp/org-colview.el
> @@ -567,7 +567,13 @@ for the duration of the command.")
>
> (defvar org-agenda-overriding-columns-format nil
> "When set, overrides any other format definition for the agenda.
> -Don't set this, this is meant for dynamic scoping.")
> +Don't set this, this is meant for dynamic scoping. Set
> +`org-agenda-local-overriding-columns-format' instead.")
The first line of a docstring cannot contain an incomplete sentence (due
to `apropos` design).
> +(defvar-local org-agenda-local-overriding-columns-format nil
> + "When set, overrides any other format definition for the agenda.
> +This can be set as a buffer local value to avoid interfering with
> +dynamic scoping for `org-agenda-overriding-columns-format'.")
The two variable names are somewhat confusing. Could
`org-agenda-local-overriding-columns-format' be renamed into
`org-local-columns-format'? Since it is defined in "org-colview.el", it
doesn't deserve the "org-agenda" prefix (and neither does the original
`org-agenda-overriding-columns-format'.).
Regards,
--
Nicolas Goaziou
next prev parent reply other threads:[~2019-02-18 21:16 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
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 [this message]
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=87r2c4sspm.fsf@nicolasgoaziou.fr \
--to=mail@nicolasgoaziou.fr \
--cc=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).