emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [PATCH] Skip uninteresting lines when navigating the agenda
@ 2012-03-08  2:14 Bernt Hansen
  2012-04-11 13:46 ` Bernt Hansen
  0 siblings, 1 reply; 2+ messages in thread
From: Bernt Hansen @ 2012-03-08  2:14 UTC (permalink / raw)
  To: emacs-orgmode; +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

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

end of thread, other threads:[~2012-04-11 13:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-03-08  2:14 [PATCH] Skip uninteresting lines when navigating the agenda Bernt Hansen
2012-04-11 13:46 ` Bernt Hansen

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