Gnus development mailing list
 help / color / mirror / Atom feed
* [gnu.emacs.gnus] Re: nntp-send-authinfo-from-file ? ?
@ 1997-07-09 22:18 Jason R Mastaler
  1997-07-10 18:30 ` Lars Magne Ingebrigtsen
  0 siblings, 1 reply; 2+ messages in thread
From: Jason R Mastaler @ 1997-07-09 22:18 UTC (permalink / raw)


Am I correct in my assumption that `nntp-send-authinfo-from-file' only
allows you to specify a password in ~/.nntp-authinfo and not a
username as well?  The manual makes it sound that way.

  `nntp-send-authinfo-from-file'
       This function will use your current login name as the user
       name and will read the NNTP password from `~/.nntp-authinfo'.

If so, maybe this functionality could be added to Gnus?  Below is one
method to do this, and it does work..

------- Forwarded Message

From: Darrell Fuhriman <darrell@grumblesmurf.net>
Newsgroups: gnu.emacs.gnus
Subject: Re: nntp-send-authinfo-from-file ? ?
Date: 09 Jul 1997 12:53:00 -0700
Organization: As if...
Message-ID: <m2vi2kovdv.fsf@xian.grumblesmurf.net>
References: <rylo3gmeq1.fsf@alt.healthcare.com>
To: bas@alt.healthcare.com (Bret A. Schuhmacher)

bas@alt.healthcare.com (Bret A. Schuhmacher) writes:

> Does send-authinfo-from-file work with nntp-send-nosy-authinfo?  I
> have to use nntp-send-nosy-authinfo but it's annoying to have to type
> in the info every 15 minutes.  Maybe the format of my .nntp-authinfo

I use the following.. in .nntp-authinfo, put the username on the
first line and the password on the second.

(add-hook 'nntp-server-opened-hook
          (lambda ()
            (cond ((string-match "something.com" nntp-address)
                   (nntp-send-nosy-authinfo-from-file))
                  (t
                    ))))

(defun nntp-send-nosy-authinfo-from-file ()
  "Send the AUTHINFO to the nntp server, including username and password
  This function is supposed to be called from `nntp-server-opened-hook'."
  (when (file-exists-p "~/.nntp-authinfo")
    (nnheader-temp-write nil
      (insert-file-contents "~/.nntp-authinfo")
      (goto-char (point-min))
      (nntp-send-command
       "^.*\r?\n" "AUTHINFO USER"
       (buffer-substring (point) (progn (end-of-line) (point))))
      (goto-line 2)
      (nntp-send-command 
       "^.*\r?\n" "AUTHINFO PASS" 
       (buffer-substring (point) (progn (end-of-line) (point)))))))

Darrell

------- End of Forwarded Message

   Jason R. Mastaler                      jason@mastaler.com


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [gnu.emacs.gnus] Re: nntp-send-authinfo-from-file ? ?
  1997-07-09 22:18 [gnu.emacs.gnus] Re: nntp-send-authinfo-from-file ? ? Jason R Mastaler
@ 1997-07-10 18:30 ` Lars Magne Ingebrigtsen
  0 siblings, 0 replies; 2+ messages in thread
From: Lars Magne Ingebrigtsen @ 1997-07-10 18:30 UTC (permalink / raw)


Jason R Mastaler <jason@mastaler.com> writes:

> Am I correct in my assumption that `nntp-send-authinfo-from-file' only
> allows you to specify a password in ~/.nntp-authinfo and not a
> username as well?  The manual makes it sound that way.

Yes, that's right.

A function like the one you included will probably be included with
Quassia Gnus.

-- 
(domestic pets only, the antidote for overdose, milk.)
  larsi@gnus.org * Lars Magne Ingebrigtsen


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~1997-07-10 18:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1997-07-09 22:18 [gnu.emacs.gnus] Re: nntp-send-authinfo-from-file ? ? Jason R Mastaler
1997-07-10 18:30 ` Lars Magne Ingebrigtsen

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).