From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Michael Albinus via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#67937: 30.0.50; auth-source-pass relies on epa-file being enabled Date: Fri, 29 Dec 2023 10:38:27 +0100 Message-ID: <87bka9ic18.fsf@gmx.de> References: <8734vwq06i.fsf@aarsen.me> <871qbf4ocp.fsf@neverwas.me> <871qbflg53.fsf@aarsen.me> <87h6kbxgzl.fsf@neverwas.me> <87jzp6is0s.fsf@aarsen.me> <87ttoas466.fsf@neverwas.me> <878r5mm3el.fsf@gmx.de> <875y0qrmhj.fsf@neverwas.me> <871qbdmagw.fsf@gmx.de> <87bkahlzzp.fsf@neverwas.me> <868r5lszxm.fsf@aarsen.me> <87plywlus1.fsf@gmx.de> <86r0jcn100.fsf@aarsen.me> <87h6k8kk4l.fsf@gmx.de> <867cl3kh4p.fsf@aarsen.me> <83a5pzde0a.fsf@gnu.org> <86h6k77qco.fsf@aarsen.me> <87v88nk5md.fsf@gmx.de> <86y1dj4l71.fsf@aarsen.me> <87le9jjyu6.fsf@gmx.de> <8734vlflpf.fsf@aarsen.me> Reply-To: Michael Albinus Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="24240"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: damien@cassou.me, Eli Zaretskii , 67937@debbugs.gnu.org, jp@neverwas.me To: Arsen =?UTF-8?Q?Arsenovi=C4=87?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Dec 29 10:39:26 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1rJ9Kv-00069H-Q1 for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 29 Dec 2023 10:39:25 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rJ9Ka-00034x-Mb; Fri, 29 Dec 2023 04:39:04 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rJ9KZ-00034o-1N for bug-gnu-emacs@gnu.org; Fri, 29 Dec 2023 04:39:03 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rJ9KY-0002tr-OW for bug-gnu-emacs@gnu.org; Fri, 29 Dec 2023 04:39:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rJ9KY-00086y-Gf for bug-gnu-emacs@gnu.org; Fri, 29 Dec 2023 04:39:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Michael Albinus Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 29 Dec 2023 09:39:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 67937 X-GNU-PR-Package: emacs Original-Received: via spool by 67937-submit@debbugs.gnu.org id=B67937.170384272631156 (code B ref 67937); Fri, 29 Dec 2023 09:39:02 +0000 Original-Received: (at 67937) by debbugs.gnu.org; 29 Dec 2023 09:38:46 +0000 Original-Received: from localhost ([127.0.0.1]:40787 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rJ9KI-00086S-3s for submit@debbugs.gnu.org; Fri, 29 Dec 2023 04:38:46 -0500 Original-Received: from mout.gmx.net ([212.227.15.18]:45569) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rJ9KF-00086C-Hj for 67937@debbugs.gnu.org; Fri, 29 Dec 2023 04:38:44 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.de; s=s31663417; t=1703842709; x=1704447509; i=michael.albinus@gmx.de; bh=kgAOvGOdcBBMj1zP25CIrFKQhJOm4eI+BlAAs4GGRks=; h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References: Date; b=Xdl19x8jsToH0RCU8uZtSQ7FRAqA9IA40WPY8vKahqhupY05KO1osUxzYULtV+xr VclEtONDVO4FLf9cx7eWwTm42bmfk/K01slq63FIKDHVTRG1VD/jbmo3qPcUC+QXJ t0F1zfBBmgrCVCd7/Wixh3x/1PrlN4WjvTuKfvd2E/AQZP7O5Zr9ZZ/3+S05FjOmR 2DU0yts6d4uvuFSFOl33UuGeDCYFTvfJigmY2jLB9YOfuzEuM0Ktwf3mpiLqoyLKB qBzTMpxRozWgcebf+H2OcdSQdtYQhARI06VnD4kESfE+12wLzNUfewmkQlDjOa+vb EW+Z/RF33Vj/EZMWxw== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Original-Received: from gandalf.gmx.de ([185.89.39.3]) by mail.gmx.net (mrgmx004 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MtfNl-1qxusV46Bj-00v46P; Fri, 29 Dec 2023 10:38:29 +0100 In-Reply-To: <8734vlflpf.fsf@aarsen.me> ("Arsen =?UTF-8?Q?Arsenovi=C4=87?="'s message of "Fri, 29 Dec 2023 09:27:59 +0100") X-Provags-ID: V03:K1:hYlWy8AwR7ewgxocNYU5Xd9b70DJhs6MJnlMT9xSvFSzQ0+FQ6M oi4TQwuqCAsB+jPpT+gs9Fs28Hq4GNQM8YgGNryDmb8ITjGAuK9DZJy94VmUYLaI74Z0KdX e/t7YSLD4gjKXSVaTBwa4IEN9a5N+l8I66bl/syjZdE7i0RpQteuBUVxVgIdPRqbWRyET3m Y/JZbFSwz9F/LIz7cnDNg== UI-OutboundReport: notjunk:1;M01:P0:Ex46rRac674=;2hSBFqOu7uCxZRs4L+VsW9MwicJ OEDuUQ/mqe6WCAvFOLWqzXg9kEBKNrZENNMUTUNFMYjcfKIYBR3zQGh99lLn3H1bTYlKEkfCE 8grOUsJy26BwyTida96a1CSf7bKE9MILSzW9Dy7rfsfJFsVpRHfPhPR4btpWcRXKMlAEllyQQ tUJdZrnymqWBzL9YQWjMnyBuv3DqK+rGnoFiv66nJGsEDW8elbz1J9T9kxRSOIldJWjfOJ2Lt KMUJ73hu7KGUZ3iuVnHJfzlC7+GOChVwJ/lSmv9u8QdQQ3+DirxWITSQyTP0+HslAYHsDPbWq kLZL33r4/XvUHc7fribcJ1YaW9S6jhPUejJPA/y3s7zZLnnZlA+h9/ZgvWjAP+aicQ675anLR snzDSqbPWJt+Z08TWOPQIJLOIA5sfFdnz6pW8YBgcxHReuIkClqdK7wahgKL7yL/aQU/+EXTr GJxRs8mSwak99TEb2SskI9Voa2QL5qwt/4MXTQuxq/G47Vrjo5pteLku8sFPHfpRC0VxKR29B FBnL3nXGkiQd4hWAR5Di88MJ7y7kCowBNwibzh5pxo7GlGVAb2X/eyzb0Xwzxmd64l5FvKQ7u 4vWCFwv41mzVImTBm9vGrQ0QhpjrsROz/SxmycwwjCqCmcaQ5ttqq3MM4uS4h3psDUQTw80k0 zTbj7SU782wlFoHoQv/WgWDJLfYdeXk9t7UaZUKI11LWmn834nmgHqSHU/w9hZTJSXw9u1fNF jAi6ZEEIXI/ef+L0GsC6bpXukgWaZpNb5UFRcxdsfHSzmk9/4D18SgEWMJ5pg+XVYuFGr9q5 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:277007 Archived-At: Arsen Arsenovi=C4=87 writes: > Hi Michael, Hi Arsen, > So I did. With the diff below, I ran into an issue: the error emitted > in it is caught. Could you pls just print a backtrace when epa-fle-handler isn't found? Something like --8<---------------cut here---------------start------------->8--- (message "%s" (with-output-to-string (backtrace))) --8<---------------cut here---------------end--------------->8--- This would give us a backtrace to analyze. > I believe that the check utilized below is correct for the > check-and-error solution. > > diff --git a/lisp/auth-source-pass.el b/lisp/auth-source-pass.el > index 0f51755a250..4da15a65259 100644 > --- a/lisp/auth-source-pass.el > +++ b/lisp/auth-source-pass.el > @@ -195,10 +195,13 @@ auth-source-pass--get-attr > (defun auth-source-pass--read-entry (entry) > "Return a string with the file content of ENTRY." > (with-temp-buffer > - (insert-file-contents (expand-file-name > - (format "%s.gpg" entry) > - auth-source-pass-filename)) > - (buffer-substring-no-properties (point-min) (point-max)))) > + (let ((fname (format "%s.gpg" entry))) > + (if (not (find-file-name-handler fname 'insert-file-contents)) > + (error "auth-source-pass requires a handler for .gpg files")) > + (insert-file-contents (expand-file-name > + fname > + auth-source-pass-filename)) > + (buffer-substring-no-properties (point-min) (point-max))))) > > (defun auth-source-pass-parse-entry (entry) > "Return an alist of the data associated with ENTRY. Nope. find-file-name-handler shows the next file name handler to be applied. It could be epa-file-handler, but if it is removed from file-name-handler-alist, another file name handler could be returned, like tramp-file-name-handler. So if you want to use find-file-name-handler, you must check something like --8<---------------cut here---------------start------------->8--- (eq (find-file-name-handler fname 'insert-file-contents) 'epa-file-handler) --8<---------------cut here---------------end--------------->8--- > Arsen Arsenovi=C4=87 Best regards, Michael.