From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id 8YoQKa90qmAxtgAAgWs5BA (envelope-from ) for ; Sun, 23 May 2021 17:28:47 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id CLEnJK90qmDRWAAAB5/wlQ (envelope-from ) for ; Sun, 23 May 2021 15:28:47 +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 C55C4E475 for ; Sun, 23 May 2021 17:28:46 +0200 (CEST) Received: from localhost ([::1]:57874 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lkq21-0007Hp-Tj for larch@yhetil.org; Sun, 23 May 2021 11:28:45 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33984) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lkpuc-0004AD-QG for emacs-orgmode@gnu.org; Sun, 23 May 2021 11:21:06 -0400 Received: from mail-qv1-xf36.google.com ([2607:f8b0:4864:20::f36]:42981) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lkpub-0000xj-7Y for emacs-orgmode@gnu.org; Sun, 23 May 2021 11:21:06 -0400 Received: by mail-qv1-xf36.google.com with SMTP id u33so12933084qvf.9 for ; Sun, 23 May 2021 08:21:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:mime-version; bh=Lc/sXHUyAyAIsyVv3qEME1LPD7NYJORs4w8XFxH2xac=; b=DESi8f1D3FkyAZGnqjyLa7/QKv6cJedvuows515NeQkb57KuEPBlaIADKrhK8qEVuT iqX+Ge33+0hBI38Pw4PWUHcVmHa6Eck5OgO/FFqDMC+LB0vr1zKH2ci3mNLBjKiQfxgh tcY/eMz+V6g0y+8+30YMefQBtFYfD6A767tRvu4Tb//9i1vTqjs48n8B0cQFgQZJgxEO CGEO5PkUuZeUCo9QY7E7sXfsSrs3D+THWiqC899Y7P6Z+qqItV+DPJZXonMbieiHHZD8 R+MjMX9wNMtvQNCzktoixri3hFOvhM3NaARotzYSI1oGV/e0y1BzxqcWjGnlg/Zop2p3 70uQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version; bh=Lc/sXHUyAyAIsyVv3qEME1LPD7NYJORs4w8XFxH2xac=; b=Ereobn0aNp34mR3NzvQ971vGzZnowSg0s+jy5XLE6TRMdaDv0CT71mV0LS1tyDxK+s Zf1/E2Y61F+WOfS1RFZVMwdIvp8wzTv1sSGqlgjZS3McU+PQqRorLvaSFskIDIDmUFP4 um3NUhqwYcWXUHMsb9mivbitzKUi0NWRHPaYYkf9V7wEAqhTV+onRRDf9vCdidNq2s88 c+dV6DS6Xh/Ed/3jn6nmTROYEOg8i6Tuuzt3yi/2GSBIgmftv7dxB3QD4TpuADknDT4X LkWn5zGeg4EeuB6WBOHSiploUs+AFQKpqanTIJG16LxJnuCnwmRK9hH/3wsdMKXdCYCy sAZg== X-Gm-Message-State: AOAM532uljUuel1r+FkVVEyAfm2IVCNZKV4hY1zXkn+bOGTooCvZR4w+ 8Zgl0S5cwMKPPn5WKU/mK6iNxGC872Y= X-Google-Smtp-Source: ABdhPJziCNaBe67OLOUlfuWnJKAfgIbEQSpvXSlDXiUxUNNy0/O9nsdjAAXixh/MkrBBvyS6BEia2g== X-Received: by 2002:a0c:8d44:: with SMTP id s4mr13963329qvb.43.1621783263174; Sun, 23 May 2021 08:21:03 -0700 (PDT) Received: from tbb.theblackbeard.org ([201.213.132.172]) by smtp.gmail.com with ESMTPSA id b17sm8204584qtb.78.2021.05.23.08.21.01 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 23 May 2021 08:21:02 -0700 (PDT) From: Mauro Aranda To: emacs-orgmode@gnu.org Subject: Bug: org-table-clean-line may not return only | and space [9.4.4 (release_9.4.4 @ /home/tbb/code/emacs/emacs/lisp/org/)] [9.4.4 (release_9.4.4 @ /home/tbb/code/emacs/emacs/lisp/org/)] Date: Sun, 23 May 2021 12:21:35 -0300 Message-ID: <87a6olpjb4.fsf@tbb.theblackbeard.org> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2607:f8b0:4864:20::f36; envelope-from=maurooaranda@gmail.com; helo=mail-qv1-xf36.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Sun, 23 May 2021 11:26:43 -0400 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=1621783727; 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:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=Lc/sXHUyAyAIsyVv3qEME1LPD7NYJORs4w8XFxH2xac=; b=XzYJ1l2/SKNK/UFz65H4+vVMEx3f0+hpHZd2WsuRFSFtQDcFxlFZUibbnGMrq+ZajP6lYl o+9hWGduu4Qk4vipMKNqO3/B3j0SHkK8MTkYj280I5SodX+deISJj6dIMW4mqEgn73lgoL TMSFakOT6WtUkFfzJpQQeeE834GxVqyL206nOQPV9vRLlO72OwA6brwcoPnhdiUMIV4x00 VysUUOUYNzCGO9PP9L7dEEqhjASgzGNn3nwgta/SCWjxp/xjIVJCEag4G2j8B1Z+DFY4+n YKPuTsPiPZ4XXbicFm0dctbB9LIsT9zzNGuOzDmgKjYp2WRWJycILxsqmNA5Tw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1621783727; a=rsa-sha256; cv=none; b=bZpOvMaKFPghjb5KEU/xKdyK3M3UeRhq+UzUzzrAa8nVS20/f3adLBTg8w0jwF9LYx4/6C xJVT0+dvOAaaEqZui60MqiYnq+bfb1PCC1M6LCeTIcJefec3aZWzKEvA2oDY6E9Ud5o6PO yd/MZZEulHqF2EaQbwYFp8UR9/1d+sM0LzpeNlUKNUOKJrKUHmFiIw/J/03xgHX2A/Od+v 4Pu7O0pCaTj5nryv04G57Zu+12mcD9UEQ+Cxoce9qXz6tJ4+rfK+x/Gd+k/+fdSyIYZb+W rV9WfHTvUta0QGFiA5iHWB9JUPps67eKXy6Jp87gK1YbzR51QafcYlXA8a1bnA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=DESi8f1D; dmarc=pass (policy=none) header.from=gmail.com; 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: -3.14 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=DESi8f1D; dmarc=pass (policy=none) header.from=gmail.com; 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: C55C4E475 X-Spam-Score: -3.14 X-Migadu-Scanner: scn0.migadu.com X-TUID: PVbnMIKAl/35 Starting from emacs -Q: 1. C-x C-f test.org 2. Write something like the following: Here is a table: |Data1|Data2 3. Make sure to leave the last column without the "|" 4. C-o, with point at the table row. 5. I expected to get a clean row: Here is a table: | | | | Data1 | Data2 | but I got: Here is a table: | | Data2 | | Data1 | Data2 | I realize this might be a corner-case, but I'm used to leave the last column without "|", because TAB is smart enough to add it for me. So the "Data2" repetition becomes a little annoying. If I put point at the row | Data1 | Data2 the following: (org-table-clean-line (buffer-substring (line-beginning-position) (line-end-position))) evaluates to a string that has characters other than "|" and space, but org-table-clean-line says it returns a string with only "|" and space. I've tweaked the relevant regexp in org-table-clean-line to "|\\([ \t]*?[^ \t\r\n|][^\r\n|]*\\)|?" and that fixes it for me. Best regards, Mauro. Emacs : GNU Emacs 28.0.50 (build 5, i686-pc-linux-gnu, GTK+ Version 2.24.33, cairo version 1.16.0) of 2021-05-19 Package: Org mode version 9.4.4 (release_9.4.4 @ /home/tbb/code/emacs/emacs/lisp/org/)