[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Incremental search of a package

From: Emanuel Berg
Subject: Re: Incremental search of a package
Date: Sun, 24 Jul 2016 00:10:33 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux)

A better (?) version of what I just wrote:

(defun search-package (pack)
  (interactive "sPackage: ")
  (let*((regexp (format "^  %s" pack))
        (hit    (save-excursion
                  (goto-char (point-min))
                  (when (search-forward-regexp regexp (point-max) t)
                    (point) ))))
    (if hit (goto-char hit)
        (message "No package: %s" pack) )))

underground experts united ....
Emacs Gnus Blogomatic .........
                   - so far: 58 Blogomatic articles -                   

reply via email to

[Prev in Thread] Current Thread [Next in Thread]