From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bernt Hansen Subject: [PATCH] Skip uninteresting lines when navigating the agenda Date: Wed, 7 Mar 2012 21:14:47 -0500 Message-ID: <1331172887-2163-1-git-send-email-bernt@norang.ca> Return-path: Received: from eggs.gnu.org ([208.118.235.92]:41437) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S5Sso-0004ep-GF for emacs-orgmode@gnu.org; Wed, 07 Mar 2012 21:15:11 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S5Ssl-00057f-LM for emacs-orgmode@gnu.org; Wed, 07 Mar 2012 21:15:10 -0500 Received: from mho-02-ewr.mailhop.org ([204.13.248.72]:57175) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S5Ssl-0004zW-Hh for emacs-orgmode@gnu.org; Wed, 07 Mar 2012 21:15:07 -0500 Received: from cpe000102d0fe75-cm0012256ecbde.cpe.net.cable.rogers.com ([99.239.165.89] helo=mail.norang.ca) by mho-02-ewr.mailhop.org with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.72) (envelope-from ) id 1S5Ssd-0004s6-F1 for emacs-orgmode@gnu.org; Thu, 08 Mar 2012 02:14:59 +0000 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-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Cc: Bernt Hansen * lisp/org-agenda.el (org-agenda-next-line): Skip lines without markers * lisp/org-agenda.el (org-agenda-previous-line): Skip lines without markers Next and previous line functions now only visit agenda lines which have a marker defined. This skips all of the uninteresting data lines in the agenda window such as empty grid lines, titles, and separate lines in block agendas. --- lisp/org-agenda.el | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el index ac1b5b1..90a4228 100644 --- a/lisp/org-agenda.el +++ b/lisp/org-agenda.el @@ -6911,12 +6911,18 @@ When called with a prefix argument, include all archive files as well." "Move cursor to the next line, and show if follow mode is active." (interactive) (call-interactively 'next-line) + (while (and (not (org-get-at-bol 'org-hd-marker)) + (< (point) (point-max))) + (call-interactively 'next-line)) (org-agenda-do-context-action)) (defun org-agenda-previous-line () "Move cursor to the previous line, and show if follow-mode is active." (interactive) (call-interactively 'previous-line) + (while (and (not (org-get-at-bol 'org-hd-marker)) + (> (point) (point-min))) + (call-interactively 'previous-line)) (org-agenda-do-context-action)) (defun org-agenda-do-context-action () -- 1.7.9.48.g85da4d