stumpwm-devel
[Top][All Lists]
Advanced

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

[STUMP] Misc. stumpwm business


From: gwern branwen
Subject: [STUMP] Misc. stumpwm business
Date: Sun, 31 Dec 2006 22:41:58 -0500

1: primitives.lisp should probably be changed so that *x-selection* is
initialized to an empty string rather than nil; if one tries to paste
from *x-selection*, it could crash stumpwm. I had to add a set in my
paste.lisp to make sure it was initialized which was a little annoying
(<http://stumpwm.elektrubadur.se/cgi-bin/wiki?action=browse&diff=1&id=paste.lisp&revision=11&diffrevision=10&Compare=Compare>).
Basically:
--- primitives.lisp     2006-12-16 00:17:16.000000000 -0500
+++ primitives2.lisp    2006-12-31 22:34:05.000000000 -0500
@@ -537,7 +537,7 @@
  (+ (xlib:font-descent font)
     (xlib:font-ascent font)))

-(defvar *x-selection* nil
+(defvar *x-selection* ""
  "This holds stumpwm's current selection. It is generally set
when killing text in the input bar.")

2:  I recently rewrote a good chunk of my .stumpwmrc dealing with
surfraw. Here's an example:
;;Ask user for a search string and search Wikipedia for it.
(define-stumpwm-command "wikipedia" ((search-string :string "wikipedia
" :string))
 (run-shell-command (concatenate 'string "surfraw wikipedia " search-string)))

This works perfectly when bound to a key and called, but I've
discovered to my dismay that when you go to the input box and manually
type in "wikipedia foo bar", it fails miserably and only brings up a
search for the Wikipedia article [[Foo]], and not [[Foo bar]] like it
should. I think it has something to do with the problem that
"search-string" is only being bound to the first item, as split by
whitespace, but all my attempts to use &rest and other variables have
failed. I'd appreciate any suggestions anyone could offer.

--Gwern




reply via email to

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