emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[O] Bug: org-agenda-list attempts to add text properties to agenda heade


From: Nick Dokos
Subject: [O] Bug: org-agenda-list attempts to add text properties to agenda header even if org-agenda-overriding-header is set to "" [9.2.4 (release_9.2.4-386-gb855ac @ /home/nick/elisp/org-mode/lisp/)]
Date: Tue, 02 Jul 2019 23:30:14 -0400


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

Evaluate the following form:

     (let ((org-agenda-overriding-header "")) (org-agenda-list))

It fails with

     org-agenda-list: Args out of range: 0, 1

It seems that the following code in org-agenda-list:

--8<---------------cut here---------------start------------->8---
         ...
      (unless org-agenda-compact-blocks
        (let* ((d1 (car day-numbers))
               (d2 (org-last day-numbers))
               (w1 (org-days-to-iso-week d1))
               (w2 (org-days-to-iso-week d2)))
          (setq s (point))
          (org-agenda--insert-overriding-header
            (concat (org-agenda-span-name span)
                    "-agenda"
                    (cond ((<= 350 (- d2 d1)) "")
                          ((= w1 w2) (format " (W%02d)" w1))
                          (t (format " (W%02d-W%02d)" w1 w2)))
                    ":\n")))
        (add-text-properties s (1- (point)) (list 'face 'org-agenda-structure
                                                  'org-date-line t))
        (org-agenda-mark-header-line s))
--8<---------------cut here---------------end--------------->8---

tries to add text properties to the string even though it has been set to the
empty string.

I was able to reproduce this after it was reported on the Emacs SE:

    
https://emacs.stackexchange.com/questions/51354/is-there-any-way-to-hide-agenda-date-header

Emacs  : GNU Emacs 27.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 2.24.32)
 of 2019-05-01
Package: Org mode version 9.2.4 (release_9.2.4-386-gb855ac @ 
/home/nick/elisp/org-mode/lisp/)
-- 
Nick

"There are only two hard problems in computer science: cache
invalidation, naming things, and off-by-one errors." -Martin Fowler



reply via email to

[Prev in Thread] Current Thread [Next in Thread]