[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r107561: Allow ^substr, substr=, ~wor
From: |
Eli Zaretskii |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r107561: Allow ^substr, substr=, ~word in mairix searches via the form widget. |
Date: |
Sat, 10 Mar 2012 16:36:42 +0200 |
User-agent: |
Bazaar (2.3.1) |
------------------------------------------------------------
revno: 107561
committer: Eli Zaretskii <address@hidden>
branch nick: trunk
timestamp: Sat 2012-03-10 16:36:42 +0200
message:
Allow ^substr, substr=, ~word in mairix searches via the form widget.
lisp/net/mairix.el (mairix-replace-invalid-chars): Rename from
mairix-replace-illegal-chars; all callers changed. Don't remove
^, ~, and = characters: they are meaningful in mairix search
specs.
(mairix-widget-create-query): Add usage information about mairix
search forms: negating words, searching for substrings, etc.
modified:
lisp/ChangeLog
lisp/net/mairix.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2012-03-10 09:45:06 +0000
+++ b/lisp/ChangeLog 2012-03-10 14:36:42 +0000
@@ -1,3 +1,12 @@
+2012-03-10 Eli Zaretskii <address@hidden>
+
+ * net/mairix.el (mairix-replace-invalid-chars): Rename from
+ mairix-replace-illegal-chars; all callers changed. Don't remove
+ ^, ~, and = characters: they are meaningful in mairix search
+ specs.
+ (mairix-widget-create-query): Add usage information about mairix
+ search forms: negating words, searching for substrings, etc.
+
2012-03-10 Jae-hyeon Park <address@hidden> (tiny change)
* international/fontset.el (font-encoding-alist): Add an entry for
=== modified file 'lisp/net/mairix.el'
--- a/lisp/net/mairix.el 2012-01-19 07:21:25 +0000
+++ b/lisp/net/mairix.el 2012-03-10 14:36:42 +0000
@@ -570,10 +570,10 @@
mairix-output-buffer)))
(zerop rval)))
-(defun mairix-replace-illegal-chars (header)
- "Replace illegal characters in HEADER for mairix query."
+(defun mairix-replace-invalid-chars (header)
+ "Replace invalid characters in HEADER for mairix query."
(when header
- (while (string-match "[^-.@/,& [:alnum:]]" header)
+ (while (string-match "[^-.@/,^=~& [:alnum:]]" header)
(setq header (replace-match "" t t header)))
(while (string-match "[& ]" header)
(setq header (replace-match "," t t header)))
@@ -620,7 +620,7 @@
(concat
(nth 1 cur)
":"
- (mairix-replace-illegal-chars
+ (mairix-replace-invalid-chars
(widget-value
(cadr (assoc (concat "e" (car (cddr cur))) widgets)))))
query)))
@@ -652,9 +652,17 @@
(kill-all-local-variables)
(erase-buffer)
(widget-insert
- "Specify your query for Mairix (check boxes for activating fields):\n\n")
- (widget-insert
- "(Whitespaces will be converted to ',' (i.e. AND). Use '/' for OR.)\n\n")
+ "Specify your query for Mairix using check boxes for activating
fields.\n\n")
+ (widget-insert
+ (concat "Use ~word to match messages "
+ (propertize "not" 'face 'italic)
+ " containing the word)\n"
+ " substring= to match words containing the substring\n"
+ " substring=N to match words containing the substring,
allowing\n"
+ " up to N errors(mising/extra/different
letters)\n"
+ " ^substring= to match the substring at the beginning of a
word.\n"))
+ (widget-insert
+ "Whitespace will be converted to ',' (i.e. AND). Use '/' for OR.\n\n")
(setq mairix-widgets (mairix-widget-build-editable-fields values))
(when (member 'flags mairix-widget-other)
(widget-insert "\nFlags:\n Seen: ")
@@ -935,7 +943,7 @@
(lambda (field)
(list (car (cddr field))
(if (car field)
- (mairix-replace-illegal-chars
+ (mairix-replace-invalid-chars
(funcall get-mail-header (car field)))
nil))))
mairix-widget-fields-list)))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r107561: Allow ^substr, substr=, ~word in mairix searches via the form widget.,
Eli Zaretskii <=