Re: [O] Bug: Can't access org agenda custom command [9.2.1 (9.2.1-33-g029cf6-elpaplus @ /home/gustavo/.emacs.d/elpa/org-plus-contrib-20190225/)]

2019-02-25 Thread Alan Schmitt
On 2019-02-26 02:19, Gustavo Barros  
writes:


I've been having trouble with my custom agenda commands since 
the latest

update.

The agenda dispatcher used to work fine until the last update, 
but now,

given one of my custom agenda commands, it issues the error
"org-agenda-get-restriction-and-command: Wrong number of 
arguments".


I think the problem is on line 3036 of org-agenda.el. The code

(propertize match nil 'face 'org-warning))

should be
(propertize match 'face 'org-warning))

(I changed it locally and it now works)

Best,

Alan


signature.asc
Description: PGP signature


[O] RCE through Org-protocol and org-babel

2019-02-25 Thread Ring <3 Rootkitty
Hi all,

Some time ago I discovered a method of executing remote code by
controlling the content sent over org-protocol, escaping the capture
template, and embedding a org-babel code block.

Details are outlined in the blog post bellow.
https://rootkitty.tech/post/rce-emacs-capture/

I don't really know if this is the right place to send it, but hey it's
best that people are aware that this is possible, even if it involves
user interaction to some extent.

-- 
Ring <3 Rootkitty
https://rootkitty.tech



Re: [O] Org can't export inline image link to PDF

2019-02-25 Thread stardiviner


Vladimir Lomov  writes:

> Hello,
>
> ** stardiviner [2019-02-23 18:19:05 +0800]:
>
> [...]
>
 I checked the =Resume.tex= file. The raw latex is this:
 
 #+begin_src latex
 \begin{center}
 \includegraphics[width=2.0in]{data/images/me_picture 23.jpg}
 \end{center}
 #+end_src
 
 No "23.bb", I search over the whole TeX file, nothing found. But the
 compiled PDF file still have "23.bb".
>>>
>>> May be you find what '.bb' file is if you look into the 'graphics'
>>> package documentation (assuming that you use TeX Live run 'texdoc
>>> graphicx', in my local copy on page 13 there is example of .bb file,
>>> search the document for .ps.bb).
>>>
>>> As for spaces in file name, if you cannot avoid them use 'grffile'
>>> package with 'graphicx' package.
>>
>> I have not found '.bb' files. Neither '.ps.bb' files. I checked out variable
>> ~org-latex-packages-alist~, it have 'grffile' and 'graphicx' packages.
>
>>> P.S. The question how the .bb file comes on scene completely related how
>>> LaTeX works with graphic file. Look into documentation or ask question
>>> on TeX.SO or on texhax mailing list.
>
> The LaTeX cannot work directly with graphic files. In past when only
> latex and dvips were existed a user was able to use only PS/EPS graphic
> files. latex can work with any graphic files using graphics/graphicx
> package. One of the purpose of the package is to provide to latex
> information about the size of a figure (Bounding Box) what is found in
> EPS file. Sometimes EPS files were gzipped but latex was unable on-fly
> decompress them and extract BB information. The workaround for this
> situation is to either provide bb keyword for '\includegraphics' command
> or create file with extension .eps.bb which will hold necessary
> information. Actual inclusion of graphic file was done by dvips program.
>
> Nowadays almost everyone uses pdflatex/xelatex/luatex engines. They use
> graphic files in format PDF (native), PNG, JPEG. In most situations the
> engine could determine the size of a figure but when it fails it will
> include the figure with wrong size.
>
> The problem that you faced is a bit another, while it is looked as being
> related to missing BB (bounding box): the latex engine don't like the
> space in file name. pdflatex engine being run in special mode don't stop
> on missing file but show you information about missing .bb file. A
> workaround to use graphic files with spaces in file name is to use
> package 'grffile'. Note, however, this workaround is only for graphic
> files and don't work to input other LaTeX files with spaces in they
> filenames into current one.

I see, thanks for explanation, now I understand why. using 'grffile' did fixed
this problem.

>
> ---
> WBR, Vladimir Lomov


