From debbugs-submit-bounces@debbugs.gnu.org Fri Feb 21 05:01:51 2014 Received: (at submit) by debbugs.gnu.org; 21 Feb 2014 10:01:52 +0000 Received: from localhost ([127.0.0.1]:34281 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WGmvX-0005GS-0g for submit@debbugs.gnu.org; Fri, 21 Feb 2014 05:01:51 -0500 Received: from eggs.gnu.org ([208.118.235.92]:36938) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WGmvU-0005GA-6U for submit@debbugs.gnu.org; Fri, 21 Feb 2014 05:01:49 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WGmvN-0007yv-FB for submit@debbugs.gnu.org; Fri, 21 Feb 2014 05:01:42 -0500 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, HTML_MESSAGE,T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:42545) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WGmvN-0007yr-CC for submit@debbugs.gnu.org; Fri, 21 Feb 2014 05:01:41 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38659) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WGmvM-0002qC-06 for bug-gnu-emacs@gnu.org; Fri, 21 Feb 2014 05:01:41 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WGmvK-0007yc-Pp for bug-gnu-emacs@gnu.org; Fri, 21 Feb 2014 05:01:39 -0500 Received: from mail-wi0-x234.google.com ([2a00:1450:400c:c05::234]:39909) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WGmvK-0007yW-FA for bug-gnu-emacs@gnu.org; Fri, 21 Feb 2014 05:01:38 -0500 Received: by mail-wi0-f180.google.com with SMTP id hm4so626332wib.7 for ; Fri, 21 Feb 2014 02:01:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=jSYaIuZUv4qtYwg+my6gSaxMwCNpyedhsh/kj8s2QYU=; b=OkwEV5/UXEIHrokhZ4EQjdi14eel4Ds7H0SOdQfPwZYlJMtB6KfHn0a4ieuysTWchm ZLYOJLhe4Z2TFnonmxXjwtw8l7+yV5ispBY07D2LYlWxSSkE82wMz1b0DB+47np2OyWZ ncg5S6XYPokzJcbr74Zj0uFjucuOzCY+nXapsDbXT5Pjf0x7yQ7g/H1LofCNsNZ0Nvyl t2Os7RDV9gNyrgsZgRLcVURJETYmrF3SkO6sbswb8peKTpPUaSFZm1UgUGlBO9sUyUTP NXtCtBDvQ29wanYkRq27gHSLiw078lbhmv7cMgCpYXjxt2tPibq8DaU1E83CaasbgrBC okGg== MIME-Version: 1.0 X-Received: by 10.180.84.73 with SMTP id w9mr2345139wiy.58.1392976896854; Fri, 21 Feb 2014 02:01:36 -0800 (PST) Received: by 10.217.110.131 with HTTP; Fri, 21 Feb 2014 02:01:36 -0800 (PST) Date: Fri, 21 Feb 2014 11:01:36 +0100 Message-ID: Subject: 24.3.50; eval-expression, character representation of integer results time-consuming From: Anders Lindgren To: bug-gnu-emacs@gnu.org Content-Type: multipart/alternative; boundary=f46d044404921e0f4204f2e7b51d X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). 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.15 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 (----) --f46d044404921e0f4204f2e7b51d Content-Type: text/plain; charset=ISO-8859-1 The command `eval-expression' prints integer results both as decimal, hex, octal, and (sometimes) as a character. Some integers take a very long time to print, probably due to the fact that it takes a long time to find a suitable font to render the character variant in. The slow-down typically only occur once. Steps to repeat: M-: 3200 RET Here, it takes 22.5 seconds for Emacs to respond: 3200 (#o6200, #xc80) Under 24.3 this was fast (well under a second). This is on OS X 10.9 -- I haven't got access to any other system to test this on. In addition, sometimes it looks like the echo area splits the text into two parts, effective only showing the second part. Unfortunately, I haven't figured out when and how this occurs. Anyway, when it does, the *Messages* buffer look like: 3200 (#o6200, #xc80) 3200 (#o6200, #xc80) [2 times] A simple solution would be to suppress printing of characters outside the 0-255 range (or at least give the user an option to do so). Sincerely, Anders Lindgren In GNU Emacs 24.3.50.2 (x86_64-apple-darwin13.0.0, NS apple-appkit-1265.00) of 2014-02-16 on macpro.lan Repository revision: 116451 jan.h.d@swipnet.se-20140216095141-cop794qd0bf30tmt Windowing system distributor `Apple', version 10.3.1265 Configured using: `configure --with-ns' Important settings: value of $LC_CTYPE: UTF-8 locale-coding-system: utf-8-unix Major mode: Lisp Interaction Minor modes in effect: tooltip-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 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 Recent input: : 3 2 0 0 x r e p o s r t - t r t - e m Recent messages: For information about GNU Emacs and the GNU system, type C-h C-a. 3200 (#o6200, #xc80) is undefined [2 times] s-b is undefined Load-path shadows: None found. Features: (shadow sort gnus-util mail-extr emacsbug message format-spec rfc822 mml easymenu mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util help-fns mail-prsvr mail-utils mule-util time-date tooltip electric uniquify ediff-hook vc-hooks lisp-float-type mwheel ns-win tool-bar dnd fontset image regexp-opt fringe tabulated-list newcomment lisp-mode prog-mode register page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer 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 make-network-process cocoa ns multi-tty emacs) --f46d044404921e0f4204f2e7b51d Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
The command `eval-expression' prints integer resu= lts both as decimal, hex, octal, and (sometimes) as a character.
=
Some integers take a very long time to print, probably due t= o the fact that it takes a long time to find a suitable font to render the = character variant in. The slow-down typically only occur once.

Steps to repeat:

=A0 =A0 M-: 3= 200 RET

Here, it takes 22.5 seconds for Emacs to r= espond: 3200 (#o6200, #xc80)

Under 24.3 this was f= ast (well under a second).

This is on OS X 10.9 -- I haven't got access to any= other system to test this on.


In a= ddition, sometimes it looks like the echo area splits the text into two par= ts, effective only showing the second part. Unfortunately, I haven't fi= gured out when and how this occurs. Anyway, when it does, the *Messages* bu= ffer look like:
=A0

3200
=A0(#o6200, #xc80= )
3200 (#o6200, #xc80) [2 times]

A= simple solution would be to suppress printing of characters outside the 0-= 255 range (or at least give the user an option to do so).

Sincerely,
=A0 =A0 Anders Lindgren
=
In GNU Emacs 24.3.50.2 (x86_64-apple-darwin13.0.0, NS apple-= appkit-1265.00)
=A0of 2014-02-16 on macpro.lan
Reposito= ry revision: 116451 jan.h.d@swipnet.se-20140216095141-cop794qd0bf30tmt
Windowing system distributor `Apple', version 10.3.1265
= Configured using:
=A0`configure --with-ns'

Important settings:
=A0 value of $LC_CTYPE: UTF-8
=A0 locale-coding-system: utf-8-unix

Major mode: L= isp Interaction

Minor modes in effect:
= =A0 tooltip-mode: t
=A0 electric-indent-mode: t
=A0 mou= se-wheel-mode: t
=A0 tool-bar-mode: t
=A0 menu-bar-mode: t
=A0 file= -name-shadow-mode: t
=A0 global-font-lock-mode: t
=A0 f= ont-lock-mode: t
=A0 blink-cursor-mode: t
=A0 auto-comp= osition-mode: t
=A0 auto-encryption-mode: t
=A0 auto-compression-mode: t
=A0 line-number-mode: t
=A0 transient-mark-mode: t

Recent input:
<escape> : 3 2 0 0 <retu= rn> <escape> x r e p o s r=A0
t - <backspace> <backspace> <backspace> t <backsp= ace>=A0
<backspace> r t - e m <tab> <return>=

Recent messages:
For information about = GNU Emacs and the GNU system, type C-h C-a.
3200 (#o6200, #xc80)
<s-backspace> is undefined [2 tim= es]
s-b is undefined

Load-path shadows:<= /div>
None found.

Features:
(shadow = sort gnus-util mail-extr emacsbug message format-spec rfc822 mml
easymenu mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231
mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums
mm-util help-fns mail-prsvr mail-utils mule-util time-date tooltip=
electric uniquify ediff-hook vc-hooks lisp-float-type mwheel ns-win
tool-bar dnd fontset image regexp-opt fringe tabulated-list newcomm= ent
lisp-mode prog-mode register page menu-bar rfn-eshadow timer = select
scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame ch= am
georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet= lao
korean japanese hebrew greek romanian slovak czech european = ethiopic
indian cyrillic chinese case-table epa-hook jka-cmpr-hook help simple<= /div>
abbrev minibuffer nadvice loaddefs button faces cus-face macroexp= files
text-properties overlay sha1 md5 base64 format env code-pa= ges mule
custom widget hashtable-print-readable backquote make-network-process<= /div>
cocoa ns multi-tty emacs)


--f46d044404921e0f4204f2e7b51d-- From debbugs-submit-bounces@debbugs.gnu.org Fri Feb 21 05:29:05 2014 Received: (at 16828) by debbugs.gnu.org; 21 Feb 2014 10:29:05 +0000 Received: from localhost ([127.0.0.1]:34291 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WGnLt-0005z1-CE for submit@debbugs.gnu.org; Fri, 21 Feb 2014 05:29:05 -0500 Received: from mtaout24.012.net.il ([80.179.55.180]:48056) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WGnLp-0005yT-Rk for 16828@debbugs.gnu.org; Fri, 21 Feb 2014 05:29:02 -0500 Received: from conversion-daemon.mtaout24.012.net.il by mtaout24.012.net.il (HyperSendmail v2007.08) id <0N1C00700CYC6L00@mtaout24.012.net.il> for 16828@debbugs.gnu.org; Fri, 21 Feb 2014 12:27:37 +0200 (IST) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout24.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0N1C00PEID216P70@mtaout24.012.net.il>; Fri, 21 Feb 2014 12:27:37 +0200 (IST) Date: Fri, 21 Feb 2014 12:29:11 +0200 From: Eli Zaretskii Subject: Re: bug#16828: 24.3.50; eval-expression, character representation of integer results time-consuming In-reply-to: X-012-Sender: halo1@inter.net.il To: Anders Lindgren Message-id: <83mwhk4v48.fsf@gnu.org> References: X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 16828 Cc: 16828@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Eli Zaretskii 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: 1.0 (+) > Date: Fri, 21 Feb 2014 11:01:36 +0100 > From: Anders Lindgren > > Some integers take a very long time to print, probably due to the fact that > it takes a long time to find a suitable font to render the character > variant in. The slow-down typically only occur once. Yes, this is because Emacs looks for and loads a suitable font. From debbugs-submit-bounces@debbugs.gnu.org Sat Feb 22 07:49:33 2014 Received: (at 16828) by debbugs.gnu.org; 22 Feb 2014 12:49:33 +0000 Received: from localhost ([127.0.0.1]:35442 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WHC1M-0003bq-NC for submit@debbugs.gnu.org; Sat, 22 Feb 2014 07:49:32 -0500 Received: from mail-wi0-f170.google.com ([209.85.212.170]:36255) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WHC1K-0003bb-E3 for 16828@debbugs.gnu.org; Sat, 22 Feb 2014 07:49:30 -0500 Received: by mail-wi0-f170.google.com with SMTP id hi5so1666772wib.5 for <16828@debbugs.gnu.org>; Sat, 22 Feb 2014 04:49:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=fnTa74mq2p7sL0FY1N5CNuGemXEEsKZlqw06OZMxD4U=; b=YHQmu/TOqEA4OLq+CLkImGoUbLboWbyRstNfPm9c7YuCFi28BlD7y7o1hWyaBGc82F +zdXSNFzmXzqngi7tPbXhbfHGpjI5YCmo93fDQlt/krRuBD1iVudE5eXEhnRD2vCSuPG HIjq0yAbcfgSRNXtnGJqprn/4SnrA2VZQjcVg5QeNuAN4Y6LiXciAGz4YjzT9BwWnCkb 7E8K6EmQ0F9BEM3YbYPNZS5Vd8HHKgb61K522dZQuuo8fgtMpLdCYRvD18ePKBOgIJiv SI+vRUfz0cjBUj+JEW8J907XD80xds0T8VbM0GsNBM7zAlVH/WryzEyP8Cot8WqJgcZQ QKgw== MIME-Version: 1.0 X-Received: by 10.194.110.41 with SMTP id hx9mr11322030wjb.28.1393073364498; Sat, 22 Feb 2014 04:49:24 -0800 (PST) Received: by 10.217.110.131 with HTTP; Sat, 22 Feb 2014 04:49:24 -0800 (PST) In-Reply-To: <83mwhk4v48.fsf@gnu.org> References: <83mwhk4v48.fsf@gnu.org> Date: Sat, 22 Feb 2014 13:49:24 +0100 Message-ID: Subject: Re: bug#16828: 24.3.50; eval-expression, character representation of integer results time-consuming From: Anders Lindgren To: Eli Zaretskii Content-Type: multipart/alternative; boundary=089e010d89e0097ce904f2fe2bf1 X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 16828 Cc: "16828@debbugs.gnu.org" <16828@debbugs.gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 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 (/) --089e010d89e0097ce904f2fe2bf1 Content-Type: text/plain; charset=ISO-8859-1 Ok, good, then we know what caused the problem. The question now it what should be done about it. Personally, I see little value of always seeing the char representation of integers >255, and if that comes at the cost of a 22 second delay I don't see that it's worth it. -- Anders On Friday, February 21, 2014, Eli Zaretskii wrote: >> Date: Fri, 21 Feb 2014 11:01:36 +0100 >> From: Anders Lindgren >> >> Some integers take a very long time to print, probably due to the fact that >> it takes a long time to find a suitable font to render the character >> variant in. The slow-down typically only occur once. > > Yes, this is because Emacs looks for and loads a suitable font. > --089e010d89e0097ce904f2fe2bf1 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
Ok, good, then we know what caused the problem. The question now it wha= t should be done about it.

Personally, I see little value of always = seeing the char representation of integers >255, and if that comes at th= e cost of a 22 second delay I don't see that it's worth it.

=A0 =A0-- Anders

On Friday, February 21, 2014, Eli Zaretskii &l= t;eliz@gnu.org> wrote:
>> D= ate: Fri, 21 Feb 2014 11:01:36 +0100
>> From: Anders Lindgren <= andlind@gmail.com>
>>
>> Some integers take a very long time to print, probably= due to the fact that
>> it takes a long time to find a suitable f= ont to render the character
>> variant in. The slow-down typically= only occur once.
>
> Yes, this is because Emacs looks for and loads a suitable font= .
> --089e010d89e0097ce904f2fe2bf1-- From debbugs-submit-bounces@debbugs.gnu.org Sat Feb 22 08:10:54 2014 Received: (at 16828) by debbugs.gnu.org; 22 Feb 2014 13:10:54 +0000 Received: from localhost ([127.0.0.1]:35471 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WHCM1-0004Ea-SL for submit@debbugs.gnu.org; Sat, 22 Feb 2014 08:10:54 -0500 Received: from mtaout28.012.net.il ([80.179.55.184]:46995) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WHCLz-0004EB-80 for 16828@debbugs.gnu.org; Sat, 22 Feb 2014 08:10:52 -0500 Received: from conversion-daemon.mtaout28.012.net.il by mtaout28.012.net.il (HyperSendmail v2007.08) id <0N1E00N00F09DE00@mtaout28.012.net.il> for 16828@debbugs.gnu.org; Sat, 22 Feb 2014 15:11:20 +0200 (IST) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout28.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0N1E00JD9FAW6350@mtaout28.012.net.il>; Sat, 22 Feb 2014 15:11:20 +0200 (IST) Date: Sat, 22 Feb 2014 15:11:05 +0200 From: Eli Zaretskii Subject: Re: bug#16828: 24.3.50; eval-expression, character representation of integer results time-consuming In-reply-to: X-012-Sender: halo1@inter.net.il To: Anders Lindgren Message-id: <83txbr2sye.fsf@gnu.org> References: <83mwhk4v48.fsf@gnu.org> X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 16828 Cc: 16828@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Eli Zaretskii 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: 1.0 (+) > Date: Sat, 22 Feb 2014 13:49:24 +0100 > From: Anders Lindgren > Cc: "16828@debbugs.gnu.org" <16828@debbugs.gnu.org> > > Personally, I see little value of always seeing the char representation of > integers >255, and if that comes at the cost of a 22 second delay I don't > see that it's worth it. A user option should be a good compromise (we could argue about its default value later ;-). From debbugs-submit-bounces@debbugs.gnu.org Sat Feb 22 13:53:33 2014 Received: (at 16828) by debbugs.gnu.org; 22 Feb 2014 18:53:33 +0000 Received: from localhost ([127.0.0.1]:35891 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WHHhb-0005fY-Nq for submit@debbugs.gnu.org; Sat, 22 Feb 2014 13:53:32 -0500 Received: from mout.gmx.net ([212.227.15.15]:51977) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WHHhY-0005fF-4Q for 16828@debbugs.gnu.org; Sat, 22 Feb 2014 13:53:29 -0500 Received: from rosalinde.fritz.box ([89.245.88.94]) by mail.gmx.com (mrgmx101) with ESMTPSA (Nemesis) id 0LcFTN-1X0UTN3CEf-00jVdh for <16828@debbugs.gnu.org>; Sat, 22 Feb 2014 19:53:21 +0100 From: Stephen Berman To: Eli Zaretskii Subject: Re: bug#16828: 24.3.50; eval-expression, character representation of integer results time-consuming References: <83mwhk4v48.fsf@gnu.org> <83txbr2sye.fsf@gnu.org> Date: Sat, 22 Feb 2014 19:53:13 +0100 In-Reply-To: <83txbr2sye.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 22 Feb 2014 15:11:05 +0200") Message-ID: <87zjljf086.fsf@rosalinde.fritz.box> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K0:8FGOCusDcXeh8rD4T3/CJjnU2UQPVzz/em+4Bhm1G03dfwfO1qq IMiIHBjx+7CGmSB2+qmxXZ/5lRiVHZmBYeZVmkSca80ofKgGBEPs7btMdNOvhHGP6MO9VQV ymodBQJa/ZZiAVhU+NZaOqBha72qt/ahX+y151tctQuNtbhjD94FPz9gwod+GtkEq94R8xL h9UMmOjTiI8vqRhxoRKOA== X-Spam-Score: -0.5 (/) X-Debbugs-Envelope-To: 16828 Cc: 16828@debbugs.gnu.org, Anders Lindgren X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 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 Sat, 22 Feb 2014 15:11:05 +0200 Eli Zaretskii wrote: >> Date: Sat, 22 Feb 2014 13:49:24 +0100 >> From: Anders Lindgren >> Cc: "16828@debbugs.gnu.org" <16828@debbugs.gnu.org> >> >> Personally, I see little value of always seeing the char representation of >> integers >255, and if that comes at the cost of a 22 second delay I don't >> see that it's worth it. > > A user option should be a good compromise (we could argue about its > default value later ;-). An option for whether to show the character representation of integers higher than 255 may be the easiest way to deal with this issue, but the problem has wider scope (at least for me): it happens with any command that makes Emacs look for and load a suitable font, e.g. `C-h h' or opening an email or newsgroup posting that contains such a character. In my case the delay can be as long as ~90 (ninety!) seconds. Even though this happens only once per session, such a long delay, during which Emacs is effectively frozen, is quite annoying, especially when reading mail or news, where it is typically unexpected. Could the option be a timeout, say if the font isn't found within X seconds (with a low default), then just some placeholder will be shown, and maybe a message indicating the failure to find the font in that time? Steve Berman From debbugs-submit-bounces@debbugs.gnu.org Sat Feb 22 16:00:29 2014 Received: (at 16828) by debbugs.gnu.org; 22 Feb 2014 21:00:29 +0000 Received: from localhost ([127.0.0.1]:35993 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WHJgS-00025E-Hr for submit@debbugs.gnu.org; Sat, 22 Feb 2014 16:00:28 -0500 Received: from mtaout24.012.net.il ([80.179.55.180]:46443) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WHJgO-00024p-GO for 16828@debbugs.gnu.org; Sat, 22 Feb 2014 16:00:27 -0500 Received: from conversion-daemon.mtaout24.012.net.il by mtaout24.012.net.il (HyperSendmail v2007.08) id <0N1F00C000EPOK00@mtaout24.012.net.il> for 16828@debbugs.gnu.org; Sat, 22 Feb 2014 22:58:56 +0200 (IST) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout24.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0N1F009C10Y8GO50@mtaout24.012.net.il>; Sat, 22 Feb 2014 22:58:56 +0200 (IST) Date: Sat, 22 Feb 2014 23:00:10 +0200 From: Eli Zaretskii Subject: Re: bug#16828: 24.3.50; eval-expression, character representation of integer results time-consuming In-reply-to: <87zjljf086.fsf@rosalinde.fritz.box> X-012-Sender: halo1@inter.net.il To: Stephen Berman Message-id: <83a9di3lt1.fsf@gnu.org> References: <83mwhk4v48.fsf@gnu.org> <83txbr2sye.fsf@gnu.org> <87zjljf086.fsf@rosalinde.fritz.box> X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 16828 Cc: 16828@debbugs.gnu.org, andlind@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Eli Zaretskii 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: 1.0 (+) > From: Stephen Berman > Cc: Anders Lindgren , 16828@debbugs.gnu.org > Date: Sat, 22 Feb 2014 19:53:13 +0100 > > In my case the delay can be as long as ~90 (ninety!) seconds. Even > though this happens only once per session, such a long delay, during > which Emacs is effectively frozen, is quite annoying, especially when > reading mail or news, where it is typically unexpected. Could the > option be a timeout, say if the font isn't found within X seconds (with > a low default), then just some placeholder will be shown, and maybe a > message indicating the failure to find the font in that time? I don't think the time this takes is spend _looking_ for a font, I think it's spend loading a font. But someone will have to trace and profile this, and then come up with an analysis. From debbugs-submit-bounces@debbugs.gnu.org Sun Feb 23 04:07:00 2014 Received: (at submit) by debbugs.gnu.org; 23 Feb 2014 09:07:00 +0000 Received: from localhost ([127.0.0.1]:36260 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WHV1Y-0005An-7w for submit@debbugs.gnu.org; Sun, 23 Feb 2014 04:07:00 -0500 Received: from eggs.gnu.org ([208.118.235.92]:38928) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WHV1V-0005AW-9Z for submit@debbugs.gnu.org; Sun, 23 Feb 2014 04:06:58 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WHV1I-00011W-UZ for submit@debbugs.gnu.org; Sun, 23 Feb 2014 04:06:52 -0500 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 autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:51846) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WHV1I-00011S-RI for submit@debbugs.gnu.org; Sun, 23 Feb 2014 04:06:44 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40609) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WHV1C-00070E-G9 for bug-gnu-emacs@gnu.org; Sun, 23 Feb 2014 04:06:44 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WHV16-0000z3-7D for bug-gnu-emacs@gnu.org; Sun, 23 Feb 2014 04:06:38 -0500 Received: from plane.gmane.org ([80.91.229.3]:57619) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WHV16-0000yz-0b for bug-gnu-emacs@gnu.org; Sun, 23 Feb 2014 04:06:32 -0500 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1WHV13-0004sf-Vi for bug-gnu-emacs@gnu.org; Sun, 23 Feb 2014 10:06:29 +0100 Received: from pd9eb3adf.dip0.t-ipconnect.de ([217.235.58.223]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 23 Feb 2014 10:06:29 +0100 Received: from Stromeko by pd9eb3adf.dip0.t-ipconnect.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 23 Feb 2014 10:06:29 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: bug-gnu-emacs@gnu.org From: Achim Gratz Subject: Re: bug#16828: 24.3.50; eval-expression, character representation of integer results time-consuming Date: Sun, 23 Feb 2014 10:06:18 +0100 Organization: Linux Private Site Lines: 17 Message-ID: <877g8mb3lh.fsf@Rainer.invalid> References: <83mwhk4v48.fsf@gnu.org> <83txbr2sye.fsf@gnu.org> <87zjljf086.fsf@rosalinde.fritz.box> <83a9di3lt1.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: pd9eb3adf.dip0.t-ipconnect.de User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) Cancel-Lock: sha1:09TT33/ExgjOcwlUYZPdqmKrIRw= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.1 (----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 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.1 (----) Eli Zaretskii writes: > I don't think the time this takes is spend _looking_ for a font, I > think it's spend loading a font. But someone will have to trace and > profile this, and then come up with an analysis. Like Stephen I am fairly certain that most of the time is indeed spent looking for a suitable font, based on the disk noises that indicate seeking through many directories. Regards, Achim. -- +<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+ SD adaptation for Waldorf rackAttack V1.04R1: http://Synth.Stromeko.net/Downloads.html#WaldorfSDada From debbugs-submit-bounces@debbugs.gnu.org Mon Feb 24 19:42:28 2014 Received: (at 16828) by debbugs.gnu.org; 25 Feb 2014 00:42:29 +0000 Received: from localhost ([127.0.0.1]:38319 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WI66O-0006VW-IR for submit@debbugs.gnu.org; Mon, 24 Feb 2014 19:42:28 -0500 Received: from hampton-mail.hostforweb.net ([205.234.204.210]:48661 helo=hampton.hostforweb.net) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WI66M-0006VH-Gy for 16828@debbugs.gnu.org; Mon, 24 Feb 2014 19:42:27 -0500 Received: from localhost.localdomain ([127.0.0.1]:58740 helo=localhost) by hampton.hostforweb.net with smtp (Exim 4.80.1) (envelope-from ) id 1WI66F-001saQ-0r; Mon, 24 Feb 2014 18:42:19 -0600 Date: Tue, 25 Feb 2014 09:42:22 +0900 Message-ID: From: Katsumi Yamaoka To: 16828@debbugs.gnu.org Subject: Re: bug#16828: 24.3.50; eval-expression, character representation of integer results time-consuming References: <83mwhk4v48.fsf@gnu.org> <83txbr2sye.fsf@gnu.org> <87zjljf086.fsf@rosalinde.fritz.box> <83a9di3lt1.fsf@gnu.org> <877g8mb3lh.fsf@Rainer.invalid> Organization: Emacsen advocacy group X-Face: #kKnN,xUnmKia.'[pp`; Omh}odZK)?7wQSl"4o04=EixTF+V[""w~iNbM9ZL+.b*_CxUmFk B#Fu[*?MZZH@IkN:!"\w%I_zt>[$nm7nQosZ<3eu; B:$Q_:p!',P.c0-_Cy[dz4oIpw0ESA^D*1Lw= L&i*6&( User-Agent: Gnus/5.13001 (=?iso-2022-jp?B?GyRCPz8bKEI=?= Gnus v0.10) Emacs/24.3.50 (i686-pc-cygwin) Cancel-Lock: sha1:GVojZ2ORJp4mHqrMVKbFbHJSJxY= MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-OutGoing-Spam-Status: No, score= X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - hampton.hostforweb.net X-AntiAbuse: Original Domain - debbugs.gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - jpl.org X-Get-Message-Sender-Via: hampton.hostforweb.net: acl_c_authenticated_local_user: yamaoka X-Source: X-Source-Args: X-Source-Dir: X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 16828 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 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 (/) Achim Gratz wrote: > Eli Zaretskii writes: >> I don't think the time this takes is spend _looking_ for a font, I >> think it's spend loading a font. But someone will have to trace and >> profile this, and then come up with an analysis. > Like Stephen I am fairly certain that most of the time is indeed spent > looking for a suitable font, based on the disk noises that indicate > seeking through many directories. Especially on Cygwin, it's very annoying when edebugging. Displaying a character for the number of a point or a result of a calculation is useless. I use: (if (eq system-type 'cygwin) (defadvice eval-expression-print-format (around dont-try-to-convert-char-to-string-when-edebugging (value) activate) "Don't try to convert char to string when edebugging." (if (and (boundp 'edebug-active) (eval 'edebug-active)) (if (and (integerp value) (or (eq standard-output t) (zerop (prefix-numeric-value current-prefix-arg)))) (format " (#o%o, #x%x)" value value)) ad-do-it))) From debbugs-submit-bounces@debbugs.gnu.org Wed Feb 26 05:16:28 2014 Received: (at 16828) by debbugs.gnu.org; 26 Feb 2014 10:16:28 +0000 Received: from localhost ([127.0.0.1]:40396 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WIbXP-0007DC-DJ for submit@debbugs.gnu.org; Wed, 26 Feb 2014 05:16:28 -0500 Received: from mout.gmx.net ([212.227.17.20]:63031) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WIbXN-0007D3-1m for 16828@debbugs.gnu.org; Wed, 26 Feb 2014 05:16:25 -0500 Received: from [62.47.38.172] ([62.47.38.172]) by mail.gmx.com (mrgmx001) with ESMTPSA (Nemesis) id 0LyEJp-1XL6J82yGr-015caJ for <16828@debbugs.gnu.org>; Wed, 26 Feb 2014 11:16:23 +0100 Message-ID: <530DBEEE.8060805@gmx.at> Date: Wed, 26 Feb 2014 11:16:14 +0100 From: martin rudalics MIME-Version: 1.0 To: Katsumi Yamaoka Subject: Re: bug#16828: 24.3.50; eval-expression, character representation of integer results time-consuming References: <83mwhk4v48.fsf@gnu.org> <83txbr2sye.fsf@gnu.org> <87zjljf086.fsf@rosalinde.fritz.box> <83a9di3lt1.fsf@gnu.org> <877g8mb3lh.fsf@Rainer.invalid> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:sKdg8HBiDo7Kz8cSswG7sQ5azXGLPhHB/1clkdsRBoH3GyM01dN P78cTJU8q9iVKrj5pjjjbKx4O5pPvdZrihJleBOyhVGEv3Y8oV158ysDv6PfXQswQzrniec PkUjgPH2REl1GJ6X5vOZbvFRZEOvVpp9oElXNLHYoprDT9Ft68jSS/ITlmLPfZ1ZIxDf5G0 1R348kpt8LIi6z1geOIMg== X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 16828 Cc: 16828@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 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 (/) > Especially on Cygwin, it's very annoying when edebugging. Displaying > a character for the number of a point or a result of a calculation is > useless. The most annoying aspect here is that it very often finds a character with a superscript and increases the height of my echo area. Think of how valuable this is when debugging code resizing the echo area ;-) martin From debbugs-submit-bounces@debbugs.gnu.org Thu Jun 30 23:45:42 2016 Received: (at control) by debbugs.gnu.org; 1 Jul 2016 03:45:42 +0000 Received: from localhost ([127.0.0.1]:33026 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bIpOg-0007ob-HK for submit@debbugs.gnu.org; Thu, 30 Jun 2016 23:45:42 -0400 Received: from mail-oi0-f47.google.com ([209.85.218.47]:34424) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bIpOe-0007iV-Qc for control@debbugs.gnu.org; Thu, 30 Jun 2016 23:45:41 -0400 Received: by mail-oi0-f47.google.com with SMTP id s66so94504232oif.1 for ; Thu, 30 Jun 2016 20:45:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:from:date:message-id:subject:to; bh=5zSM/qCZLjvwR/hkOSvtCwtuWkHVckndOBO8IPs7nnM=; b=d2SKOZzJMhU9jcPG7zezoVJqUDsRY7hjjjVJv16CcnP9M9iSAF11E+cHBPeALNish1 CBqkXtpafuMDhJGBBCewgNpk2YaEXL3bJg8cdW3Igw8BdrdU6rVZXHKH3OCe4FVKD2IK inCchyzn9w5Njr20jJOmyrvixe/kbV0M3e6CmtAIJXuapJK98m5Zpi66QM/+HiHl/vOG eSzhG2tnAyk2pao73UqdTKdApLm9N9gt6MAAKnQFvZSccAXPb2oh9scO2Vbzom0QVuhG ze7dSxuG8uokEkjxOR8tXZqBGT9bzQR0L1LFpi+aqKxtFl6C4Wh2xZdlmzkZZBqToEsQ IXhg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:from:date:message-id:subject :to; bh=5zSM/qCZLjvwR/hkOSvtCwtuWkHVckndOBO8IPs7nnM=; b=N+vqNUGIiNukEt0Ais3A5UFEHTbsunlUqsozRT+gE4/6JvN5A6g41HF4V7bILSFcep WUECTj10ePFhOjcCiVIxSYdHjkvDpX4M9aBVmlwoRZWq3OLKOfFKxC0FJx6B8F+J4pmc LLv4kXn7+2Ny+KHilOoiyONVSeAIdGfdFBnhnpeNt/FpSRsRH0rQ7O2zNJFsbp5T/ZGS 6hBF1xiGssH8nE7t88OUSK2Ln4R7RD0AwhlW6a5+f1MIlYJLGXFDqiGcjoY+S8JCbTwL oTjTDzv9/xZv2oLXzEMI/zCcd2Jyj2JEzzJrRhukJ8b38ILs75BI4nz/yXa8uDA3oak6 Lm4w== X-Gm-Message-State: ALyK8tL3FPfgW8w1FO34VqtmAHP4uKGN9mBRTblPyEjCDcldx5F3UkG4dncyds/YdSalxcwJMadzEQ+MbDwKBQ== X-Received: by 10.202.5.193 with SMTP id 184mr10751655oif.143.1467344735151; Thu, 30 Jun 2016 20:45:35 -0700 (PDT) MIME-Version: 1.0 Received: by 10.157.52.238 with HTTP; Thu, 30 Jun 2016 20:45:34 -0700 (PDT) From: Noam Postavsky Date: Thu, 30 Jun 2016 23:45:34 -0400 X-Google-Sender-Auth: 50eM3ukSRItEs_UrIK9SZ_u24YE Message-ID: Subject: merge bugs To: GNU bug tracker automated control server Content-Type: text/plain; charset=UTF-8 X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: control 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 (/) # eval-expression numeric -> unicode char slow merge 16828 19023 # osx libgnutls fail merge 22929 23225 quit From debbugs-submit-bounces@debbugs.gnu.org Sat Jul 09 19:59:44 2016 Received: (at control) by debbugs.gnu.org; 9 Jul 2016 23:59:44 +0000 Received: from localhost ([127.0.0.1]:44477 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bM29w-0002oV-Dz for submit@debbugs.gnu.org; Sat, 09 Jul 2016 19:59:44 -0400 Received: from mail-it0-f51.google.com ([209.85.214.51]:34887) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bM29u-0002oE-OH; Sat, 09 Jul 2016 19:59:43 -0400 Received: by mail-it0-f51.google.com with SMTP id u186so35765499ita.0; Sat, 09 Jul 2016 16:59:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=sg+Z8r4I3tk2CdvHNX5ofQIx2JNXZtLA6zZVG1v6MkI=; b=Se7RT1ogFvGusgCB4rfqieVrh0dTh7Oujzo8MGK5E4VJg9jyfbtM3zxCdPPB2vDpzn 6x1nF69TZo/5ISA1lOH9uxYigTtirZv9Cw1Sfze/Mg6Ybs0rCynNTMW1AKgIEUPlJ0nv qHvkDx8LcWITdtfyNWaiJgIZw64UEiupCZ3NGmibm1+8obuOXt5Pg1ZAi90zY4eMyW2i WnSQ9hVHgfuTfdWDvoh6NnVhsSZ21PSCDPrPOkTHcZjxMwfGL21h/cXnVvJIpIqGNdi7 5limOzVtqrQ4d8wylUaGa7862im/exKKoUzu8eyDc4kjjcjKxL5QixmN8dPeoMiwVNn5 Ac2g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:from:to:cc:subject:references:date :in-reply-to:message-id:user-agent:mime-version; bh=sg+Z8r4I3tk2CdvHNX5ofQIx2JNXZtLA6zZVG1v6MkI=; b=SY3//3WmoB1MhrPfmhQTXdHjEyuDk2StoCW3wJo2EztM3puaK9zj0jMz2Ll4cA/ZFA iHOQQq8+FVndKm6orNvnj2WUqoKBcUtcb/g8jtbSZ2PKgD9yucEjh39/zB/fK36Bd0nr UwgTx0JWFxyrIWoI2bSYq19sm7vBscXGrHK/BXBXt4ybJGTjgpJpQFEOt++kyYqRqk7O LHxp+g9WCBlAQcNJMATRZk2zbiOtl5Fv37lDhqO7cMzPCTC8JHFGNLMUoZCn5AzxhYAx h7XfsrmgmHQoK+l7TLrAL19O8b+DhDBfu/ExUft7c40ir3rimed7yE3nQH9+kgUGQZK1 zrow== X-Gm-Message-State: ALyK8tIFT82s4OxnnM+yN24Cpk3JlnxOZJBuDAYTa2YaQpB+WZon+c2KWTHwuZTVQnP9KA== X-Received: by 10.36.204.198 with SMTP id x189mr4530637itf.52.1468108777100; Sat, 09 Jul 2016 16:59:37 -0700 (PDT) Received: from zony (206-188-64-44.cpe.distributel.net. [206.188.64.44]) by smtp.googlemail.com with ESMTPSA id e127sm7442428ith.1.2016.07.09.16.59.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 09 Jul 2016 16:59:36 -0700 (PDT) From: npostavs@users.sourceforge.net To: Stephen Berman Subject: Re: bug#23930: 25.0.95; "M-: 3072 RET" very slow to echo "3072 (#o6000, #xc00)" References: <87shvi2yiv.fsf@gmx.net> Date: Sat, 09 Jul 2016 19:59:35 -0400 In-Reply-To: <87shvi2yiv.fsf@gmx.net> (Stephen Berman's message of "Sun, 10 Jul 2016 01:16:08 +0200") Message-ID: <87r3b2gy6w.fsf@users.sourceforge.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.93 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: control Cc: Richard Copley , 23930@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 (/) forcemerge 23930 16828 quit Stephen Berman writes: > On Sat, 9 Jul 2016 17:37:23 -0400 Noam Postavsky wrote: > >> On Sat, Jul 9, 2016 at 5:32 PM, Richard Copley wrote: >>> Recipe from 'emacs -Q': >>> M-: 3072 RET >>> >>> This has the result of echoing "3072 (#o6000, #xc00)", but there's a >>> pause of around 8 seconds before the result is echoed. The long wait >>> is the bug I'm reporting. >> >> Maybe a dup of http://debbugs.gnu.org/cgi/bugreport.cgi?bug=21131 > > And of bug#16828. Hah, which I must have looked at before, because I merged it with #19023. From debbugs-submit-bounces@debbugs.gnu.org Sat Mar 25 23:44:10 2017 Received: (at 16828) by debbugs.gnu.org; 26 Mar 2017 03:44:10 +0000 Received: from localhost ([127.0.0.1]:44873 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1crz69-0000NT-TD for submit@debbugs.gnu.org; Sat, 25 Mar 2017 23:44:10 -0400 Received: from mail-it0-f54.google.com ([209.85.214.54]:38520) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1crz66-0000Mg-51; Sat, 25 Mar 2017 23:44:06 -0400 Received: by mail-it0-f54.google.com with SMTP id y18so23667899itc.1; Sat, 25 Mar 2017 20:44:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=f6E9rYmku5k1M2yZGuMkWdCYBOUaS87V9I2At4m+hJM=; b=adB+wWGNHY0in5JLgN+7AbV5+zbOjk8SQx0vYkDw8ih8Job+EwuDRwsNFLFt4s/jyj FiuVh+FGmX9Ew7GqiQkXwKEgzv2FrDBXkNjEbfzKc54sHf7qGVKHxIUqhiD2p7LAAcZ9 gEyM0SApKW4wJJM+9JLh9OL8H0SPUPVepi2rEqmgAMakZYsNlj9cMia767DomlhtIahI hmxt4rexVEhHwaJ59UvuDa+ZtoO2p+F7YYHVlNFkTc4psDxkxFpnrcMmC+FjLqBEfZj1 Vb/8SxwFIzfnKRmschq6aXca8ntVViVzua1gSbCjP4UAGXyaW7vGSgEoeZ78+fFZE9eJ Kb9A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:references:date :in-reply-to:message-id:user-agent:mime-version; bh=f6E9rYmku5k1M2yZGuMkWdCYBOUaS87V9I2At4m+hJM=; b=nppY2/m/MOVTuaoPTbh1BG2f/ri1sJRrm/iuxA0YMVAw3kGNK9+tR2W04NphtPX3Hd vqGEmnh0vx40EBmBS1Pwqs4DyhkX4N2Kt/sXAur5X/g4MBchyIHQs3npawEjBGCpxe5C gG8TcKk1pjKAJLLcoKD4+7s0DkcA9lP4XHTSYuNxfo012OA7QOOI8fEDRy3rjIYIckim K3VCNe/0oYcNqfevbZg9aPJopoTLd9btzve7Zwhr4dbBNtIK9VpFFa3851k/qncvBJza AMULXwrZjcOIHV2pqG7aQKOvoCgb46tSyNq9oYDjvKeubUEgDxLasgOjcaC62AXMN6bi 5mPg== X-Gm-Message-State: AFeK/H1ielv9RPqgIMPAUbJ4h8UqdZts4dx/yNNdvOrNSObmwdUow50ACKZrYgHwayu+ug== X-Received: by 10.36.185.87 with SMTP id k23mr559824iti.12.1490499840568; Sat, 25 Mar 2017 20:44:00 -0700 (PDT) Received: from zony ([45.2.7.65]) by smtp.googlemail.com with ESMTPSA id f196sm2081298itc.2.2017.03.25.20.43.59 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 25 Mar 2017 20:43:59 -0700 (PDT) From: npostavs@users.sourceforge.net To: martin rudalics Subject: Re: bug#16828: 24.3.50; eval-expression, character representation of integer results time-consuming References: <83mwhk4v48.fsf@gnu.org> <83txbr2sye.fsf@gnu.org> <87zjljf086.fsf@rosalinde.fritz.box> <83a9di3lt1.fsf@gnu.org> <877g8mb3lh.fsf@Rainer.invalid> <530DBEEE.8060805@gmx.at> Date: Sat, 25 Mar 2017 23:45:22 -0400 In-Reply-To: <530DBEEE.8060805@gmx.at> (martin rudalics's message of "Wed, 26 Feb 2014 11:16:14 +0100") Message-ID: <87zig84s6l.fsf@users.sourceforge.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 16828 Cc: Katsumi Yamaoka , 16828@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 (/) --=-=-= Content-Type: text/plain tags 16828 patch quit martin rudalics writes: >> Especially on Cygwin, it's very annoying when edebugging. Displaying >> a character for the number of a point or a result of a calculation is >> useless. > > The most annoying aspect here is that it very often finds a character > with a superscript and increases the height of my echo area. Think of > how valuable this is when debugging code resizing the echo area ;-) I wonder how it could take so long to fix this silly thing. --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=v1-0001-Limit-integers-printed-as-characters-Bug-16828.patch Content-Description: patch >From 301202a7963ee377bf0f51f703e0282782c7a6c1 Mon Sep 17 00:00:00 2001 From: Noam Postavsky Date: Sat, 25 Mar 2017 23:31:11 -0400 Subject: [PATCH v1] Limit integers printed as characters (Bug#16828) * lisp/simple.el (eval-expression-print-maximum-character): New variable. (eval-expression-print-format): Only display value as character if it's equal or less than `eval-expression-print-maximum-character'. * doc/emacs/building.texi (Lisp Eval): Document it. * etc/NEWS: Announce it. --- doc/emacs/building.texi | 6 +++++- etc/NEWS | 4 ++++ lisp/simple.el | 14 +++++++++++--- 3 files changed, 20 insertions(+), 4 deletions(-) diff --git a/doc/emacs/building.texi b/doc/emacs/building.texi index ba8eae0759..2ee08e2505 100644 --- a/doc/emacs/building.texi +++ b/doc/emacs/building.texi @@ -1485,7 +1485,8 @@ Lisp Eval Emacs Lisp expression preceding point in the buffer, and displays the value in the echo area. When the result of an evaluation is an integer, it is displayed together with the value in other formats -(octal, hexadecimal, and character). +(octal, hexadecimal, and character if +@code{eval-expression-print-maximum-character} allows it). If @kbd{M-:} or @kbd{C-x C-e} is given a prefix argument, it inserts the value into the current buffer at point, rather than displaying it @@ -1524,6 +1525,7 @@ Lisp Eval @vindex eval-expression-print-level @vindex eval-expression-print-length +@vindex eval-expression-print-maximum-character @vindex eval-expression-debug-on-error The options @code{eval-expression-print-level} and @code{eval-expression-print-length} control the maximum depth and @@ -1533,6 +1535,8 @@ Lisp Eval printed in full. @code{eval-expression-debug-on-error} controls whether evaluation errors invoke the debugger when these commands are used; its default is @code{t}. +@code{eval-expression-print-maximum-character} prevents large integers +from being displayed as characters. @node Lisp Interaction @section Lisp Interaction Buffers diff --git a/etc/NEWS b/etc/NEWS index 62d06f3561..c09cc390bb 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -334,6 +334,10 @@ always restricting the margin to a quarter of the window. ** Emacsclient has a new option -u/--suppress-output. The option suppresses display of return values from the server process. ++++ +** The new variable 'eval-expression-print-maximum-character' prevents +large integers from being displayed as characters. + * Editing Changes in Emacs 26.1 diff --git a/lisp/simple.el b/lisp/simple.el index 681cf83807..599c7ebf30 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -1450,6 +1450,13 @@ eval-expression-debug-on-error :type 'boolean :version "21.1") +(defcustom eval-expression-print-maximum-character 127 + "The largest integer that will be displayed as a character. +This affects printing by `eval-expression-print-format'." + :group 'lisp + :type 'integer + :version "26.1") + (defun eval-expression-print-format (value) "If VALUE in an integer, return a specially formatted string. This string will typically look like \" (#o1, #x1, ?\\C-a)\". @@ -1460,9 +1467,10 @@ eval-expression-print-format (or (eq standard-output t) (zerop (prefix-numeric-value current-prefix-arg)))) (let ((char-string - (if (and (characterp value) - (char-displayable-p value)) - (prin1-char value)))) + (and (characterp value) + (<= value eval-expression-print-maximum-character) + (char-displayable-p value) + (prin1-char value)))) (if char-string (format " (#o%o, #x%x, %s)" value value char-string) (format " (#o%o, #x%x)" value value))))) -- 2.11.1 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Sun Mar 26 10:13:48 2017 Received: (at 16828) by debbugs.gnu.org; 26 Mar 2017 14:13:48 +0000 Received: from localhost ([127.0.0.1]:46009 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cs8vU-00055J-3l for submit@debbugs.gnu.org; Sun, 26 Mar 2017 10:13:48 -0400 Received: from eggs.gnu.org ([208.118.235.92]:59111) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cs8vT-000558-Dz for 16828@debbugs.gnu.org; Sun, 26 Mar 2017 10:13:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cs8vK-0002xH-B4 for 16828@debbugs.gnu.org; Sun, 26 Mar 2017 10:13:42 -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,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:39099) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cs8vK-0002x7-6x; Sun, 26 Mar 2017 10:13:38 -0400 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:2681 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1cs8vJ-0002un-Be; Sun, 26 Mar 2017 10:13:37 -0400 Date: Sun, 26 Mar 2017 17:13:35 +0300 Message-Id: <83wpbc9ldc.fsf@gnu.org> From: Eli Zaretskii To: npostavs@users.sourceforge.net In-reply-to: <87zig84s6l.fsf@users.sourceforge.net> (npostavs@users.sourceforge.net) Subject: Re: bug#16828: 24.3.50; eval-expression, character representation of integer results time-consuming References: <83mwhk4v48.fsf@gnu.org> <83txbr2sye.fsf@gnu.org> <87zjljf086.fsf@rosalinde.fritz.box> <83a9di3lt1.fsf@gnu.org> <877g8mb3lh.fsf@Rainer.invalid> <530DBEEE.8060805@gmx.at> <87zig84s6l.fsf@users.sourceforge.net> 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.0 (-----) X-Debbugs-Envelope-To: 16828 Cc: rudalics@gmx.at, yamaoka@jpl.org, 16828@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.0 (-----) > From: npostavs@users.sourceforge.net > Date: Sat, 25 Mar 2017 23:45:22 -0400 > Cc: Katsumi Yamaoka , 16828@debbugs.gnu.org > > martin rudalics writes: > > >> Especially on Cygwin, it's very annoying when edebugging. Displaying > >> a character for the number of a point or a result of a calculation is > >> useless. > > > > The most annoying aspect here is that it very often finds a character > > with a superscript and increases the height of my echo area. Think of > > how valuable this is when debugging code resizing the echo area ;-) > > I wonder how it could take so long to fix this silly thing. It isn't silly IME, I actually use this feature. So, under this proposal, is there any way to get the character for a single invocation of M-:, without setting the option, if I only need that sometimes? Should there be such a way? Thanks. From debbugs-submit-bounces@debbugs.gnu.org Sun Mar 26 10:19:57 2017 Received: (at 16828) by debbugs.gnu.org; 26 Mar 2017 14:19:58 +0000 Received: from localhost ([127.0.0.1]:46028 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cs91R-0005Fp-OA for submit@debbugs.gnu.org; Sun, 26 Mar 2017 10:19:57 -0400 Received: from mail-oi0-f54.google.com ([209.85.218.54]:34460) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cs91Q-0005Fb-PY for 16828@debbugs.gnu.org; Sun, 26 Mar 2017 10:19:57 -0400 Received: by mail-oi0-f54.google.com with SMTP id o67so2248346oib.1 for <16828@debbugs.gnu.org>; Sun, 26 Mar 2017 07:19:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=Gh6MUWIUDe6RCq8qPIRoGHeETEj3ocUiOtAZFApS6b0=; b=JZSKep6TZeSpi2zC3/THeySv9C6EReYWHG0rSYTfULSkEXM/M+qTxy+6DMi/lXGbJZ 42dN3an8HgZkmdf8ZkWm+BEk/zSgnWm7W4Hn8RnhktRZI9qSA4aWxi2m+o45ixA/YEbi jR9rjCyP3MXgg1tuwaGh7ae+lhuL0+Prdq/D1JQRhkWTym+Gmhknd0gVaC4rr2MS73i1 LQjN1mBS5QbBp85Z7GuRz5NWdeU8AbsSJ3Bax6DXcmSS6ASY+/6AiKYtqpZc3NIjpF1A 9q3MPZIq5CZETiwttg0VI0cum2jJEJLulx3UBZ/PrYi/jjRqclr/nGEwGS/o/ifFb+b+ Hl9Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=Gh6MUWIUDe6RCq8qPIRoGHeETEj3ocUiOtAZFApS6b0=; b=BEZvGWZ4O6uuxkbD3LGaNiioazHFBPKeqY1D3yjI/JHRCYL03eA+aQ+41pF3thnIax 1nVa4TI737jPIHHZKW1iyiiydnfSRRcfEKLgbtiC8V1P1nHT7As9oSV7LiwaCoFhVmcK Lgd+X6Yvqxjr/ib4NwACKeGHpjnih9RaZmMD8j7GQasL3V59q+48Blk1oIJaTZzR4qGR F8a1Iz+t62YPvu+In8hJZvx2QrY3CA3maQJk7p63dGZYsRAM8H2sPIgTfZ51IHFZsiTX QWbMSeBQGGa/iMZpbip7V40YsBrZQRyJWjdWCD/oATZbCsX/k6HKlE3xQHklLY2reFct 9vcw== X-Gm-Message-State: AFeK/H3afa1q3/hUN98jzkHpet1DUM5VrT4uBnnpbuV1ec1grk8q0EPNzVuANsHq9pa1uRPNgbBudCMjiJxweg== X-Received: by 10.202.89.139 with SMTP id n133mr8929934oib.70.1490537991120; Sun, 26 Mar 2017 07:19:51 -0700 (PDT) MIME-Version: 1.0 Received: by 10.157.80.172 with HTTP; Sun, 26 Mar 2017 07:19:50 -0700 (PDT) In-Reply-To: <83wpbc9ldc.fsf@gnu.org> References: <83mwhk4v48.fsf@gnu.org> <83txbr2sye.fsf@gnu.org> <87zjljf086.fsf@rosalinde.fritz.box> <83a9di3lt1.fsf@gnu.org> <877g8mb3lh.fsf@Rainer.invalid> <530DBEEE.8060805@gmx.at> <87zig84s6l.fsf@users.sourceforge.net> <83wpbc9ldc.fsf@gnu.org> From: Noam Postavsky Date: Sun, 26 Mar 2017 10:19:50 -0400 X-Google-Sender-Auth: W25xrerwS6f3W5-AXNfyO9-XnGI Message-ID: Subject: Re: bug#16828: 24.3.50; eval-expression, character representation of integer results time-consuming To: Eli Zaretskii Content-Type: text/plain; charset=UTF-8 X-Spam-Score: 0.7 (/) X-Debbugs-Envelope-To: 16828 Cc: Katsumi Yamaoka , 16828@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 Sun, Mar 26, 2017 at 10:13 AM, Eli Zaretskii wrote: > > So, under this proposal, is there any way to get the character for a > single invocation of M-:, without setting the option, if I only need > that sometimes? Should there be such a way? Isn't M-: (prin1-char value) sufficient? From debbugs-submit-bounces@debbugs.gnu.org Sun Mar 26 10:38:11 2017 Received: (at 16828) by debbugs.gnu.org; 26 Mar 2017 14:38:11 +0000 Received: from localhost ([127.0.0.1]:46043 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cs9J5-0007Tc-0M for submit@debbugs.gnu.org; Sun, 26 Mar 2017 10:38:11 -0400 Received: from eggs.gnu.org ([208.118.235.92]:37262) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cs9J3-0007TN-6l for 16828@debbugs.gnu.org; Sun, 26 Mar 2017 10:38:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cs9Iv-000535-0p for 16828@debbugs.gnu.org; Sun, 26 Mar 2017 10:38:04 -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.0 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]:39431) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cs9Iu-000531-Td; Sun, 26 Mar 2017 10:38:00 -0400 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:2715 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1cs9Iu-0000qH-6V; Sun, 26 Mar 2017 10:38:00 -0400 Date: Sun, 26 Mar 2017 17:37:58 +0300 Message-Id: <83lgrs9k8p.fsf@gnu.org> From: Eli Zaretskii To: Noam Postavsky In-reply-to: (message from Noam Postavsky on Sun, 26 Mar 2017 10:19:50 -0400) Subject: Re: bug#16828: 24.3.50; eval-expression, character representation of integer results time-consuming References: <83mwhk4v48.fsf@gnu.org> <83txbr2sye.fsf@gnu.org> <87zjljf086.fsf@rosalinde.fritz.box> <83a9di3lt1.fsf@gnu.org> <877g8mb3lh.fsf@Rainer.invalid> <530DBEEE.8060805@gmx.at> <87zig84s6l.fsf@users.sourceforge.net> <83wpbc9ldc.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.0 (-----) X-Debbugs-Envelope-To: 16828 Cc: yamaoka@jpl.org, 16828@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.0 (-----) > From: Noam Postavsky > Date: Sun, 26 Mar 2017 10:19:50 -0400 > Cc: Katsumi Yamaoka , 16828@debbugs.gnu.org > > On Sun, Mar 26, 2017 at 10:13 AM, Eli Zaretskii wrote: > > > > So, under this proposal, is there any way to get the character for a > > single invocation of M-:, without setting the option, if I only need > > that sometimes? Should there be such a way? > > Isn't M-: (prin1-char value) sufficient? No, not after years of using "M-: #xNNNN RET". From debbugs-submit-bounces@debbugs.gnu.org Sun Mar 26 10:54:31 2017 Received: (at 16828) by debbugs.gnu.org; 26 Mar 2017 14:54:31 +0000 Received: from localhost ([127.0.0.1]:46051 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cs9Yt-0007sh-IS for submit@debbugs.gnu.org; Sun, 26 Mar 2017 10:54:31 -0400 Received: from mail-it0-f46.google.com ([209.85.214.46]:37784) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cs9Yr-0007sO-Sd for 16828@debbugs.gnu.org; Sun, 26 Mar 2017 10:54:30 -0400 Received: by mail-it0-f46.google.com with SMTP id 190so29761866itm.0 for <16828@debbugs.gnu.org>; Sun, 26 Mar 2017 07:54:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=XKu7CGuTfNGoeaO3hyOAiIptpUxdn/x/SAofDtpMs4g=; b=s/SQ6CIfAoWUQ+sajZqUfrNVeiFYwBZHy8c9Wywa4fITLuDUsvblPXNtB7zqfsFrbx oR+MPTYLS30Mjiww5MP0BCuUXNgGPM5K0IAHfkQ5eIvZOZQ/pXMRkqDyy1VhH1CNVomg NTinlLTskTckBgWNwENcICpO07ETJMssLD8X4dRgoSoR0RTey8w8s1NKKnnGQkMQzM7w 5fMHdDzHMPL2bEGGG9b0yhf7AuwcFWCG+SE+ev+eZZoFv90HqmZwd4WgwMHYW0/QCELj NelrUt70y6Npv4Gxsn8KkObZlJhbSZ6rXzJP9dqcWtT54CNEb6FLJBEzY4qwbb8/p16F yEMQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:references:date :in-reply-to:message-id:user-agent:mime-version; bh=XKu7CGuTfNGoeaO3hyOAiIptpUxdn/x/SAofDtpMs4g=; b=dAA20Wi57PcCqRNj9oumH4/TgZ2IYHfEbXy3LICRDYAITQnj50YvvyC0MOn3yn7dwQ L/inftX2so0yvuaxBWS3rDNAG2f4d5n/F3Y4Qv6/I6EBYIy6+RrMdGvLmuC3anAdV22d LnHnuu5+h5SutKKvFFvBXCLBERTUpOZVror2zU0W1usW/PEj4GW1708ToBb/++90GdpY kHpCr/CVU4iOnPyP8CChl9CbdaVvv/93S/s2QR2dHrlmv1c1q/TAuMvGElGBiGI7IPRv Dpirlkq1BHDg7GqmAbmqtoOl0BwK8tQKapLLHTDINs/20Rn0fNywbV+53u0pJOATtBrG OQMA== X-Gm-Message-State: AFeK/H3mkhmMhr3f/9jq86sR0gO5MGxfU/5s1PJdT5QqlbtRzGD0VB54IEH7HpKG/Z2PRg== X-Received: by 10.107.20.86 with SMTP id 83mr16849724iou.94.1490540064223; Sun, 26 Mar 2017 07:54:24 -0700 (PDT) Received: from zony ([45.2.7.65]) by smtp.googlemail.com with ESMTPSA id e134sm3984069itc.23.2017.03.26.07.54.23 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 26 Mar 2017 07:54:23 -0700 (PDT) From: npostavs@users.sourceforge.net To: Eli Zaretskii Subject: Re: bug#16828: 24.3.50; eval-expression, character representation of integer results time-consuming References: <83mwhk4v48.fsf@gnu.org> <83txbr2sye.fsf@gnu.org> <87zjljf086.fsf@rosalinde.fritz.box> <83a9di3lt1.fsf@gnu.org> <877g8mb3lh.fsf@Rainer.invalid> <530DBEEE.8060805@gmx.at> <87zig84s6l.fsf@users.sourceforge.net> <83wpbc9ldc.fsf@gnu.org> <83lgrs9k8p.fsf@gnu.org> Date: Sun, 26 Mar 2017 10:55:44 -0400 In-Reply-To: <83lgrs9k8p.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 26 Mar 2017 17:37:58 +0300") Message-ID: <87inmw3x5b.fsf@users.sourceforge.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.7 (/) X-Debbugs-Envelope-To: 16828 Cc: 16828@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 (/) Eli Zaretskii writes: >> > >> > So, under this proposal, is there any way to get the character for a >> > single invocation of M-:, without setting the option, if I only need >> > that sometimes? Should there be such a way? >> >> Isn't M-: (prin1-char value) sufficient? > > No, not after years of using "M-: #xNNNN RET". If you want to keep muscle memory, (setq eval-expression-print-maximum-character most-positive-fixnum) should give you back the old behaviour. If you only want this only some of the time, perhaps we should add a toggle-print-maximum-character command? From debbugs-submit-bounces@debbugs.gnu.org Sun Mar 26 11:23:03 2017 Received: (at 16828) by debbugs.gnu.org; 26 Mar 2017 15:23:03 +0000 Received: from localhost ([127.0.0.1]:46063 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1csA0V-0000Bn-5k for submit@debbugs.gnu.org; Sun, 26 Mar 2017 11:23:03 -0400 Received: from eggs.gnu.org ([208.118.235.92]:45125) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1csA0T-0000B2-J3 for 16828@debbugs.gnu.org; Sun, 26 Mar 2017 11:23:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1csA0J-00031i-2l for 16828@debbugs.gnu.org; Sun, 26 Mar 2017 11:22:56 -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,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:40098) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1csA0J-00031Y-04; Sun, 26 Mar 2017 11:22:51 -0400 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:2857 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1csA0I-0006La-8e; Sun, 26 Mar 2017 11:22:50 -0400 Date: Sun, 26 Mar 2017 18:22:48 +0300 Message-Id: <83fui09i5z.fsf@gnu.org> From: Eli Zaretskii To: npostavs@users.sourceforge.net In-reply-to: <87inmw3x5b.fsf@users.sourceforge.net> (npostavs@users.sourceforge.net) Subject: Re: bug#16828: 24.3.50; eval-expression, character representation of integer results time-consuming References: <83mwhk4v48.fsf@gnu.org> <83txbr2sye.fsf@gnu.org> <87zjljf086.fsf@rosalinde.fritz.box> <83a9di3lt1.fsf@gnu.org> <877g8mb3lh.fsf@Rainer.invalid> <530DBEEE.8060805@gmx.at> <87zig84s6l.fsf@users.sourceforge.net> <83wpbc9ldc.fsf@gnu.org> <83lgrs9k8p.fsf@gnu.org> <87inmw3x5b.fsf@users.sourceforge.net> 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.0 (-----) X-Debbugs-Envelope-To: 16828 Cc: 16828@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.0 (-----) > From: npostavs@users.sourceforge.net > Cc: 16828@debbugs.gnu.org > Date: Sun, 26 Mar 2017 10:55:44 -0400 > > Eli Zaretskii writes: > > >> > > >> > So, under this proposal, is there any way to get the character for a > >> > single invocation of M-:, without setting the option, if I only need > >> > that sometimes? Should there be such a way? > >> > >> Isn't M-: (prin1-char value) sufficient? > > > > No, not after years of using "M-: #xNNNN RET". > > If you want to keep muscle memory, > > (setq eval-expression-print-maximum-character most-positive-fixnum) > > should give you back the old behaviour. If you only want this only some > of the time, perhaps we should add a toggle-print-maximum-character > command? What about a special value of prefix argument, like zero? If that's OK, it's more convenient than any of the above. From debbugs-submit-bounces@debbugs.gnu.org Sun Mar 26 13:38:39 2017 Received: (at 16828) by debbugs.gnu.org; 26 Mar 2017 17:38:39 +0000 Received: from localhost ([127.0.0.1]:46125 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1csC7i-0003Pc-VL for submit@debbugs.gnu.org; Sun, 26 Mar 2017 13:38:39 -0400 Received: from mail-it0-f46.google.com ([209.85.214.46]:36783) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1csC7h-0003PN-Bx for 16828@debbugs.gnu.org; Sun, 26 Mar 2017 13:38:38 -0400 Received: by mail-it0-f46.google.com with SMTP id w124so51119641itb.1 for <16828@debbugs.gnu.org>; Sun, 26 Mar 2017 10:38:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=ObwXK8iWpfEa4Qmnh11LT34Pf4BeaRykjObxuxLQ+94=; b=hkSQAWZpV60iXhk9cFaWW1kY0BK7R82rTQNwfpXDnLeOCfZEj7O7mtti3BHKsBsGZB e2gIfNlI6Gri55xtQxIn0tospgdMUZj/sjsnCn/yVMnRjAEp3iDbESXAIentVPyv6xmX R0mX2t+UpApN+l91AfhGWBXGaENHrsr0oH/r334r/chnzZ0yfxx/eddfd+rSgEWIR0OZ Rzdbzy1Qrun0PuFmb5jNfM6bP18h7H8nf3eprLvAuwxkCMcztMfKPj496OjKU0KvFwCx nwf8UGO1wSbkCGESTxjpK5yE0C7r9QE9HggjANQop3ePThsXb1G+9Pfb+OMMAYYwu3GH PFog== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:references:date :in-reply-to:message-id:user-agent:mime-version; bh=ObwXK8iWpfEa4Qmnh11LT34Pf4BeaRykjObxuxLQ+94=; b=qdd975It9Xm3f8GtNxbuk2VYfokTuN9jDb28RcawcE16rUKjPEVClbTUd05us/LQIc Kzd36wnRP1mYfoxATsWrWL/ww06jjH76tgb6HA564LSWjuRHEb7QlF2fU7QtfarhmL/i y9cJMfb7OS5gIZW0Lzf6CRjEqEnoG2wIFd+q/EEUzP0Ky5OivqQqraiAn4pkXO+pgGVM lAj/dRfsIBarpCt03F9ibktbVVoTq17h2M2V4pPSIit8P4hmESFMK+NtR7al0Fid3//U LwaMbh36gELP7vAkWMptXWYDzrqbdpgiQzaDFqEQK1re1EBPVrlevELMB/EmuA+vO02Y pSMw== X-Gm-Message-State: AFeK/H1WrrKJONKF73ph6L425NvzI8tmvSKsAktdrnu/oeYLjx6JGXwmLtZeUeP2x5u6iw== X-Received: by 10.36.34.212 with SMTP id o203mr6077077ito.103.1490549911774; Sun, 26 Mar 2017 10:38:31 -0700 (PDT) Received: from zony ([45.2.7.65]) by smtp.googlemail.com with ESMTPSA id r133sm4187601ith.9.2017.03.26.10.38.30 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 26 Mar 2017 10:38:31 -0700 (PDT) From: npostavs@users.sourceforge.net To: Eli Zaretskii Subject: Re: bug#16828: 24.3.50; eval-expression, character representation of integer results time-consuming References: <83mwhk4v48.fsf@gnu.org> <83txbr2sye.fsf@gnu.org> <87zjljf086.fsf@rosalinde.fritz.box> <83a9di3lt1.fsf@gnu.org> <877g8mb3lh.fsf@Rainer.invalid> <530DBEEE.8060805@gmx.at> <87zig84s6l.fsf@users.sourceforge.net> <83wpbc9ldc.fsf@gnu.org> <83lgrs9k8p.fsf@gnu.org> <87inmw3x5b.fsf@users.sourceforge.net> <83fui09i5z.fsf@gnu.org> Date: Sun, 26 Mar 2017 13:39:52 -0400 In-Reply-To: <83fui09i5z.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 26 Mar 2017 18:22:48 +0300") Message-ID: <87fui03pjr.fsf@users.sourceforge.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.7 (/) X-Debbugs-Envelope-To: 16828 Cc: 16828@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 (/) Eli Zaretskii writes: >> From: npostavs@users.sourceforge.net >> Cc: 16828@debbugs.gnu.org >> Date: Sun, 26 Mar 2017 10:55:44 -0400 >> >> Eli Zaretskii writes: >> >> >> > >> >> > So, under this proposal, is there any way to get the character for a >> >> > single invocation of M-:, without setting the option, if I only need >> >> > that sometimes? Should there be such a way? >> >> >> >> Isn't M-: (prin1-char value) sufficient? >> > >> > No, not after years of using "M-: #xNNNN RET". >> >> If you want to keep muscle memory, >> >> (setq eval-expression-print-maximum-character most-positive-fixnum) >> >> should give you back the old behaviour. If you only want this only some >> of the time, perhaps we should add a toggle-print-maximum-character >> command? > > What about a special value of prefix argument, like zero? If that's > OK, it's more convenient than any of the above. Sure, it's just a matter of deciding how to fit this in with the existing interpretation of the prefix argument. Right now, a non-nil prefix argument means to insert the result into the buffer. From debbugs-submit-bounces@debbugs.gnu.org Sun Mar 26 13:52:10 2017 Received: (at 16828) by debbugs.gnu.org; 26 Mar 2017 17:52:11 +0000 Received: from localhost ([127.0.0.1]:46139 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1csCKo-0003lF-LV for submit@debbugs.gnu.org; Sun, 26 Mar 2017 13:52:10 -0400 Received: from eggs.gnu.org ([208.118.235.92]:42622) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1csCKm-0003l3-QU for 16828@debbugs.gnu.org; Sun, 26 Mar 2017 13:52:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1csCKe-0001a5-Ap for 16828@debbugs.gnu.org; Sun, 26 Mar 2017 13:52:03 -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,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:41744) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1csCKe-0001Zw-8O; Sun, 26 Mar 2017 13:52:00 -0400 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:2957 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1csCKb-0006j7-Jg; Sun, 26 Mar 2017 13:52:00 -0400 Date: Sun, 26 Mar 2017 20:51:42 +0300 Message-Id: <834lyg9b9t.fsf@gnu.org> From: Eli Zaretskii To: npostavs@users.sourceforge.net In-reply-to: <87fui03pjr.fsf@users.sourceforge.net> (npostavs@users.sourceforge.net) Subject: Re: bug#16828: 24.3.50; eval-expression, character representation of integer results time-consuming References: <83mwhk4v48.fsf@gnu.org> <83txbr2sye.fsf@gnu.org> <87zjljf086.fsf@rosalinde.fritz.box> <83a9di3lt1.fsf@gnu.org> <877g8mb3lh.fsf@Rainer.invalid> <530DBEEE.8060805@gmx.at> <87zig84s6l.fsf@users.sourceforge.net> <83wpbc9ldc.fsf@gnu.org> <83lgrs9k8p.fsf@gnu.org> <87inmw3x5b.fsf@users.sourceforge.net> <83fui09i5z.fsf@gnu.org> <87fui03pjr.fsf@users.sourceforge.net> 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.0 (-----) X-Debbugs-Envelope-To: 16828 Cc: 16828@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.0 (-----) > From: npostavs@users.sourceforge.net > Cc: 16828@debbugs.gnu.org > Date: Sun, 26 Mar 2017 13:39:52 -0400 > > > What about a special value of prefix argument, like zero? If that's > > OK, it's more convenient than any of the above. > > Sure, it's just a matter of deciding how to fit this in with the > existing interpretation of the prefix argument. Right now, a non-nil > prefix argument means to insert the result into the buffer. Yes, I propose that the current behavior wrt the argument will be left unchanged, except when the argument is zero, i.e. "C-u 0". From debbugs-submit-bounces@debbugs.gnu.org Sun Mar 26 14:15:40 2017 Received: (at 16828) by debbugs.gnu.org; 26 Mar 2017 18:15:40 +0000 Received: from localhost ([127.0.0.1]:46148 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1csChX-0004Id-Tm for submit@debbugs.gnu.org; Sun, 26 Mar 2017 14:15:40 -0400 Received: from mail-it0-f50.google.com ([209.85.214.50]:35540) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1csChV-0004IO-C7 for 16828@debbugs.gnu.org; Sun, 26 Mar 2017 14:15:37 -0400 Received: by mail-it0-f50.google.com with SMTP id y18so52160693itc.0 for <16828@debbugs.gnu.org>; Sun, 26 Mar 2017 11:15:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=Ajvs3fFdpRXyEr02RdX8UAH/buK4w/UjK4CBYmYNxfg=; b=IdnB4rsWZAXyH99b+6jqk656ZVouHqzlroG6hpmS8Lqpj2OTWWD4crUYwJPm8nJWu/ DddJHqzebjuFF0HaKIWlRzIHTICjgILZRsczl2zCTpOyNAEGFCouGuxt1vsDZVCSMc8v Zpy86a3JBrlrO6Xx4YgOW1CDAEDqZLrH7KOYX0NHTywJQ0aBIczuLzxliN1OcZtwmar6 ryuhwLBWzV9RuAbI+3jK++n52KhoOUWSoZEymMCQk04h96W2F7N+lzOQUbUDbNlrezOk klHS8U9ygnJKxNPIZWCRMA8K/7bsJxpn/PK2328c+2iRSroqnusDrlEuC6CDQTwiQLes WHKA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:references:date :in-reply-to:message-id:user-agent:mime-version; bh=Ajvs3fFdpRXyEr02RdX8UAH/buK4w/UjK4CBYmYNxfg=; b=mQuImnndnthd4wH1Y4yAR1tFbg/KUA5kWmGfdWn4mfWj6UHeEAFj/WujUc5zqlVuZk Hu5Mx4pRcAn81xtfXLXa5fA3il3DGgA827K1DuX6D5/TAgDAbS7ksFw4LE41MXizf+6r Zc0ZtWeuy/E+dX2SfydJcVOD1ggGXQgsXi6v/ZuCkPXbuTTAbb2wENBTz/2swCVB/4qw fBgDUcocmykpznwer3QtEL4S9SUxdNZqcywqOViRm9C4eHnrNvIUrpJlcd80faiKLBee U4AZZ9d9lsA7k7vL4eBR00JjyPwNLGVECLJYbIasdipmXjJHCnrgnFC1IP6OeZxOxheU kYtw== X-Gm-Message-State: AFeK/H01PDN15jgBi9TljOyfTLzPO7K6teHwyXZpP2yrFImmBpF9dVUgAbvDXb4JxT7lFQ== X-Received: by 10.36.16.202 with SMTP id 193mr6887961ity.52.1490552131749; Sun, 26 Mar 2017 11:15:31 -0700 (PDT) Received: from zony ([45.2.7.65]) by smtp.googlemail.com with ESMTPSA id 62sm2943619itl.1.2017.03.26.11.15.30 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 26 Mar 2017 11:15:31 -0700 (PDT) From: npostavs@users.sourceforge.net To: Eli Zaretskii Subject: Re: bug#16828: 24.3.50; eval-expression, character representation of integer results time-consuming References: <83mwhk4v48.fsf@gnu.org> <83txbr2sye.fsf@gnu.org> <87zjljf086.fsf@rosalinde.fritz.box> <83a9di3lt1.fsf@gnu.org> <877g8mb3lh.fsf@Rainer.invalid> <530DBEEE.8060805@gmx.at> <87zig84s6l.fsf@users.sourceforge.net> <83wpbc9ldc.fsf@gnu.org> <83lgrs9k8p.fsf@gnu.org> <87inmw3x5b.fsf@users.sourceforge.net> <83fui09i5z.fsf@gnu.org> <87fui03pjr.fsf@users.sourceforge.net> <834lyg9b9t.fsf@gnu.org> Date: Sun, 26 Mar 2017 14:16:52 -0400 In-Reply-To: <834lyg9b9t.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 26 Mar 2017 20:51:42 +0300") Message-ID: <87a88752ej.fsf@users.sourceforge.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 16828 Cc: 16828@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 (/) Eli Zaretskii writes: >> From: npostavs@users.sourceforge.net >> Cc: 16828@debbugs.gnu.org >> Date: Sun, 26 Mar 2017 13:39:52 -0400 >> >> > What about a special value of prefix argument, like zero? If that's >> > OK, it's more convenient than any of the above. >> >> Sure, it's just a matter of deciding how to fit this in with the >> existing interpretation of the prefix argument. Right now, a non-nil >> prefix argument means to insert the result into the buffer. > > Yes, I propose that the current behavior wrt the argument will be left > unchanged, except when the argument is zero, i.e. "C-u 0". Currently, zero also means no truncation, keeping that meaning seems important too. Perhaps a negative argument would be a better choice? Excerpt from current docstring: Optional argument INSERT-VALUE non-nil (interactively, with prefix argument) means insert the result into the current buffer instead of printing it in the echo area. Normally, this function truncates long output according to the value of the variables `eval-expression-print-length' and `eval-expression-print-level'. With a prefix argument of zero, however, there is no such truncation. From debbugs-submit-bounces@debbugs.gnu.org Sun Mar 26 14:41:02 2017 Received: (at 16828) by debbugs.gnu.org; 26 Mar 2017 18:41:02 +0000 Received: from localhost ([127.0.0.1]:46158 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1csD65-0004vB-PE for submit@debbugs.gnu.org; Sun, 26 Mar 2017 14:41:01 -0400 Received: from eggs.gnu.org ([208.118.235.92]:49901) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1csD63-0004uu-UY for 16828@debbugs.gnu.org; Sun, 26 Mar 2017 14:41:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1csD5w-00083N-Ti for 16828@debbugs.gnu.org; Sun, 26 Mar 2017 14:40:54 -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.0 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]:42175) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1csD5w-00083J-Pe; Sun, 26 Mar 2017 14:40:52 -0400 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:3015 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1csD5t-0007A7-V0; Sun, 26 Mar 2017 14:40:52 -0400 Date: Sun, 26 Mar 2017 21:40:38 +0300 Message-Id: <83y3vr9909.fsf@gnu.org> From: Eli Zaretskii To: npostavs@users.sourceforge.net In-reply-to: <87a88752ej.fsf@users.sourceforge.net> (npostavs@users.sourceforge.net) Subject: Re: bug#16828: 24.3.50; eval-expression, character representation of integer results time-consuming References: <83mwhk4v48.fsf@gnu.org> <83txbr2sye.fsf@gnu.org> <87zjljf086.fsf@rosalinde.fritz.box> <83a9di3lt1.fsf@gnu.org> <877g8mb3lh.fsf@Rainer.invalid> <530DBEEE.8060805@gmx.at> <87zig84s6l.fsf@users.sourceforge.net> <83wpbc9ldc.fsf@gnu.org> <83lgrs9k8p.fsf@gnu.org> <87inmw3x5b.fsf@users.sourceforge.net> <83fui09i5z.fsf@gnu.org> <87fui03pjr.fsf@users.sourceforge.net> <834lyg9b9t.fsf@gnu.org> <87a88752ej.fsf@users.sourceforge.net> 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.0 (-----) X-Debbugs-Envelope-To: 16828 Cc: 16828@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.0 (-----) > From: npostavs@users.sourceforge.net > Cc: 16828@debbugs.gnu.org > Date: Sun, 26 Mar 2017 14:16:52 -0400 > > > Yes, I propose that the current behavior wrt the argument will be left > > unchanged, except when the argument is zero, i.e. "C-u 0". > > Currently, zero also means no truncation, keeping that meaning seems > important too. Perhaps a negative argument would be a better choice? Yes, that'd be fine with me. Thanks. From debbugs-submit-bounces@debbugs.gnu.org Thu May 18 19:55:28 2017 Received: (at 16828) by debbugs.gnu.org; 18 May 2017 23:55:28 +0000 Received: from localhost ([127.0.0.1]:54110 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dBVGR-0004Kr-5v for submit@debbugs.gnu.org; Thu, 18 May 2017 19:55:28 -0400 Received: from mail-it0-f42.google.com ([209.85.214.42]:35081) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dBVGO-0004Kc-0p for 16828@debbugs.gnu.org; Thu, 18 May 2017 19:55:25 -0400 Received: by mail-it0-f42.google.com with SMTP id c15so109947274ith.0 for <16828@debbugs.gnu.org>; Thu, 18 May 2017 16:55:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=4pHKDX5coPzAQmyfiKozUnveuGeji2/zhj/+b7jIS58=; b=p9NpYWLnGqppfpIH5rIJBbcrDr8j8KtAvbav6OYpQ4cFlf7HKLbY5ihD7UdLgGg4S0 i04P6/GoW2HA225dDQdyzy0jHO8M06sPdidUVZdthie8Acj+41LReRFVQmpgTKMZQtcw qCrIl4tR1QcZ7RcSy4Qa86DibzucFJcF/DfHLywcX0yE5WHsl+2xyKtJaqUmXLc9/nZe soymNxvDw4Fkn5nS1+CSNL6d33s0b4fzWIDR83vq9re86QK1v2XDiFwY9m4RNTFJ96ro kKZYsYRZNT3mzi5w7Kws7mNH90KChvYOYCiXB5A6gOF+uZtkzR4hjMFxXHYSYIuw+nN7 Pilw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:references:date :in-reply-to:message-id:user-agent:mime-version; bh=4pHKDX5coPzAQmyfiKozUnveuGeji2/zhj/+b7jIS58=; b=P3k1nXpdY1nVQDJ60i7l1EFtDmPoxcnasclEIGbBuVfi3KDFxhnHBI57+jckvVtyd2 SzzKj+JbsPFMx302d/Iz6mHKfT2IyM828j3DSaig08FHgWw2FZfNWGDVb9McnwPar0Qp xjuRrMVP25Ew7Wv6kfwK36OEhqcIWym4ybB4/lnjnL4Hz8BnI3HWwkGlpBZZIz3PNG8d DlSAKqMDP5ncBZ83XvoKp6x7ZPrkg3ycyLAgOlDgTUOHHgd2bDQR6C3HxE0VLufo01+/ N7Xk4KnXlVLwKKLje7CCQBVt9eoTIbNj30sitr/iw6oV9Hsfgy9Dd0twsXntHID02jo9 WrZw== X-Gm-Message-State: AODbwcBBWkwgf78n4oZ7Kwvghr/+igcDAsZ5PUAfAhRvNtFBkeRGTVek 1NwTVdHT6e/Z+A== X-Received: by 10.36.172.105 with SMTP id m41mr4397234iti.110.1495151718296; Thu, 18 May 2017 16:55:18 -0700 (PDT) Received: from zony ([45.2.7.65]) by smtp.googlemail.com with ESMTPSA id f15sm3034103ioi.58.2017.05.18.16.55.16 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 18 May 2017 16:55:17 -0700 (PDT) From: npostavs@users.sourceforge.net To: Eli Zaretskii Subject: Re: bug#16828: 24.3.50; eval-expression, character representation of integer results time-consuming References: <83mwhk4v48.fsf@gnu.org> <83txbr2sye.fsf@gnu.org> <87zjljf086.fsf@rosalinde.fritz.box> <83a9di3lt1.fsf@gnu.org> <877g8mb3lh.fsf@Rainer.invalid> <530DBEEE.8060805@gmx.at> <87zig84s6l.fsf@users.sourceforge.net> <83wpbc9ldc.fsf@gnu.org> <83lgrs9k8p.fsf@gnu.org> <87inmw3x5b.fsf@users.sourceforge.net> <83fui09i5z.fsf@gnu.org> <87fui03pjr.fsf@users.sourceforge.net> <834lyg9b9t.fsf@gnu.org> <87a88752ej.fsf@users.sourceforge.net> <83y3vr9909.fsf@gnu.org> Date: Thu, 18 May 2017 19:56:53 -0400 In-Reply-To: <83y3vr9909.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 26 Mar 2017 21:40:38 +0300") Message-ID: <878tltiure.fsf@users.sourceforge.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: 0.2 (/) X-Debbugs-Envelope-To: 16828 Cc: 16828@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.2 (/) --=-=-= Content-Type: text/plain Eli Zaretskii writes: >> >> > Yes, I propose that the current behavior wrt the argument will be left >> > unchanged, except when the argument is zero, i.e. "C-u 0". >> >> Currently, zero also means no truncation, keeping that meaning seems >> important too. Perhaps a negative argument would be a better choice? > > Yes, that'd be fine with me. Thanks. I added `-' to echo in character format, and `-1' to print it to the buffer. I split the patch in 2 parts, the first just refactors the printing code, the 2nd adds the new behaviour. --=-=-= Content-Type: text/plain Content-Disposition: attachment; filename=v2-0001-Refactor-lisp-eval-result-printing.patch Content-Description: patch >From f5ebfc7e1d352e63794264cf971993c5c0d564b2 Mon Sep 17 00:00:00 2001 From: Noam Postavsky Date: Sun, 23 Apr 2017 22:21:42 -0400 Subject: [PATCH v2 1/2] Refactor lisp eval result printing * lisp/simple.el (eval-expression-print-format): Don't check `standard-output' or `current-prefix-arg'. (eval-expression-get-print-arguments): New function, centralizes decision about how to print results of `eval-expression' and `eval-last-sexp'. (eval-expression): * lisp/progmodes/elisp-mode.el (elisp--eval-last-sexp-print-value): Use it. --- lisp/progmodes/elisp-mode.el | 35 ++++++++++---------- lisp/simple.el | 58 +++++++++++++++++---------------- test/lisp/progmodes/elisp-mode-tests.el | 18 ++++++++++ test/lisp/simple-tests.el | 42 ++++++++++++++++++------ 4 files changed, 97 insertions(+), 56 deletions(-) diff --git a/lisp/progmodes/elisp-mode.el b/lisp/progmodes/elisp-mode.el index 53a0f66439..c2fdba47a0 100644 --- a/lisp/progmodes/elisp-mode.el +++ b/lisp/progmodes/elisp-mode.el @@ -1119,29 +1119,28 @@ elisp--eval-last-sexp output with no limit on the length and level of lists, and include additional formats for integers \(octal, hexadecimal, and character)." - (let ((standard-output (if eval-last-sexp-arg-internal (current-buffer) t))) + (pcase-let* + ((`(,insert-value ,no-truncate ,char-print) + (eval-expression-get-print-arguments eval-last-sexp-arg-internal))) ;; Setup the lexical environment if lexical-binding is enabled. (elisp--eval-last-sexp-print-value (eval (eval-sexp-add-defvars (elisp--preceding-sexp)) lexical-binding) - eval-last-sexp-arg-internal))) - -(defun elisp--eval-last-sexp-print-value (value &optional eval-last-sexp-arg-internal) - (let ((unabbreviated (let ((print-length nil) (print-level nil)) - (prin1-to-string value))) - (print-length (and (not (zerop (prefix-numeric-value - eval-last-sexp-arg-internal))) - eval-expression-print-length)) - (print-level (and (not (zerop (prefix-numeric-value - eval-last-sexp-arg-internal))) - eval-expression-print-level)) - (beg (point)) - end) + (if insert-value (current-buffer) t) no-truncate char-print))) + +(defun elisp--eval-last-sexp-print-value + (value output &optional no-truncate char-print) + (let* ((unabbreviated (let ((print-length nil) (print-level nil)) + (prin1-to-string value))) + (print-length (unless no-truncate eval-expression-print-length)) + (print-level (unless no-truncate eval-expression-print-level)) + (beg (point)) + end) (prog1 - (prin1 value) - (let ((str (eval-expression-print-format value))) - (if str (princ str))) + (prin1 value output) + (let ((str (and char-print (eval-expression-print-format value)))) + (if str (princ str output))) (setq end (point)) - (when (and (bufferp standard-output) + (when (and (bufferp output) (or (not (null print-length)) (not (null print-level))) (not (string= unabbreviated diff --git a/lisp/simple.el b/lisp/simple.el index 082406bdc4..68208118f1 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -1460,16 +1460,14 @@ eval-expression-print-format If VALUE is not an integer, nil is returned. This function is used by functions like `prin1' that display the result of expression evaluation." - (if (and (integerp value) - (or (eq standard-output t) - (zerop (prefix-numeric-value current-prefix-arg)))) - (let ((char-string - (if (and (characterp value) - (char-displayable-p value)) - (prin1-char value)))) - (if char-string - (format " (#o%o, #x%x, %s)" value value char-string) - (format " (#o%o, #x%x)" value value))))) + (when (integerp value) + (let ((char-string + (and (characterp value) + (char-displayable-p value) + (prin1-char value)))) + (if char-string + (format " (#o%o, #x%x, %s)" value value char-string) + (format " (#o%o, #x%x)" value value))))) (defvar eval-expression-minibuffer-setup-hook nil "Hook run by `eval-expression' when entering the minibuffer.") @@ -1488,9 +1486,21 @@ read--expression read-expression-map t 'read-expression-history)))) +(defun eval-expression-get-print-arguments (prefix-argument) + "Get arguments for commands that print an expression result. +Returns a list (INSERT-VALUE NO-TRUNCATE CHAR-PRINT) +based on PREFIX-ARG. This function determines the interpretation +of the prefix argument for `eval-expression' and +`eval-last-sexp'." + (let ((num (prefix-numeric-value prefix-argument))) + (list (not (memq prefix-argument '(nil))) + (= num 0) + (cond ((not (memq prefix-argument '(0 nil))) nil) + (t t))))) + ;; We define this, rather than making `eval' interactive, ;; for the sake of completion of names like eval-region, eval-buffer. -(defun eval-expression (exp &optional insert-value) +(defun eval-expression (exp &optional insert-value no-truncate char-print) "Evaluate EXP and print value in the echo area. When called interactively, read an Emacs Lisp expression and evaluate it. Value is also consed on to front of the variable `values'. @@ -1511,8 +1521,8 @@ eval-expression If `eval-expression-debug-on-error' is non-nil, which is the default, this command arranges for all errors to enter the debugger." (interactive - (list (read--expression "Eval: ") - current-prefix-arg)) + (cons (read--expression "Eval: ") + (eval-expression-get-print-arguments current-prefix-arg))) (if (null eval-expression-debug-on-error) (push (eval exp lexical-binding) values) @@ -1527,23 +1537,15 @@ eval-expression (unless (eq old-value new-value) (setq debug-on-error new-value)))) - (let ((print-length (and (not (zerop (prefix-numeric-value insert-value))) - eval-expression-print-length)) - (print-level (and (not (zerop (prefix-numeric-value insert-value))) - eval-expression-print-level)) + (let ((print-length (unless no-truncate eval-expression-print-length)) + (print-level (unless no-truncate eval-expression-print-level)) (deactivate-mark)) - (if insert-value - (with-no-warnings - (let ((standard-output (current-buffer))) - (prog1 - (prin1 (car values)) - (when (zerop (prefix-numeric-value insert-value)) - (let ((str (eval-expression-print-format (car values)))) - (if str (princ str))))))) + (let ((out (if insert-value (current-buffer) t))) (prog1 - (prin1 (car values) t) - (let ((str (eval-expression-print-format (car values)))) - (if str (princ str t))))))) + (prin1 (car values) out) + (let ((str (and char-print + (eval-expression-print-format (car values))))) + (when str (princ str out))))))) (defun edit-and-eval-command (prompt command) "Prompting with PROMPT, let user edit COMMAND and eval result. diff --git a/test/lisp/progmodes/elisp-mode-tests.el b/test/lisp/progmodes/elisp-mode-tests.el index 93c428b2d2..5edb590b1e 100644 --- a/test/lisp/progmodes/elisp-mode-tests.el +++ b/test/lisp/progmodes/elisp-mode-tests.el @@ -114,6 +114,24 @@ elisp--test-completions (should (member "backup-buffer" comps)) (should-not (member "backup-inhibited" comps))))) +;;; eval-last-sexp + +(ert-deftest eval-last-sexp-print-format-sym () + (with-temp-buffer + (let ((current-prefix-arg '(4))) + (erase-buffer) (insert "t") + (call-interactively #'eval-last-sexp) + (should (equal (buffer-string) "tt"))))) + +(ert-deftest eval-last-sexp-print-format-sym-echo () + ;; We can only check the echo area when running interactive. + (skip-unless (not noninteractive)) + (with-temp-buffer + (let ((current-prefix-arg nil)) + (erase-buffer) (insert "t") (message nil) + (call-interactively #'eval-last-sexp) + (should (equal (current-message) "t"))))) + ;;; xref (defun xref-elisp-test-descr-to-target (xref) diff --git a/test/lisp/simple-tests.el b/test/lisp/simple-tests.el index f4849c4b21..b74e28ccaf 100644 --- a/test/lisp/simple-tests.el +++ b/test/lisp/simple-tests.el @@ -20,6 +20,7 @@ ;;; Code: (require 'ert) +(eval-when-compile (require 'cl-lib)) (defmacro simple-test--dummy-buffer (&rest body) (declare (indent 0) @@ -35,6 +36,8 @@ simple-test--dummy-buffer (buffer-substring (point) (point-max)))))) + +;;; `transpose-sexps' (defmacro simple-test--transpositions (&rest body) (declare (indent 0) (debug t)) @@ -46,6 +49,13 @@ simple-test--transpositions (cons (buffer-substring (point-min) (point)) (buffer-substring (point) (point-max))))) +;;; Transposition with negative args (bug#20698, bug#21885) +(ert-deftest simple-transpose-subr () + (should (equal (simple-test--transpositions (transpose-sexps -1)) + '("(s1) (s2) (s4)" . " (s3) (s5)"))) + (should (equal (simple-test--transpositions (transpose-sexps -2)) + '("(s1) (s4)" . " (s2) (s3) (s5)")))) + ;;; `newline' (ert-deftest newline () @@ -239,8 +249,8 @@ simple-test--transpositions (should (equal ?\s (char-syntax ?\f))) (should (equal ?\s (char-syntax ?\n)))))) - -;;; auto-boundary tests + +;;; undo auto-boundary tests (ert-deftest undo-auto-boundary-timer () (should undo-auto-current-boundary-timer)) @@ -269,14 +279,6 @@ simple-test--transpositions (insert "hello") (undo-auto--boundaries 'test)))) -;;; Transposition with negative args (bug#20698, bug#21885) -(ert-deftest simple-transpose-subr () - (should (equal (simple-test--transpositions (transpose-sexps -1)) - '("(s1) (s2) (s4)" . " (s3) (s5)"))) - (should (equal (simple-test--transpositions (transpose-sexps -2)) - '("(s1) (s4)" . " (s2) (s3) (s5)")))) - - ;; Test for a regression introduced by undo-auto--boundaries changes. ;; https://lists.gnu.org/archive/html/emacs-devel/2015-11/msg01652.html (defun undo-test-kill-c-a-then-undo () @@ -374,5 +376,25 @@ simple-test-undo-with-switched-buffer (undo) (point))))) + +;;; `eval-expression' + +(ert-deftest eval-expression-print-format-sym () + (with-temp-buffer + (cl-letf (((symbol-function 'read--expression) (lambda (&rest _) t))) + (let ((current-prefix-arg '(4))) + (call-interactively #'eval-expression) + (should (equal (buffer-string) "t")))))) + +(ert-deftest eval-expression-print-format-sym-echo () + ;; We can only check the echo area when running interactive. + (skip-unless (not noninteractive)) + (with-temp-buffer + (cl-letf (((symbol-function 'read--expression) (lambda (&rest _) t))) + (let ((current-prefix-arg nil)) + (message nil) + (call-interactively #'eval-expression) + (should (equal (current-message) "t")))))) + (provide 'simple-test) ;;; simple-test.el ends here -- 2.11.1 --=-=-= Content-Type: text/plain Content-Disposition: attachment; filename=v2-0002-Limit-integers-printed-as-characters-Bug-16828.patch Content-Description: patch >From cb5c5e64b97aa8add81aa7537bb888ebe651d72d Mon Sep 17 00:00:00 2001 From: Noam Postavsky Date: Sun, 23 Apr 2017 22:30:20 -0400 Subject: [PATCH v2 2/2] Limit integers printed as characters (Bug#16828) * lisp/simple.el (eval-expression-print-maximum-character): New variable. (eval-expression-print-format): Only display value as character if it's less than or equal to `eval-expression-print-maximum-character'. (eval-expression-get-print-arguments): Check eval-expression-print-maximum-character, allow negative arg to override it. (eval-expression): * lisp/progmodes/elisp-mode.el (elisp--eval-last-sexp): (elisp--eval-last-sexp-print-value): Handle new variable. * doc/emacs/building.texi (Lisp Eval): Document new variable and behavior. * etc/NEWS: Announce it. * test/lisp/progmodes/elisp-mode-tests.el (eval-last-sexp-print-format-small-int): (eval-last-sexp-print-format-small-int-echo): (eval-last-sexp-print-format-large-int): (eval-last-sexp-print-format-large-int-echo): * test/lisp/simple-tests.el (eval-expression-print-format-small-int): (eval-expression-print-format-small-int-echo): (eval-expression-print-format-large-int): (eval-expression-print-format-large-int-echo): New tests. --- doc/emacs/building.texi | 12 ++++++-- etc/NEWS | 4 +++ lisp/progmodes/elisp-mode.el | 20 ++++++++----- lisp/simple.el | 53 ++++++++++++++++++++++----------- test/lisp/progmodes/elisp-mode-tests.el | 48 +++++++++++++++++++++++++++++ test/lisp/simple-tests.el | 52 ++++++++++++++++++++++++++++++++ 6 files changed, 160 insertions(+), 29 deletions(-) diff --git a/doc/emacs/building.texi b/doc/emacs/building.texi index ba8eae0759..56bdffbb31 100644 --- a/doc/emacs/building.texi +++ b/doc/emacs/building.texi @@ -1485,7 +1485,8 @@ Lisp Eval Emacs Lisp expression preceding point in the buffer, and displays the value in the echo area. When the result of an evaluation is an integer, it is displayed together with the value in other formats -(octal, hexadecimal, and character). +(octal, hexadecimal, and character if +@code{eval-expression-print-maximum-character} allows it). If @kbd{M-:} or @kbd{C-x C-e} is given a prefix argument, it inserts the value into the current buffer at point, rather than displaying it @@ -1493,8 +1494,10 @@ Lisp Eval is inserted together with its value in other formats (octal, hexadecimal, and character). Such a prefix argument also prevents abbreviation of the output according to the variables -@code{eval-expression-print-level} and @code{eval-expression-print-length} -(see below). +@code{eval-expression-print-level} and +@code{eval-expression-print-length} (see below). Similarly, a prefix +argument of @code{-1} overrides the effect of +@code{eval-expression-print-length}. @kindex C-M-x @r{(Emacs Lisp mode)} @findex eval-defun @@ -1524,6 +1527,7 @@ Lisp Eval @vindex eval-expression-print-level @vindex eval-expression-print-length +@vindex eval-expression-print-maximum-character @vindex eval-expression-debug-on-error The options @code{eval-expression-print-level} and @code{eval-expression-print-length} control the maximum depth and @@ -1533,6 +1537,8 @@ Lisp Eval printed in full. @code{eval-expression-debug-on-error} controls whether evaluation errors invoke the debugger when these commands are used; its default is @code{t}. +@code{eval-expression-print-maximum-character} prevents large integers +from being displayed as characters. @node Lisp Interaction @section Lisp Interaction Buffers diff --git a/etc/NEWS b/etc/NEWS index e8f5b2e899..548d55d60d 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -344,6 +344,10 @@ for DNS-querying functions 'nslookup-host', 'dns-lookup-host', and 'run-dig'. Each function now accepts an optional name server argument interactively (with a prefix argument) and non-interactively. ++++ +** The new variable 'eval-expression-print-maximum-character' prevents +large integers from being displayed as characters. + * Editing Changes in Emacs 26.1 diff --git a/lisp/progmodes/elisp-mode.el b/lisp/progmodes/elisp-mode.el index c2fdba47a0..6c6fb92504 100644 --- a/lisp/progmodes/elisp-mode.el +++ b/lisp/progmodes/elisp-mode.el @@ -1120,24 +1120,25 @@ elisp--eval-last-sexp include additional formats for integers \(octal, hexadecimal, and character)." (pcase-let* - ((`(,insert-value ,no-truncate ,char-print) + ((`(,insert-value ,no-truncate ,char-print-limit) (eval-expression-get-print-arguments eval-last-sexp-arg-internal))) ;; Setup the lexical environment if lexical-binding is enabled. (elisp--eval-last-sexp-print-value (eval (eval-sexp-add-defvars (elisp--preceding-sexp)) lexical-binding) - (if insert-value (current-buffer) t) no-truncate char-print))) + (if insert-value (current-buffer) t) no-truncate char-print-limit))) (defun elisp--eval-last-sexp-print-value - (value output &optional no-truncate char-print) + (value output &optional no-truncate char-print-limit) (let* ((unabbreviated (let ((print-length nil) (print-level nil)) (prin1-to-string value))) + (eval-expression-print-maximum-character char-print-limit) (print-length (unless no-truncate eval-expression-print-length)) (print-level (unless no-truncate eval-expression-print-level)) (beg (point)) end) (prog1 (prin1 value output) - (let ((str (and char-print (eval-expression-print-format value)))) + (let ((str (and char-print-limit (eval-expression-print-format value)))) (if str (princ str output))) (setq end (point)) (when (and (bufferp output) @@ -1175,14 +1176,17 @@ eval-sexp-add-defvars (defun eval-last-sexp (eval-last-sexp-arg-internal) "Evaluate sexp before point; print value in the echo area. -Interactively, with prefix argument, print output into current buffer. +Interactively, with a non `-' prefix argument, print output into +current buffer. -Normally, this function truncates long output according to the value -of the variables `eval-expression-print-length' and +Normally, this function truncates long output according to the +value of the variables `eval-expression-print-length' and `eval-expression-print-level'. With a prefix argument of zero, however, there is no such truncation. Such a prefix argument also causes integers to be printed in several additional formats -\(octal, hexadecimal, and character). +\(octal, hexadecimal, and character when the prefix argument is +-1 or the integer is `eval-expression-print-maximum-character' or +less). If `eval-expression-debug-on-error' is non-nil, which is the default, this command arranges for all errors to enter the debugger." diff --git a/lisp/simple.el b/lisp/simple.el index 68208118f1..4435da6463 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -1454,6 +1454,13 @@ eval-expression-debug-on-error :type 'boolean :version "21.1") +(defcustom eval-expression-print-maximum-character 127 + "The largest integer that will be displayed as a character. +This affects printing by `eval-expression-print-format'." + :group 'lisp + :type 'integer + :version "26.1") + (defun eval-expression-print-format (value) "If VALUE in an integer, return a specially formatted string. This string will typically look like \" (#o1, #x1, ?\\C-a)\". @@ -1463,6 +1470,7 @@ eval-expression-print-format (when (integerp value) (let ((char-string (and (characterp value) + (<= value eval-expression-print-maximum-character) (char-displayable-p value) (prin1-char value)))) (if char-string @@ -1488,32 +1496,40 @@ read--expression (defun eval-expression-get-print-arguments (prefix-argument) "Get arguments for commands that print an expression result. -Returns a list (INSERT-VALUE NO-TRUNCATE CHAR-PRINT) +Returns a list (INSERT-VALUE NO-TRUNCATE CHAR-PRINT-LIMIT) based on PREFIX-ARG. This function determines the interpretation of the prefix argument for `eval-expression' and `eval-last-sexp'." (let ((num (prefix-numeric-value prefix-argument))) - (list (not (memq prefix-argument '(nil))) + (list (not (memq prefix-argument '(- nil))) (= num 0) - (cond ((not (memq prefix-argument '(0 nil))) nil) - (t t))))) + (cond ((not (memq prefix-argument '(0 -1 - nil))) nil) + ((= num -1) most-positive-fixnum) + (t eval-expression-print-maximum-character))))) ;; We define this, rather than making `eval' interactive, ;; for the sake of completion of names like eval-region, eval-buffer. -(defun eval-expression (exp &optional insert-value no-truncate char-print) +(defun eval-expression (exp &optional insert-value no-truncate char-print-limit) "Evaluate EXP and print value in the echo area. -When called interactively, read an Emacs Lisp expression and evaluate it. -Value is also consed on to front of the variable `values'. -If the resulting value is an integer, it will be printed in -several additional formats (octal, hexadecimal, and character). -Optional argument INSERT-VALUE non-nil (interactively, with -prefix argument) means insert the result into the current buffer -instead of printing it in the echo area. - -Normally, this function truncates long output according to the value -of the variables `eval-expression-print-length' and -`eval-expression-print-level'. With a prefix argument of zero, -however, there is no such truncation. +When called interactively, read an Emacs Lisp expression and +evaluate it. Value is also consed on to front of the variable +`values'. Optional argument INSERT-VALUE non-nil (interactively, +with a non `-' prefix argument) means insert the result into the +current buffer instead of printing it in the echo area. + +Normally, this function truncates long output according to the +value of the variables `eval-expression-print-length' and +`eval-expression-print-level'. When NO-TRUNCATE is +non-nil (interactively, with a prefix argument of zero), however, +there is no such truncation. + +If the resulting value is an integer, and CHAR-PRINT-LIMIT is +non-nil (interactively, unless given a positive prefix argument) +it will be printed in several additional formats (octal, +hexadecimal, and character). The character format is only used +if the value is below CHAR-PRINT-LIMIT (interactively, if the +prefix argument is -1 or the value is below +`eval-expression-print-maximum-character'). Runs the hook `eval-expression-minibuffer-setup-hook' on entering the minibuffer. @@ -1539,11 +1555,12 @@ eval-expression (let ((print-length (unless no-truncate eval-expression-print-length)) (print-level (unless no-truncate eval-expression-print-level)) + (eval-expression-print-maximum-character char-print-limit) (deactivate-mark)) (let ((out (if insert-value (current-buffer) t))) (prog1 (prin1 (car values) out) - (let ((str (and char-print + (let ((str (and char-print-limit (eval-expression-print-format (car values))))) (when str (princ str out))))))) diff --git a/test/lisp/progmodes/elisp-mode-tests.el b/test/lisp/progmodes/elisp-mode-tests.el index 5edb590b1e..03ae8481ee 100644 --- a/test/lisp/progmodes/elisp-mode-tests.el +++ b/test/lisp/progmodes/elisp-mode-tests.el @@ -132,6 +132,54 @@ elisp--test-completions (call-interactively #'eval-last-sexp) (should (equal (current-message) "t"))))) +(ert-deftest eval-last-sexp-print-format-small-int () + (with-temp-buffer + (let ((current-prefix-arg '(4))) + (erase-buffer) (insert "?A") + (call-interactively #'eval-last-sexp) + (should (equal (buffer-string) "?A65"))) + (let ((current-prefix-arg 0)) + (erase-buffer) (insert "?A") + (call-interactively #'eval-last-sexp) + (should (equal (buffer-string) "?A65 (#o101, #x41, ?A)"))))) + +(ert-deftest eval-last-sexp-print-format-small-int-echo () + (skip-unless (not noninteractive)) + (with-temp-buffer + (let ((current-prefix-arg nil)) + (erase-buffer) (insert "?A") (message nil) + (call-interactively #'eval-last-sexp) + (should (equal (current-message) "65 (#o101, #x41, ?A)"))))) + +(ert-deftest eval-last-sexp-print-format-large-int () + (with-temp-buffer + (let ((eval-expression-print-maximum-character ?A)) + (let ((current-prefix-arg '(4))) + (erase-buffer) (insert "?B") + (call-interactively #'eval-last-sexp) + (should (equal (buffer-string) "?B66"))) + (let ((current-prefix-arg 0)) + (erase-buffer) (insert "?B") + (call-interactively #'eval-last-sexp) + (should (equal (buffer-string) "?B66 (#o102, #x42)"))) + (let ((current-prefix-arg -1)) + (erase-buffer) (insert "?B") + (call-interactively #'eval-last-sexp) + (should (equal (buffer-string) "?B66 (#o102, #x42, ?B)")))))) + +(ert-deftest eval-last-sexp-print-format-large-int-echo () + (skip-unless (not noninteractive)) + (with-temp-buffer + (let ((eval-expression-print-maximum-character ?A)) + (let ((current-prefix-arg nil)) + (erase-buffer) (insert "?B") (message nil) + (call-interactively #'eval-last-sexp) + (should (equal (current-message) "66 (#o102, #x42)"))) + (let ((current-prefix-arg '-)) + (erase-buffer) (insert "?B") (message nil) + (call-interactively #'eval-last-sexp) + (should (equal (current-message) "66 (#o102, #x42, ?B)")))))) + ;;; xref (defun xref-elisp-test-descr-to-target (xref) diff --git a/test/lisp/simple-tests.el b/test/lisp/simple-tests.el index b74e28ccaf..180dcc0a20 100644 --- a/test/lisp/simple-tests.el +++ b/test/lisp/simple-tests.el @@ -396,5 +396,57 @@ simple-test-undo-with-switched-buffer (call-interactively #'eval-expression) (should (equal (current-message) "t")))))) +(ert-deftest eval-expression-print-format-small-int () + (with-temp-buffer + (cl-letf (((symbol-function 'read--expression) (lambda (&rest _) ?A))) + (let ((current-prefix-arg '(4))) + (erase-buffer) + (call-interactively #'eval-expression) + (should (equal (buffer-string) "65"))) + (let ((current-prefix-arg 0)) + (erase-buffer) + (call-interactively #'eval-expression) + (should (equal (buffer-string) "65 (#o101, #x41, ?A)")))))) + +(ert-deftest eval-expression-print-format-small-int-echo () + (skip-unless (not noninteractive)) + (with-temp-buffer + (cl-letf (((symbol-function 'read--expression) (lambda (&rest _) ?A))) + (let ((current-prefix-arg nil)) + (message nil) + (call-interactively #'eval-expression) + (should (equal (current-message) "65 (#o101, #x41, ?A)")))))) + +(ert-deftest eval-expression-print-format-large-int () + (with-temp-buffer + (cl-letf (((symbol-function 'read--expression) (lambda (&rest _) ?B)) + (eval-expression-print-maximum-character ?A)) + (let ((current-prefix-arg '(4))) + (erase-buffer) + (call-interactively #'eval-expression) + (should (equal (buffer-string) "66"))) + (let ((current-prefix-arg 0)) + (erase-buffer) + (call-interactively #'eval-expression) + (should (equal (buffer-string) "66 (#o102, #x42)"))) + (let ((current-prefix-arg -1)) + (erase-buffer) + (call-interactively #'eval-expression) + (should (equal (buffer-string) "66 (#o102, #x42, ?B)")))))) + +(ert-deftest eval-expression-print-format-large-int-echo () + (skip-unless (not noninteractive)) + (with-temp-buffer + (cl-letf (((symbol-function 'read--expression) (lambda (&rest _) ?B)) + (eval-expression-print-maximum-character ?A)) + (let ((current-prefix-arg nil)) + (message nil) + (call-interactively #'eval-expression) + (should (equal (current-message) "66 (#o102, #x42)"))) + (let ((current-prefix-arg '-)) + (message nil) + (call-interactively #'eval-expression) + (should (equal (current-message) "66 (#o102, #x42, ?B)")))))) + (provide 'simple-test) ;;; simple-test.el ends here -- 2.11.1 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Fri May 19 02:35:11 2017 Received: (at 16828) by debbugs.gnu.org; 19 May 2017 06:35:11 +0000 Received: from localhost ([127.0.0.1]:54243 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dBbVG-0005NB-PU for submit@debbugs.gnu.org; Fri, 19 May 2017 02:35:11 -0400 Received: from eggs.gnu.org ([208.118.235.92]:43629) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dBbVF-0005My-FK for 16828@debbugs.gnu.org; Fri, 19 May 2017 02:35:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dBbV5-0001de-DG for 16828@debbugs.gnu.org; Fri, 19 May 2017 02:35:04 -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,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:38898) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dBbV5-0001da-A0; Fri, 19 May 2017 02:34:59 -0400 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:3187 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1dBbV4-0001ah-Em; Fri, 19 May 2017 02:34:58 -0400 Date: Fri, 19 May 2017 09:34:52 +0300 Message-Id: <83efvl4ann.fsf@gnu.org> From: Eli Zaretskii To: npostavs@users.sourceforge.net In-reply-to: <878tltiure.fsf@users.sourceforge.net> (npostavs@users.sourceforge.net) Subject: Re: bug#16828: 24.3.50; eval-expression, character representation of integer results time-consuming References: <83mwhk4v48.fsf@gnu.org> <83txbr2sye.fsf@gnu.org> <87zjljf086.fsf@rosalinde.fritz.box> <83a9di3lt1.fsf@gnu.org> <877g8mb3lh.fsf@Rainer.invalid> <530DBEEE.8060805@gmx.at> <87zig84s6l.fsf@users.sourceforge.net> <83wpbc9ldc.fsf@gnu.org> <83lgrs9k8p.fsf@gnu.org> <87inmw3x5b.fsf@users.sourceforge.net> <83fui09i5z.fsf@gnu.org> <87fui03pjr.fsf@users.sourceforge.net> <834lyg9b9t.fsf@gnu.org> <87a88752ej.fsf@users.sourceforge.net> <83y3vr9909.fsf@gnu.org> <878tltiure.fsf@users.sourceforge.net> 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.0 (-----) X-Debbugs-Envelope-To: 16828 Cc: 16828@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.0 (-----) > From: npostavs@users.sourceforge.net > Cc: 16828@debbugs.gnu.org > Date: Thu, 18 May 2017 19:56:53 -0400 > > >> Currently, zero also means no truncation, keeping that meaning seems > >> important too. Perhaps a negative argument would be a better choice? > > > > Yes, that'd be fine with me. Thanks. > > I added `-' to echo in character format, and `-1' to print it to the > buffer. I split the patch in 2 parts, the first just refactors the > printing code, the 2nd adds the new behaviour. Thanks. A couple of nits regarding the documentation part: > +(defcustom eval-expression-print-maximum-character 127 > + "The largest integer that will be displayed as a character. > +This affects printing by `eval-expression-print-format'." I would suggest to also mention eval-expression here. > --- a/doc/emacs/building.texi > +++ b/doc/emacs/building.texi > @@ -1485,7 +1485,8 @@ Lisp Eval > Emacs Lisp expression preceding point in the buffer, and displays the > value in the echo area. When the result of an evaluation is an > integer, it is displayed together with the value in other formats > -(octal, hexadecimal, and character). > +(octal, hexadecimal, and character if > +@code{eval-expression-print-maximum-character} allows it). Please add a "see below" here, as the description of the variable is several dozens of lines farther. > +@code{eval-expression-print-maximum-character} prevents large integers > +from being displayed as characters. This is too terse, IMO; please state explicitly that values larger than this will not be displayed as characters. From debbugs-submit-bounces@debbugs.gnu.org Fri May 19 16:50:53 2017 Received: (at 16828) by debbugs.gnu.org; 19 May 2017 20:50:53 +0000 Received: from localhost ([127.0.0.1]:55645 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dBorM-0005Z9-LT for submit@debbugs.gnu.org; Fri, 19 May 2017 16:50:53 -0400 Received: from mail-it0-f45.google.com ([209.85.214.45]:35574) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dBorL-0005Yx-Cq for 16828@debbugs.gnu.org; Fri, 19 May 2017 16:50:52 -0400 Received: by mail-it0-f45.google.com with SMTP id c15so125425873ith.0 for <16828@debbugs.gnu.org>; Fri, 19 May 2017 13:50:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=ux5oeRO7KxJ6mio4inZl44OP8KNwanyv6kvlYTtafGk=; b=pSrcMEXMEM6fzTz65re87eWtVfIxII5jR7xTFH08ELnQZh5cZc2xWiig1QjCYABgNR 0Z9ebxjngj/akhIndpJLFJChOz4Z/9PT57tPfvTaZZnCymCn3JQq543UPNr+ex+WP7U8 JPL6WhBBu4C6heKDYn/KMbXPMDJd5iLepqxVVURImgyDJ0/+VId6iUEgD4RlXUbpHm9f uxy+bxxa+HarmkiAXZEj8FgBVGwtvbF7jvO++kZtwRIXowiTS9L77ymMj1uAg0jia9fS V+5m0CV6RUAfWvdmEj0+Rlw6kaEbmjXfGJ0HHNrj4JcusOVQxrT9TuU5O1XEBDsnzRUW uAFA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:references:date :in-reply-to:message-id:user-agent:mime-version; bh=ux5oeRO7KxJ6mio4inZl44OP8KNwanyv6kvlYTtafGk=; b=WqMzWSGYkWH4g7sMKamOjPmbHjhmcv5Sg9lBqtp60UgQck4sqBJC8TzgxvI6xSXbMI ynt/6raYyd2y5hEf69/46MlEKnLDhe8pBtvq343dz7/LGB61ynpMPYRxW7sWHdonChp5 4F6vGjXCGq9X8RYnnwFvLSIvE8gGJDiobHY+EzoupRjkp42tp7VCsctJ1OEn5Sk87+je P3sjdpWQEiC/9+jUGiMJJfsPIjfpScW2blfQQ1mayzH+UYRWeEt+vmv3WNopM+RtD9Y2 VGMYtXuHp290AhFUy3LIpAOSXaQCs9Nh11xzwLb60ljr8zyIbXbBG4oWUr5QZxNT+ayi cenA== X-Gm-Message-State: AODbwcC5Z9rRDsbcY3jfUFzBT+pmLCCxVjXv0yVa9EfMzOCrgRmUwCoY FcWIozh5ZAZL7w== X-Received: by 10.36.48.5 with SMTP id q5mr31225087itq.15.1495227045615; Fri, 19 May 2017 13:50:45 -0700 (PDT) Received: from zony ([45.2.7.65]) by smtp.googlemail.com with ESMTPSA id b10sm4301670iod.33.2017.05.19.13.50.43 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 19 May 2017 13:50:44 -0700 (PDT) From: npostavs@users.sourceforge.net To: Eli Zaretskii Subject: Re: bug#16828: 24.3.50; eval-expression, character representation of integer results time-consuming References: <83mwhk4v48.fsf@gnu.org> <83txbr2sye.fsf@gnu.org> <87zjljf086.fsf@rosalinde.fritz.box> <83a9di3lt1.fsf@gnu.org> <877g8mb3lh.fsf@Rainer.invalid> <530DBEEE.8060805@gmx.at> <87zig84s6l.fsf@users.sourceforge.net> <83wpbc9ldc.fsf@gnu.org> <83lgrs9k8p.fsf@gnu.org> <87inmw3x5b.fsf@users.sourceforge.net> <83fui09i5z.fsf@gnu.org> <87fui03pjr.fsf@users.sourceforge.net> <834lyg9b9t.fsf@gnu.org> <87a88752ej.fsf@users.sourceforge.net> <83y3vr9909.fsf@gnu.org> <878tltiure.fsf@users.sourceforge.net> <83efvl4ann.fsf@gnu.org> Date: Fri, 19 May 2017 16:52:20 -0400 In-Reply-To: <83efvl4ann.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 19 May 2017 09:34:52 +0300") Message-ID: <8760gwin7f.fsf@users.sourceforge.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: 0.7 (/) X-Debbugs-Envelope-To: 16828 Cc: 16828@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 (/) --=-=-= Content-Type: text/plain Eli Zaretskii writes: > I would suggest to also mention eval-expression here. Right, I also noticed eval-expression-print-format's docstring refers to `prin1' which seems to be wrong. (defcustom eval-expression-print-maximum-character 127 "The largest integer that will be displayed as a character. -This affects printing by `eval-expression-print-format'." +This affects printing by `eval-expression' (via +`eval-expression-print-format')." :group 'lisp :type 'integer :version "26.1") (defun eval-expression-print-format (value) "If VALUE in an integer, return a specially formatted string. This string will typically look like \" (#o1, #x1, ?\\C-a)\". If VALUE is not an integer, nil is returned. -This function is used by functions like `prin1' that display the -result of expression evaluation." +This function is used by commands like `eval-expression' that +display the result of expression evaluation." >> +(octal, hexadecimal, and character if >> +@code{eval-expression-print-maximum-character} allows it). > > Please add a "see below" here, as the description of the variable is > several dozens of lines farther. Right. Is it okay to have nested parentheses? I use this quite often when I write emails and such, but I have the idea it might be frowned upon in more formal contexts. +@code{eval-expression-print-maximum-character} (see below) allows it). > > This is too terse, IMO; please state explicitly that values larger > than this will not be displayed as characters. Yeah, I have a tendency to be overly terse. +@code{eval-expression-print-maximum-character} prevents integers which +are larger than it from being displayed as characters. --=-=-= Content-Type: text/plain Content-Disposition: attachment; filename=v3-0002-Limit-integers-printed-as-characters-Bug-16828.patch Content-Description: patch >From eb11632d4db13d80839601c2c972e02fa46cc7f8 Mon Sep 17 00:00:00 2001 From: Noam Postavsky Date: Sun, 23 Apr 2017 22:30:20 -0400 Subject: [PATCH v3 2/2] Limit integers printed as characters (Bug#16828) * lisp/simple.el (eval-expression-print-maximum-character): New variable. (eval-expression-print-format): Only display value as character if it's less than or equal to `eval-expression-print-maximum-character'. (eval-expression-get-print-arguments): Check eval-expression-print-maximum-character, allow negative arg to override it. (eval-expression): * lisp/progmodes/elisp-mode.el (elisp--eval-last-sexp): (elisp--eval-last-sexp-print-value): Handle new variable. * doc/emacs/building.texi (Lisp Eval): Document new variable and behavior. * etc/NEWS: Announce it. * test/lisp/progmodes/elisp-mode-tests.el (eval-last-sexp-print-format-small-int): (eval-last-sexp-print-format-small-int-echo): (eval-last-sexp-print-format-large-int): (eval-last-sexp-print-format-large-int-echo): * test/lisp/simple-tests.el (eval-expression-print-format-small-int): (eval-expression-print-format-small-int-echo): (eval-expression-print-format-large-int): (eval-expression-print-format-large-int-echo): New tests. --- doc/emacs/building.texi | 12 +++++-- etc/NEWS | 4 +++ lisp/progmodes/elisp-mode.el | 20 +++++++----- lisp/simple.el | 58 +++++++++++++++++++++------------ test/lisp/progmodes/elisp-mode-tests.el | 48 +++++++++++++++++++++++++++ test/lisp/simple-tests.el | 52 +++++++++++++++++++++++++++++ 6 files changed, 163 insertions(+), 31 deletions(-) diff --git a/doc/emacs/building.texi b/doc/emacs/building.texi index ba8eae0759..5bf10bf97d 100644 --- a/doc/emacs/building.texi +++ b/doc/emacs/building.texi @@ -1485,7 +1485,8 @@ Lisp Eval Emacs Lisp expression preceding point in the buffer, and displays the value in the echo area. When the result of an evaluation is an integer, it is displayed together with the value in other formats -(octal, hexadecimal, and character). +(octal, hexadecimal, and character if +@code{eval-expression-print-maximum-character} (see below) allows it). If @kbd{M-:} or @kbd{C-x C-e} is given a prefix argument, it inserts the value into the current buffer at point, rather than displaying it @@ -1493,8 +1494,10 @@ Lisp Eval is inserted together with its value in other formats (octal, hexadecimal, and character). Such a prefix argument also prevents abbreviation of the output according to the variables -@code{eval-expression-print-level} and @code{eval-expression-print-length} -(see below). +@code{eval-expression-print-level} and +@code{eval-expression-print-length} (see below). Similarly, a prefix +argument of @code{-1} overrides the effect of +@code{eval-expression-print-length}. @kindex C-M-x @r{(Emacs Lisp mode)} @findex eval-defun @@ -1524,6 +1527,7 @@ Lisp Eval @vindex eval-expression-print-level @vindex eval-expression-print-length +@vindex eval-expression-print-maximum-character @vindex eval-expression-debug-on-error The options @code{eval-expression-print-level} and @code{eval-expression-print-length} control the maximum depth and @@ -1533,6 +1537,8 @@ Lisp Eval printed in full. @code{eval-expression-debug-on-error} controls whether evaluation errors invoke the debugger when these commands are used; its default is @code{t}. +@code{eval-expression-print-maximum-character} prevents integers which +are larger than it from being displayed as characters. @node Lisp Interaction @section Lisp Interaction Buffers diff --git a/etc/NEWS b/etc/NEWS index e8f5b2e899..548d55d60d 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -344,6 +344,10 @@ for DNS-querying functions 'nslookup-host', 'dns-lookup-host', and 'run-dig'. Each function now accepts an optional name server argument interactively (with a prefix argument) and non-interactively. ++++ +** The new variable 'eval-expression-print-maximum-character' prevents +large integers from being displayed as characters. + * Editing Changes in Emacs 26.1 diff --git a/lisp/progmodes/elisp-mode.el b/lisp/progmodes/elisp-mode.el index c2fdba47a0..6c6fb92504 100644 --- a/lisp/progmodes/elisp-mode.el +++ b/lisp/progmodes/elisp-mode.el @@ -1120,24 +1120,25 @@ elisp--eval-last-sexp include additional formats for integers \(octal, hexadecimal, and character)." (pcase-let* - ((`(,insert-value ,no-truncate ,char-print) + ((`(,insert-value ,no-truncate ,char-print-limit) (eval-expression-get-print-arguments eval-last-sexp-arg-internal))) ;; Setup the lexical environment if lexical-binding is enabled. (elisp--eval-last-sexp-print-value (eval (eval-sexp-add-defvars (elisp--preceding-sexp)) lexical-binding) - (if insert-value (current-buffer) t) no-truncate char-print))) + (if insert-value (current-buffer) t) no-truncate char-print-limit))) (defun elisp--eval-last-sexp-print-value - (value output &optional no-truncate char-print) + (value output &optional no-truncate char-print-limit) (let* ((unabbreviated (let ((print-length nil) (print-level nil)) (prin1-to-string value))) + (eval-expression-print-maximum-character char-print-limit) (print-length (unless no-truncate eval-expression-print-length)) (print-level (unless no-truncate eval-expression-print-level)) (beg (point)) end) (prog1 (prin1 value output) - (let ((str (and char-print (eval-expression-print-format value)))) + (let ((str (and char-print-limit (eval-expression-print-format value)))) (if str (princ str output))) (setq end (point)) (when (and (bufferp output) @@ -1175,14 +1176,17 @@ eval-sexp-add-defvars (defun eval-last-sexp (eval-last-sexp-arg-internal) "Evaluate sexp before point; print value in the echo area. -Interactively, with prefix argument, print output into current buffer. +Interactively, with a non `-' prefix argument, print output into +current buffer. -Normally, this function truncates long output according to the value -of the variables `eval-expression-print-length' and +Normally, this function truncates long output according to the +value of the variables `eval-expression-print-length' and `eval-expression-print-level'. With a prefix argument of zero, however, there is no such truncation. Such a prefix argument also causes integers to be printed in several additional formats -\(octal, hexadecimal, and character). +\(octal, hexadecimal, and character when the prefix argument is +-1 or the integer is `eval-expression-print-maximum-character' or +less). If `eval-expression-debug-on-error' is non-nil, which is the default, this command arranges for all errors to enter the debugger." diff --git a/lisp/simple.el b/lisp/simple.el index 68208118f1..be12c315c8 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -1454,15 +1454,24 @@ eval-expression-debug-on-error :type 'boolean :version "21.1") +(defcustom eval-expression-print-maximum-character 127 + "The largest integer that will be displayed as a character. +This affects printing by `eval-expression' (via +`eval-expression-print-format')." + :group 'lisp + :type 'integer + :version "26.1") + (defun eval-expression-print-format (value) "If VALUE in an integer, return a specially formatted string. This string will typically look like \" (#o1, #x1, ?\\C-a)\". If VALUE is not an integer, nil is returned. -This function is used by functions like `prin1' that display the -result of expression evaluation." +This function is used by commands like `eval-expression' that +display the result of expression evaluation." (when (integerp value) (let ((char-string (and (characterp value) + (<= value eval-expression-print-maximum-character) (char-displayable-p value) (prin1-char value)))) (if char-string @@ -1488,32 +1497,40 @@ read--expression (defun eval-expression-get-print-arguments (prefix-argument) "Get arguments for commands that print an expression result. -Returns a list (INSERT-VALUE NO-TRUNCATE CHAR-PRINT) +Returns a list (INSERT-VALUE NO-TRUNCATE CHAR-PRINT-LIMIT) based on PREFIX-ARG. This function determines the interpretation of the prefix argument for `eval-expression' and `eval-last-sexp'." (let ((num (prefix-numeric-value prefix-argument))) - (list (not (memq prefix-argument '(nil))) + (list (not (memq prefix-argument '(- nil))) (= num 0) - (cond ((not (memq prefix-argument '(0 nil))) nil) - (t t))))) + (cond ((not (memq prefix-argument '(0 -1 - nil))) nil) + ((= num -1) most-positive-fixnum) + (t eval-expression-print-maximum-character))))) ;; We define this, rather than making `eval' interactive, ;; for the sake of completion of names like eval-region, eval-buffer. -(defun eval-expression (exp &optional insert-value no-truncate char-print) +(defun eval-expression (exp &optional insert-value no-truncate char-print-limit) "Evaluate EXP and print value in the echo area. -When called interactively, read an Emacs Lisp expression and evaluate it. -Value is also consed on to front of the variable `values'. -If the resulting value is an integer, it will be printed in -several additional formats (octal, hexadecimal, and character). -Optional argument INSERT-VALUE non-nil (interactively, with -prefix argument) means insert the result into the current buffer -instead of printing it in the echo area. - -Normally, this function truncates long output according to the value -of the variables `eval-expression-print-length' and -`eval-expression-print-level'. With a prefix argument of zero, -however, there is no such truncation. +When called interactively, read an Emacs Lisp expression and +evaluate it. Value is also consed on to front of the variable +`values'. Optional argument INSERT-VALUE non-nil (interactively, +with a non `-' prefix argument) means insert the result into the +current buffer instead of printing it in the echo area. + +Normally, this function truncates long output according to the +value of the variables `eval-expression-print-length' and +`eval-expression-print-level'. When NO-TRUNCATE is +non-nil (interactively, with a prefix argument of zero), however, +there is no such truncation. + +If the resulting value is an integer, and CHAR-PRINT-LIMIT is +non-nil (interactively, unless given a positive prefix argument) +it will be printed in several additional formats (octal, +hexadecimal, and character). The character format is only used +if the value is below CHAR-PRINT-LIMIT (interactively, if the +prefix argument is -1 or the value is below +`eval-expression-print-maximum-character'). Runs the hook `eval-expression-minibuffer-setup-hook' on entering the minibuffer. @@ -1539,11 +1556,12 @@ eval-expression (let ((print-length (unless no-truncate eval-expression-print-length)) (print-level (unless no-truncate eval-expression-print-level)) + (eval-expression-print-maximum-character char-print-limit) (deactivate-mark)) (let ((out (if insert-value (current-buffer) t))) (prog1 (prin1 (car values) out) - (let ((str (and char-print + (let ((str (and char-print-limit (eval-expression-print-format (car values))))) (when str (princ str out))))))) diff --git a/test/lisp/progmodes/elisp-mode-tests.el b/test/lisp/progmodes/elisp-mode-tests.el index 5edb590b1e..03ae8481ee 100644 --- a/test/lisp/progmodes/elisp-mode-tests.el +++ b/test/lisp/progmodes/elisp-mode-tests.el @@ -132,6 +132,54 @@ elisp--test-completions (call-interactively #'eval-last-sexp) (should (equal (current-message) "t"))))) +(ert-deftest eval-last-sexp-print-format-small-int () + (with-temp-buffer + (let ((current-prefix-arg '(4))) + (erase-buffer) (insert "?A") + (call-interactively #'eval-last-sexp) + (should (equal (buffer-string) "?A65"))) + (let ((current-prefix-arg 0)) + (erase-buffer) (insert "?A") + (call-interactively #'eval-last-sexp) + (should (equal (buffer-string) "?A65 (#o101, #x41, ?A)"))))) + +(ert-deftest eval-last-sexp-print-format-small-int-echo () + (skip-unless (not noninteractive)) + (with-temp-buffer + (let ((current-prefix-arg nil)) + (erase-buffer) (insert "?A") (message nil) + (call-interactively #'eval-last-sexp) + (should (equal (current-message) "65 (#o101, #x41, ?A)"))))) + +(ert-deftest eval-last-sexp-print-format-large-int () + (with-temp-buffer + (let ((eval-expression-print-maximum-character ?A)) + (let ((current-prefix-arg '(4))) + (erase-buffer) (insert "?B") + (call-interactively #'eval-last-sexp) + (should (equal (buffer-string) "?B66"))) + (let ((current-prefix-arg 0)) + (erase-buffer) (insert "?B") + (call-interactively #'eval-last-sexp) + (should (equal (buffer-string) "?B66 (#o102, #x42)"))) + (let ((current-prefix-arg -1)) + (erase-buffer) (insert "?B") + (call-interactively #'eval-last-sexp) + (should (equal (buffer-string) "?B66 (#o102, #x42, ?B)")))))) + +(ert-deftest eval-last-sexp-print-format-large-int-echo () + (skip-unless (not noninteractive)) + (with-temp-buffer + (let ((eval-expression-print-maximum-character ?A)) + (let ((current-prefix-arg nil)) + (erase-buffer) (insert "?B") (message nil) + (call-interactively #'eval-last-sexp) + (should (equal (current-message) "66 (#o102, #x42)"))) + (let ((current-prefix-arg '-)) + (erase-buffer) (insert "?B") (message nil) + (call-interactively #'eval-last-sexp) + (should (equal (current-message) "66 (#o102, #x42, ?B)")))))) + ;;; xref (defun xref-elisp-test-descr-to-target (xref) diff --git a/test/lisp/simple-tests.el b/test/lisp/simple-tests.el index b74e28ccaf..180dcc0a20 100644 --- a/test/lisp/simple-tests.el +++ b/test/lisp/simple-tests.el @@ -396,5 +396,57 @@ simple-test-undo-with-switched-buffer (call-interactively #'eval-expression) (should (equal (current-message) "t")))))) +(ert-deftest eval-expression-print-format-small-int () + (with-temp-buffer + (cl-letf (((symbol-function 'read--expression) (lambda (&rest _) ?A))) + (let ((current-prefix-arg '(4))) + (erase-buffer) + (call-interactively #'eval-expression) + (should (equal (buffer-string) "65"))) + (let ((current-prefix-arg 0)) + (erase-buffer) + (call-interactively #'eval-expression) + (should (equal (buffer-string) "65 (#o101, #x41, ?A)")))))) + +(ert-deftest eval-expression-print-format-small-int-echo () + (skip-unless (not noninteractive)) + (with-temp-buffer + (cl-letf (((symbol-function 'read--expression) (lambda (&rest _) ?A))) + (let ((current-prefix-arg nil)) + (message nil) + (call-interactively #'eval-expression) + (should (equal (current-message) "65 (#o101, #x41, ?A)")))))) + +(ert-deftest eval-expression-print-format-large-int () + (with-temp-buffer + (cl-letf (((symbol-function 'read--expression) (lambda (&rest _) ?B)) + (eval-expression-print-maximum-character ?A)) + (let ((current-prefix-arg '(4))) + (erase-buffer) + (call-interactively #'eval-expression) + (should (equal (buffer-string) "66"))) + (let ((current-prefix-arg 0)) + (erase-buffer) + (call-interactively #'eval-expression) + (should (equal (buffer-string) "66 (#o102, #x42)"))) + (let ((current-prefix-arg -1)) + (erase-buffer) + (call-interactively #'eval-expression) + (should (equal (buffer-string) "66 (#o102, #x42, ?B)")))))) + +(ert-deftest eval-expression-print-format-large-int-echo () + (skip-unless (not noninteractive)) + (with-temp-buffer + (cl-letf (((symbol-function 'read--expression) (lambda (&rest _) ?B)) + (eval-expression-print-maximum-character ?A)) + (let ((current-prefix-arg nil)) + (message nil) + (call-interactively #'eval-expression) + (should (equal (current-message) "66 (#o102, #x42)"))) + (let ((current-prefix-arg '-)) + (message nil) + (call-interactively #'eval-expression) + (should (equal (current-message) "66 (#o102, #x42, ?B)")))))) + (provide 'simple-test) ;;; simple-test.el ends here -- 2.11.1 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Fri May 19 17:09:54 2017 Received: (at 16828) by debbugs.gnu.org; 19 May 2017 21:09:54 +0000 Received: from localhost ([127.0.0.1]:55659 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dBp9l-0005zj-5u for submit@debbugs.gnu.org; Fri, 19 May 2017 17:09:53 -0400 Received: from eggs.gnu.org ([208.118.235.92]:59348) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dBp9k-0005zX-4D for 16828@debbugs.gnu.org; Fri, 19 May 2017 17:09:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dBp9b-0003pc-RH for 16828@debbugs.gnu.org; Fri, 19 May 2017 17:09:46 -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.0 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]:36344) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dBp9b-0003pY-Nm; Fri, 19 May 2017 17:09:43 -0400 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:4717 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1dBp9a-0004vE-Vv; Fri, 19 May 2017 17:09:43 -0400 Date: Sat, 20 May 2017 00:09:24 +0300 Message-Id: <83zie81rln.fsf@gnu.org> From: Eli Zaretskii To: npostavs@users.sourceforge.net In-reply-to: <8760gwin7f.fsf@users.sourceforge.net> (npostavs@users.sourceforge.net) Subject: Re: bug#16828: 24.3.50; eval-expression, character representation of integer results time-consuming References: <83mwhk4v48.fsf@gnu.org> <83txbr2sye.fsf@gnu.org> <87zjljf086.fsf@rosalinde.fritz.box> <83a9di3lt1.fsf@gnu.org> <877g8mb3lh.fsf@Rainer.invalid> <530DBEEE.8060805@gmx.at> <87zig84s6l.fsf@users.sourceforge.net> <83wpbc9ldc.fsf@gnu.org> <83lgrs9k8p.fsf@gnu.org> <87inmw3x5b.fsf@users.sourceforge.net> <83fui09i5z.fsf@gnu.org> <87fui03pjr.fsf@users.sourceforge.net> <834lyg9b9t.fsf@gnu.org> <87a88752ej.fsf@users.sourceforge.net> <83y3vr9909.fsf@gnu.org> <878tltiure.fsf@users.sourceforge.net> <83efvl4ann.fsf@gnu.org> <8760gwin7f.fsf@users.sourceforge.net> 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.0 (-----) X-Debbugs-Envelope-To: 16828 Cc: 16828@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.0 (-----) > From: npostavs@users.sourceforge.net > Cc: 16828@debbugs.gnu.org > Date: Fri, 19 May 2017 16:52:20 -0400 > > >> +(octal, hexadecimal, and character if > >> +@code{eval-expression-print-maximum-character} allows it). > > > > Please add a "see below" here, as the description of the variable is > > several dozens of lines farther. > > Right. Is it okay to have nested parentheses? Personally, I prefer to use commas in these cases: +(octal, hexadecimal, and character if +@code{eval-expression-print-maximum-character}, described below, allows it). Thanks, the new version is fine with me. From debbugs-submit-bounces@debbugs.gnu.org Fri May 19 18:27:26 2017 Received: (at 16828) by debbugs.gnu.org; 19 May 2017 22:27:26 +0000 Received: from localhost ([127.0.0.1]:55704 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dBqMo-0007j9-Hb for submit@debbugs.gnu.org; Fri, 19 May 2017 18:27:26 -0400 Received: from mail-io0-f194.google.com ([209.85.223.194]:36117) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dBqMm-0007iq-Mf; Fri, 19 May 2017 18:27:25 -0400 Received: by mail-io0-f194.google.com with SMTP id f102so8652752ioi.3; Fri, 19 May 2017 15:27:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=s/WN7AbycwwMcEt5uy7587bFag5AmXZgnvWfPyNpGQY=; b=ZypiEDfEkqxL4qISBahlANGVFWfbqaGM9q8/II9Ln0L49oGgFgoXVBr4uRaXXWWChL OTLq+oI6hoURS0R2QVNDX+5/90tUzF7ivxO3ivxIzGlMMvmMdjXeG/DN3QBIgoQnk/4y XpFhN5+WSNXvfTdnQAArLUbFXnC9ILqDfb9XQTeEKPiVjFF8y9+PFbidIO7T214WiqUX I6suUPu1eASUK7O2hGN7SnQZWJz0y9Ct9th6Mk8w6FmcRKBy2FX5iSAeViBrpTbozEBc +baIZSezWmF45LUNR/dD3Tq/pxjzT2Z+5kr3DdsFtr1ZJljfYO3brXKNazdFmu5f12ze ATYQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:references:date :in-reply-to:message-id:user-agent:mime-version; bh=s/WN7AbycwwMcEt5uy7587bFag5AmXZgnvWfPyNpGQY=; b=h9xkvucueNGUCGgBAK//ERWuDReYIT36xJpJ6HvGOSn+xZRfu8JdzZ8sODR0Sx9U8q mBGI/BRZTysgI/Y0Xc7U++MFN6VkB+Tz0lFHvaT+1iQyRZH2j0NzFscDiAkS/kVdLXoh iacPBZbloch6hRlPezCZ6u3c9QtkdjjQ9K8Kb4DMRCn5MtqlUzCALzbMB06AFvMTvG7b wo7fGCToWXb4Ua2rh/9q0WeAf9hjp/HzXs2gIWYW1rEx/oZyqFbLvW7FsfYIgy9pgs3+ JPWHxBX02kYObrw9cqVgQSTB1dp2lPydianlYsTG2/n9fz2ilOfDTnuuL351exk3NglN hiRg== X-Gm-Message-State: AODbwcDhyoyniT6/FYxmIt14GQ74AJllrS7ayrx2Ug8yEsKVmh/zwSyQ Q1yiGwVnNsdRkw== X-Received: by 10.107.140.194 with SMTP id o185mr14417471iod.139.1495232838965; Fri, 19 May 2017 15:27:18 -0700 (PDT) Received: from zony ([45.2.7.65]) by smtp.googlemail.com with ESMTPSA id f15sm4399132ioi.58.2017.05.19.15.27.17 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 19 May 2017 15:27:18 -0700 (PDT) From: npostavs@users.sourceforge.net To: Eli Zaretskii Subject: Re: bug#16828: 24.3.50; eval-expression, character representation of integer results time-consuming References: <83txbr2sye.fsf@gnu.org> <87zjljf086.fsf@rosalinde.fritz.box> <83a9di3lt1.fsf@gnu.org> <877g8mb3lh.fsf@Rainer.invalid> <530DBEEE.8060805@gmx.at> <87zig84s6l.fsf@users.sourceforge.net> <83wpbc9ldc.fsf@gnu.org> <83lgrs9k8p.fsf@gnu.org> <87inmw3x5b.fsf@users.sourceforge.net> <83fui09i5z.fsf@gnu.org> <87fui03pjr.fsf@users.sourceforge.net> <834lyg9b9t.fsf@gnu.org> <87a88752ej.fsf@users.sourceforge.net> <83y3vr9909.fsf@gnu.org> <878tltiure.fsf@users.sourceforge.net> <83efvl4ann.fsf@gnu.org> <8760gwin7f.fsf@users.sourceforge.net> <83zie81rln.fsf@gnu.org> Date: Fri, 19 May 2017 18:28:55 -0400 In-Reply-To: <83zie81rln.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 20 May 2017 00:09:24 +0300") Message-ID: <8737c0iiqg.fsf@users.sourceforge.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.1 (--) X-Debbugs-Envelope-To: 16828 Cc: 16828@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: -2.1 (--) tags 16828 fixed close 16828 26.1 quit Eli Zaretskii writes: > Thanks, the new version is fine with me. Pushed to master [1: acd58c9198] [2: 267be4bdc2]. [1: acd58c9198]: 2017-05-19 18:16:38 -0400 Limit integers printed as characters (Bug#16828) http://git.savannah.gnu.org/cgit/emacs.git/commit/?id=acd58c9198c08c3eb631a3f036b4f95073f7fe10 [2: 267be4bdc2]: 2017-05-19 18:16:15 -0400 Refactor lisp eval result printing http://git.savannah.gnu.org/cgit/emacs.git/commit/?id=267be4bdc28564a99f45da29e84eb98838117b50 From unknown Wed Jun 18 23:08:21 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sat, 17 Jun 2017 11: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