From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.devel Subject: Re: Disambiguate modeline character for UTF-8? Date: Tue, 25 Aug 2020 21:59:00 +0300 Organization: LINKOV.NET Message-ID: <87k0xmtv3r.fsf@mail.linkov.net> References: <83wo1p73d2.fsf@gnu.org> <87tuwst23n.fsf@mail.linkov.net> <83o8mz6fh0.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="26361"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) Cc: ulm@gentoo.org, monnier@iro.umontreal.ca, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Aug 25 21:11:28 2020 Return-path: Envelope-to: ged-emacs-devel@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 1kAeLv-0006mH-04 for ged-emacs-devel@m.gmane-mx.org; Tue, 25 Aug 2020 21:11:27 +0200 Original-Received: from localhost ([::1]:36498 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kAeLu-0006i0-1V for ged-emacs-devel@m.gmane-mx.org; Tue, 25 Aug 2020 15:11:26 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:35924) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kAeKT-0005LP-3D for emacs-devel@gnu.org; Tue, 25 Aug 2020 15:09:57 -0400 Original-Received: from relay6-d.mail.gandi.net ([217.70.183.198]:36083) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kAeKQ-0004DX-DH; Tue, 25 Aug 2020 15:09:56 -0400 X-Originating-IP: 91.129.102.47 Original-Received: from mail.gandi.net (m91-129-102-47.cust.tele2.ee [91.129.102.47]) (Authenticated sender: juri@linkov.net) by relay6-d.mail.gandi.net (Postfix) with ESMTPSA id B626FC000B; Tue, 25 Aug 2020 19:09:45 +0000 (UTC) In-Reply-To: <83o8mz6fh0.fsf@gnu.org> (Eli Zaretskii's message of "Mon, 24 Aug 2020 21:55:39 +0300") Received-SPF: pass client-ip=217.70.183.198; envelope-from=juri@linkov.net; helo=relay6-d.mail.gandi.net X-detected-operating-system: by eggs.gnu.org: First seen = 2020/08/25 15:09:47 X-ACL-Warn: Detected OS = Linux 3.11 and newer X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:254223 Archived-At: >> but since I can't memorize these cryptic characters, I customized >> the mode-line to display coding names in full, except a few characters >> that I can remember: "U" for UTF-8, and "-" for ASCII: > > So on a TTY, you can have "UTF-8UTF-8UTF-8", if all the 3 encodings > are UTF-8? Or do you only handle buffer-file-coding-system and ignore > the other 2 encodings? Currently the other 2 encodings are ignored on a TTY, but since often all 3 encodings are the same, then maybe it would be enough to display the full name for buffer-file-coding-system, and mnemonics for the other 2 encodings. >> A long coding string in the mode-line also serves as a warning that >> a non-standard coding is used in the buffer. > > It's okay to customize the mode line to your personal needs, but are > you really proposing this for a general-purpose feature in Emacs? > Because then we'd need to start by deciding what is "non-standard" in > this context. For example, assuming the "standard" encoding is the > one determined by the locale, then if one lives in a non-UTF-8 locale, > they will always see "non-standard" strings in each and every .el file > they ever edit, which doesn't sound like a good idea to me. A list of "standard" codings could be customizable, so every user could add more codings to it after learning their mnemonic characters.