From: Hanak David <dhanak@inf.bme.hu>
Subject: Re: emacs.gnus
Date: Mon, 09 Jun 2003 17:00:53 +0200 [thread overview]
Message-ID: <m2el23gusa.fsf@maui.hanak.hu> (raw)
In-Reply-To: <84ptln1ik5.fsf@lucy.is.informatik.uni-duisburg.de>
[-- Attachment #1: Type: text/plain, Size: 1133 bytes --]
On Mon, 09 Jun 2003, Kai Großjohann wrote:
> Hanak David <dhanak@inf.bme.hu> writes:
>
>> That sounds perfectly reasonable. But what do I have to do to assign all
>> copyrights to the FSF? (I've checked the FSF homepage, but haven't found
>> the HOW, only the WHY.)
>
> Sent by private mail.
Thanks, request submitted, waiting. (Boy, this is complicated!)
> I think that it is okay for the function to return t. The Gnus
> manual also has some stuff on how the nnchoke-request-foo functions
> work. In particular, see the node (gnus)Back End Interface, which
Ah. I must remember to RTFM before asking stupid questions and making even
more stupid suggestions.
> I think the right thing to do is to use the existing function.
Yep, we agree. Although this way we loose efficiency, because first we
print the article list into the nntp buffer and then reparse this buffer
and convert it back to a list.
The "third generation" of patches follow.
David
P.S.: I'm begginning to think that it would have taken you less time to
implement the idea yourself than to instruct me how to do it. ;-) Thanks
for "investing" in me.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: gnus.patch --]
[-- Type: text/x-patch, Size: 3027 bytes --]
*** /usr/share/emacs/site-lisp/gnus/lisp/gnus-sum.el 2003-06-07 19:40:22.000000000 +0200
--- ./gnus-sum.el 2003-06-09 16:44:28.000000000 +0200
***************
*** 1092,1097 ****
--- 1092,1106 ----
:type 'boolean
:group 'gnus-article-mime)
+ (defcustom gnus-count-articles-in-groups nil
+ "*Regexp to match groups whose article count should be determined
+ accurately upon entering the group. Non-matching groups are conventionally
+ looked up in the active info.
+
+ If t, matches all groups, if nil, matches none."
+ :type '(choice regexp (const t) (const nil))
+ :group 'gnus-summary)
+
;;; Internal variables
(defvar gnus-summary-display-cache nil)
***************
*** 5226,5231 ****
--- 5235,5261 ----
(memq article gnus-newsgroup-recent))
(t t))))
+ (defun gnus-get-group-articles (group)
+ "Return a list of group articles if `gnus-count-articles-in-groups'
+ matches GROUP as a regexp. Otherwise return nil."
+ (when (and gnus-count-articles-in-groups
+ (or (eq gnus-count-articles-in-groups t)
+ (string-match gnus-count-articles-in-groups group)))
+ (let ((article-list))
+ (save-excursion
+ (gnus-request-group-articles group)
+ (set-buffer nntp-server-buffer)
+ (goto-char (point-max))
+ (forward-line -2) ; skip "."
+ (while (not (looking-at "^211 Article list follows$"))
+ (setq article-list
+ (cons (string-to-number (buffer-substring-no-properties
+ (line-beginning-position)
+ (line-end-position)))
+ article-list))
+ (forward-line -1)))
+ article-list)))
+
(defun gnus-articles-to-read (group &optional read-all)
"Find out what articles the user wants to read."
(let* ((display (gnus-group-find-parameter group 'display))
***************
*** 5242,5247 ****
--- 5272,5278 ----
;; articles in the group, or (if that's nil), the
;; articles in the cache.
(or
+ (gnus-get-group-articles group)
(gnus-uncompress-range (gnus-active group))
(gnus-cache-articles-in-group group))
;; Select only the "normal" subset of articles.
*** /usr/share/emacs/site-lisp/gnus/lisp/nnml.el 2003-05-01 16:23:15.000000000 +0200
--- ./nnml.el 2003-06-09 16:10:57.000000000 +0200
***************
*** 1007,1012 ****
--- 1007,1029 ----
(nnml-save-marks group server)
(nnheader-message 7 "Bootstrapping marks for %s...done" group)))))
+ (deffoo nnml-request-group-articles (group &optional server)
+ "Return the list of existing articles in GROUP."
+ (let ((article-list (sort (nnheader-directory-articles
+ (nnheader-group-pathname
+ (gnus-group-real-name group)
+ nnml-directory))
+ '<)))
+ (condition-case ()
+ (save-excursion
+ (set-buffer nntp-server-buffer)
+ (erase-buffer)
+ (insert "211 Article list follows\n")
+ (mapcar '(lambda (x) (insert (number-to-string x) "\n")) article-list)
+ (insert ".\n")
+ t)
+ (error nil))))
+
(provide 'nnml)
;;; nnml.el ends here
next prev parent reply other threads:[~2003-06-09 15:00 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-06-08 13:04 emacs.gnus Hanak David
2003-06-08 19:12 ` emacs.gnus Kai Großjohann
2003-06-08 21:04 ` emacs.gnus Hanak David
2003-06-09 9:16 ` emacs.gnus Kai Großjohann
2003-06-09 12:24 ` emacs.gnus Hanak David
2003-06-09 13:34 ` emacs.gnus Kai Großjohann
2003-06-09 15:00 ` Hanak David [this message]
2003-06-09 17:34 ` emacs.gnus Kai Großjohann
2003-06-10 13:33 ` emacs.gnus Hanak David
2003-06-10 16:58 ` emacs.gnus Kai Großjohann
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=m2el23gusa.fsf@maui.hanak.hu \
--to=dhanak@inf.bme.hu \
/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 NNTP newsgroup(s).