patch for glimpse preferences
Alexander Zangerl <[email protected]> Mon, 13 Nov 2006 15:10:35 +1000
| Newsgroups | gmane.mail.exmh.devel |
|---|---|
| Message-ID | <[email protected]> |
the persistent glimpse preferences do not include the AND scope option,
which is present only in the glimpse Opts dialog. it's a bit annoying to have to
check that every time exmh is started.
here's a patch that takes care of this by adding the option and some
explanatory text to the main preferences. you can still override the setting
in the glimpse Opts dialog.
the patch is against version 2.7.2 with all the cvs diffs applied.
if somebody with cvs commit rights would apply the patch i'd be grateful.
regards
az
---patch---
diff -urNad exmh-2.7.2/lib/extrasInit.tcl /tmp/dpep.ERK5qi/exmh-2.7.2/lib/extrasInit.tcl
--- exmh-2.7.2/lib/extrasInit.tcl 2005-09-26 17:53:38.000000000 +1000
+++ /tmp/dpep.ERK5qi/exmh-2.7.2/lib/extrasInit.tcl 2006-11-13 13:51:54.000000000 +1000
@@ -722,6 +722,7 @@
# (max hits (per folder))
# -L {limit}:0:{flimit} : limit per file : since 3.0:glimpse(maxHitsMsg)
# (max hits per message)
+# -W : AND scope whole file : since 2.0:glimpse(andScope)
proc Glimpse_Init {} {
global glimpse
@@ -773,7 +774,18 @@
to the whole search.
The maximum # of matches can be changed on the fly in the 'Glimpse Window'
-in the menu 'opts'"} } }
+in the menu 'opts'"} }
+
+Preferences_Add "Glimpse" "" {
+ {glimpse(andScope) glimpseAndScope ON {AND scope is whole file}
+ "If set, the scope for boolean AND is the whole file.
+The default scope of Boolean AND queries is a single line, and
+the query 'good;bad' will return all lines containing both 'good'
+and 'bad'. This option changes the scope of Booleans to be the
+whole file. With the option enabled, the query 'good;bad' would
+return all lines containing 'good' or 'bad' if the file contains
+matches for both terms."}}
+}
if {$glimpse(version) >= 3.0} {
Preferences_Add "Glimpse" "" {
diff -urNad exmh-2.7.2/lib/glimpse.tcl /tmp/dpep.ERK5qi/exmh-2.7.2/lib/glimpse.tcl
--- exmh-2.7.2/lib/glimpse.tcl 2004-07-27 04:23:31.000000000 +1000
+++ /tmp/dpep.ERK5qi/exmh-2.7.2/lib/glimpse.tcl 2006-11-13 13:51:54.000000000 +1000
@@ -63,7 +63,11 @@
}
# set default variable values
set glimpse(search) ""
+ if $glimpse(andScope) {
+ set glimpse(andscope) "-W"
+ } else {
set glimpse(andscope) ""
+ }
set glimpse(giall) 0
if {$glimpse(maxErrors) == "none"} {
---patch---
--
+ Alexander Zangerl + DSA 42BD645D + (RSA 5B586291)
Now that we have all this useful information, it would be nice to be able
to do something with it. (Actually, it can be emotionally fulfilling just
to get information. This is usually only true, however, if you have the
social life of a kumquat.) -- UNIX Programmer's Manual
_______________________________________________
Exmh-workers mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/exmh-workers
signature.asc
(application/pgp-signature, 189 B)
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (GNU/Linux) iD8DBQFFV/5npy/2bEK9ZF0RAm6SAJ4q0k/r5IoKz09xvOC/rInw1STLlQCfWZA7 BAuX8tHwd3HK1bzzA4sYES0= =j1Gv -----END PGP SIGNATURE-----