From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id AMZsJ7ou52D27wAAgWs5BA (envelope-from ) for ; Thu, 08 Jul 2021 18:58:34 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id wBAgI7ou52BqaAAAbx9fmQ (envelope-from ) for ; Thu, 08 Jul 2021 16:58:34 +0000 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 EE982E5AB for ; Thu, 8 Jul 2021 18:58:33 +0200 (CEST) Received: from localhost ([::1]:55952 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m1XM8-0006kT-GB for larch@yhetil.org; Thu, 08 Jul 2021 12:58:32 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36302) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m1WW6-0007m1-LJ for emacs-orgmode@gnu.org; Thu, 08 Jul 2021 12:04:47 -0400 Received: from smtp1-g21.free.fr ([2a01:e0c:1:1599::10]:19910) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m1WVz-0005uh-O8 for emacs-orgmode@gnu.org; Thu, 08 Jul 2021 12:04:46 -0400 Received: from [IPv6:2a01:e35:39f3:4610:e577:af29:2660:9eb3] (unknown [IPv6:2a01:e35:39f3:4610:e577:af29:2660:9eb3]) by smtp1-g21.free.fr (Postfix) with ESMTPS id D1008B0058E for ; Thu, 8 Jul 2021 18:04:35 +0200 (CEST) To: Org Mode From: tbanelwebmin Subject: [PATCH] bad table formula recorded in some cases Message-ID: <43910853-03cb-c226-f46d-4736d0e6cca6@free.fr> Date: Thu, 8 Jul 2021 18:04:35 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Content-Language: en-US Received-SPF: pass client-ip=2a01:e0c:1:1599::10; envelope-from=tbanelwebmin@free.fr; helo=smtp1-g21.free.fr X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, FREEMAIL_FROM=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.23 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 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1625763514; 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: content-transfer-encoding:content-transfer-encoding:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=i4Mr6lFzR0Ayc5tCB0hpordw2Iig8WBYyjZpAmJZL5o=; b=SBfZnx9phi0pYzlMEpaO2LxwlZPogoqxqOQQT/RCHrRDEu8PtFMteWG4bqxvgl0XEJBCai /D/RTqp53ZAEmmxfN1AbQbpqCRrvN4zEvmbtSyGdpJ20qc3sdJh1KyqcEDaKff5+dwEfd4 GHltML/sIJUUXkBRpX+E8cOdSKlfEI9qgxAhriPE+4laC9WNd3DjNXjxgIUribcnwWjMU4 ZJLdZ2EZEen1AVsQITGrOb9tI7e7OGi2VG9W1dF/6npB5rxoW9OZifPpd9jJbdlnKYMJaz On5vbveyE952iLw8/4+L1hLb5vbT/4KHIJDQAi9ZmmvIQCKe+5HBOiKPGu736Q== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1625763514; a=rsa-sha256; cv=none; b=MiTpk8rO2dpqpAUUo3u0eTvWvH1KGACAfswh9YLvrJKokHDlFTz++bhe8ci1sMju01aztY LX6pOt2R8L3aGt6Uy0ATjakfc7qStaPRSCLypfhYVQo2/N55x6nuQP/2PPU/8NKMZP+76Y y66AgXH3uvbZGGmi1/MB/duO2CObqgjRlKGTkjYn59n6HcZHfJxPPfbjs1Ac7VRByrI3RD suiGwD0iaKR89hokuMu1bIbX4++Ygcml9ajPMgueg3De3zQZUMAsX9RJZEtQB3bcGo37ZP AQIIVxcVDEXXnJgW3Hq0tRCuoUmd5md51aVjGO0TkB0UKwNXV3R2Gc0lCMlNUQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=free.fr (policy=none); spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Spam-Score: -2.31 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=free.fr (policy=none); spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Queue-Id: EE982E5AB X-Spam-Score: -2.31 X-Migadu-Scanner: scn0.migadu.com X-TUID: dAue8tiumOF/ Small bug, small fix. Suppose we have a table embedded in a begin-end block. #+begin: aaa :param value | a | b | | a | b | #+end: Suppose we want to add a formula, with C-c = We end up with an incorrect result: #+begin: aaa :param value | a | 33 | | a |  b |  :param value $2=33 #+end: The fix: in org-table.el, line 2177, change   (insert (or (match-string 2) "#+TBLFM:"))) to   (insert "#+TBLFM:")) Then we get the correct result: #+begin: aaa :param value | a | 33 | | a |  b | #+TBLFM: $2=33 #+end:   Why? Because (match-string 2) is supposed to refer to the (looking-at) instruction 7 lines above. But (match-string 2) is in the else branch, which means that (looking-at) failed. Therefore (match-string 2) returns garbage. Thanks to Uwe Brauer for pointing to this bug.