From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.devel Subject: Re: GNU Emacs raison d'etre Date: Fri, 22 May 2020 01:19:54 +0300 Message-ID: <57928502-aec4-4042-5ac8-d38a960c920b@yandex.ru> References: <5230692c-c665-a330-7a12-e59fa25d97dd@gmail.com> <83sgfybn22.fsf@gnu.org> <1701f0b1-a481-bb45-08b8-99da4a6139fc@gmx.at> <736c1336-58ea-dd1f-18ba-94f902e37f61@yandex.ru> <206d0959-8a6f-ebf9-0230-1cdb41a0c849@gmx.at> <79aa434b-6513-14ff-eb45-ece4ba30590b@yandex.ru> <83eere7jil.fsf@gnu.org> <834ksa7fgy.fsf@gnu.org> <0db86fd4-3add-7863-9102-849a9d270cc3@gmx.at> <83sgfu5vhs.fsf@gnu.org> <8fc4ea19-35ff-5c34-4a25-e1b47ee79e77@yandex.ru> <83pnay5udk.fsf@gnu.org> <83mu625tav.fsf@gnu.org> <0015ade0-d4f9-6ccc-692c-222871251c51@yandex.ru> <83imgq58dm.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="112868"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 Cc: jean.christophe.helary@traduction-libre.org, rms@gnu.org, andreas.roehler@online.de, emacs-devel@gnu.org, kfogel@red-bean.com, rudalics@gmx.at, homeros.misasa@gmail.com, tkk@misasa.okayama-u.ac.jp, sorganov@gmail.com, monnier@iro.umontreal.ca, arthur.miller@live.com, drew.adams@oracle.com, stefankangas@gmail.com To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri May 22 00:20:38 2020 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jbtYL-000TFy-UH for ged-emacs-devel@m.gmane-mx.org; Fri, 22 May 2020 00:20:37 +0200 Original-Received: from localhost ([::1]:58570 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jbtYK-0003Q7-Vg for ged-emacs-devel@m.gmane-mx.org; Thu, 21 May 2020 18:20:36 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:57778) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jbtXl-0002vP-6M for emacs-devel@gnu.org; Thu, 21 May 2020 18:20:01 -0400 Original-Received: from mail-wm1-x32b.google.com ([2a00:1450:4864:20::32b]:54807) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jbtXk-00018h-76; Thu, 21 May 2020 18:20:00 -0400 Original-Received: by mail-wm1-x32b.google.com with SMTP id h4so6912235wmb.4; Thu, 21 May 2020 15:19:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=in/NGUGM7u0FSSkjbYPcjMKPyKPMIeSU5LN9dlBffzs=; b=vTHmKII5MRrhz9j7YmoLaMBgKjOc0VM8QnRIVsqxNwgiJShBieaXZz8sSl3nLZky78 ctm/V+Yu33dxddak3DcoflAbWos3DCB1bBxjti5Eb8KWsgaAeY4TUzUs42QRPIiSRQVf Hv26Jfi4djhEqNHgk45IZzhUdte2j4LOrIdMC5y36XRyU7JZUlrLEwvgs3t3hlIoSuMv KzKhglaaVbuU4EdR7PbgRQXYcHOkUOh67Kl4EC5+nM41QhjSNCyQkPjl3CJWh/Hr3uQG wAzwH3Tn5a2RxQh4MpVom2XH28phypH43Qq4HGn1z38uouOkvivbX7kPFgtG2kANTH9R NoXw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=in/NGUGM7u0FSSkjbYPcjMKPyKPMIeSU5LN9dlBffzs=; b=FSErRKtW39yyd6ZLUKOhA7DVIQFRW4lokuxKKlCgQaN6HlhCoGAtZGJARc3Fuycjmp toKGyvwpFvceCoEP12aHqISBxSAClkEjnPBB4+5M6c2o80XyjL6CWwxWqkGTuo4JA+GR dDQDtHHnERvyfUa1Att+tknOjrl23yE8/cqh8YnH2l/PcduxoZzrBB+1Wo4VnekaylsB Fd4kPmfGlmmfyFydepy5oz026jvNpGbbK5IA6e9ORViu0LaM1B/pUlnAY6nkOLPAytY4 W1N6Fkiqx+XOhQxUKka15I99OL2xKEcNg1kG4O65TZw1xAgHNvSJhmdsxXEIw6uSFEk5 OWQA== X-Gm-Message-State: AOAM532Jmz1px6mTLfUO8AgENFJotKaN8ydL2TFw6dG57piESvYlxu4O lAfaVBwfR0NRRFS0MBG/GZE= X-Google-Smtp-Source: ABdhPJzygx/LJ0/AtZveNzS1PEIFstwj8Ij7o93Mc5wHvAz4uZkyHIvx9sA6m42kS29EnNKXVg6Kng== X-Received: by 2002:a1c:b755:: with SMTP id h82mr3199879wmf.47.1590099598106; Thu, 21 May 2020 15:19:58 -0700 (PDT) Original-Received: from [192.168.0.3] ([66.205.73.129]) by smtp.googlemail.com with ESMTPSA id n6sm7527857wrt.58.2020.05.21.15.19.55 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 21 May 2020 15:19:57 -0700 (PDT) In-Reply-To: <83imgq58dm.fsf@gnu.org> Content-Language: en-US Received-SPF: pass client-ip=2a00:1450:4864:20::32b; envelope-from=raaahh@gmail.com; helo=mail-wm1-x32b.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.001, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:251188 Archived-At: On 21.05.2020 05:28, Eli Zaretskii wrote: >>> eval-last-sexp uses prin1 to display the result, so it is not >>> affected, as intended. >> But aren't all echo area displays targeted at the user anyway? >> >> I'm not saying the current behavior is necessarily "broken", but perhaps >> we could enhance it further. > The intent was to affect messages that are a "surprise" for the user. > eval-last-sexp is invoked by the user, so no surprise here. But not all 'message' calls are a "surprise". One might even say that the vast majority of them aren't. And yet, they obey set-message-function. eval-last-sexp uses 'prin1' under the covers. While it's different from 'message', it's not entirely clear to me that it's intended to be different semantically, e.g. used for distinctly different purposes. So I might as well imagine the same code that calls 'message' decide at some point to call 'prin1' (in addition to 'message', or instead). Looking at its description, it could delegate to 'standard-output', which is overridable. It's not particularly convenient, though. But this patch would do it: @@ -1132,7 +1132,7 @@ ;; 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-limit))) + (if insert-value (current-buffer)) no-truncate char-print-limit))) (defun elisp--eval-last-sexp-print-value (value output &optional no-truncate char-print-limit)