all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Boruch Baum <boruch_baum@gmx.com>
To: Lars Ingebrigtsen <larsi@gnus.org>
Cc: 18183@debbugs.gnu.org
Subject: bug#18183: 24.3; table-fixed-width-mode fails with kill/yank
Date: Tue, 8 Dec 2020 08:56:53 -0500	[thread overview]
Message-ID: <20201208135653.b3n54ujwakrgffdf@E15-2016.optimum.net> (raw)
In-Reply-To: <878sa84drc.fsf@gnus.org>

[-- Attachment #1: Type: text/plain, Size: 852 bytes --]

On 2020-12-08 14:40, Lars Ingebrigtsen wrote:
> Boruch Baum <boruch_baum@gmx.com> 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.

--
hkp://keys.gnupg.net
CA45 09B5 5351 7C11 A9D1  7286 0036 9E45 1595 8BC0

[-- Attachment #2: org-src-18183.patch --]
[-- Type: text/x-diff, Size: 940 bytes --]

diff --git a/org-src.el b/org-src.el
index 7876dea..96ab8ad 100644
--- 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.

  reply	other threads:[~2020-12-08 13:56 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-03 18:15 bug#18183: 24.3; table-fixed-width-mode fails with kill/yank Boruch Baum
2020-12-04 11:29 ` Lars Ingebrigtsen
2020-12-06  9:06   ` Boruch Baum
2020-12-06 14:30     ` Lars Ingebrigtsen
2020-12-06 18:20       ` Boruch Baum
2020-12-07 13:53         ` Lars Ingebrigtsen
2020-12-07 14:06           ` Lars Ingebrigtsen
2020-12-07 17:36             ` Boruch Baum
2020-12-07 18:21             ` Boruch Baum
2020-12-08 13:39               ` Lars Ingebrigtsen
2020-12-07 19:18             ` Boruch Baum
2020-12-08  7:18             ` Boruch Baum
2020-12-08 13:40               ` Lars Ingebrigtsen
2020-12-08 13:56                 ` Boruch Baum [this message]
2020-12-08 13:59                   ` Lars Ingebrigtsen
2020-12-08 14:30                     ` Michael Albinus
2020-12-08 14:49                       ` Lars Ingebrigtsen
2020-12-10 10:37                         ` Bastien
2020-12-14  9:36                           ` Boruch Baum
2020-12-14 18:21                             ` Bastien
2020-12-14 19:32                               ` Boruch Baum
2020-12-08  7:46             ` Boruch Baum
2020-12-07 16:02           ` Boruch Baum
     [not found]           ` <20201209115145.oamb5hjjv65bw23s@E15-2016.optimum.net>
2020-12-09 11:53             ` Boruch Baum
2020-12-09 19:35               ` Lars Ingebrigtsen
2020-12-10  7:04                 ` Boruch Baum

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201208135653.b3n54ujwakrgffdf@E15-2016.optimum.net \
    --to=boruch_baum@gmx.com \
    --cc=18183@debbugs.gnu.org \
    --cc=larsi@gnus.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.