From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Dokos Subject: 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 Message-ID: <87muhv4wxl.fsf@alphaville.usersys.redhat.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:44968) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hiVyi-0001E1-0G for emacs-orgmode@gnu.org; Tue, 02 Jul 2019 23:30:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hiVyg-0006vR-Rx for emacs-orgmode@gnu.org; Tue, 02 Jul 2019 23:30:39 -0400 Received: from mx1.redhat.com ([209.132.183.28]:37012) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hiVye-0006eD-4f for emacs-orgmode@gnu.org; Tue, 02 Jul 2019 23:30:37 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id E18F730821FA for ; Wed, 3 Jul 2019 03:30:16 +0000 (UTC) Received: from alphaville.usersys.redhat.com (ovpn-116-10.phx2.redhat.com [10.3.116.10]) by smtp.corp.redhat.com (Postfix) with ESMTPS id C568B5C231 for ; Wed, 3 Jul 2019 03:30:15 +0000 (UTC) Received: from alphaville.usersys.redhat.com (localhost [IPv6:::1]) by alphaville.usersys.redhat.com (Postfix) with ESMTPS id DFD0D2705E3 for ; Tue, 2 Jul 2019 23:30:14 -0400 (EDT) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: emacs-orgmode@gnu.org 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