From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Boruch Baum Newsgroups: gmane.emacs.bugs Subject: bug#18183: 24.3; table-fixed-width-mode fails with kill/yank Date: Tue, 8 Dec 2020 08:56:53 -0500 Message-ID: <20201208135653.b3n54ujwakrgffdf@E15-2016.optimum.net> References: <53DE7C34.6030304@gmx.com> <87y2idizbd.fsf@gnus.org> <20201206090648.n23pfcopzkalkwqb@E15-2016.optimum.net> <877dpvc8hm.fsf@gnus.org> <20201206182023.jabgkssgn2g4okjt@E15-2016.optimum.net> <871rg1k9hr.fsf@gnus.org> <87wnxtiubi.fsf@gnus.org> <20201208071802.uzm4q6vtzpzmcbj2@E15-2016.optimum.net> <878sa84drc.fsf@gnus.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="bddvcvkfc5oyfqcb" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="26795"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: NeoMutt/20180716 Cc: 18183@debbugs.gnu.org To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Dec 08 14:59:15 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 1kmdWN-0006rQ-CR for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 08 Dec 2020 14:59:15 +0100 Original-Received: from localhost ([::1]:56090 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kmdWM-0005Jf-7x for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 08 Dec 2020 08:59:14 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:47876) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kmdVF-0005GQ-4A for bug-gnu-emacs@gnu.org; Tue, 08 Dec 2020 08:58:05 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:45401) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kmdVC-0005QU-2u for bug-gnu-emacs@gnu.org; Tue, 08 Dec 2020 08:58:04 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kmdVC-0005vN-0u for bug-gnu-emacs@gnu.org; Tue, 08 Dec 2020 08:58:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Boruch Baum Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 08 Dec 2020 13:58: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.160743582522682 (code B ref 18183); Tue, 08 Dec 2020 13:58:01 +0000 Original-Received: (at 18183) by debbugs.gnu.org; 8 Dec 2020 13:57:05 +0000 Original-Received: from localhost ([127.0.0.1]:56943 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kmdUH-0005tl-0p for submit@debbugs.gnu.org; Tue, 08 Dec 2020 08:57:05 -0500 Original-Received: from mout.gmx.net ([212.227.17.20]:38907) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kmdUE-0005tG-Oy for 18183@debbugs.gnu.org; Tue, 08 Dec 2020 08:57:03 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1607435816; bh=+PkXgiFKJ6XXBhPgmPa14TxWSzrxjkGFSnXWaWGm3YI=; h=X-UI-Sender-Class:Date:From:To:Cc:Subject:References:In-Reply-To; b=TSKXPuMEBTbN/FEyQA3ZqGFaTsvPDvqnVXO8qUyiIGAcAE6Y67PUu3q9cgV2bJqoW W0z1G6Q4bgqJn+cM14ZGPEm9CEAUsRgUSAE6RSBgsB1dBSJKLFCpkNs3Ep0JWZkYoj C+5WlrdiB5T08pfxXgYkBFMP9GWGvdeKNjvYunn0= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Original-Received: from E15-2016.optimum.net ([70.19.86.82]) by mail.gmx.com (mrgmx105 [212.227.17.174]) with ESMTPSA (Nemesis) id 1MfpOT-1kFFk90Koj-00gHay; Tue, 08 Dec 2020 14:56:56 +0100 Content-Disposition: inline In-Reply-To: <878sa84drc.fsf@gnus.org> X-Provags-ID: V03:K1:W8vkzbARAwH70q1uhL73QyMfGYpS/YCAakzgy5UQWReWa8/rKmi hJjZj5QrZGY/aFdjjLHYxHeYIddUjwQNw9M5DQGtn86Fxp7/ytpivsZeb8Bw4rUP3w7ywuD jS2zRzR3RZCAabYR+mSIEJzkDdxahrhpPK0sONxij1dxuLX6CfVtJZLJYnbHWkgYnGv8aSJ t3GaQ2SG4Xto//bccO0eQ== X-UI-Out-Filterresults: notjunk:1;V03:K0:kmcy5CmEdyA=:JTFwVUGUaJeWyusRNQQYu2 TJZwLOtq47U918MME376uhc0YeDH3pz0NnCdZtpW+V94CeeJyJ9DhwNlagzIGyqc0iCjFiXYS m0ISc0vaLclDpn1plZBNhiJdRMJjIAKucvRjxuj9t35rpUYOqFsZx0yIq8edOnUeb8LJGlfI+ LNkR5LA6UoCFp0bJl28I19OCHIvv2aQnjbkuwNWZLshbrNMUVM04s3JyKs+IEhGUzSp+jAolg 6E9kEfdGjT6GExg1cpXHVHIr2vcxpXkS/BDMQl/2ILQdsGZZHK9xjVv5al98Znnw2EbFyKn3u rhBesS71+yoOrb3DkAVa9RnyJ52XqYW4/NrOpBLufvhS7Wx6fMghDpR5BGfDGeg4N2IigK5So r9kDkyRxpUX0wpqGgYXuAsc9jryd74QVg7UQ3lt9kQvOnQshMHmicVJPTsrNNNf0sU2pp5S+e 4BzJxcgBIZXn3G7KfymymdMaM1X2NFlsy7HzJCLH+ZI1iTXwaJxZ4mt7q8Bc2BeHwBGocGdEc h2ZiimaAOWmQi/wzE158NApVIx838QKVCYmbW0AVvrBn1XiUtNHowiT5rBnRYK7JKjPmSMWcJ +I35A2txpxTjzCDVBqKv6jQi9G9elHv/moW9O9RPVwICWOOgMdeYMREJCgkdH9ycVvOUPYW3k X92n4re/6OvV7jnEyOaOEEtQTKNPgf3I/vNwN82jqhW8YSL7M7C9s52cfUPhxzUw7uTfszeJi JvFXS+OJWS8/2ngAAxdCPxhVKVkLoSnUBSfZimk0xC6/2hEpCgi3UpopqFmR67oardnmdQg2 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:195336 Archived-At: --bddvcvkfc5oyfqcb Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2020-12-08 14:40, Lars Ingebrigtsen wrote: > Boruch Baum writes: > > > Hi Lars. I've been doing some more work on the bug and have a solution > > for the secondary issue found, the one that I marked previously as > > 'tangent'. In that related bug, aborting from a table.el edit sets POI= NT > > at the beginning of the table instead of where it was upon entry to th= e > > edit session. The solution was simply to save and restore point. The > > saving is done in function org-src--edit-element and the restore is > > performed in function org-edit-src-abort. Here are the modified > > functions with the two additional lines marked with arrows ; <------ > > Could you send that as a patch instead? It's easier to read. > Attached. =2D- hkp://keys.gnupg.net CA45 09B5 5351 7C11 A9D1 7286 0036 9E45 1595 8BC0 --bddvcvkfc5oyfqcb Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="org-src-18183.patch" Content-Transfer-Encoding: quoted-printable diff --git a/org-src.el b/org-src.el index 7876dea..96ab8ad 100644 =2D-- a/org-src.el +++ b/org-src.el @@ -479,6 +479,7 @@ Leave point in edit buffer." (y-or-n-p "Return to existing edit buffer ([n] will revert changes)? "= ))) ;; Move to existing buffer. (org-src-switch-to-buffer old-edit-buffer 'return) + (setq-local org-src--return-point (point)) ;; Discard old edit buffer. (when old-edit-buffer (with-current-buffer old-edit-buffer (org-src--remove-overlay)) @@ -1106,7 +1107,9 @@ the area in the Org mode buffer." (defun org-edit-src-abort () "Abort editing of the src code and return to the Org buffer." (interactive) - (let (org-src--allow-write-back) (org-edit-src-exit))) + (let (org-src--allow-write-back) + (org-edit-src-exit) + (goto-char org-src--return-point))) (defun org-edit-src-continue (e) "Unconditionally return to buffer editing area under point. --bddvcvkfc5oyfqcb--