From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#24759: 25.1.50; electric-quote-mode Date: Sat, 22 Oct 2016 12:10:33 +0300 Message-ID: <83funorbp2.fsf@gnu.org> References: <83wph1qxrw.fsf@gnu.org> <74d0a4a5-014e-b365-9d89-ad03a7fc6430@cs.ucla.edu> <83shrori8z.fsf@gnu.org> <83k2d0rfk8.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1477127608 24037 195.159.176.226 (22 Oct 2016 09:13:28 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 22 Oct 2016 09:13:28 +0000 (UTC) Cc: eggert@cs.ucla.edu, 24759@debbugs.gnu.org To: Dani Moncayo Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Oct 22 11:13:24 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 1bxsMW-0003k3-BV for geb-bug-gnu-emacs@m.gmane.org; Sat, 22 Oct 2016 11:13:08 +0200 Original-Received: from localhost ([::1]:36097 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bxsMY-0005cE-MP for geb-bug-gnu-emacs@m.gmane.org; Sat, 22 Oct 2016 05:13:10 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:59112) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bxsKX-0004Ja-Fc for bug-gnu-emacs@gnu.org; Sat, 22 Oct 2016 05:11:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bxsKU-0005m7-AE for bug-gnu-emacs@gnu.org; Sat, 22 Oct 2016 05:11:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:58684) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1bxsKU-0005m1-75 for bug-gnu-emacs@gnu.org; Sat, 22 Oct 2016 05:11:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1bxsKT-0002pz-LO for bug-gnu-emacs@gnu.org; Sat, 22 Oct 2016 05:11:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 22 Oct 2016 09:11:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 24759 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 24759-submit@debbugs.gnu.org id=B24759.147712745110872 (code B ref 24759); Sat, 22 Oct 2016 09:11:01 +0000 Original-Received: (at 24759) by debbugs.gnu.org; 22 Oct 2016 09:10:51 +0000 Original-Received: from localhost ([127.0.0.1]:45850 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bxsKJ-0002pI-Ej for submit@debbugs.gnu.org; Sat, 22 Oct 2016 05:10:51 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:39835) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bxsKH-0002oq-Di for 24759@debbugs.gnu.org; Sat, 22 Oct 2016 05:10:49 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bxsK9-0005d4-2x for 24759@debbugs.gnu.org; Sat, 22 Oct 2016 05:10:44 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:47666) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bxsK8-0005cO-Ob; Sat, 22 Oct 2016 05:10:40 -0400 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:4844 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1bxsK7-0006Os-O4; Sat, 22 Oct 2016 05:10:40 -0400 In-reply-to: (message from Dani Moncayo on Sat, 22 Oct 2016 10:16:35 +0200) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] 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:124814 Archived-At: > From: Dani Moncayo > Date: Sat, 22 Oct 2016 10:16:35 +0200 > Cc: Paul Eggert , 24759@debbugs.gnu.org > > > And if electric-quote-mode wants to be more user-friendly, it could > > ask, upon the first insertion of any electric quote character into a > > buffer, whether the user would like to her buffer-file-coding-system > > switched to UTF-8. > > I'd like such a feature, but I'd rather make it general (not specific > to electric-quote-mode). That is, whenever a buffer gets a character > (whether typed, yanked, electrically inserted, ...) which is not > representable in the current buffer-file-coding-system, Emacs could > offer the user to switch the coding system to UTF-8 (or another one > which can represent all the characters currently present in the > buffer), like happens when the buffer is about to be saved to a file. IMO, this would be too annoying and detrimental to performance in many cases. I think you underestimate how much 'insert' is used in Emacs, without the user knowing anything about that. In most such cases, the buffer into which the character is entered will never be saved to any file. My proposal was specifically for the case where keyboard input caused these characters be inserted after conversion by electric-quote-mode, which hopefully restricts the applicable use cases to those where the user is typing at the keyboard.