From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.bugs Subject: bug#18183: 24.3; table-fixed-width-mode fails with kill/yank Date: Sun, 06 Dec 2020 15:30:29 +0100 Message-ID: <877dpvc8hm.fsf@gnus.org> References: <53DE7C34.6030304@gmx.com> <87y2idizbd.fsf@gnus.org> <20201206090648.n23pfcopzkalkwqb@E15-2016.optimum.net> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="6709"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: 18183@debbugs.gnu.org To: Boruch Baum Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Dec 06 15:31:10 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1klv4A-0001eA-Do for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 06 Dec 2020 15:31:10 +0100 Original-Received: from localhost ([::1]:60440 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1klv49-00062i-14 for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 06 Dec 2020 09:31:09 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:59604) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1klv42-00062b-CV for bug-gnu-emacs@gnu.org; Sun, 06 Dec 2020 09:31:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:37712) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1klv42-0006hX-4d for bug-gnu-emacs@gnu.org; Sun, 06 Dec 2020 09:31:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1klv42-0004tr-1l for bug-gnu-emacs@gnu.org; Sun, 06 Dec 2020 09:31:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 06 Dec 2020 14:31:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 18183 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: moreinfo Original-Received: via spool by 18183-submit@debbugs.gnu.org id=B18183.160726504418810 (code B ref 18183); Sun, 06 Dec 2020 14:31:01 +0000 Original-Received: (at 18183) by debbugs.gnu.org; 6 Dec 2020 14:30:44 +0000 Original-Received: from localhost ([127.0.0.1]:49258 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1klv3k-0004tK-Gc for submit@debbugs.gnu.org; Sun, 06 Dec 2020 09:30:44 -0500 Original-Received: from quimby.gnus.org ([95.216.78.240]:53204) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1klv3j-0004t7-CG for 18183@debbugs.gnu.org; Sun, 06 Dec 2020 09:30:43 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=NJI56shoPCSIPnU6A5B/Uv+qGVPEQzHa+ahXvgmI/yY=; b=MQR9JdTvtO9g5ESY5gIOAxcf8T TAHU8ZSMPvGCZxM/82zQzl2NIg6LMOLJqN/rvdDkQPOrniJ50YoSdwX32QKNd51Sy3MMPv/Z+JgS4 1FVucqOMjFNrbRgKNAS6baYm+MHy0MytLx3X64mfsPb8XZRXDIb5n0NOXhI7etF54L0o=; Original-Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1klv3a-00051p-Hr; Sun, 06 Dec 2020 15:30:37 +0100 Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwAgMAAAAqbBEUAAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAADFBMVEUjGxotJSZOR07/ //8trI8JAAAAAWJLR0QDEQxM8gAAAAd0SU1FB+QMBg4ZADAExfsAAAFASURBVCjPdZKxTsQwDIZt qVmYitQw8DSJRPYW5Y/E7Te0j8EjINrhZopUPyV22uO4gQxNvjr2/8cJ0W04Iv6Fhu6G7/8DdweZ z5iRdwKP0HENthRuxVsHtFXFNnsDOoCooz8Q9oztmkxNIjHRxwoDTZ86wcJNSyOIB1jYgYCUai1W UMHe9HxWSyxz9e3QG2zVJJtZPslqISDozyeRJZi/rOCKiE7o8mB1JpEYwahNAyR2MVQbWmha4JPf LbtSLjEomAhnbFr5hZAYkdy4DTCjVXoSpLhDVh9fIdEKFZ31swVPYmNRqU29jaov73OR76SFHxQ+ 1iKreeMKJ80zyWfdZlCgbeThdTki2XprK8CRHTmWwDj31ngmBP8WbZFblz3VO3UU+r23vZ6RnCYc 7yZZK8NxdU77fbwKZnNgwK219wferm6PhYYHpQAAACV0RVh0ZGF0ZTpjcmVhdGUAMjAyMC0xMi0w NlQxNDoyNTowMCswMDowMK0ty8QAAAAldEVYdGRhdGU6bW9kaWZ5ADIwMjAtMTItMDZUMTQ6MjU6 MDArMDA6MDDccHN4AAAAAElFTkSuQmCC X-Now-Playing: Helen Money's _Atomic_: "Brave One" In-Reply-To: <20201206090648.n23pfcopzkalkwqb@E15-2016.optimum.net> (Boruch Baum's message of "Sun, 6 Dec 2020 04:06:48 -0500") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:195102 Archived-At: Boruch Baum writes: >> > typing directly into a cells in tables does not change the size of the >> > cell when table-fixed-width-mode is set; however, yanking and killing >> > within a cell does change the size of the cell. >> >> (This bug report unfortunately got no response at the time.) >> >> Do you have a recipe, starting from "emacs -Q", to reproduce this bug? > > Yes. A form of this bug is reproducible in emacs-snapshot, > inconsistencies of mode's definition, so I'm providing a recipe for the > simplest case, tested in an October version of emacs-snapshot. > > After opening a fresh emacs: > > 1) find an org-mode file > 2) create an org-mode heading line just to show you're in org mode, eg > * foo > 3) M-x table-fixed-width-mode > 4) Verify by evaluating table-fixed-width-mode and getting a 't' result > 5) Create a table, using the defaults of M-x table-insert > 6) C-c ' to edit the current table cell > 7) Insert a string greater than the cell width. The expected behavior is > "A word that is too long to fit in a cell is chopped into multiple > lines". Note that is not the case within the cell editor pop-up > buffer. Rather the cell width is expanded. > 8) Save your cell-edit changes using C-c '. Note the persistence of the > unexpected behavior. > > My vague vague memory of the distant past when I submitted the bug > report was that the unexpected behavior was different, as described in > my initial report, but some form of that original bug remains, just now > it's more consistent, and behaves just as badly whether inserting or > yanking text into a cell. I see the same behaviour on the trunk. > At this point, since the behavior is consistent, a lazy way to 'fix' the > bug might be to just change the docstring... Well, that would make table-fixed-width-mode useless? (Which it is, indeed, already.) I tried debugging this, and while there is a bunch of code to handle the fixed-width setting, I don't understand the code. table--cell-insert-char always inserts non-space chars, no matter what the setting is, and then table--measure-max-width measures the new width, which makes table-with-cache-buffer widen the cell. So I'm wondering -- has this ever worked? -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no