From debbugs-submit-bounces@debbugs.gnu.org Fri Oct 21 15:38:56 2016 Received: (at submit) by debbugs.gnu.org; 21 Oct 2016 19:38:56 +0000 Received: from localhost ([127.0.0.1]:45629 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bxfea-0004Cd-Fo for submit@debbugs.gnu.org; Fri, 21 Oct 2016 15:38:56 -0400 Received: from eggs.gnu.org ([208.118.235.92]:34838) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bxfeY-0004CQ-SS for submit@debbugs.gnu.org; Fri, 21 Oct 2016 15:38:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bxfeS-00069f-LC for submit@debbugs.gnu.org; Fri, 21 Oct 2016 15:38:49 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM, T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:58961) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1bxfeS-00069b-IE for submit@debbugs.gnu.org; Fri, 21 Oct 2016 15:38:48 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54028) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bxfeR-0003eC-CS for bug-gnu-emacs@gnu.org; Fri, 21 Oct 2016 15:38:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bxfeQ-00068r-ET for bug-gnu-emacs@gnu.org; Fri, 21 Oct 2016 15:38:47 -0400 Received: from mail-wm0-x236.google.com ([2a00:1450:400c:c09::236]:33756) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1bxfeQ-00068c-7R for bug-gnu-emacs@gnu.org; Fri, 21 Oct 2016 15:38:46 -0400 Received: by mail-wm0-x236.google.com with SMTP id c78so1235919wme.0 for ; Fri, 21 Oct 2016 12:38:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to; bh=JXBFPS83XowWLbNID3hDr4EAbRx6FVtX42vv6ykoDRc=; b=UDvxjFbW+6x9a77g3MrJVooZIhZrVuJl6ZVwKhEsHtXWQQwBfmRxD/BFdQipQc+mBn 1Gfups/Vr0dgZzw7CsL9RX+QnbnZeYouqJNkvmFRHrV/L4FDiTLPc1jcGOdTm+BX6BRK MvEH/0IJznSaeUyoLXJGBhYRn5N7iHeEVWOX3flTfT7nlK5qwuD711dkmE44sb3z8KgO PylPEX9jwRNiJIbIo0mRCtmgRcDX5vF3iuhCcEJb+u6TnzPbnRth8+N2J8Qr4Of9VVrP 2GJZawLZy+635lMQi4wuu0KjXCO54+MY+yRKUZQpCWFbFZHN6PeTWB2/l6VehZonfBoj iC+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=JXBFPS83XowWLbNID3hDr4EAbRx6FVtX42vv6ykoDRc=; b=fB+MwwDlVhBge6FRcRALAvKQnFWsh4NTu3doLHYon+cPcMJmmCRTJ2f6ZZ8qeAQvhU IG9LNKxHn6U8bb2+9NBK2cGOqLRy8wMkUdcMatqR7V39a+7R87HNtwAhLEMms2mLMEY3 ij1iuLk7rREJ5nFbkLAJwR5QLeAYPNvC4dj8r//GQyo/k9/l7R1v+txQAiJK/PKGDFbr Dy+57HZ+kzz/IRTO9wu9JRmgncOLxgyC7nDr+Fx9KBaAALbhTuUba6vwRWoxsR6m2VZv 7f4OsAjhmQo3vZeva2/p2KefUpvLur3fS8xEtoi6X+5e5fry/Mj1/AZV77oodKXkKfoY StMg== X-Gm-Message-State: AA6/9RmOy8NZnZ9JPS7vQqSYr+s+DKfqEwtmc/ILIWKD8pxcbTwRqXCNIAbeZj+WxwOeD+n0XCiCtcIT4oVvEg== X-Received: by 10.28.227.4 with SMTP id a4mr11471603wmh.84.1477078724522; Fri, 21 Oct 2016 12:38:44 -0700 (PDT) MIME-Version: 1.0 Received: by 10.28.95.133 with HTTP; Fri, 21 Oct 2016 12:38:43 -0700 (PDT) From: Dani Moncayo Date: Fri, 21 Oct 2016 21:38:43 +0200 Message-ID: Subject: 25.1.50; electric-quote-mode To: bug-gnu-emacs Content-Type: text/plain; charset=UTF-8 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.0 (----) Hello, I may be missing something, but electric-quote-mode does not seem to work here. >From `emacs -Q', if I create a new text-mode buffer C-x b foo M-x text-mode then I enable electric quoting in that buffer M-x electric-quote-local-mode and then I type [``foo''] or [`foo'], no quote conversion takes place. Am I missing something? TIA In GNU Emacs 25.1.50.1 (i686-pc-mingw32) of 2016-10-19 built on LEG570 Repository revision: 8988327d548db7b69f30ea15496ccb0726fa4502 Windowing system distributor 'Microsoft Corp.', version 10.0.14393 Configured using: 'configure --host=i686-pc-mingw32' Configured features: XPM JPEG TIFF GIF PNG RSVG SOUND NOTIFY ACL GNUTLS LIBXML2 ZLIB TOOLKIT_SCROLL_BARS Important settings: value of $LANG: ENU locale-coding-system: cp1252 Major mode: Text Minor modes in effect: tooltip-mode: t global-eldoc-mode: t electric-quote-mode: t electric-indent-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t Load-path shadows: None found. Features: (shadow sort mail-extr emacsbug message dired format-spec rfc822 mml mml-sec password-cache epg epg-config gnus-util mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils misearch multi-isearch cl-extra help-fns help-mode easymenu cl-loaddefs pcase cl-lib time-date mule-util tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel dos-w32 ls-lisp disp-table w32-win w32-vars term/common-win tool-bar dnd fontset image regexp-opt fringe tabulated-list newcomment elisp-mode lisp-mode prog-mode register page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese charscript case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer cl-preloaded nadvice loaddefs button faces cus-face macroexp files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote w32notify w32 multi-tty make-network-process emacs) Memory information: ((conses 8 91051 7113) (symbols 32 19702 0) (miscs 32 185 237) (strings 16 15931 4229) (string-bytes 1 430123) (vectors 8 12502) (vector-slots 4 438930 5422) (floats 8 165 224) (intervals 28 384 92) (buffers 516 21)) -- Dani Moncayo From debbugs-submit-bounces@debbugs.gnu.org Fri Oct 21 15:59:20 2016 Received: (at 24759) by debbugs.gnu.org; 21 Oct 2016 19:59:20 +0000 Received: from localhost ([127.0.0.1]:45662 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bxfyK-0004iy-FH for submit@debbugs.gnu.org; Fri, 21 Oct 2016 15:59:20 -0400 Received: from eggs.gnu.org ([208.118.235.92]:41205) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bxfyJ-0004im-Me for 24759@debbugs.gnu.org; Fri, 21 Oct 2016 15:59:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bxfyB-0006DM-EW for 24759@debbugs.gnu.org; Fri, 21 Oct 2016 15:59:14 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.3 required=5.0 tests=BAYES_20,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:55582) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bxfyB-0006Ci-B0; Fri, 21 Oct 2016 15:59:11 -0400 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:4252 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1bxfy7-0003Jp-MN; Fri, 21 Oct 2016 15:59:08 -0400 Date: Fri, 21 Oct 2016 22:58:59 +0300 Message-Id: <83wph1qxrw.fsf@gnu.org> From: Eli Zaretskii To: Dani Moncayo , Paul Eggert In-reply-to: (message from Dani Moncayo on Fri, 21 Oct 2016 21:38:43 +0200) Subject: Re: bug#24759: 25.1.50; electric-quote-mode References: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.3 (-----) X-Debbugs-Envelope-To: 24759 Cc: 24759@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.3 (-----) > From: Dani Moncayo > Date: Fri, 21 Oct 2016 21:38:43 +0200 > > I may be missing something, but electric-quote-mode does not seem to > work here. > > >From `emacs -Q', if I create a new text-mode buffer > > C-x b foo > M-x text-mode > > then I enable electric quoting in that buffer > > M-x electric-quote-local-mode > > and then I type [``foo''] or [`foo'], no quote conversion takes place. I guess your buffer-file-coding-system is neither 'undecided' nor anything that can encode the curved quotes. Try C-x RET f utf-8 RET and then type the above again. Paul, I think this condition: (defun electric--insertable-p (string) (or (not buffer-file-coding-system) (eq (coding-system-base buffer-file-coding-system) 'undecided) (not (unencodable-char-position nil nil buffer-file-coding-system nil string)))) should also accept a coding-system that is the default-value of buffer-file-coding-system, because that's how buffers are created. When the file is saved, Emacs will ask for a proper encoding, which is not a catastrophe. From debbugs-submit-bounces@debbugs.gnu.org Fri Oct 21 16:26:21 2016 Received: (at 24759) by debbugs.gnu.org; 21 Oct 2016 20:26:21 +0000 Received: from localhost ([127.0.0.1]:45697 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bxgOT-0005RL-Dk for submit@debbugs.gnu.org; Fri, 21 Oct 2016 16:26:21 -0400 Received: from mail-wm0-f45.google.com ([74.125.82.45]:35291) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bxgOR-0005Qz-MH for 24759@debbugs.gnu.org; Fri, 21 Oct 2016 16:26:19 -0400 Received: by mail-wm0-f45.google.com with SMTP id c78so4948306wme.0 for <24759@debbugs.gnu.org>; Fri, 21 Oct 2016 13:26:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=mCV03FyFqwojtIh3jjyA5HB9IvJZouuwnSjNwkmWyqg=; b=XsqfQ7pqJULMzRhltcCt6i/MuGDmCQz6G67toA+bzIU8oFrLlJgOf1tuSSIYLOrK39 Eq5OUeEtHPfgzVHcQu+pcEUk1NHIZ/4EQU29C8RaBEJeeS7kheECsd2FqSzY3RmEmPVF 7oWLV9Zn06u3GEQVpOqSIFyI9A7GK3a5xffXf32XyjvbZsUlUlZlooFTr45McaMo9wV0 fqJtNZQ2l/8T4J/it8GRZB/VpPRCXqSveF78LWKPBl5NpaL9dkf+zTVDn/2Gwwsm04Qy q2LoeANvE1KyD1MgndKcmceL827ZoghiOykD60djvDHv5ugo/r/TwivcWXaegFzVW0wQ DR2Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=mCV03FyFqwojtIh3jjyA5HB9IvJZouuwnSjNwkmWyqg=; b=JBY2sxlB7TSLmi8PaHGXoNOs9t2z5PiC/B1VfEgWvM6h530EbTtPM52C8pfveROcMF zz0vv3eLswz7twbeBrEd5ctDCm4UPtU4N+yOXL7ob5qH7k+5GjsNlqltPrjvu+GpPS6R h3+XSaK6ndB3XsJn1vforAZDdjP6V68i87eMkP94HenRyy4LMNiK0tGB+qxWw+LSpU8g z5smLDCTzdsKHQyuaZVn4G9fJP6VjUJQdPboCt5cLF5POGEvmvXzsnPcKWfZg5EfnD4n /Ci6WQJoalK+8BuBGRgq7g8zTQPl7nSQrRnOlCpLQT0E790KKz5hldm1dYRldtSUy4mn lVIw== X-Gm-Message-State: ABUngvcJDqo6Tmye1rrs4XtSnGp2UnDkDET7pXycZgvCERwQhFoDC6+6TyNwJ31qMaisOxPSfiS92jfydRpsGg== X-Received: by 10.194.235.103 with SMTP id ul7mr2321339wjc.201.1477081574094; Fri, 21 Oct 2016 13:26:14 -0700 (PDT) MIME-Version: 1.0 Received: by 10.28.95.133 with HTTP; Fri, 21 Oct 2016 13:26:13 -0700 (PDT) In-Reply-To: <83wph1qxrw.fsf@gnu.org> References: <83wph1qxrw.fsf@gnu.org> From: Dani Moncayo Date: Fri, 21 Oct 2016 22:26:13 +0200 Message-ID: Subject: Re: bug#24759: 25.1.50; electric-quote-mode To: Eli Zaretskii Content-Type: text/plain; charset=UTF-8 X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 24759 Cc: Paul Eggert , 24759@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) > I guess your buffer-file-coding-system is neither 'undecided' nor > anything that can encode the curved quotes. Try > > C-x RET f utf-8 RET > > and then type the above again. Your guess is right. After doing the above, the electric quote conversion works. > Paul, I think this condition: > > (defun electric--insertable-p (string) > (or (not buffer-file-coding-system) > (eq (coding-system-base buffer-file-coding-system) 'undecided) > (not (unencodable-char-position nil nil buffer-file-coding-system > nil string)))) > > should also accept a coding-system that is the default-value of > buffer-file-coding-system, because that's how buffers are created. > When the file is saved, Emacs will ask for a proper encoding, which is > not a catastrophe. I have no opinion on that but I think that, if this minor mode isn't going to work with every possible buffer-file-coding-system, that limitation should be explained somehow in the *Help* text of the minor mode, to avoid confusing some users. Thanks. -- Dani Moncayo From debbugs-submit-bounces@debbugs.gnu.org Fri Oct 21 17:01:35 2016 Received: (at 24759) by debbugs.gnu.org; 21 Oct 2016 21:01:35 +0000 Received: from localhost ([127.0.0.1]:45711 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bxgwZ-0006Ho-Jr for submit@debbugs.gnu.org; Fri, 21 Oct 2016 17:01:35 -0400 Received: from zimbra.cs.ucla.edu ([131.179.128.68]:40592) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bxgwX-0006HZ-48 for 24759@debbugs.gnu.org; Fri, 21 Oct 2016 17:01:33 -0400 Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 39E51161318; Fri, 21 Oct 2016 14:01:27 -0700 (PDT) Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id 1KJwZZTqjOyb; Fri, 21 Oct 2016 14:01:26 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 81F5C16131E; Fri, 21 Oct 2016 14:01:26 -0700 (PDT) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id noJPXVWZRnzH; Fri, 21 Oct 2016 14:01:26 -0700 (PDT) Received: from Penguin.CS.UCLA.EDU (Penguin.CS.UCLA.EDU [131.179.64.200]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 671761612D4; Fri, 21 Oct 2016 14:01:26 -0700 (PDT) Subject: Re: bug#24759: 25.1.50; electric-quote-mode To: Dani Moncayo , Eli Zaretskii References: <83wph1qxrw.fsf@gnu.org> From: Paul Eggert Organization: UCLA Computer Science Department Message-ID: <7bd67872-a8ed-f52e-6c15-018c3afd78a1@cs.ucla.edu> Date: Fri, 21 Oct 2016 14:01:26 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/mixed; boundary="------------FB95D8602C206E5FE1E5F12C" X-Spam-Score: -0.3 (/) X-Debbugs-Envelope-To: 24759 Cc: 24759@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.3 (/) This is a multi-part message in MIME format. --------------FB95D8602C206E5FE1E5F12C Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit On 10/21/2016 01:26 PM, Dani Moncayo wrote: > hat > limitation should be explained somehow in the*Help* text of the minor > mode, Sure, that's easy enough. I installed the attached into emacs-25. --------------FB95D8602C206E5FE1E5F12C Content-Type: application/x-patch; name="0001-lisp-electric.el-electric-quote-mode-Improve-doc-Bug.patch" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename*0="0001-lisp-electric.el-electric-quote-mode-Improve-doc-Bug.pa"; filename*1="tch" RnJvbSA5YWMxNzA3NWYwODUzMjVmNGRhNDkwYjYwNTU1NTkwODlhNDc3ZGYyIE1vbiBTZXAg MTcgMDA6MDA6MDAgMjAwMQpGcm9tOiBQYXVsIEVnZ2VydCA8ZWdnZXJ0QGNzLnVjbGEuZWR1 PgpEYXRlOiBGcmksIDIxIE9jdCAyMDE2IDE0OjAwOjA5IC0wNzAwClN1YmplY3Q6IFtQQVRD SF0gKiBsaXNwL2VsZWN0cmljLmVsIChlbGVjdHJpYy1xdW90ZS1tb2RlKTogSW1wcm92ZSBk b2MKIChCdWcjMjQ3NTkpLgoKLS0tCiBsaXNwL2VsZWN0cmljLmVsIHwgMyArKysKIDEgZmls ZSBjaGFuZ2VkLCAzIGluc2VydGlvbnMoKykKCmRpZmYgLS1naXQgYS9saXNwL2VsZWN0cmlj LmVsIGIvbGlzcC9lbGVjdHJpYy5lbAppbmRleCBlMjg5NjAxLi5iNjY5N2UwIDEwMDY0NAot LS0gYS9saXNwL2VsZWN0cmljLmVsCisrKyBiL2xpc3AvZWxlY3RyaWMuZWwKQEAgLTQ5Nyw2 ICs0OTcsOSBAQCBlbGVjdHJpYy1xdW90ZS1tb2RlCiBgZWxlY3RyaWMtcXVvdGUtY29tbWVu dCcsIGBlbGVjdHJpYy1xdW90ZS1zdHJpbmcnLCBhbmQKIGBlbGVjdHJpYy1xdW90ZS1wYXJh Z3JhcGgnLgogCitFbGVjdHJpYyBxdW90aW5nIGlzIHN1cHByZXNzZWQgaW4gYSBidWZmZXIg d2hvc2UgY29kaW5nIHN5c3RlbQorY2Fubm90IHJlcHJlc2VudCB0aGUgcmVwbGFjZW1lbnQg Y2hhcmFjdGVycy4KKwogVGhpcyBpcyBhIGdsb2JhbCBtaW5vciBtb2RlLiAgVG8gdG9nZ2xl IHRoZSBtb2RlIGluIGEgc2luZ2xlIGJ1ZmZlciwKIHVzZSBgZWxlY3RyaWMtcXVvdGUtbG9j YWwtbW9kZScuIgogICA6Z2xvYmFsIHQgOmdyb3VwICdlbGVjdHJpY2l0eQotLSAKMi43LjQK Cg== --------------FB95D8602C206E5FE1E5F12C-- From debbugs-submit-bounces@debbugs.gnu.org Fri Oct 21 17:05:05 2016 Received: (at 24759) by debbugs.gnu.org; 21 Oct 2016 21:05:05 +0000 Received: from localhost ([127.0.0.1]:45715 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bxgzx-0006Mn-3G for submit@debbugs.gnu.org; Fri, 21 Oct 2016 17:05:05 -0400 Received: from zimbra.cs.ucla.edu ([131.179.128.68]:41050) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bxgzv-0006MF-0e for 24759@debbugs.gnu.org; Fri, 21 Oct 2016 17:05:03 -0400 Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id A2B00161324; Fri, 21 Oct 2016 14:04:57 -0700 (PDT) Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id 6j-Cq5cBGmMN; Fri, 21 Oct 2016 14:04:56 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 950231612D4; Fri, 21 Oct 2016 14:04:56 -0700 (PDT) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id fpAhxP5BOxvH; Fri, 21 Oct 2016 14:04:56 -0700 (PDT) Received: from Penguin.CS.UCLA.EDU (Penguin.CS.UCLA.EDU [131.179.64.200]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 7C5C51612A6; Fri, 21 Oct 2016 14:04:56 -0700 (PDT) Subject: Re: bug#24759: 25.1.50; electric-quote-mode To: Eli Zaretskii , Dani Moncayo References: <83wph1qxrw.fsf@gnu.org> From: Paul Eggert Organization: UCLA Computer Science Department Message-ID: <74d0a4a5-014e-b365-9d89-ad03a7fc6430@cs.ucla.edu> Date: Fri, 21 Oct 2016 14:04:56 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: <83wph1qxrw.fsf@gnu.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -0.3 (/) X-Debbugs-Envelope-To: 24759 Cc: 24759@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.3 (/) On 10/21/2016 12:58 PM, Eli Zaretskii wrote: > I think this condition: > > (defun electric--insertable-p (string) > (or (not buffer-file-coding-system) > (eq (coding-system-base buffer-file-coding-system) 'undecided) > (not (unencodable-char-position nil nil buffer-file-coding-system > nil string)))) > > should also accept a coding-system that is the default-value of > buffer-file-coding-system, because that's how buffers are created. > When the file is saved, Emacs will ask for a proper encoding, which is > not a catastrophe. Wouldn't this lead to problems? If I use electric quoting in a unibyte French locale, where I the default is an ISO 8859 encoding and buffer-file-coding-system is something like iso-latin-1-unix, when I later save the file Emacs will say "Select coding system (default chinese-iso-8bit): ". This is hardly user-friendly, even if we improve Emacs to guess UTF-8, as there may be a long interval between typing ` and saving the buffer. From debbugs-submit-bounces@debbugs.gnu.org Sat Oct 22 02:49:18 2016 Received: (at 24759) by debbugs.gnu.org; 22 Oct 2016 06:49:18 +0000 Received: from localhost ([127.0.0.1]:45819 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bxq7K-0006PH-JL for submit@debbugs.gnu.org; Sat, 22 Oct 2016 02:49:18 -0400 Received: from eggs.gnu.org ([208.118.235.92]:45347) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bxq7I-0006P3-LE for 24759@debbugs.gnu.org; Sat, 22 Oct 2016 02:49:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bxq7A-0006PU-CG for 24759@debbugs.gnu.org; Sat, 22 Oct 2016 02:49:11 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.5 required=5.0 tests=BAYES_50,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:46377) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bxq7A-0006PB-A0; Sat, 22 Oct 2016 02:49:08 -0400 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:4669 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1bxq79-0000if-Kt; Sat, 22 Oct 2016 02:49:08 -0400 Date: Sat, 22 Oct 2016 09:49:00 +0300 Message-Id: <83shrori8z.fsf@gnu.org> From: Eli Zaretskii To: Paul Eggert In-reply-to: <74d0a4a5-014e-b365-9d89-ad03a7fc6430@cs.ucla.edu> (message from Paul Eggert on Fri, 21 Oct 2016 14:04:56 -0700) Subject: Re: bug#24759: 25.1.50; electric-quote-mode References: <83wph1qxrw.fsf@gnu.org> <74d0a4a5-014e-b365-9d89-ad03a7fc6430@cs.ucla.edu> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.3 (-----) X-Debbugs-Envelope-To: 24759 Cc: 24759@debbugs.gnu.org, dmoncayo@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.3 (-----) > Cc: 24759@debbugs.gnu.org > From: Paul Eggert > Date: Fri, 21 Oct 2016 14:04:56 -0700 > > On 10/21/2016 12:58 PM, Eli Zaretskii wrote: > > I think this condition: > > > > (defun electric--insertable-p (string) > > (or (not buffer-file-coding-system) > > (eq (coding-system-base buffer-file-coding-system) 'undecided) > > (not (unencodable-char-position nil nil buffer-file-coding-system > > nil string)))) > > > > should also accept a coding-system that is the default-value of > > buffer-file-coding-system, because that's how buffers are created. > > When the file is saved, Emacs will ask for a proper encoding, which is > > not a catastrophe. > > Wouldn't this lead to problems? If I use electric quoting in a unibyte > French locale, where I the default is an ISO 8859 encoding and > buffer-file-coding-system is something like iso-latin-1-unix, when I > later save the file Emacs will say "Select coding system (default > chinese-iso-8bit): ". This is hardly user-friendly, even if we improve > Emacs to guess UTF-8, as there may be a long interval between typing ` > and saving the buffer. This is standard Emacs behavior. Emacs never makes any tests of the current buffer-file-coding-system when you insert characters. You will see the same at save-buffer time if you insert the curved quotes with, e.g., "C-x 8 [", where we insert the character no matter what is the current buffer-file-coding-system. Users who use electric-quote-mode and don't have UTF-8 as their default encoding will get accustomed to this prompt soon enough. So I actually question the need for any test in electric--insertable-p. What bad things, besides the prompt at save-buffer time, will happen if we remove the test, and insert the characters unconditionally? From debbugs-submit-bounces@debbugs.gnu.org Sat Oct 22 03:47:22 2016 Received: (at 24759) by debbugs.gnu.org; 22 Oct 2016 07:47:22 +0000 Received: from localhost ([127.0.0.1]:45830 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bxr1W-0007jA-Ct for submit@debbugs.gnu.org; Sat, 22 Oct 2016 03:47:22 -0400 Received: from eggs.gnu.org ([208.118.235.92]:51439) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bxr1V-0007iz-BF for 24759@debbugs.gnu.org; Sat, 22 Oct 2016 03:47:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bxr1L-00044K-5m for 24759@debbugs.gnu.org; Sat, 22 Oct 2016 03:47:16 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.5 required=5.0 tests=BAYES_50,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:46752) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bxr1L-00044G-2l; Sat, 22 Oct 2016 03:47:11 -0400 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:4772 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1bxr1K-0005RX-Cv; Sat, 22 Oct 2016 03:47:10 -0400 Date: Sat, 22 Oct 2016 10:47:03 +0300 Message-Id: <83k2d0rfk8.fsf@gnu.org> From: Eli Zaretskii To: eggert@cs.ucla.edu In-reply-to: <83shrori8z.fsf@gnu.org> (message from Eli Zaretskii on Sat, 22 Oct 2016 09:49:00 +0300) Subject: Re: bug#24759: 25.1.50; electric-quote-mode References: <83wph1qxrw.fsf@gnu.org> <74d0a4a5-014e-b365-9d89-ad03a7fc6430@cs.ucla.edu> <83shrori8z.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.3 (-----) X-Debbugs-Envelope-To: 24759 Cc: 24759@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.3 (-----) > Date: Sat, 22 Oct 2016 09:49:00 +0300 > From: Eli Zaretskii > Cc: 24759@debbugs.gnu.org > > So I actually question the need for any test in electric--insertable-p. > What bad things, besides the prompt at save-buffer time, will happen > if we remove the test, and insert the characters unconditionally? 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. From debbugs-submit-bounces@debbugs.gnu.org Sat Oct 22 04:16:43 2016 Received: (at 24759) by debbugs.gnu.org; 22 Oct 2016 08:16:43 +0000 Received: from localhost ([127.0.0.1]:45834 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bxrTu-0008OE-SW for submit@debbugs.gnu.org; Sat, 22 Oct 2016 04:16:42 -0400 Received: from mail-wm0-f43.google.com ([74.125.82.43]:38807) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bxrTt-0008O0-FU for 24759@debbugs.gnu.org; Sat, 22 Oct 2016 04:16:41 -0400 Received: by mail-wm0-f43.google.com with SMTP id c78so24660024wme.1 for <24759@debbugs.gnu.org>; Sat, 22 Oct 2016 01:16:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=4ilLjCVJ66Rdndt4Lrinv2QBTeXbqGcYlBrVSGyfJ3o=; b=CndLo00OcFdgR179rMh1yyNvBAtnsSYAXX/eUET1I2CK30wM8lEMt/1882TfyMZlgp l5OTYxwHzU1ZjlgGudLT/Cp5pfOWxOQnn2eGxTwDisxsoVY4+Q5eg7Dx6J3jbnb2xXg7 abRT/i44b64n+yPmtA2YwntcVUWZvDJmdLmrh2iL+f1JW6XHLKWxOH8iodDuyR6wNTmJ wiXd2lZoW9lmnRBBch42Nk9DpI+nHV3BZorwzUwDiADiBzp6lWdRtCq9szAz7QI4s2PB YuexIppGXgGFFwe8thsvZcIf661lcglaoivg1vd2HBD6LAqbmfw5ncvVYzkFFfOnBfIs zUZQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=4ilLjCVJ66Rdndt4Lrinv2QBTeXbqGcYlBrVSGyfJ3o=; b=M7URFo4z13do0GnOXnIvLPmU9F0N+HACZzIuLFgik7i6aj5d/fGICffMiEsm12S+6S v6zmxQSsqLaxRHcf3HWVwxhwPBPRH0tdXosihY8EpLaeRIB2/ppRM2X4ovGdZuzxvIfq JUnE5UOKMdKrC0vHWWKjSrjV4BcYSIQzp9vOg0faBH/aQgsa1Wdw7XIKHGj91bqGPbG9 EU5bGsfPUVGgN0SeTyd7N2XNgs2bNFIuxDzjK86bFjC9CcKtmgJSNyNZDIhJCNmd4jo0 46lK8A4pdrsFEjcxPmkWS+tfLZKuc3+ChKN7qqklaUTCNXpHH0D3xOvaIo4T1ZCtMSiO Ij0w== X-Gm-Message-State: AA6/9Rn8Mm42sE0cGdNGb1uH8xaL4r+Hk42z2Du2M+xcHsMnmgF6n/azBW9Y0Mie1m5BngKh4R8AQUXLzyTtTA== X-Received: by 10.28.209.75 with SMTP id i72mr6128463wmg.56.1477124195598; Sat, 22 Oct 2016 01:16:35 -0700 (PDT) MIME-Version: 1.0 Received: by 10.28.95.133 with HTTP; Sat, 22 Oct 2016 01:16:35 -0700 (PDT) In-Reply-To: <83k2d0rfk8.fsf@gnu.org> References: <83wph1qxrw.fsf@gnu.org> <74d0a4a5-014e-b365-9d89-ad03a7fc6430@cs.ucla.edu> <83shrori8z.fsf@gnu.org> <83k2d0rfk8.fsf@gnu.org> From: Dani Moncayo Date: Sat, 22 Oct 2016 10:16:35 +0200 Message-ID: Subject: Re: bug#24759: 25.1.50; electric-quote-mode To: Eli Zaretskii Content-Type: text/plain; charset=UTF-8 X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 24759 Cc: Paul Eggert , 24759@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.5 (/) >> So I actually question the need for any test in electric--insertable-p. >> What bad things, besides the prompt at save-buffer time, will happen >> if we remove the test, and insert the characters unconditionally? > > 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. -- Dani Moncayo From debbugs-submit-bounces@debbugs.gnu.org Sat Oct 22 05:10:51 2016 Received: (at 24759) by debbugs.gnu.org; 22 Oct 2016 09:10:51 +0000 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 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 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 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.5 required=5.0 tests=BAYES_50,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 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 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 Date: Sat, 22 Oct 2016 12:10:33 +0300 Message-Id: <83funorbp2.fsf@gnu.org> From: Eli Zaretskii To: Dani Moncayo In-reply-to: (message from Dani Moncayo on Sat, 22 Oct 2016 10:16:35 +0200) Subject: Re: bug#24759: 25.1.50; electric-quote-mode References: <83wph1qxrw.fsf@gnu.org> <74d0a4a5-014e-b365-9d89-ad03a7fc6430@cs.ucla.edu> <83shrori8z.fsf@gnu.org> <83k2d0rfk8.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.3 (-----) X-Debbugs-Envelope-To: 24759 Cc: eggert@cs.ucla.edu, 24759@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.3 (-----) > 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. From debbugs-submit-bounces@debbugs.gnu.org Sat Oct 22 06:36:47 2016 Received: (at 24759) by debbugs.gnu.org; 22 Oct 2016 10:36:47 +0000 Received: from localhost ([127.0.0.1]:45871 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bxtfT-00074j-0w for submit@debbugs.gnu.org; Sat, 22 Oct 2016 06:36:47 -0400 Received: from mail-wm0-f48.google.com ([74.125.82.48]:36603) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bxtfQ-00074U-Vx for 24759@debbugs.gnu.org; Sat, 22 Oct 2016 06:36:45 -0400 Received: by mail-wm0-f48.google.com with SMTP id b80so25565323wme.1 for <24759@debbugs.gnu.org>; Sat, 22 Oct 2016 03:36:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=qkq1DDZDwu8W+V3X4q9+/bZPV9ZFZNVNXEoOOihem6g=; b=pl4oD266WJRdx72cv7OeUftS8xQUkKeE8nk6HztM2eupVUC1O4E+i5PSBfyxa1IXYS Lq6Y7YnLYmmtP0ItTNtNqxy9ddfFDpBJynUb7wg9UhYPBSrmzFMaXy5ac03coqwkKIyH ljskQs+h5g13ukMTEfOb9ZJOTajtHZS0hM7hGnWqBKRTLPpKYSag59kALQ+ozzDqwI8E b+0/zwykS137SCp8cgPHTXUSFzhrBZB82X9oMf5z4g7Dlgp372ItqQ98RkLU9YLapP6m cPV7A0v1CMZesPMFRY6E9gcOXPW7i39lP8dcd12SMctnemICxsYM7/Xea8wdB+MQhECa vNKQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=qkq1DDZDwu8W+V3X4q9+/bZPV9ZFZNVNXEoOOihem6g=; b=IVzF2qUxLHdHD+tXzfpl44ZsODqg1Z/Gk6tqBQcmV8SQ48lcuDm4t4OwwMWWQbBWG6 kFcZIWqzkatv1NwY7/ATZ2KEKKQwnWUDg90xtMOMH4N1sYd8b2KmUA7ZOwPVJEFe3JuO X16iaC0zlLixFp0wi80k6TcBO2n6u++IsWbOGdNnO86kZ65rErVKQACa/3eRV/zjezPo S3PgTvVWOQKAz0cpP4Ckk/e7Ik0v5tf3gqhWYxVRlVYLNNm4+AAy6OsT5K66r2ez18/j I0EuZtJizwY9q7zwsvut3lrYhBcIH7/8tHEry9sN/aRzQBnnDof79jLVSr3OS8HGvuIM fzTw== X-Gm-Message-State: AA6/9RkyHceU5UiipQkvjk6lNSmQbpohSnd6xvuFgTixwwQSsno7vCRTGrzRjQLAXlCLFIYnqKu9hmvNBwRopg== X-Received: by 10.28.152.78 with SMTP id a75mr13465159wme.56.1477132599211; Sat, 22 Oct 2016 03:36:39 -0700 (PDT) MIME-Version: 1.0 Received: by 10.28.95.133 with HTTP; Sat, 22 Oct 2016 03:36:38 -0700 (PDT) In-Reply-To: <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> <83funorbp2.fsf@gnu.org> From: Dani Moncayo Date: Sat, 22 Oct 2016 12:36:38 +0200 Message-ID: Subject: Re: bug#24759: 25.1.50; electric-quote-mode To: Eli Zaretskii Content-Type: text/plain; charset=UTF-8 X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 24759 Cc: Paul Eggert , 24759@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.5 (/) >> > 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. OK. In that case I withdraw my general approach. > Date: Sat, 22 Oct 2016 09:49:00 +0300 > From: Eli Zaretskii > Cc: 24759@debbugs.gnu.org > > So I actually question the need for any test in electric--insertable-p. > What bad things, besides the prompt at save-buffer time, will happen > if we remove the test, and insert the characters unconditionally? FWIW: I'd also prefer to remove that check from electric-quote-mode, so that the quote conversion would always happen (if the minor mode is enabled in the current buffer), regardless of buffer-file-coding-system. Thanks. -- Dani Moncayo From debbugs-submit-bounces@debbugs.gnu.org Sat Oct 22 14:48:07 2016 Received: (at 24759) by debbugs.gnu.org; 22 Oct 2016 18:48:07 +0000 Received: from localhost ([127.0.0.1]:46559 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1by1Kx-0005Bb-4C for submit@debbugs.gnu.org; Sat, 22 Oct 2016 14:48:07 -0400 Received: from zimbra.cs.ucla.edu ([131.179.128.68]:49368) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1by1Kv-0005B5-7X for 24759@debbugs.gnu.org; Sat, 22 Oct 2016 14:48:05 -0400 Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 1FE971612C0; Sat, 22 Oct 2016 11:47:59 -0700 (PDT) Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id wIGdAzjYxEGL; Sat, 22 Oct 2016 11:47:58 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 67DC6161373; Sat, 22 Oct 2016 11:47:58 -0700 (PDT) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id cy8eo9f5VrgO; Sat, 22 Oct 2016 11:47:58 -0700 (PDT) Received: from [192.168.1.9] (unknown [47.153.178.162]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 471E81612C0; Sat, 22 Oct 2016 11:47:58 -0700 (PDT) Subject: Re: bug#24759: 25.1.50; electric-quote-mode To: Eli Zaretskii References: <83wph1qxrw.fsf@gnu.org> <74d0a4a5-014e-b365-9d89-ad03a7fc6430@cs.ucla.edu> <83shrori8z.fsf@gnu.org> From: Paul Eggert Organization: UCLA Computer Science Department Message-ID: Date: Sat, 22 Oct 2016 11:47:58 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0 MIME-Version: 1.0 In-Reply-To: <83shrori8z.fsf@gnu.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.3 (/) X-Debbugs-Envelope-To: 24759 Cc: 24759@debbugs.gnu.org, dmoncayo@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.3 (/) Eli Zaretskii wrote: >> when I >> > later save the file Emacs will say "Select coding system (default >> > chinese-iso-8bit): ". This is hardly user-friendly, even if we impro= ve >> > Emacs to guess UTF-8, as there may be a long interval between typing= ` >> > and saving the buffer. > This is standard Emacs behavior. If it is, then the standard behavior is wrong. For starters, Emacs should= not=20 default to chinese-iso-8bit in a unibyte French-language environment mere= ly=20 because the buffer has a curved quote. That can't be what a typical Frenc= h user=20 wants. The problem can be reproduced without electric-quote mode, as follows: LC_ALL=3Dfr_FR.iso88591 emacs -Q newfile C-x 8 [ RET C-x C-s More generally, if I type any character that won't be saved, I should be=20 notified when I type it, not ages later when I save the buffer. This shou= ld be=20 done independently of whether electric-quote mode is in use. From debbugs-submit-bounces@debbugs.gnu.org Sat Oct 22 15:04:47 2016 Received: (at 24759) by debbugs.gnu.org; 22 Oct 2016 19:04:47 +0000 Received: from localhost ([127.0.0.1]:46582 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1by1b5-0005bU-18 for submit@debbugs.gnu.org; Sat, 22 Oct 2016 15:04:47 -0400 Received: from eggs.gnu.org ([208.118.235.92]:57813) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1by1b3-0005bI-Fl for 24759@debbugs.gnu.org; Sat, 22 Oct 2016 15:04:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1by1au-0007j1-VM for 24759@debbugs.gnu.org; Sat, 22 Oct 2016 15:04:40 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.5 required=5.0 tests=BAYES_50,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:52826) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1by1au-0007ix-Sv; Sat, 22 Oct 2016 15:04:36 -0400 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:2070 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1by1at-0006FZ-J0; Sat, 22 Oct 2016 15:04:36 -0400 Date: Sat, 22 Oct 2016 22:04:28 +0300 Message-Id: <83mvhwp5mr.fsf@gnu.org> From: Eli Zaretskii To: Paul Eggert In-reply-to: (message from Paul Eggert on Sat, 22 Oct 2016 11:47:58 -0700) Subject: Re: bug#24759: 25.1.50; electric-quote-mode References: <83wph1qxrw.fsf@gnu.org> <74d0a4a5-014e-b365-9d89-ad03a7fc6430@cs.ucla.edu> <83shrori8z.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.3 (-----) X-Debbugs-Envelope-To: 24759 Cc: 24759@debbugs.gnu.org, dmoncayo@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.3 (-----) > Cc: dmoncayo@gmail.com, 24759@debbugs.gnu.org > From: Paul Eggert > Date: Sat, 22 Oct 2016 11:47:58 -0700 > > Eli Zaretskii wrote: > >> when I > >> > later save the file Emacs will say "Select coding system (default > >> > chinese-iso-8bit): ". This is hardly user-friendly, even if we improve > >> > Emacs to guess UTF-8, as there may be a long interval between typing ` > >> > and saving the buffer. > > This is standard Emacs behavior. > > If it is, then the standard behavior is wrong. It was like that since Emacs 20.1. I don't see what changed now that it's suddenly a problem. I guess you are simply unused to see these prompts due to your locale, that's all. > For starters, Emacs should not default to chinese-iso-8bit in a > unibyte French-language environment merely because the buffer has a > curved quote. Emacs collects all the encodings that can handle all of the characters, then sorts them; chinese-iso-8bit is just the one that comes up first in the sorted order. If you are hinting that UTF-8 should come up first, we should just change the sorting order, that's all. > That can't be what a typical French user wants. We have no idea what the user might want. We can guess at best, and offer the list of the alternatives from which to choose. Which is what we do. > More generally, if I type any character that won't be saved, I should be > notified when I type it, not ages later when I save the buffer. I disagree. Most buffers will never be saved. And even if they will be, the user could delete the character by the time she saves it. I don't see how we can do better here than we already do, except by making the first alternative more suitable for today's world. From debbugs-submit-bounces@debbugs.gnu.org Sat Oct 22 15:20:36 2016 Received: (at 24759) by debbugs.gnu.org; 22 Oct 2016 19:20:36 +0000 Received: from localhost ([127.0.0.1]:46594 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1by1qN-0005yl-To for submit@debbugs.gnu.org; Sat, 22 Oct 2016 15:20:36 -0400 Received: from mail-out.m-online.net ([212.18.0.9]:35085) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1by1qM-0005yc-AL for 24759@debbugs.gnu.org; Sat, 22 Oct 2016 15:20:34 -0400 Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 3t1XSd1cThz3hjS1; Sat, 22 Oct 2016 21:20:32 +0200 (CEST) Received: from localhost (dynscan1.mnet-online.de [192.168.6.68]) by mail.m-online.net (Postfix) with ESMTP id 3t1XSc5wqFzvkJL; Sat, 22 Oct 2016 21:20:32 +0200 (CEST) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.68]) (amavisd-new, port 10024) with ESMTP id 1pbeCFdZWO_V; Sat, 22 Oct 2016 21:20:31 +0200 (CEST) X-Auth-Info: Ask9zyzsR1SWTHB2DxG3vueDklqV/8TMT9lVwy2Jhnvs7VURfT5zQ7YjEXUqXt9v Received: from igel.home (ppp-88-217-12-51.dynamic.mnet-online.de [88.217.12.51]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPSA; Sat, 22 Oct 2016 21:20:31 +0200 (CEST) Received: by igel.home (Postfix, from userid 1000) id 35CBE2C4AA3; Sat, 22 Oct 2016 21:20:31 +0200 (CEST) From: Andreas Schwab To: Paul Eggert Subject: Re: bug#24759: 25.1.50; electric-quote-mode References: <83wph1qxrw.fsf@gnu.org> <74d0a4a5-014e-b365-9d89-ad03a7fc6430@cs.ucla.edu> <83shrori8z.fsf@gnu.org> X-Yow: Edwin Meese made me wear CORDOVANS!! Date: Sat, 22 Oct 2016 21:20:31 +0200 In-Reply-To: (Paul Eggert's message of "Sat, 22 Oct 2016 11:47:58 -0700") Message-ID: <87r378b37k.fsf@linux-m68k.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 24759 Cc: Eli Zaretskii , 24759@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) On Okt 22 2016, Paul Eggert wrote: > If it is, then the standard behavior is wrong. For starters, Emacs should > not default to chinese-iso-8bit in a unibyte French-language environment > merely because the buffer has a curved quote. That can't be what a typical > French user wants. A typical French user will use a utf-8 locale. Andreas. -- Andreas Schwab, schwab@linux-m68k.org GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different." From debbugs-submit-bounces@debbugs.gnu.org Sat Oct 22 15:35:23 2016 Received: (at 24759) by debbugs.gnu.org; 22 Oct 2016 19:35:23 +0000 Received: from localhost ([127.0.0.1]:46606 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1by24h-0006M0-5k for submit@debbugs.gnu.org; Sat, 22 Oct 2016 15:35:23 -0400 Received: from eggs.gnu.org ([208.118.235.92]:34550) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1by24f-0006Lm-8D for 24759@debbugs.gnu.org; Sat, 22 Oct 2016 15:35:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1by24V-0008Rn-KI for 24759@debbugs.gnu.org; Sat, 22 Oct 2016 15:35:15 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.5 required=5.0 tests=BAYES_50,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:53082) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1by24V-0008Rj-Hf; Sat, 22 Oct 2016 15:35:11 -0400 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:2086 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1by24S-0007NM-Tj; Sat, 22 Oct 2016 15:35:11 -0400 Date: Sat, 22 Oct 2016 22:34:50 +0300 Message-Id: <83k2d0p485.fsf@gnu.org> From: Eli Zaretskii To: eggert@cs.ucla.edu In-reply-to: <83mvhwp5mr.fsf@gnu.org> (message from Eli Zaretskii on Sat, 22 Oct 2016 22:04:28 +0300) Subject: Re: bug#24759: 25.1.50; electric-quote-mode References: <83wph1qxrw.fsf@gnu.org> <74d0a4a5-014e-b365-9d89-ad03a7fc6430@cs.ucla.edu> <83shrori8z.fsf@gnu.org> <83mvhwp5mr.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.3 (-----) X-Debbugs-Envelope-To: 24759 Cc: 24759@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.3 (-----) > Date: Sat, 22 Oct 2016 22:04:28 +0300 > From: Eli Zaretskii > Cc: 24759@debbugs.gnu.org > > > For starters, Emacs should not default to chinese-iso-8bit in a > > unibyte French-language environment merely because the buffer has a > > curved quote. > > Emacs collects all the encodings that can handle all of the > characters, then sorts them; chinese-iso-8bit is just the one that > comes up first in the sorted order. If you are hinting that UTF-8 > should come up first, we should just change the sorting order, that's > all. > > > That can't be what a typical French user wants. > > We have no idea what the user might want. We can guess at best, and > offer the list of the alternatives from which to choose. Which is > what we do. Please also note that by the time this prompt is displayed, Emacs has already tried to see whether several default encodings corresponding to the user locale and preferences can encode the text, and the answer was NO (this information is included in the buffer popped up to the user). If one of the default encodings could encode the text, Emacs would have used it without asking any questions. Once we have tried all those defaults, and found they cannot do the job, we've exhausted our potential of guessing "what the user wants" reliably, so we must now ask the user to tell us that. From debbugs-submit-bounces@debbugs.gnu.org Sat Oct 22 23:55:35 2016 Received: (at 24759) by debbugs.gnu.org; 23 Oct 2016 03:55:35 +0000 Received: from localhost ([127.0.0.1]:46735 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1by9sl-0004zT-4X for submit@debbugs.gnu.org; Sat, 22 Oct 2016 23:55:35 -0400 Received: from zimbra.cs.ucla.edu ([131.179.128.68]:32802) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1by9sk-0004zF-0x for 24759@debbugs.gnu.org; Sat, 22 Oct 2016 23:55:34 -0400 Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 8D94D160017; Sat, 22 Oct 2016 20:55:26 -0700 (PDT) Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id 2JZOYi9wOLfI; Sat, 22 Oct 2016 20:55:25 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id CAF30160F90; Sat, 22 Oct 2016 20:55:25 -0700 (PDT) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id fZU--wTsZrZ1; Sat, 22 Oct 2016 20:55:25 -0700 (PDT) Received: from [192.168.1.9] (unknown [47.153.178.162]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id A9E0016026B; Sat, 22 Oct 2016 20:55:25 -0700 (PDT) Subject: Re: bug#24759: 25.1.50; electric-quote-mode To: Andreas Schwab References: <83wph1qxrw.fsf@gnu.org> <74d0a4a5-014e-b365-9d89-ad03a7fc6430@cs.ucla.edu> <83shrori8z.fsf@gnu.org> <87r378b37k.fsf@linux-m68k.org> From: Paul Eggert Organization: UCLA Computer Science Department Message-ID: <48240d67-ab6c-e7ec-9f77-bddbe1c07b83@cs.ucla.edu> Date: Sat, 22 Oct 2016 20:55:25 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0 MIME-Version: 1.0 In-Reply-To: <87r378b37k.fsf@linux-m68k.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.3 (/) X-Debbugs-Envelope-To: 24759 Cc: Eli Zaretskii , 24759@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.3 (/) Andreas Schwab wrote: > A typical French user will use a utf-8 locale. Yes, and to some extent this subthread is a tempest in a teapot, since ty= pical=20 French users now either use a UTF-8 locale, or perhaps the C locale, and = Emacs=20 works fine in both these cases. That is, when I run this: LC_ALL=3DC emacs -Q newfile C-x 8 [ RET C-x C-s on Fedora 24, Emacs saves the file using UTF-8 without prompting the user= for an=20 encoding - basically, it is bypassing the locale settings for this file, = which=20 is a reasonable thing to do. As I understand it, this subthread is about what Emacs should do in a uni= byte=20 locale that isn't the C locale. It's not clear to me why these locales (w= hich=20 are no longer that important) should be treated differently from a unibyt= e C=20 locale for this sort of situation. From debbugs-submit-bounces@debbugs.gnu.org Sun Oct 23 00:10:15 2016 Received: (at 24759) by debbugs.gnu.org; 23 Oct 2016 04:10:15 +0000 Received: from localhost ([127.0.0.1]:46763 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1byA6x-0005Mz-EB for submit@debbugs.gnu.org; Sun, 23 Oct 2016 00:10:15 -0400 Received: from zimbra.cs.ucla.edu ([131.179.128.68]:38486) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1byA6w-0005Mj-Lo for 24759@debbugs.gnu.org; Sun, 23 Oct 2016 00:10:14 -0400 Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 3EE5F160017; Sat, 22 Oct 2016 21:10:09 -0700 (PDT) Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id YrSbpriowenq; Sat, 22 Oct 2016 21:10:08 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 80DA8160F6E; Sat, 22 Oct 2016 21:10:08 -0700 (PDT) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id diztESn1tKak; Sat, 22 Oct 2016 21:10:08 -0700 (PDT) Received: from [192.168.1.9] (unknown [47.153.178.162]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 6548616026B; Sat, 22 Oct 2016 21:10:08 -0700 (PDT) Subject: Re: bug#24759: 25.1.50; electric-quote-mode To: Eli Zaretskii References: <83wph1qxrw.fsf@gnu.org> <74d0a4a5-014e-b365-9d89-ad03a7fc6430@cs.ucla.edu> <83shrori8z.fsf@gnu.org> <83mvhwp5mr.fsf@gnu.org> <83k2d0p485.fsf@gnu.org> From: Paul Eggert Organization: UCLA Computer Science Department Message-ID: Date: Sat, 22 Oct 2016 21:10:08 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0 MIME-Version: 1.0 In-Reply-To: <83k2d0p485.fsf@gnu.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.3 (/) X-Debbugs-Envelope-To: 24759 Cc: 24759@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.3 (/) Eli Zaretskii wrote: > Once we have tried all those defaults, and found they cannot do the > job, we've exhausted our potential of guessing "what the user wants" > reliably, so we must now ask the user to tell us that. It is odd that Emacs uses UTF-8 without questions in the C locale, but pr= ompts=20 and suggest a Chinese encoding in a unibyte French locale. > It was like that since Emacs 20.1. I don't see what changed now that > it's suddenly a problem. Emacs is now more likely to have non-unibyte text, partly due to its fanc= ier=20 quoting and partly because Unicode is more ubiquitous than it was in 1997= when=20 Emacs 20.1 was released. So the problem is more likely to occur now. > If you are hinting that UTF-8 should come up first UTF-8 should be the most-preferred multibyte encoding nowadays, unless th= ere is=20 a reasonable indication that the user prefers something else. In a unibyt= e=20 European locale, UTF-8 should be the first-listed multibyte encoding by d= efault. > Most buffers will never be saved. For buffers that don't correspond to files, we needn't bother with any of= this=20 checking. But for buffers that correspond to files with restrictive encod= ings,=20 it would be helpful to warn users earlier rather than later about this so= rt of=20 problem. It's a bit like spelling checking. Many users prefer checking spelling on= the=20 fly, rather than checking only when you save the file. From debbugs-submit-bounces@debbugs.gnu.org Sun Oct 23 03:00:44 2016 Received: (at 24759) by debbugs.gnu.org; 23 Oct 2016 07:00:44 +0000 Received: from localhost ([127.0.0.1]:47160 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1byClw-0001XU-AA for submit@debbugs.gnu.org; Sun, 23 Oct 2016 03:00:44 -0400 Received: from eggs.gnu.org ([208.118.235.92]:35331) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1byClu-0001XH-Pp for 24759@debbugs.gnu.org; Sun, 23 Oct 2016 03:00:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1byClm-0001i1-9D for 24759@debbugs.gnu.org; Sun, 23 Oct 2016 03:00:37 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.3 required=5.0 tests=BAYES_40,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:58210) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1byClm-0001hb-14; Sun, 23 Oct 2016 03:00:34 -0400 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:2445 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1byCll-0005rt-3D; Sun, 23 Oct 2016 03:00:33 -0400 Date: Sun, 23 Oct 2016 10:00:28 +0300 Message-Id: <8337jnpn1v.fsf@gnu.org> From: Eli Zaretskii To: Paul Eggert In-reply-to: <48240d67-ab6c-e7ec-9f77-bddbe1c07b83@cs.ucla.edu> (message from Paul Eggert on Sat, 22 Oct 2016 20:55:25 -0700) Subject: Re: bug#24759: 25.1.50; electric-quote-mode References: <83wph1qxrw.fsf@gnu.org> <74d0a4a5-014e-b365-9d89-ad03a7fc6430@cs.ucla.edu> <83shrori8z.fsf@gnu.org> <87r378b37k.fsf@linux-m68k.org> <48240d67-ab6c-e7ec-9f77-bddbe1c07b83@cs.ucla.edu> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.3 (-----) X-Debbugs-Envelope-To: 24759 Cc: 24759@debbugs.gnu.org, schwab@linux-m68k.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.3 (-----) > Cc: Eli Zaretskii , 24759@debbugs.gnu.org > From: Paul Eggert > Date: Sat, 22 Oct 2016 20:55:25 -0700 > > As I understand it, this subthread is about what Emacs should do in a unibyte > locale that isn't the C locale. It's not clear to me why these locales (which > are no longer that important) should be treated differently from a unibyte C > locale for this sort of situation. Because a C locale basically means you have no non-trivial default encoding. IOW, your default is 'undecided'. In such cases, we prefer UTF-8 automatically if it can do the job (and it usually can), since the user doesn't have any specific preferences. So I think we should indeed remove the electric--insertable-p test in electric-quote-mode, on the emacs-25 branch. A related change (which IMO should be done on master) is to make UTF-8 be the first encoding in the sorted list of encodings Emacs offers when the defaults cannot cope with some characters in a buffer about to be saved or sent to a subprocess. But this related change is not a prerequisite for removing the electric--insertable-p test, as it is a general improvement in the Emacs guesswork, not something specific to the issue at hand in this bug report. From debbugs-submit-bounces@debbugs.gnu.org Sun Oct 23 03:13:36 2016 Received: (at 24759) by debbugs.gnu.org; 23 Oct 2016 07:13:36 +0000 Received: from localhost ([127.0.0.1]:47185 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1byCyO-0001pv-GU for submit@debbugs.gnu.org; Sun, 23 Oct 2016 03:13:36 -0400 Received: from eggs.gnu.org ([208.118.235.92]:36432) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1byCyN-0001pg-Fs for 24759@debbugs.gnu.org; Sun, 23 Oct 2016 03:13:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1byCyD-0004QI-NX for 24759@debbugs.gnu.org; Sun, 23 Oct 2016 03:13:30 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.5 required=5.0 tests=BAYES_50,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:58307) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1byCyD-0004QE-Jo; Sun, 23 Oct 2016 03:13:25 -0400 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:2449 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1byCyC-0005OH-Vt; Sun, 23 Oct 2016 03:13:25 -0400 Date: Sun, 23 Oct 2016 10:13:20 +0300 Message-Id: <831sz7pmgf.fsf@gnu.org> From: Eli Zaretskii To: Paul Eggert In-reply-to: (message from Paul Eggert on Sat, 22 Oct 2016 21:10:08 -0700) Subject: Re: bug#24759: 25.1.50; electric-quote-mode References: <83wph1qxrw.fsf@gnu.org> <74d0a4a5-014e-b365-9d89-ad03a7fc6430@cs.ucla.edu> <83shrori8z.fsf@gnu.org> <83mvhwp5mr.fsf@gnu.org> <83k2d0p485.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.3 (-----) X-Debbugs-Envelope-To: 24759 Cc: 24759@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.3 (-----) > Cc: 24759@debbugs.gnu.org > From: Paul Eggert > Date: Sat, 22 Oct 2016 21:10:08 -0700 > > Eli Zaretskii wrote: > > Once we have tried all those defaults, and found they cannot do the > > job, we've exhausted our potential of guessing "what the user wants" > > reliably, so we must now ask the user to tell us that. > > It is odd that Emacs uses UTF-8 without questions in the C locale, but prompts > and suggest a Chinese encoding in a unibyte French locale. I tried to explain the logic behind this in another message. > > It was like that since Emacs 20.1. I don't see what changed now that > > it's suddenly a problem. > > Emacs is now more likely to have non-unibyte text, partly due to its fancier > quoting and partly because Unicode is more ubiquitous than it was in 1997 when > Emacs 20.1 was released. So the problem is more likely to occur now. I'm not sure you are right (the original Emacs 20.x m17n was heavily biased towards ISO-2022 encodings, which are multibyte), but I don't think it matters. > > If you are hinting that UTF-8 should come up first > > UTF-8 should be the most-preferred multibyte encoding nowadays, unless there is > a reasonable indication that the user prefers something else. What kind of indication do you have in mind? > In a unibyte European locale, UTF-8 should be the first-listed > multibyte encoding by default. Why not list it the first always? That sounds simpler to me, because it doesn't require any guesswork about the user preferences beyond what we do already. The encoding we offer as the first alternative now has nothing to do with user preferences, so why would we introduce such preferences? > > Most buffers will never be saved. > > For buffers that don't correspond to files, we needn't bother with any of this > checking. But for buffers that correspond to files with restrictive encodings, > it would be helpful to warn users earlier rather than later about this sort of > problem. First, buffers that correspond to files are not the only case where this encoding prompt can pop up. Text sent to a subprocess or to the network (like this email message I'm typing) is another. And second, I think you underestimate the annoyance that would result from such prompting. If the single prompt we now issue already annoys you, it hardly makes sense to do the same multiple times. It is better to try to minimize the prompts by silently doing TRT whenever we can. > It's a bit like spelling checking. It's not. A mis-spelled buffer can be saved, but we cannot save a buffer without knowing how to encode it. From debbugs-submit-bounces@debbugs.gnu.org Sun Oct 23 04:15:57 2016 Received: (at 24759) by debbugs.gnu.org; 23 Oct 2016 08:15:57 +0000 Received: from localhost ([127.0.0.1]:47351 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1byDwj-0003Mj-3M for submit@debbugs.gnu.org; Sun, 23 Oct 2016 04:15:57 -0400 Received: from zimbra.cs.ucla.edu ([131.179.128.68]:53442) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1byDwh-0003MW-5U for 24759@debbugs.gnu.org; Sun, 23 Oct 2016 04:15:55 -0400 Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 7CD2C16100C; Sun, 23 Oct 2016 01:15:49 -0700 (PDT) Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id 3OhQwbnHcrlC; Sun, 23 Oct 2016 01:15:48 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 87E43160FB1; Sun, 23 Oct 2016 01:15:48 -0700 (PDT) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id UY0mvtbddyZZ; Sun, 23 Oct 2016 01:15:48 -0700 (PDT) Received: from [192.168.1.9] (unknown [47.153.178.162]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 06427160FF5; Sun, 23 Oct 2016 01:15:48 -0700 (PDT) Subject: Re: bug#24759: 25.1.50; electric-quote-mode To: Eli Zaretskii References: <83wph1qxrw.fsf@gnu.org> <74d0a4a5-014e-b365-9d89-ad03a7fc6430@cs.ucla.edu> <83shrori8z.fsf@gnu.org> <87r378b37k.fsf@linux-m68k.org> <48240d67-ab6c-e7ec-9f77-bddbe1c07b83@cs.ucla.edu> <8337jnpn1v.fsf@gnu.org> From: Paul Eggert Organization: UCLA Computer Science Department Message-ID: <47834b84-fa9c-0596-8986-b7ebb22994f4@cs.ucla.edu> Date: Sun, 23 Oct 2016 01:15:47 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0 MIME-Version: 1.0 In-Reply-To: <8337jnpn1v.fsf@gnu.org> Content-Type: multipart/mixed; boundary="------------753CAB20C91325B65671FFC8" X-Spam-Score: -0.3 (/) X-Debbugs-Envelope-To: 24759 Cc: 24759@debbugs.gnu.org, schwab@linux-m68k.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.3 (/) This is a multi-part message in MIME format. --------------753CAB20C91325B65671FFC8 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Eli Zaretskii wrote: > So I think we should indeed remove the electric--insertable-p test in > electric-quote-mode, on the emacs-25 branch. OK, done with the attached. --------------753CAB20C91325B65671FFC8 Content-Type: text/x-diff; name="0001-electric-quote-mode-no-longer-worries-about-coding.patch" Content-Disposition: attachment; filename*0="0001-electric-quote-mode-no-longer-worries-about-coding.patc"; filename*1="h" Content-Transfer-Encoding: quoted-printable >From da6bd602c8603a23c6c63e4d4676333d91388be0 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sun, 23 Oct 2016 01:14:23 -0700 Subject: [PATCH] electric-quote mode no longer worries about coding * doc/emacs/text.texi (Quotation Marks), etc/NEWS: Document this. * lisp/electric.el (electric--insertable-p): Remove. All uses removed (Bug#24759). --- doc/emacs/text.texi | 4 +--- etc/NEWS | 6 ++++++ lisp/electric.el | 21 ++++----------------- 3 files changed, 11 insertions(+), 20 deletions(-) diff --git a/doc/emacs/text.texi b/doc/emacs/text.texi index 579f788..7fa0804 100644 --- a/doc/emacs/text.texi +++ b/doc/emacs/text.texi @@ -422,9 +422,7 @@ Quotation Marks =20 Electric Quote mode makes it easier to type curved quotes. As you type characters it optionally converts @t{`} to @t{=E2=80=98}, @t{'} to = @t{=E2=80=99}, -@t{``} to @t{=E2=80=9C}, and @t{''} to @t{=E2=80=9D}. These conversions= are -suppressed in buffers whose coding systems cannot represent curved -quote characters. +@t{``} to @t{=E2=80=9C}, and @t{''} to @t{=E2=80=9D}. =20 @vindex electric-quote-paragraph @vindex electric-quote-comment diff --git a/etc/NEWS b/etc/NEWS index 5b89639..a5bcb8d 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -38,6 +38,12 @@ fontsets if the default font supports these characters= . Set this variable to nil to disable the new behavior and get back the old behavior. =20 ++++ +** 'electric-quote-mode' is no longer suppressed in a buffer whose +whose coding system cannot represent curved quote characters. +Instead, users can deal with the unrepresentable characters in the +usual way when they save the buffer. + --- ** New variable 'inhibit-compacting-font-caches'. Set this variable to a non-nil value to speed up display of characters diff --git a/lisp/electric.el b/lisp/electric.el index b6697e0..ab9770b 100644 --- a/lisp/electric.el +++ b/lisp/electric.el @@ -430,12 +430,6 @@ electric-quote-paragraph :version "25.1" :type 'boolean :safe 'booleanp :group 'electricity) =20 -(defun electric--insertable-p (string) - (or (not buffer-file-coding-system) - (eq (coding-system-base buffer-file-coding-system) 'undecided) - (not (unencodable-char-position nil nil buffer-file-coding-system - nil string)))) - (defun electric-quote-post-self-insert-function () "Function that `electric-quote-mode' adds to `post-self-insert-hook'. This requotes when a quoting key is typed." @@ -460,8 +454,7 @@ electric-quote-post-self-insert-function (when start (save-excursion (if (eq last-command-event ?\`) - (cond ((and (electric--insertable-p "=E2=80=9C") - (search-backward "=E2=80=98`" (- (point) 2) t)= ) + (cond ((search-backward "=E2=80=98`" (- (point) 2) t) (replace-match "=E2=80=9C") (when (and electric-pair-mode (eq (cdr-safe @@ -469,16 +462,13 @@ electric-quote-post-self-insert-function (char-after))) (delete-char 1)) (setq last-command-event ?=E2=80=9C)) - ((and (electric--insertable-p "=E2=80=98") - (search-backward "`" (1- (point)) t)) + ((search-backward "`" (1- (point)) t) (replace-match "=E2=80=98") (setq last-command-event ?=E2=80=98))) - (cond ((and (electric--insertable-p "=E2=80=9D") - (search-backward "=E2=80=99'" (- (point) 2) t)) + (cond ((search-backward "=E2=80=99'" (- (point) 2) t) (replace-match "=E2=80=9D") (setq last-command-event ?=E2=80=9D)) - ((and (electric--insertable-p "=E2=80=99") - (search-backward "'" (1- (point)) t)) + ((search-backward "'" (1- (point)) t) (replace-match "=E2=80=99") (setq last-command-event ?=E2=80=99))))))))) =20 @@ -497,9 +487,6 @@ electric-quote-mode `electric-quote-comment', `electric-quote-string', and `electric-quote-paragraph'. =20 -Electric quoting is suppressed in a buffer whose coding system -cannot represent the replacement characters. - This is a global minor mode. To toggle the mode in a single buffer, use `electric-quote-local-mode'." :global t :group 'electricity --=20 2.7.4 --------------753CAB20C91325B65671FFC8-- From debbugs-submit-bounces@debbugs.gnu.org Sun Oct 23 04:24:23 2016 Received: (at 24759) by debbugs.gnu.org; 23 Oct 2016 08:24:23 +0000 Received: from localhost ([127.0.0.1]:47372 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1byE4t-0003Zq-1e for submit@debbugs.gnu.org; Sun, 23 Oct 2016 04:24:23 -0400 Received: from zimbra.cs.ucla.edu ([131.179.128.68]:57120) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1byE4s-0003Zd-Aj for 24759@debbugs.gnu.org; Sun, 23 Oct 2016 04:24:22 -0400 Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id DB46616026B; Sun, 23 Oct 2016 01:24:16 -0700 (PDT) Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id 8ZgHw6ZVs3UH; Sun, 23 Oct 2016 01:24:16 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 2433A160FF5; Sun, 23 Oct 2016 01:24:16 -0700 (PDT) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id 2sjhSyfqU0G6; Sun, 23 Oct 2016 01:24:16 -0700 (PDT) Received: from [192.168.1.9] (unknown [47.153.178.162]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 06326160FA2; Sun, 23 Oct 2016 01:24:16 -0700 (PDT) Subject: Re: bug#24759: 25.1.50; electric-quote-mode To: Eli Zaretskii References: <83wph1qxrw.fsf@gnu.org> <74d0a4a5-014e-b365-9d89-ad03a7fc6430@cs.ucla.edu> <83shrori8z.fsf@gnu.org> <83mvhwp5mr.fsf@gnu.org> <83k2d0p485.fsf@gnu.org> <831sz7pmgf.fsf@gnu.org> From: Paul Eggert Organization: UCLA Computer Science Department Message-ID: <2ee8a0d1-46b8-3b44-3721-806538daca82@cs.ucla.edu> Date: Sun, 23 Oct 2016 01:24:15 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0 MIME-Version: 1.0 In-Reply-To: <831sz7pmgf.fsf@gnu.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.3 (/) X-Debbugs-Envelope-To: 24759 Cc: 24759@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.3 (/) Eli Zaretskii wrote: >> UTF-8 should be the most-preferred multibyte encoding nowadays, unless= there is >> a reasonable indication that the user prefers something else. > > What kind of indication do you have in mind? A locale that uses some non-UTF-8 multibyte encoding. >> In a unibyte European locale, UTF-8 should be the first-listed >> multibyte encoding by default. > > Why not list it the first always? I wouldn't object. People who prefer non-UTF-8 multibyte locales might no= t like=20 it (I'm not such a person so I can't say). > If the single prompt we now issue already annoys > you, it hardly makes sense to do the same multiple times. It's not merely the prompt that annoys me. It's that the prompt can occur= long=20 after the problem it diagnoses. We could suppress the prompt in later occurrences if the user doesn't wan= t to=20 see it again. >> It's a bit like spelling checking. > > It's not. A mis-spelled buffer can be saved, but we cannot save a > buffer without knowing how to encode it. A bit like, not exactly like. The point is that users often find it more=20 convenient to see problems right away. For example, although an=20 improperly-parenthesized Lisp buffer can be saved, it's still nice to hav= e=20 parenthesis-matching enabled as I type, so that I can see and fix parenth= esis=20 problems while they're still fresh in my mind. From debbugs-submit-bounces@debbugs.gnu.org Sun Oct 23 04:52:05 2016 Received: (at 24759) by debbugs.gnu.org; 23 Oct 2016 08:52:05 +0000 Received: from localhost ([127.0.0.1]:47426 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1byEVh-0004Fo-Ie for submit@debbugs.gnu.org; Sun, 23 Oct 2016 04:52:05 -0400 Received: from eggs.gnu.org ([208.118.235.92]:46996) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1byEVg-0004FG-8P for 24759@debbugs.gnu.org; Sun, 23 Oct 2016 04:52:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1byEVX-0001cq-Uy for 24759@debbugs.gnu.org; Sun, 23 Oct 2016 04:51:59 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.5 required=5.0 tests=BAYES_50,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:59112) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1byEVX-0001cm-Ro; Sun, 23 Oct 2016 04:51:55 -0400 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:2524 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1byEVX-0005cN-67; Sun, 23 Oct 2016 04:51:55 -0400 Date: Sun, 23 Oct 2016 11:51:50 +0300 Message-Id: <83zilvo3bt.fsf@gnu.org> From: Eli Zaretskii To: Paul Eggert In-reply-to: <2ee8a0d1-46b8-3b44-3721-806538daca82@cs.ucla.edu> (message from Paul Eggert on Sun, 23 Oct 2016 01:24:15 -0700) Subject: Re: bug#24759: 25.1.50; electric-quote-mode References: <83wph1qxrw.fsf@gnu.org> <74d0a4a5-014e-b365-9d89-ad03a7fc6430@cs.ucla.edu> <83shrori8z.fsf@gnu.org> <83mvhwp5mr.fsf@gnu.org> <83k2d0p485.fsf@gnu.org> <831sz7pmgf.fsf@gnu.org> <2ee8a0d1-46b8-3b44-3721-806538daca82@cs.ucla.edu> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.3 (-----) X-Debbugs-Envelope-To: 24759 Cc: 24759@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.3 (-----) > Cc: 24759@debbugs.gnu.org > From: Paul Eggert > Date: Sun, 23 Oct 2016 01:24:15 -0700 > > > What kind of indication do you have in mind? > > A locale that uses some non-UTF-8 multibyte encoding. It isn't clear that this will help. If that locale's encoding can encode the offending characters, Emacs will already use it silently without any prompts. Beyond that, inferring a preference for some non-UTF-8 encoding from the fact that the locale's encoding is multibyte and not UTF-8 sounds far-fetched to me. > >> In a unibyte European locale, UTF-8 should be the first-listed > >> multibyte encoding by default. > > > > Why not list it the first always? > > I wouldn't object. People who prefer non-UTF-8 multibyte locales might not like > it (I'm not such a person so I can't say). I don't think we should do this as the first approximation; we should just make sure UTF-8 is the first in the list. If later users will complain about this, we could introduce a defcustom for such a "second best" encoding, perhaps with a suitably guessed default value. But I wouldn't go there without specific requests and use cases. > > If the single prompt we now issue already annoys > > you, it hardly makes sense to do the same multiple times. > > It's not merely the prompt that annoys me. It's that the prompt can occur long > after the problem it diagnoses. But the buffer we pop up clearly shows the problematic characters, and also describes which of them couldn't be encoded with what coding-systems that were tried. So I think this provides enough information for the user to decide what to do, and the fact that the insertion happened much earlier doesn't matter, because the information is not lost. In particular, one of the valid reactions to the prompt is to type C-g, then go to the buffer and delete/replace the offending characters, and then try saving again. > We could suppress the prompt in later occurrences if the user doesn't want to > see it again. We could, but it's not a yes/no kind of answer, because the user might not want to see another prompt for characters that require an encoding she already saw, but might still want prompts for characters that require other encodings. For example, if I insert a Latin-1 character, I will be prompted and decode I don't want to see prompts about any other characters that are encodable with ISO-8859-1. But if I later insert a character that cannot be encoded with ISO-8859-1, I might still want to see the prompt. So I think this is a lot of hassle for something that works well in practice for the past several years. Changing it will most probably open a can of worms (the current situation took several iterations to get right). So I'd rather we invest our efforts in silently doing TRT in more use cases. From debbugs-submit-bounces@debbugs.gnu.org Sun Oct 23 04:55:36 2016 Received: (at 24759) by debbugs.gnu.org; 23 Oct 2016 08:55:36 +0000 Received: from localhost ([127.0.0.1]:47440 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1byEZ6-0004L4-4I for submit@debbugs.gnu.org; Sun, 23 Oct 2016 04:55:36 -0400 Received: from eggs.gnu.org ([208.118.235.92]:47502) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1byEZ4-0004Kr-90 for 24759@debbugs.gnu.org; Sun, 23 Oct 2016 04:55:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1byEYw-0003K4-4c for 24759@debbugs.gnu.org; Sun, 23 Oct 2016 04:55:29 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:59126) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1byEYw-0003Jz-29; Sun, 23 Oct 2016 04:55:26 -0400 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:2538 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1byEYu-0005vT-Ob; Sun, 23 Oct 2016 04:55:25 -0400 Date: Sun, 23 Oct 2016 11:55:20 +0300 Message-Id: <83y41fo35z.fsf@gnu.org> From: Eli Zaretskii To: Paul Eggert , Dani Moncayo In-reply-to: <47834b84-fa9c-0596-8986-b7ebb22994f4@cs.ucla.edu> (message from Paul Eggert on Sun, 23 Oct 2016 01:15:47 -0700) Subject: Re: bug#24759: 25.1.50; electric-quote-mode References: <83wph1qxrw.fsf@gnu.org> <74d0a4a5-014e-b365-9d89-ad03a7fc6430@cs.ucla.edu> <83shrori8z.fsf@gnu.org> <87r378b37k.fsf@linux-m68k.org> <48240d67-ab6c-e7ec-9f77-bddbe1c07b83@cs.ucla.edu> <8337jnpn1v.fsf@gnu.org> <47834b84-fa9c-0596-8986-b7ebb22994f4@cs.ucla.edu> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.3 (-----) X-Debbugs-Envelope-To: 24759 Cc: 24759@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.3 (-----) > Cc: schwab@linux-m68k.org, 24759@debbugs.gnu.org > From: Paul Eggert > Date: Sun, 23 Oct 2016 01:15:47 -0700 > > Eli Zaretskii wrote: > > So I think we should indeed remove the electric--insertable-p test in > > electric-quote-mode, on the emacs-25 branch. > > OK, done with the attached. Thanks, I think this bug can be closed now. Dani, any objections? From debbugs-submit-bounces@debbugs.gnu.org Sun Oct 23 05:15:45 2016 Received: (at 24759) by debbugs.gnu.org; 23 Oct 2016 09:15:45 +0000 Received: from localhost ([127.0.0.1]:47523 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1byEsb-0004s5-CJ for submit@debbugs.gnu.org; Sun, 23 Oct 2016 05:15:45 -0400 Received: from mail-wm0-f51.google.com ([74.125.82.51]:35445) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1byEsZ-0004rs-9D for 24759@debbugs.gnu.org; Sun, 23 Oct 2016 05:15:43 -0400 Received: by mail-wm0-f51.google.com with SMTP id c78so55048326wme.0 for <24759@debbugs.gnu.org>; Sun, 23 Oct 2016 02:15:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=3ECz4swywQO4LesOZaHhduOxjk+s6GLAXdBabvWR6KQ=; b=tvikl5eZUqnq8uu++m/ZH0xiX0kTAGDHzk04aPwZN08cs0UfL9GkSGrAOOJSmz9+Cv pIV6BbrNdZYv2r/BBDoZWRK6XcfTygz2HtlOhHXHuoUb8ZrIyF3J0sHWMRN5AW74onDE cm5k5nYad6cWObPMoot0IBThBq410i1h+JOOxKyLXWFqju/TTWaqEADh7CFLehZQ8wB5 XGk21OGiqRCULg8j+TTpHIrK2pnXa8WvnarsNrETZO4V45FWR6d0juSter0EDJLKW3QK l9hiBXC5rGO8NNpoxRAB9M2hS2TUPlIbO4nWsAPTXnv2+ZxwDtDVfU1qCwnKEkk39QYD 1xmw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=3ECz4swywQO4LesOZaHhduOxjk+s6GLAXdBabvWR6KQ=; b=cf3doso3PRlpncQHmJEkiZme+zK1pkg2yFpZCEQqN4/gW+7+lHp8Lj30MjQKS7Dxxx ngL/m5meFialmQ51fhBkkHTtKYnqxDGEPvAL0XHcT0b/TR74bOGFGcTgjcNCtirH4Gtj +knAJ+w2Syat1bG42CTfcjddzfZXfvH+i/47y+48fbGrYYxazxiCZ3oRhO/mwD3Y53sm 3oSJkH5HMpIZprESXgS1mdUDKfy3mJk7W8/DvmB2ECPBl3r78JuVPy1I9xGzhZriDIvp NV6TTPpvUfG7RJkhME1tMlqsWcxmySlsvyuTD+SVvr6wbZ4lzni1rJqJNLpIlxdzrTLc cqrA== X-Gm-Message-State: ABUngvfM3ZIIvlheP/fMHCZ7OSkNsorIwEzr8EBghK/3e32Yzt/Yy0BH0va5FhnSPZ9+kB0iFzSLci52+sNb/g== X-Received: by 10.194.243.167 with SMTP id wz7mr8593917wjc.65.1477214137337; Sun, 23 Oct 2016 02:15:37 -0700 (PDT) MIME-Version: 1.0 Received: by 10.28.95.133 with HTTP; Sun, 23 Oct 2016 02:15:36 -0700 (PDT) In-Reply-To: <83y41fo35z.fsf@gnu.org> References: <83wph1qxrw.fsf@gnu.org> <74d0a4a5-014e-b365-9d89-ad03a7fc6430@cs.ucla.edu> <83shrori8z.fsf@gnu.org> <87r378b37k.fsf@linux-m68k.org> <48240d67-ab6c-e7ec-9f77-bddbe1c07b83@cs.ucla.edu> <8337jnpn1v.fsf@gnu.org> <47834b84-fa9c-0596-8986-b7ebb22994f4@cs.ucla.edu> <83y41fo35z.fsf@gnu.org> From: Dani Moncayo Date: Sun, 23 Oct 2016 11:15:36 +0200 Message-ID: Subject: Re: bug#24759: 25.1.50; electric-quote-mode To: Eli Zaretskii Content-Type: text/plain; charset=UTF-8 X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 24759 Cc: Paul Eggert , 24759@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.5 (/) On Sun, Oct 23, 2016 at 10:55 AM, Eli Zaretskii wrote: >> Cc: schwab@linux-m68k.org, 24759@debbugs.gnu.org >> From: Paul Eggert >> Date: Sun, 23 Oct 2016 01:15:47 -0700 >> >> Eli Zaretskii wrote: >> > So I think we should indeed remove the electric--insertable-p test in >> > electric-quote-mode, on the emacs-25 branch. >> >> OK, done with the attached. > > Thanks, I think this bug can be closed now. Dani, any objections? No, none. Thanks to both of you. -- Dani Moncayo From debbugs-submit-bounces@debbugs.gnu.org Sun Oct 23 05:29:08 2016 Received: (at 24759-done) by debbugs.gnu.org; 23 Oct 2016 09:29:08 +0000 Received: from localhost ([127.0.0.1]:47572 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1byF5Y-0005Cn-2C for submit@debbugs.gnu.org; Sun, 23 Oct 2016 05:29:08 -0400 Received: from zimbra.cs.ucla.edu ([131.179.128.68]:56480) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1byF5W-0005CG-Bo for 24759-done@debbugs.gnu.org; Sun, 23 Oct 2016 05:29:06 -0400 Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 983531606D6; Sun, 23 Oct 2016 02:29:00 -0700 (PDT) Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id nL108AtmjrUs; Sun, 23 Oct 2016 02:28:59 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 46F8116100C; Sun, 23 Oct 2016 02:28:59 -0700 (PDT) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id QrP16OBNI2US; Sun, 23 Oct 2016 02:28:59 -0700 (PDT) Received: from [192.168.1.9] (unknown [47.153.178.162]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 28309160FB1; Sun, 23 Oct 2016 02:28:59 -0700 (PDT) Subject: Re: bug#24759: 25.1.50; electric-quote-mode To: Dani Moncayo , Eli Zaretskii References: <83wph1qxrw.fsf@gnu.org> <74d0a4a5-014e-b365-9d89-ad03a7fc6430@cs.ucla.edu> <83shrori8z.fsf@gnu.org> <87r378b37k.fsf@linux-m68k.org> <48240d67-ab6c-e7ec-9f77-bddbe1c07b83@cs.ucla.edu> <8337jnpn1v.fsf@gnu.org> <47834b84-fa9c-0596-8986-b7ebb22994f4@cs.ucla.edu> <83y41fo35z.fsf@gnu.org> From: Paul Eggert Organization: UCLA Computer Science Department Message-ID: <999cba29-67c6-eb95-f942-bef3efb2f8bd@cs.ucla.edu> Date: Sun, 23 Oct 2016 02:28:58 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -0.3 (/) X-Debbugs-Envelope-To: 24759-done Cc: 24759-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.3 (/) Dani Moncayo wrote: > On Sun, Oct 23, 2016 at 10:55 AM, Eli Zaretskii wrote: >> Thanks, I think this bug can be closed now. Dani, any objections? > > No, none. Thanks to both of you. > You're welcome. Closing the bug. From unknown Sat Aug 16 18:39:29 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sun, 20 Nov 2016 12:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator