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: Tue, 08 Dec 2020 14:59:50 +0100 Message-ID: <87tuswjt49.fsf@gnus.org> 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> <20201208135653.b3n54ujwakrgffdf@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="4475"; 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, Michael Albinus To: Boruch Baum Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Dec 08 15:03:14 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 1kmdaD-00010K-LZ for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 08 Dec 2020 15:03:13 +0100 Original-Received: from localhost ([::1]:33120 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kmdaC-0007ea-O3 for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 08 Dec 2020 09:03:12 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:48774) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kmdY7-0006fk-1Y for bug-gnu-emacs@gnu.org; Tue, 08 Dec 2020 09:01:04 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:45418) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kmdY6-0006PB-Iv for bug-gnu-emacs@gnu.org; Tue, 08 Dec 2020 09:01:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kmdY6-0006uf-EW for bug-gnu-emacs@gnu.org; Tue, 08 Dec 2020 09:01: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: Tue, 08 Dec 2020 14:01:02 +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.160743600323102 (code B ref 18183); Tue, 08 Dec 2020 14:01:02 +0000 Original-Received: (at 18183) by debbugs.gnu.org; 8 Dec 2020 14:00:03 +0000 Original-Received: from localhost ([127.0.0.1]:56964 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kmdX9-00060C-7p for submit@debbugs.gnu.org; Tue, 08 Dec 2020 09:00:03 -0500 Original-Received: from quimby.gnus.org ([95.216.78.240]:50670) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kmdX6-0005yY-HD for 18183@debbugs.gnu.org; Tue, 08 Dec 2020 09:00:01 -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=1X7uSVHdEmonEv5z25Z+Jp1eALiVbnBiHTRwNbfqEf0=; b=NMfXqmcbhsPpkKyden875GtZr7 cMjTMsD5JQZDKnyOljBmWmqyrIvLJLeRVVYVBoLOXxm1ha/rM4V/dbeo5cFoclF3wGgymbDBNkcWT xp1iUQZO93Q8bDoQw9H++3+yUp3Liv2n9zIiBAYv6n41YZFrBQeHE0d5yAUKs1q/sHoc=; 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 1kmdWy-0002g9-6s; Tue, 08 Dec 2020 14:59:54 +0100 X-Now-Playing: Act 3's _Circuit City_: "Time Of No Time (feat. Elon Battle)" In-Reply-To: <20201208135653.b3n54ujwakrgffdf@E15-2016.optimum.net> (Boruch Baum's message of "Tue, 8 Dec 2020 08:56:53 -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:195338 Archived-At: 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 POINT >> > at the beginning of the table instead of where it was upon entry to the >> > 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. [...] > + (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))) I think this makes sense, but I'm not an org expert, so I've added Michael to the Cc's. Any comments? -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no