[Top][All Lists]

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

[STUMP] Tags: regexp search by tag function

From: Michael Raskin
Subject: [STUMP] Tags: regexp search by tag function
Date: Wed, 07 Jul 2010 12:44:44 +0400
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv: Gecko/20100626 Thunderbird/; Google GoogleBot

        I noticed that when I try out new software (which is not yet added to
my automatic group tagging) typing long class names becomes boring. So I
implemented a command that uses regular expressions to find needed windows.
        I think this could be a useful addition to my contrib/window-tags.lisp
        Does anyone else need this? Any comments? Should it be edited in any
way before being added to contrib/window-tags.lisp? Should I send it as
a patch that just adds this function in window-tags.lisp?

Michael Raskin

The code itself:

(defcommand pull+push-tag-regexp (tag-regex) ((:rest "Tag regex to
select: "))
    (current (current-group (current-screen)))
    (tag-store (find-group (current-screen) ".tag-store")))
   (loop for w in (screen-windows (current-screen)) do
          (find-if (lambda (s) (cl-ppcre:scan (concatenate 'string
"(?i)" tag-regex) s)) (window-tags w))
          (move-window-to-group w current)
          (move-window-to-group w tag-store)))))

reply via email to

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