From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Colin Baxter Newsgroups: gmane.emacs.help Subject: Re: mode-line icon for encrypted file Date: Mon, 06 May 2024 20:20:04 +0100 Message-ID: <87pltyiw7v.fsf@yandex.com> References: <875xvv6sim.fsf@yandex.com> <86ikzvi04h.fsf@gnu.org> <871q6i7ioy.fsf@yandex.com> <86zft6gkna.fsf@gnu.org> <87seyy5aea.fsf@yandex.com> <86msp6gfwe.fsf@gnu.org> <87o79l6h1e.fsf@yandex.com> <871q6fi3kd.fsf@web.de> <87wmo7hvd3.fsf@yandex.com> Reply-To: m43cap@yandex.com Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="27527"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (gnu/linux) Cc: Stefan Monnier To: Stefan Monnier via Users list for the GNU Emacs text editor Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Mon May 06 21:21:36 2024 Return-path: Envelope-to: geh-help-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 1s43u4-0006wb-EA for geh-help-gnu-emacs@m.gmane-mx.org; Mon, 06 May 2024 21:21:36 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s43t7-0002W4-GB; Mon, 06 May 2024 15:20:40 -0400 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 1s43t0-0002Tc-KP for help-gnu-emacs@gnu.org; Mon, 06 May 2024 15:20:31 -0400 Original-Received: from forward500a.mail.yandex.net ([2a02:6b8:c0e:500:1:45:d181:d500]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1s43si-0005aK-PN for help-gnu-emacs@gnu.org; Mon, 06 May 2024 15:20:28 -0400 Original-Received: from mail-nwsmtp-smtp-production-main-84.vla.yp-c.yandex.net (mail-nwsmtp-smtp-production-main-84.vla.yp-c.yandex.net [IPv6:2a02:6b8:c0d:409f:0:640:f1f0:0]) by forward500a.mail.yandex.net (Yandex) with ESMTPS id 115F060DCC; Mon, 6 May 2024 22:20:07 +0300 (MSK) Original-Received: by mail-nwsmtp-smtp-production-main-84.vla.yp-c.yandex.net (smtp/Yandex) with ESMTPSA id 4Kd4R37OlOs0-kdJH7PAQ; Mon, 06 May 2024 22:20:06 +0300 X-Yandex-Fwd: 1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.com; s=mail; t=1715023206; bh=s34KLsjOsz8ocDKQlnq0UqZOmN1e+H+UPSIQsPjmVf0=; h=Message-ID:References:Date:Reply-To:Cc:In-Reply-To:Subject:To: From; b=C0w/67FO50F3059bdTRFOsU7ekr9TK3focIe9SQHlLX94efPPhBViiJOOFZoNlM68 CbwFTaAlFsrZ1DoQrlw3jn+BOkNj899xrKprFbL6AqKM6CdIIuPuM4xyraJs/Kmth5 qRxYlDTaZI5peJvpoeALSpzoC0XrIBp2OnvJ3mrI= Authentication-Results: mail-nwsmtp-smtp-production-main-84.vla.yp-c.yandex.net; dkim=pass header.i=@yandex.com In-Reply-To: (Stefan Monnier via Users list for the's message of "Mon, 06 May 2024 11:24:07 -0400") X-Face: BHjiJOg/Qmj'BQgsAKL@])L)e62P)C"Y=6T Face: iVBORw0KGgoAAAANSUhEUgAAAEkAAAATAgMAAAChCMjeAAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAACVBMVEX/zAABCWP///8I RHjYAAAAAWJLR0QCZgt8ZAAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB+UFEAk5BvqS634A AAAbSURBVBjTY2BgCA1hYA0FAxDDgQEERsXoIAYA2F9Eb3cpB+AAAAAldEVYdGRhdGU6Y3JlYXRl ADIwMjEtMDUtMTZUMTA6NTY6MTcrMDE6MDCh/kkpAAAAJXRFWHRkYXRlOm1vZGlmeQAyMDIxLTA1 LTE2VDA5OjU3OjA2KzAxOjAwTyZ6HwAAAABJRU5ErkJggg== Received-SPF: pass client-ip=2a02:6b8:c0e:500:1:45:d181:d500; envelope-from=m43cap@yandex.com; helo=forward500a.mail.yandex.net X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, SPF_PASS=-0.001, T_SPF_HELO_TEMPERROR=0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.help:146597 Archived-At: >>>>> Stefan Monnier via Users list for the GNU Emacs text editor writes: >> >> I have discovered I can't access that advantage of the >> icon. If I >> launch emacs with -Q then putting the point over >> the icon and >> clicking does indeed display the password en >> clair. However this >> is not the case when I use my >> ~/.emacs. Then I get the error: >> [...] > AFAIU this should >> have been fixed by Stefan on master. > Michael. Yes, I can >> confirm that it is indeed fixed. > Hmm... funny: I didn't think your situation would be fixed by my > patch: I just found some loose ends while looking at the code to > try and understand what was going on. > In retrospect, I guess the problem was that the code used > `local-map` rather than `keymap` so its binding ended up with a > lower priority than the binding to `button-push`. > In any case, I'm glad it's fixed. Thank you for working on this. There's a nice hack that Michael Albinus set me, originally to hide the icon, which, with v. slight modification can be used in a terminal: --8<---------------cut here---------------start------------->8--- (unless (display-graphic-p) (with-eval-after-load 'auth-source (setcar (cdr (iconp 'read-passwd--show-password-icon)) '((text "O"))) ;;; 'O' shows password (setcar (cdr (iconp 'read-passwd--hide-password-icon)) '((text "X"))))) ;;; 'X' hides password --8<---------------cut here---------------end--------------->8--- This will be useful for me because I more often than not use emacs -nw. Thanks again. Colin.