From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id WN6JA6/pwWK7kgAAbAwnHQ (envelope-from ) for ; Sun, 03 Jul 2022 21:10:39 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id GFqFA6/pwWK1CgAAauVa8A (envelope-from ) for ; Sun, 03 Jul 2022 21:10:39 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id B57BF5AD6 for ; Sun, 3 Jul 2022 21:10:38 +0200 (CEST) Received: from localhost ([::1]:55574 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o84zN-0002SE-Fn for larch@yhetil.org; Sun, 03 Jul 2022 15:10:37 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38000) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o84yk-0002Rr-Do for emacs-orgmode@gnu.org; Sun, 03 Jul 2022 15:09:58 -0400 Received: from smtp1-g21.free.fr ([2a01:e0c:1:1599::10]:32450) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o84yi-0005KU-Rc for emacs-orgmode@gnu.org; Sun, 03 Jul 2022 15:09:58 -0400 Received: from tosh-laptop (unknown [IPv6:2a01:e0a:505:3460:1a16:a0c4:3f89:c0d9]) by smtp1-g21.free.fr (Postfix) with ESMTPS id DF843B004B6; Sun, 3 Jul 2022 21:09:51 +0200 (CEST) Received: by tosh-laptop (sSMTP sendmail emulation); Sun, 03 Jul 2022 21:11:44 +0200 From: Bruno Barbier To: Uwe Brauer , emacs-orgmode@gnu.org Subject: Re: [more absurd] (was: org-table-sort-lines (numerically) leaves 0 separated) In-Reply-To: <87o7y6aw8l.fsf@mat.ucm.es> References: <87zghtv1o1.fsf@mat.ucm.es> <87o7y6aw8l.fsf@mat.ucm.es> Date: Sun, 03 Jul 2022 21:11:44 +0200 MIME-Version: 1.0 Content-Type: text/plain Received-SPF: softfail client-ip=2a01:e0c:1:1599::10; envelope-from=brubar.cs@gmail.com; helo=smtp1-g21.free.fr X-Spam_score_int: 12 X-Spam_score: 1.2 X-Spam_bar: + X-Spam_report: (1.2 / 5.0 requ) BAYES_00=-1.9, DKIM_ADSP_CUSTOM_MED=0.001, FORGED_GMAIL_RCVD=1, FREEMAIL_FROM=0.001, MISSING_MID=0.497, NML_ADSP_CUSTOM_MED=0.9, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_SOFTFAIL=0.665, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action Message-Id: X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1656875438; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post; bh=9Gt3Q6rEMiawLsv/dF9+NYrWBrboOyM81kRrVYq/Vq0=; b=o/Iqc0t/fTRhmMSu95kaDLZu1Yd0mcHkOSVL5mgty21+l3Q2R+J0O5qYmw1poi/B+3COab pqIBXeQjTluiw9qS3FmEZVF4p/xICB/WqaSNV5BsZIMOg1E0SABeHm7P8ltgiMXkQmwBVa MQFvkRHia77OYIXmJIjSM5CNVMIDEf1yFdrQLvS6I7WhCMoPH7X+ykP+eZt+bc++3BSNUM bhCuLxR0m80c2agOh20CQvgqkeCRK01lfReDT9dFVGBg1G8WZcf7T6mtuwpG20onNoEiTa PQt9kggpO5UPo6cqW2XqtQQJ8/6/ihoU+GFjSIM+RSNCXWUSNzNUFlfImwy/dQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1656875438; a=rsa-sha256; cv=none; b=Y7pkAjriuUEWTA9wofY4LQpmc0MFhgnpkybxKg4jGVTPJdDTGFdXS/HkrNaWEld9UXgf28 xnhXYFA8PRbPirKIcCm7ewyshnDB/MQCLVgV/IIMg9Vc0Qxlo3S6IFzBsVUZ5QuZ7klQ2q gi89/mD60hlRwbwouCMR9xogpSOapTw9YWMHF1eBmtNb68klZJ4X4q5omNrTcPYAXNDgDR /eQYGXESuKyxN0ZSLy5k0E49VyeaNxIK+Brqyam0mukj8UO6ywDXoRu9AOxxHSzWQMYfdi KU8WB+R41W2rqqwb6a70pPinS4lWrKA+pWNyQcIz0WRzPbxQZxqjoAiM338XRQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: 0.66 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: B57BF5AD6 X-Spam-Score: 0.66 X-Migadu-Scanner: scn0.migadu.com X-TUID: qLl9w8+ze0iZ Uwe Brauer writes: > Consider > > | 2 | > | 1 | > | 1 | > | 0 | > | | > | | > > (org-table-sort-lines nil nil nil nil t) (numerically 'n' gives) ... > > So no empty lines, what the hell is going on here? The reason is probably that the function 'string-to-number' return 0 for anything that cannot be converted to a number. Thus, as far as sorting is concerned, "not a number cells" and "cells containing zeros" are the same and can be put in any arbitrary order. Maybe org should handle NaN cells in a better way. Bruno