From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: evaluating numbers Date: Thu, 14 Nov 2019 11:20:07 +0200 Message-ID: <831rua95mg.fsf@gnu.org> References: <875zjw2emg.fsf@gmx.net> <618B38D9-CD34-4200-8CA1-1A6B0922A83A@traduction-libre.org> <871ruk2d3f.fsf@gmx.net> <3C929D7B-1C10-4713-9EDA-55C80FC36AD8@traduction-libre.org> <835zjvg385.fsf@gnu.org> <83sgmyd6rw.fsf@gnu.org> <835zjucwbz.fsf@gnu.org> <628A3663-BDD3-47C5-B4F4-E260FD900691@traduction-libre.org> <83o8xla50f.fsf@gnu.org> Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="236558"; mail-complaints-to="usenet@blaine.gmane.org" Cc: emacs-devel@gnu.org To: Jean-Christophe Helary Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Nov 14 10:22:13 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iVBKO-000zNZ-G0 for ged-emacs-devel@m.gmane.org; Thu, 14 Nov 2019 10:22:12 +0100 Original-Received: from localhost ([::1]:54704 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iVBKN-00038p-8D for ged-emacs-devel@m.gmane.org; Thu, 14 Nov 2019 04:22:11 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:59426) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iVBIe-0000vt-D2 for emacs-devel@gnu.org; Thu, 14 Nov 2019 04:20:26 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:46908) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1iVBId-0008Dv-FJ; Thu, 14 Nov 2019 04:20:23 -0500 Original-Received: from [176.228.60.248] (port=2788 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1iVBIc-0006BF-Rf; Thu, 14 Nov 2019 04:20:23 -0500 In-reply-to: (message from Jean-Christophe Helary on Sun, 10 Nov 2019 09:22:19 +0900) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] 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.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:242134 Archived-At: > From: Jean-Christophe Helary > Date: Sun, 10 Nov 2019 09:22:19 +0900 > > >> (decode-char 'emacs 345) > >> 345 (#o531, #x159) > > > > And the code that displays "345 (#o531, #x159)" doesn't know that this > > 345 is coming out of a function which is expected to return characters. > > Considering the documentation of decode-char ("returns a character"), that's either an implementation error or a documentation error... It's neither, because characters are integers in Emacs, and a character is identical to its codepoint. > And if the intent is "returns an integer that is the code point of the character that sometimes gets to be displayed and sometimes not... etc." then let it be documented that way. But you can't say "it's a character, except when it's not, and Emacs wouldn't know the difference anyway, so oops". See above.