Gnus development mailing list
 help / color / mirror / Atom feed
From: Tassilo Horn <tassilo@member.fsf.org>
To: ding@gnus.org
Subject: Re: Changes for Emacs 23.1
Date: Mon, 06 Jul 2009 21:16:04 +0200	[thread overview]
Message-ID: <87d48doc5n.fsf@thinkpad.tsdh.de> (raw)
In-Reply-To: <871votlk4j.fsf@randomsample.de> (David Engster's message of "Mon, 06 Jul 2009 20:52:12 +0200")

David Engster <deng@randomsample.de> writes:

Hi!

>> I think at least the config for nnimap groups is so easy, that it
>> could be added to the normal section about imap.
>>
>> (add-to-list 'gnus-secondary-select-methods
>>              '(nnimap "Fastmail"
>>                       (nnimap-address "localhost")
>>                       (nnimap-stream network)
>>                       (nnimap-authenticator login)
>>                       (nnir-search-engine imap))) ;; Only this line!
>
> OK, maybe we could at least document the IMAP search features, since
> these will probably most widely used. I just think we shouldn't have
> any stubs in the Gnus docs which go with Emacs 23.

Thinking about it, maybe it's better not to do so and to remove nnir for
the 23.1 release.  The nnir imap search works great, but getting from a
search result to the original article doesn't work in all cases.  IMO,
searching without being able to reply with the right posting styles and
parameters is as bad as not being able to search at all.

I override the relevant nnir function:

--8<---------------cut here---------------start------------->8---
(defun gnus-summary-nnir-goto-thread ()
  "Redefines the function from nnir.el."
  (interactive)
  (unless (eq 'nnir (car (gnus-find-method-for-group gnus-newsgroup-name)))
    (error "Can't execute this command unless in nnir group."))
  (let* ((cur (gnus-summary-article-number))
         (group (nnir-artlist-artitem-group nnir-artlist cur))
         (mid (mail-header 'message-id
                           (progn
                             (gnus-summary-select-article t)
                             (with-current-buffer gnus-article-buffer
                               (goto-char (point-min))
                               (mail-header-extract-no-properties))))))
    (gnus-activate-group group t)
    (condition-case nil
        (let ((articles 1)
              group-opened)
          (while (and (not group-opened)
                      ;; stop on integer overflows
                      (> articles 0))
            (setq group-opened (gnus-group-read-group articles nil group)
                  articles (if (< articles 16)
                               (1+ articles)
                             (* articles 2))))
          (if group-opened
              (gnus-summary-goto-article mid nil t)
            (message "Couldn't follow gnus link.  %s"
                     "The summary couldn't be opened.")))
      (quit (message "Couldn't follow gnus link.  %s"
                     "The linked group is empty.")))
    (gnus-summary-refer-thread)
    ;; TODO: Is there nothing like limiting to the current thread?
    ))
--8<---------------cut here---------------end--------------->8---

I think the original version doesn't manage to open a group, if the last
article was deleted.  So in my version, I extend the max article count
ad infimum.  (Yeah, I know, not very elegant, but at least it works.)

>>> I think if nnir isn't properly documented, it should be removed from
>>> Emacs 23.
>>
>> I'm not in favour of doing so...
>
> Just to be clear: I'm talking about the Emacs 23.1 release branch. nnir
> should of course stay in Gnus CVS and in the Emacs development trunk.

Ah, ok.  Then I agree. ;-)

>> I wonder if anybody uses nnir with some other search engine than
>> imap.  If not, I'd vote for putting the imap stuff into nnimap.el and
>> dropping nnir altogether.
>
> Yes, that would be an option for Gnus CVS, but IMO we cannot introduce
> such a change for the Emacs 23.1 release.

Sure.

Bye,
Tassilo



  reply	other threads:[~2009-07-06 19:16 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-06 12:48 David Engster
2009-07-06 18:30 ` Tassilo Horn
2009-07-06 18:52   ` David Engster
2009-07-06 19:16     ` Tassilo Horn [this message]
2009-07-07  7:05   ` Justus-bulk
2009-07-07  7:52     ` Miles Bader
2009-07-07  8:43     ` Tassilo Horn
2009-07-07  8:58       ` David Engster
2009-07-08 18:53 ` Ted Zlatanov
2009-07-08 20:24 ` Adding "^nnmairix" to gnus-registry-unfollowed-groups (was: Changes for Emacs 23.1) Reiner Steib
2009-07-08 22:50   ` Adding "^nnmairix" to gnus-registry-unfollowed-groups Chong Yidong
2009-07-10  7:37     ` Reiner Steib
2009-07-10  8:48       ` David Engster

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=87d48doc5n.fsf@thinkpad.tsdh.de \
    --to=tassilo@member.fsf.org \
    --cc=ding@gnus.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 NNTP newsgroup(s).