emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* 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/)]
@ 2019-07-03  3:30 Nick Dokos
  2019-07-06  8:26 ` Nicolas Goaziou
  0 siblings, 1 reply; 2+ messages in thread
From: Nick Dokos @ 2019-07-03  3:30 UTC (permalink / raw)
  To: emacs-orgmode



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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-07-06  8:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-07-03  3:30 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/)] Nick Dokos
2019-07-06  8:26 ` Nicolas Goaziou

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