     (setf elfeed-search-filter new-filter)
     (elfeed-search-update :force)))
 
+(defun elfeed-goto-line (n)
+  "Like `goto-line' but for non-interactive use."
+  (goto-char (point-min))
+  (forward-line (1- n)))
+
 (defun elfeed-search-update (&optional force)
   "Update the display to match the database."
   (interactive)


(require 'cl)
(require 'xml)

(defgroup elfeed nil
  "An Emacs web feed reader."

              do (elfeed-search-print entry)
              do (insert "\n"))
        (insert "End of entries.\n")
        (elfeed-goto-line line))
      (setf elfeed-search-last-update (float-time)))))

(defun elfeed-search-update-line (&optional n)
  "Redraw the current line."
  (let ((inhibit-read-only t))
    (save-excursion
      (when n (elfeed-goto-line n))
      (let ((entry (elfeed-search-selected :ignore-region)))
        (when entry
          (beginning-of-line)