-- 
[ stardiviner ]
   I try to make every word tell the meaning what I want to express.

   Blog: https://stardiviner.github.io/
   IRC(freenode): stardiviner, Matrix: stardiviner
   GPG: F09F650D7D674819892591401B5DF1C95AE89AC3
  



Re: [O] [PATCH] Let radio target works well with Chinese

2019-02-25 Thread tumashu










At 2019-02-26 03:50:37, "Eric Abrahamsen"  wrote:
>Emilio Francesquini  writes:
>
>> Hello,
>>
>>> <<<天空>>>
>>> >
>>> > 我爱天空和大地
>>> > 
>>>
>>> Org doesn't support mid-word radio targets. Is there any strong reason
>>> to make a case for Chinese? What about other languages?
>>>
>>
>> My knowledge in Chinese is rather limited, but if it is a little like
>> Japanese the problem is that those languages do not use spaces to separate
>> words.
>>
>> I found myself in the same situation writing radio targets in Japanese...
>> My workaroud was to insert artificial spaces as needed... :/
>
>I've gotten this information (does-space-separate-words) for specific
>characters before using either of these two methods:
>
>(aref (char-category-set ?b) ?|) => nil
>(aref (char-category-set ?中) ?|) => t
>
>(aref fill-nospace-between-words-table?b) => nil
>(aref fill-nospace-between-words-table ?中) => t
>
>| is the category character for "line breakable". Perhaps adding "\c|"
>to the regexp would DTRT?

Seem to be a good idea :-)

>
>Eric
>


[O] Bug: Can't access org agenda custom command [9.2.1 (9.2.1-33-g029cf6-elpaplus @ /home/gustavo/.emacs.d/elpa/org-plus-contrib-20190225/)]

2019-02-25 Thread Gustavo Barros




Remember to cover the basics, that is, what you expected to happen and
what in fact did happen. You don't know how to make a good report? See

https://orgmode.org/manual/Feedback.html#Feedback

Your bug report will be posted to the Org mailing list.


Hi all,

I've been having trouble with my custom agenda commands since the latest
update.

The agenda dispatcher used to work fine until the last update, but now,
given one of my custom agenda commands, it issues the error
"org-agenda-get-restriction-and-command: Wrong number of arguments".

I do believe the problem is due to the recent changes to the mentioned
function, discussed in the following thread:
http://lists.gnu.org/archive/html/emacs-orgmode/2019-02/msg00291.html

To test things, I started with `emacs -Q`, and evaluated the following:


