* enhancement to the emacs "query-pr" command
@ 2003-10-11 1:51 Mel Hatzis
0 siblings, 0 replies; only message in thread
From: Mel Hatzis @ 2003-10-11 1:51 UTC (permalink / raw)
To: help-gnats
[-- Attachment #1: Type: text/plain, Size: 327 bytes --]
A colleague at work came up with an enhancement to gnats.el
so that query-pr will accept both space separated PR numbers
as well as GNATS query expressions as input.
Please review (and hopefully accept) the attached patch
which, IMO, makes the 'query-pr' command in emacs mode
more intuitive and easier to use.
--
Mel Hatzis
[-- Attachment #2: gnats.el.patch --]
[-- Type: text/plain, Size: 945 bytes --]
Change Log:
2003-10-10 Mark D Baushke <mdb@gnu.org>
* gnats.el (gnats-do-query): Accept a list of PR numbers as an
alternative to just a gnats query expression.
--- gnats.el~ Fri Oct 10 13:55:33 2003
+++ gnats.el Fri Oct 10 14:55:34 2003
@@ -1592,9 +1592,15 @@ The function works in the query buffers.
;; TODO: Handle gnatsd errors.
(gnats-send-command "QFMT" "summary")
(gnats-send-command "RSET")
- (unless (string= query "")
- (gnats-send-command "EXPR" query))
- (let ((result (gnats-send-command "QUER")))
+ (let* ((quer-cmd
+ (cond
+ ((string-match "^\[0-9 \]\+$" query)
+ (concat "QUER " query))
+ (t
+ (unless (string= query "")
+ (gnats-send-command "EXPR" query))
+ "QUER")))
+ (result (gnats-send-command quer-cmd)))
(unless (= (caar result) 300)
(error "Query error (%d %s)" (car (car result)) (cadr (car result))))
(setq result (cdr result))
[-- Attachment #3: Type: text/plain, Size: 139 bytes --]
_______________________________________________
Help-gnats mailing list
Help-gnats@gnu.org
http://mail.gnu.org/mailman/listinfo/help-gnats
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2003-10-11 1:51 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-10-11 1:51 enhancement to the emacs "query-pr" command Mel Hatzis
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).