From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marc Ihm Subject: Shouldn't org-back-to-heading skip inline tasks ? Date: Sat, 4 Nov 2017 16:44:55 +0100 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:50885) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eB0dB-0007AA-U4 for emacs-orgmode@gnu.org; Sat, 04 Nov 2017 11:45:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eB0d7-0006E6-2P for emacs-orgmode@gnu.org; Sat, 04 Nov 2017 11:45:09 -0400 Received: from [195.159.176.226] (port=38389 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eB0d6-0006DU-Qy for emacs-orgmode@gnu.org; Sat, 04 Nov 2017 11:45:04 -0400 Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1eB0cx-0003Od-02 for emacs-orgmode@gnu.org; Sat, 04 Nov 2017 16:44:55 +0100 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, recently I have been surprised by the fact, that org-back-to-heading (or outline-back-to-heading, for that matter) does stop at inline tasks, as can be tried easily with this org-snippet: * foo *************** Inline *************** END M-x org-back-to-heading In my opinion, the cursor should go straight up to the heading foo instead of stopping at the inlinetask. To fix this behaviour, one could insert a modified version of org-back-to-heading right into org-inlinetask.el like this: (defun org-back-to-heading () "Move to previous heading, skipping over inlinetasks." (let (prev) (save-excursion (end-of-line) (while (and (setq prev (re-search-backward org-outline-regexp-bol nil t)) (>= (outline-level) org-inlinetask-min-level)))) (if prev (goto-char prev) (error (error "Before first headline at position %d in buffer %s" (point) (current-buffer)))))) which does not yet accept an optional invisible-ok argument, however. Would this be a useful change ? Best regards, Marc Ihm