#+begin_src emacs-lisp
(require 'package)
(package-initialize)

(require 'org)

(custom-set-variables
'(org-agenda-files
(quote
("~/Gustavo/Documents/Pessoal/Org Agenda/pessoal.org" 
"~/Gustavo/Documents/Pessoal/Org Agenda/trabalho.org")))

'(org-agenda-custom-commands
(quote
(("h" . "Home Agenda Views")
("hh" "Home Agenda"
((agenda ""
((org-agenda-overriding-header "Today (Home)")
(org-agenda-span
(quote day
(todo ""
((org-agenda-overriding-header "Tasks")
(org-agenda-todo-ignore-with-date t)
(org-agenda-skip-function
(quote
(org-agenda-skip-entry-if
(quote todo)
(quote
("SOMEDAY"
((org-agenda-files
(quote
("~/Gustavo/Documents/Pessoal/Org Agenda/pessoal.org"
nil)
("hs" "Someday Tasks" todo "SOMEDAY"
((org-agenda-files
(quote
("~/Gustavo/Documents/Pessoal/Org Agenda/pessoal.org")
("w" . "Work Agenda Views")
("ww" "Work Agenda"
((agenda ""
((org-agenda-overriding-header "Today (Work)")
(org-agenda-span
(quote day
(todo ""
((org-agenda-overriding-header "Tasks")
(org-agenda-todo-ignore-with-date t)
(org-agenda-skip-function
(quote
(org-agenda-skip-entry-if
(quote todo)
(quote
("SOMEDAY"
nil nil)
("ws" "Someday Tasks" todo "SOMEDAY" nil)
("n" "Agenda and all TODOs"
((agenda "" nil)
(alltodo "" nil))
nil)

#+end_src

With this, =M-x org-version= returns: "Org mode version 9.2.1
(9.2.1-33-g029cf6-elpaplus @
/home/gustavo/.emacs.d/elpa/org-plus-contrib-20190225/)".

In this setting, if I try to access my "Work Agenda", with =M-x
org-agenda w w= I get the mentioned error
"org-agenda-get-restriction-and-command: Wrong number of arguments"

If I then evaluate the previous value of
=org-agenda-get-restriction-and-command= , as contained in
=org-plus-contrib-20190218= proper behaviour is restored.

Best regards,
Gustavo Barros.



Emacs : GNU Emacs 26.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.22.30)
of 2019-01-02
Package: Org mode version 9.2.1 (9.2.1-33-g029cf6-elpaplus @ 
/home/gustavo/.emacs.d/elpa/org-plus-contrib-20190225/)


current state:
==
(setq
org-src-mode-hook '(org-src-babel-configure-edit-buffer
org-src-mode-configure-edit-buffer)
org-metadown-hook '(org-babel-pop-to-session-maybe)
org-clock-out-hook '(org-clock-remove-empty-clock-drawer)
org-agenda-files '("~/Gustavo/Documents/Pessoal/Org Agenda/pessoal.org"
"~/Gustavo/Documents/Pessoal/Org Agenda/trabalho.org")
org-mode-hook '(#[0 "\300\301\302\303\304$\207"
[add-hook change-major-mode-hook org-show-all append local]
5]
#[0 "\300\301\302\303\304$\207"
[add-hook change-major-mode-hook org-babel-show-result-all
append local]
5]
org-babel-result-hide-spec org-babel-hide-all-hashes
org-eldoc-load)
org-archive-hook '(org-attach-archive-delete-maybe)
org-confirm-elisp-link-function 'yes-or-no-p
org-agenda-before-write-hook '(org-agenda-add-entry-text)
org-metaup-hook '(org-babel-load-in-session-maybe)
org-bibtex-headline-format-function #[257 "\300.\236A\207" [:title] 3 
"\n\n(fn ENTRY)"]

org-babel-pre-tangle-hook '(save-buffer)
org-tab-first-hook '(org-babel-hide-result-toggle-maybe
org-babel-header-arg-expand)
org-src-lang-modes '(("arduino" . arduino) ("redis" . redis) ("php" . php)
("C" . c) ("C++" . c++) ("asymptote" . asy)
("bash" . sh) ("beamer" . latex) ("calc" . fundamental)
("cpp" . c++) ("ditaa" . artist) ("dot" . fundamental)
("elisp" . emacs-lisp) ("ocaml" . tuareg)
("screen" . shell-script) ("shell" . sh)
("sqlite" . sql))
org-occur-hook '(org-first-headline-recenter)
org-cycle-hook '(org-cycle-hide-archived-subtrees 
org-cycle-show-empty-lines

Re: [O] [PATCH] Let radio target works well with Chinese

2019-02-25 Thread Eric Abrahamsen
Emilio Francesquini  writes:

> Hello,
>
>> <<<天空>>>
>> >
>> > 我爱天空和大地
>> > 
>>
>> Org doesn't support mid-word radio targets. Is there any strong reason
>> to make a case for Chinese? What about other languages?
>>
>
> My knowledge in Chinese is rather limited, but if it is a little like
> Japanese the problem is that those languages do not use spaces to separate
> words.
>
> I found myself in the same situation writing radio targets in Japanese...
> My workaroud was to insert artificial spaces as needed... :/

I've gotten this information (does-space-separate-words) for specific
characters before using either of these two methods:

(aref (char-category-set ?b) ?|) => nil
(aref (char-category-set ?中) ?|) => t

(aref fill-nospace-between-words-table?b) => nil
(aref fill-nospace-between-words-table ?中) => t

| is the category character for "line breakable". Perhaps adding "\c|"
to the regexp would DTRT?

Eric




[O] org-clock-resolving-clocks & idle

2019-02-25 Thread Michaël Cadilhac
Hi there;

CONTEXT:  When I'm idling with the clock running, Org asks if I want
to resolve the clock when I come back (this is by setting
org-clock-idle-time).

PROBLEM: I'm not sure how recent the change was, but Org started
asking me _multiple times_ what I want to do when back.

CAUSE: It seems that the mechanism that prevents multiple such
questions is broken.  It boils down to checking whether
org-clock-resolving-clocks is non-nil in org-resolve-clocks-if-idle.
The problem is that org-resolve-clocks-if-idle then calls
org-clock-resolve, which does *not* change org-clock-resolving-clocks
(that's the job of org-resolve-clocks, it seems).

POSSIBLE SOLUTION: (if we agree there is a problem) Check for
org-clock-resolving-clocks-due-to-idleness rather than
org-clock-resolving-clocks in org-resolve-clocks-if-idle.  How does
that sound?  Maybe org-clock-resolve should also set
org-clock-resolving-clocks; is there a use case where
org-clock-resolve may be called multiple times (with timers probably)
with different clocks, and we'd want all of them to prompt the user?

Cheers;
M.



Re: [O] Org can't export inline image link to PDF

2019-02-25 Thread Vladimir Lomov
Hello,

** stardiviner [2019-02-23 18:19:05 +0800]:

[...]

>>> I checked the =Resume.tex= file. The raw latex is this:
>>> 
>>> #+begin_src latex
>>> \begin{center}
>>> \includegraphics[width=2.0in]{data/images/me_picture 23.jpg}
>>> \end{center}
>>> #+end_src
>>> 
>>> No "23.bb", I search over the whole TeX file, nothing found. But the
>>> compiled PDF file still have "23.bb".
>>
>> May be you find what '.bb' file is if you look into the 'graphics'
>> package documentation (assuming that you use TeX Live run 'texdoc
>> graphicx', in my local copy on page 13 there is example of .bb file,
>> search the document for .ps.bb).
>>
>> As for spaces in file name, if you cannot avoid them use 'grffile'
>> package with 'graphicx' package.
>
> I have not found '.bb' files. Neither '.ps.bb' files. I checked out variable
> ~org-latex-packages-alist~, it have 'grffile' and 'graphicx' packages.

>> P.S. The question how the .bb file comes on scene completely related how
>> LaTeX works with graphic file. Look into documentation or ask question
>> on TeX.SO or on texhax mailing list.

The LaTeX cannot work directly with graphic files. In past when only
latex and dvips were existed a user was able to use only PS/EPS graphic
files. latex can work with any graphic files using graphics/graphicx
package. One of the purpose of the package is to provide to latex
information about the size of a figure (Bounding Box) what is found in
EPS file. Sometimes EPS files were gzipped but latex was unable on-fly
decompress them and extract BB information. The workaround for this
situation is to either provide bb keyword for '\includegraphics' command
or create file with extension .eps.bb which will hold necessary
information. Actual inclusion of graphic file was done by dvips program.

Nowadays almost everyone uses pdflatex/xelatex/luatex engines. They use
graphic files in format PDF (native), PNG, JPEG. In most situations the
engine could determine the size of a figure but when it fails it will
include the figure with wrong size.

The problem that you faced is a bit another, while it is looked as being
related to missing BB (bounding box): the latex engine don't like the
space in file name. pdflatex engine being run in special mode don't stop
on missing file but show you information about missing .bb file. A
workaround to use graphic files with spaces in file name is to use
package 'grffile'. Note, however, this workaround is only for graphic
files and don't work to input other LaTeX files with spaces in they
filenames into current one.

---
WBR, Vladimir Lomov

-- 
Sales tax applies.


signature.asc
Description: PGP signature


Re: [O] [PATCH] Let radio target works well with Chinese

2019-02-25 Thread Emilio Francesquini
Hello,

> <<<天空>>>
> >
> > 我爱天空和大地
> > 
>
> Org doesn't support mid-word radio targets. Is there any strong reason
> to make a case for Chinese? What about other languages?
>

My knowledge in Chinese is rather limited, but if it is a little like
Japanese the problem is that those languages do not use spaces to separate
words.

I found myself in the same situation writing radio targets in Japanese...
My workaroud was to insert artificial spaces as needed... :/

Regards,

Emilio


Re: [O] org-log-post-message: is it properly reset?

2019-02-25 Thread Nicolas Goaziou
Hello,

Michaël Cadilhac  writes:

> From time to time, I have some spurious "Entry repeats" messages when
> editing tasks that have no repetition.  I've tracked that down to
> org-log-post-message being message'd in org-store-log-note, and I
> can't really see anywhere where the variable is reset.  Should it be
> reset after it's used in org-store-log-note?
>
> Additionally, why is it defvar'd twice?

I don't know. Probably a mistake. BTW, is this variable useful at all?

Regards,

-- 
Nicolas Goaziou



Re: [O] Bug: org-agenda-overriding-columns-format destroyed on revert [9.2.1 (9.2.1-2-gc6d37c-elpaplus)]

2019-02-25 Thread Nicolas Goaziou
Hello,

Allen Li  writes:

> 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.

Applied. Thank you.

Regards,

-- 
Nicolas Goaziou



Re: [O] [PATCH] Let radio target works well with Chinese

2019-02-25 Thread Nicolas Goaziou
Hello,

"Feng Shu"  writes:

> * lisp/org.el (org-update-radio-target-regexp): Let radio target works well 
> with Chinese

Thank you.

> There is no need to force split words with the help
> of space for Chinese, this change let the below
> example works well.
>
> <<<天空>>>
>
> 我爱天空和大地
> 

Org doesn't support mid-word radio targets. Is there any strong reason
to make a case for Chinese? What about other languages?


Regards,

-- 
Nicolas Goaziou



Re: [O] [RFC] Fixing link encoding once and for all

2019-02-25 Thread stardiviner


Nicolas Goaziou  writes:

> Hello,
>
> Recently[1], issues about link escaping have resurfaced. I'd like to
> solve this once and for all.
>
> As a reminder, the initial issue is that bracket links, i.e., "[[path]]"
> or "[[path][description]]", cannot contain square brackets, for obvious
> reasons. Therefore, they need to be escaped somehow. For some historical
> reason, the "somehow" settled, for the path part[2], on URL encoding.
> Therefore [ and ] in a link must appear as, respectively, "%5B" and
> "%5D". Of course, the initial link could already contain any of these
> strings, so percent signs also need to be escaped, as "%25". Eventually,
> consecutive spaces are not very handled very gracefully by
> `fill-paragraph' function, so it is also useful, but not mandatory, to
> be able to escape white spaces, with "%20". It can sadly be confusing
> when Org encoding is applied on top an already encoded URI.
>
> To sum it up, `org-link-escape', by default, URL encodes only square
> brackets, percent signs and white spaces. Note that, however,
> `org-link-unescape' is not its reciprocal function, despite its
> docstring. It URL decodes every percent encoded combination.
>
> Anyway, square brackets in a bracket link almost looks like a solved
> problem. Alas, if some links are inserted by helper functions, such as
> `org-insert-link', others could have been typed right into the buffer.
> Therefore, there is usually no way to know if a link is already
> Org-encoded or not. Consequently, there is usually no way to know when
> a link needs to be Org-decoded. This is the root of all evil, or at
> least, all bugs encountered so far. Some links end up being encoded or
> decoded once too many.
>
> To solve this, we must assume that every bracket link is properly
> Org-encoded in a buffer. In other words, when typing, or yanking,
> a bracket link right into a buffer, users are required to use %5B, %5D,
> and %25 in the path part of the link, if necessary. I understand it will
> bite some users, but using `org-insert-link' would mitigate the pain. It
> is also limited to square brackets, which, I assume, is not the type of
> link you usually yank.
>
> With that assumption, the parser can safely Org-decode links
> appropriately, and store paths in their decoded form. Consumers, like
> export back-ends, need not call `org-link-unescape' anymore. In fact,
> the only situation where `org-link-unescape' is still needed is when
> extracting the path part of a bracket link from the buffer, e.g.,
> through regexp matching.
>
> Of course, the manual should mention this assumption, if we agree on it.
>
> Thoughts?
>
> Regards,
>

I agree and upvote on this. Use `org-insert-link' as unique entry will help
unify all behavior. The only inconvenient of inserting link literately is where
user can't access `org-insert-link'. Like on web, in other editor. But I think
whatever Org Mode is limited in Emacs already, so no matter add this on. Also,
at the end, if other clients want to support Org Mode, then can insert link with
encoded and handle this properly.

WDYT?

> Footnotes: 
>
> [1] E.g., 
> or .
>
> [2] There is no clear mechanism for the description part.
> `org-insert-link' will replace square brackets with curly ones. We could
> also use entities, but none of them appears as a square bracket. Anyway,
> I'll ignore this issue for the time being.


-- 
[ stardiviner ]
   I try to make every word tell the meaning what I want to express.

   Blog: https://stardiviner.github.io/
   IRC(freenode): stardiviner, Matrix: stardiviner
   GPG: F09F650D7D674819892591401B5DF1C95AE89AC3
  



Re: [O] Bug: org-agenda-overriding-columns-format destroyed on revert [9.2.1 (9.2.1-2-gc6d37c-elpaplus)]

2019-02-25 Thread Allen Li
Thank you for the comments, attached new patch.

On Mon, Feb 18, 2019 at 9:16 PM Nicolas Goaziou  wrote:
>
> >  (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?

I don't know if the defvar-local in org-colview will be loaded before
this point,
so I think it's safer to just use setq-local.

> >  (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).

I think you misread?  I didn't touch the first line.

>
> > +(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
From a8814962e73af61ebbbdeb20eceb53e09d030b06 Mon Sep 17 00:00:00 2001
From: Allen Li 
Date: Sat, 16 Feb 2019 17:21:04 -0800
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.

* doc/org-manual.org (Using Column View in the Agenda): Updated
  reference to variable.
* lisp/org-agenda.el (org-agenda-finalize): Set buffer local variable
  instead.
* lisp/org-colview.el (org-overriding-columns-format): Renamed.
(org-agenda-overriding-columns-format): Renamed.
(org-local-columns-format): New buffer local variable.
(org-columns-edit-value): Updated reference to variable.
(org-columns-next-allowed-value): Updated reference to variable.
(org-agenda-columns): Updated reference to variable.
---
 doc/org-manual.org  |  2 +-
 lisp/org-agenda.el  |  9 +
 lisp/org-colview.el | 20 +++-
 3 files changed, 21 insertions(+), 10 deletions(-)

diff --git a/doc/org-manual.org b/doc/org-manual.org
index a1cc35608..a8c52681b 100644
--- a/doc/org-manual.org
+++ b/doc/org-manual.org
@@ -10477,7 +10477,7 @@ environment.  This causes the following issues:
the entries in the agenda are collected from different files, and
different files may have different columns formats, this is
a non-trivial problem.  Org first checks if the variable
-   ~org-agenda-overriding-columns-format~ is currently set, and if so,
+   ~org-overriding-columns-format~ is currently set, and if so,
takes the format from there.  Otherwise it takes the format
associated with the first item in the agenda, or, if that item does
not have a specific format (defined in a property, or in its file),
diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
index c1a8a44f2..4a0604a9b 100644
--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el
@@ -3766,7 +3766,8 @@ FILTER-ALIST is an alist of filters we need to apply when
 	 (setq-local org-agenda-name name)))
   (setq buffer-read-only nil
 
-(defvar org-agenda-overriding-columns-format)  ; From org-colview.el
+(defvar org-overriding-columns-format)
+(defvar org-local-columns-format)
 (defun org-agenda-finalize ()
   "Finishing touch for the agenda buffer, called just before displaying it."
   (unless org-agenda-multi
@@ -3781,9 +3782,9 @@ FILTER-ALIST is an alist of filters we need to apply when
 	  (org-agenda-align-tags))
 	(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
-		  org-agenda-overriding-columns-format))
+	(when (bound-and-true-p org-overriding-columns-format)
+	  (setq-local org-local-columns-format
+		  org-overriding-columns-format))
 	(when org-agenda-view-columns-initially
 	  (org-agenda-columns))
 	(when org-agenda-fontify-priorities
diff --git a/lisp/org-colview.el