From: Mel Hatzis <hatzis@juniper.net>
To: help-gnats@gnu.org
Subject: enhancement to the emacs "query-pr" command
Date: Sat, 11 Oct 2003 01:51:00 -0000 [thread overview]
Message-ID: <3F8761BB.3080202@juniper.net> (raw)
[-- 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
reply other threads:[~2003-10-11 1:51 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3F8761BB.3080202@juniper.net \
--to=hatzis@juniper.net \
--cc=help-gnats@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).