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

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

Behavior of with-current-buffer


From: Andreas Röhler
Subject: Behavior of with-current-buffer
Date: Wed, 15 Apr 2020 09:37:22 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0

Hi,

have a buffer connected with a Python-process, however not in comint-mode - for speed. See upper window in attachment not-point-max.png.

In the case given "import json" was sent to this buffer by a function ‘py-fast-send-string’ which is shown partially in window below.

This function checks for a newline-char at the end of the string - actually an extra "\n" was sent inside this or-clause.

After sending "\n", second-cursor in output-buffer is shown after the newly inserted prompt at EOB. However, when or-clause returns, the cursor jumps back to the position before the last prompt started, i.e. at position before sending.

An extra (goto-char (point-max)) as shown in code would help, but shouldn't be necessary.

Any explanation? A bug?

Thanks,
Andreas
GNU Emacs 28.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 2.24.32, cairo version 1.16.0) of 2020-04-06




Attachment: not-point-max.png
Description: PNG image


reply via email to

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