all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#34977: org-edit-src-code undesirable behaviour
@ 2019-03-24 16:33 pinkanon pinkanon
  2019-05-05 10:24 ` Nicolas Goaziou
  0 siblings, 1 reply; 3+ messages in thread
From: pinkanon pinkanon @ 2019-03-24 16:33 UTC (permalink / raw)
  To: 34977

GNU Emacs 26.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.7) of 2019-03-17
Org mode version 9.1.9 (release_9.1.9-65-g5e4542 @ /usr/share/emacs/26.1/lisp/org/)

There are two things that work undesirably for me when using org-edit-src-code:
(1) With a selected region, the point in the edit buffer will be one line below the bottom of the selection.
(2) After closing the edit buffer, if it was modified, the point jumps to the beginning of the block.
(3) If I wanted to programmatically edit src code in the block, is calling 'org-edit-src-code the right way anyway? Because there seems to be some lag, besides the points mentioned above.

Steps to reproduce:

M-x org-mode

Eval this function:

  (defun commit-bad-deeds ()
    (interactive)
    (let* ((p (point))
           (w (get-buffer-window (current-buffer))))
      (org-edit-src-code)
      (gnus-delete-line) ; any code that modifies buffer
      (org-edit-src-exit)
      (set-window-point w p)))

Bind it:

(global-set-key (kbd "M-w") 'commit-bad-deeds)

Paste this code:

#+BEGIN_SRC elisp
(1) cursor jumps to the beginning of this line
(2) lawfully-good line to be selected
(3) and this line to be murdered instead
(4) w/ no witnesses
#+END_SRC

- Jump to line (2)
- Select whole line: (progn (end-of-line) (set-mark (line-beginning-position))) or any other way
- press M-w

Observe:
(1) Line (3) removed instead of (2)
(2) Point jumping to the beginning of the block
(3) Lag?





^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#34977: org-edit-src-code undesirable behaviour
  2019-03-24 16:33 bug#34977: org-edit-src-code undesirable behaviour pinkanon pinkanon
@ 2019-05-05 10:24 ` Nicolas Goaziou
  2020-05-24  8:19   ` Bastien
  0 siblings, 1 reply; 3+ messages in thread
From: Nicolas Goaziou @ 2019-05-05 10:24 UTC (permalink / raw)
  To: pinkanon pinkanon; +Cc: 34977

Hello,

pinkanon pinkanon <pinkanon.pinkanon@yandex.ru> writes:

> There are two things that work undesirably for me when using org-edit-src-code:
> (1) With a selected region, the point in the edit buffer will be one line below the bottom of the selection.
> (2) After closing the edit buffer, if it was modified, the point jumps to the beginning of the block.
> (3) If I wanted to programmatically edit src code in the block, is calling 'org-edit-src-code the right way anyway? Because there seems to be some lag, besides the points mentioned above.
>
> Steps to reproduce:
>
> M-x org-mode
>
> Eval this function:
>
>   (defun commit-bad-deeds ()
>     (interactive)
>     (let* ((p (point))
>            (w (get-buffer-window (current-buffer))))
>       (org-edit-src-code)
>       (gnus-delete-line) ; any code that modifies buffer
>       (org-edit-src-exit)
>       (set-window-point w p)))
>
> Bind it:
>
> (global-set-key (kbd "M-w") 'commit-bad-deeds)
>
> Paste this code:
>
> #+BEGIN_SRC elisp
> (1) cursor jumps to the beginning of this line
> (2) lawfully-good line to be selected
> (3) and this line to be murdered instead
> (4) w/ no witnesses
> #+END_SRC
>
> - Jump to line (2)
> - Select whole line: (progn (end-of-line) (set-mark (line-beginning-position))) or any other way
> - press M-w
>
> Observe:
> (1) Line (3) removed instead of (2)
> (2) Point jumping to the beginning of the block
> (3) Lag?

I cannot reproduce any of these observations. Could you check that no
other function is interfering?

Regards,

-- 
Nicolas Goaziou

^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#34977: org-edit-src-code undesirable behaviour
  2019-05-05 10:24 ` Nicolas Goaziou
@ 2020-05-24  8:19   ` Bastien
  0 siblings, 0 replies; 3+ messages in thread
From: Bastien @ 2020-05-24  8:19 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: 34977-done, pinkanon pinkanon

Hi,

Nicolas Goaziou <mail@nicolasgoaziou.fr> writes:

> I cannot reproduce any of these observations. Could you check that no
> other function is interfering?

Well, I tried and could not reproduce this either.

I am closing the bug report.

-- 
 Bastien




^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-05-24  8:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-03-24 16:33 bug#34977: org-edit-src-code undesirable behaviour pinkanon pinkanon
2019-05-05 10:24 ` Nicolas Goaziou
2020-05-24  8:19   ` Bastien

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.