bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#18183: 24.3; table-fixed-width-mode fails with kill/yank


From: Lars Ingebrigtsen
Subject: bug#18183: 24.3; table-fixed-width-mode fails with kill/yank
Date: Tue, 08 Dec 2020 14:59:50 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

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.

[...]

> +      (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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]