From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Ivan Shmakov Newsgroups: gmane.emacs.bugs Subject: bug#24274: 24.5; Use auth-source library for remote passwords in Rmail Date: Sun, 21 Aug 2016 19:30:43 +0000 Message-ID: <87inutsyvw.fsf@violet.siamics.net> References: <87vayvqphr.fsf@gmail.com> <87a8g6nqp4.fsf@gmail.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1471807882 8343 195.159.176.226 (21 Aug 2016 19:31:22 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 21 Aug 2016 19:31:22 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) Cc: Viktor Slavkovik , zhtvk@gmx.com To: 24274@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Aug 21 21:31:18 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bbYSj-0001sn-Ed for geb-bug-gnu-emacs@m.gmane.org; Sun, 21 Aug 2016 21:31:17 +0200 Original-Received: from localhost ([::1]:37962 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bbYSg-0004dR-L5 for geb-bug-gnu-emacs@m.gmane.org; Sun, 21 Aug 2016 15:31:14 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:46894) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bbYSZ-0004dM-Od for bug-gnu-emacs@gnu.org; Sun, 21 Aug 2016 15:31:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bbYSU-0008OQ-Uj for bug-gnu-emacs@gnu.org; Sun, 21 Aug 2016 15:31:07 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:38375) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bbYSU-0008OM-JX for bug-gnu-emacs@gnu.org; Sun, 21 Aug 2016 15:31:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1bbYSU-0001mo-9M for bug-gnu-emacs@gnu.org; Sun, 21 Aug 2016 15:31:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Ivan Shmakov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 21 Aug 2016 19:31:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 24274 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 24274-submit@debbugs.gnu.org id=B24274.14718078556850 (code B ref 24274); Sun, 21 Aug 2016 19:31:02 +0000 Original-Received: (at 24274) by debbugs.gnu.org; 21 Aug 2016 19:30:55 +0000 Original-Received: from localhost ([127.0.0.1]:36087 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bbYSN-0001mP-1i for submit@debbugs.gnu.org; Sun, 21 Aug 2016 15:30:55 -0400 Original-Received: from fely.am-1.org ([78.47.74.50]:39989) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bbYSL-0001mH-5F for 24274@debbugs.gnu.org; Sun, 21 Aug 2016 15:30:53 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=siamics.net; s=a2013295; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID:In-Reply-To:Date:Sender:References:Subject:Cc:To:From; bh=EyU4RNfX3/YdVjF1lFrgWyARdtZwM3XfdskO2J0tUhA=; b=RUjwZ30xQH6Z5DnYyvAgU0aNLSnNauK/rS7lzxF4b/FsOLUZmQWyvEViVYVi8mDAR3WzCDAIy9hexDAajZDQiioA8987pd14pxoWBHbjft+Rudj83LWbuthnpPWyVjAF6KslqTMqDPp2p84QIvsUgwe8aq15HJexs6wxo1rAbMM=; Original-Received: from violet.siamics.net ([2001:470:1f13:1eb::1:1d]) by fely.am-1.org with esmtps (TLS1.2:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.84_2) (envelope-from ) id 1bbYSJ-0002S7-5Y; Sun, 21 Aug 2016 19:30:51 +0000 Original-Received: from localhost ([::1] helo=violet.siamics.net) by violet.siamics.net with esmtps (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.80) (envelope-from ) id 1bbYSC-0003YU-Et; Mon, 22 Aug 2016 02:30:44 +0700 In-Reply-To: <87a8g6nqp4.fsf@gmail.com> (Viktor Slavkovik's message of "Sun, 21 Aug 2016 16:26:31 +0200") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:122468 Archived-At: >>>>> Viktor Slavkovik writes: >>>>> Ivan Shmakov writes: [=E2=80=A6] >> The auth-source-search function will prompt for password >> automatically if given =E2=80=98:create t=E2=80=99 among its parameters= , making >> explicit read-passwd unnecessary. (But check also the >> auth-source-creation-prompts variable.) [=E2=80=A6] > I've made an update (attached) to the previous patch. I removed the > code indentation spaces and changed the docstring to be more > descriptive. Also, I included a function check for the auth-source > password which was missing before. > ! (if found > ! (progn > ! (setq secret (plist-get found :secret)) > ! (if (functionp secret) > ! (funcall secret))) There, rmail-remote-password will end up being set to nil if =E2=80=98secret=E2=80=99 is /not/ a function. Compare: (progn (setq secret (plist-get found :secret)) (if (functionp secret) (funcall secret) secret)) > I don't think that the ':create' parameter of auth-source-search > should be used here, since we don't know if the authentication will > be successful. We can call auth-source-forget+ if necessary once we figure it out; just like it=E2=80=99s done in gnus/nnimap.el and mail/smtpmail.el. > Content-Type: application/octet-stream I=E2=80=99d appreciate for the patches to come marked as something text/*, so that MIME-aware mail user agents could just display them (as opposed to: ask user to save one into a file.) I guess that such a Content-Type: will be emitted automatically when the filename of the file being attached ends with .diff or .patch. > Content-Disposition: attachment; filename=3Dpatch_update > Content-Transfer-Encoding: base64 > Content-Description: updated patch --=20 FSF associate member #7257 http://am-1.org/~ivan/ =E2=80=A6 3013 B6A0= 230E 334A