From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rasmus Subject: [bug] org-indent Date: Fri, 23 Jun 2017 12:15:18 +0200 Message-ID: <871sqbovrd.fsf@gmx.us> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:55576) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dOLck-0000w9-PZ for emacs-orgmode@gnu.org; Fri, 23 Jun 2017 06:15:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dOLch-0002H1-ET for emacs-orgmode@gnu.org; Fri, 23 Jun 2017 06:15:34 -0400 Received: from [195.159.176.226] (port=58631 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dOLch-0002GZ-5Z for emacs-orgmode@gnu.org; Fri, 23 Jun 2017 06:15:31 -0400 Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1dOLca-0005ZT-3h for emacs-orgmode@gnu.org; Fri, 23 Jun 2017 12:15:24 +0200 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 Hi, There's a bug in ‘org-indent--compute-prefixes’ near ";; Inline tasks line prefixes". If (bound-and-true-p org-inlinetask-show-first-star) is non-nil, then Org tries to compute (substring heading-prefix 1). But the initial value of ‘heading-prefix’ seems to be "", at least some of the time (if ‘indentation’ is 0). In my Emacs this results in an error. Adding an extra check seems to fix it, but I’m not sure if the substring part is what needs fixing. ;; Inline tasks line prefixes (aset org-indent--inlinetask-line-prefixes n (org-add-props (if (and (bound-and-true-p org-inlinetask-show-first-star) (org-string-nw-p heading-prefix)) (concat org-indent-inlinetask-first-star (substring heading-prefix 1)) heading-prefix) nil 'face 'org-indent))) Thanks, Rasmus -- Dung makes an excellent fertilizer