unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#35334: 26.2; Changes to position of point are undone during with-current-buffer if window is visible but not current
@ 2019-04-20  4:00 Sean McAfee
  2019-04-20  4:10 ` Noam Postavsky
  0 siblings, 1 reply; 10+ messages in thread
From: Sean McAfee @ 2019-04-20  4:00 UTC (permalink / raw)
  To: 35334

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

Starting from emacs -Q:

Create a new buffer named "a".  Insert ten asterisks and move point to
the beginning of the buffer.

Split the window and select the scratch buffer in one of them, leaving
buffer "a" visible in the other.  In the scratch buffer, evaluate this
Lisp expression:

(with-current-buffer "a" (goto-char 5) (insert "foo"))

You can see "foo" inserted at position 5 in buffer "a", but point
remains at the beginning of the buffer.

Go to buffer "a", delete the "foo", and move to the beginning of the
buffer again.  Go to the scratch buffer and make it the sole visible
window.  Evaluate the above Lisp expression again.  Go to buffer "a".
"foo" has been inserted at position 5 as before, but now point is at
position 8, after the "foo".

I would expect point to move to position 8 in both cases, and I don't
see anything in the documentation for with-current-buffer or goto-char
to suggest that it ever wouldn't.



In GNU Emacs 26.2 (build 1, x86_64-pc-linux-gnu, X toolkit, Xaw3d scroll
bars)
 of 2019-04-19 built on SeanMc
Windowing system distributor 'The X.Org Foundation', version 11.0.11906000
System Description:    Ubuntu 18.04.2 LTS

Recent messages:
C-x C-g is undefined
C-. is undefined
Undo!
C-. is undefined
nil
Undo!
Mark activated
nil
Quit
Undo!

Configured features:
XAW3D XPM JPEG TIFF GIF PNG SOUND GPM DBUS GSETTINGS GLIB NOTIFY ACL
LIBSELINUX GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB
TOOLKIT_SCROLL_BARS LUCID X11 XDBE XIM THREADS LCMS2

Important settings:
  value of $LANG: en_US.UTF-8
  value of $XMODIFIERS: @im=ibus
  locale-coding-system: utf-8-unix

Major mode: Fundamental

Minor modes in effect:
  tooltip-mode: t
  global-eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug message rmc puny seq byte-opt gv
bytecomp byte-compile cconv cl-loaddefs cl-lib dired dired-loaddefs
format-spec rfc822 mml easymenu mml-sec password-cache epa derived epg
epg-config gnus-util rmail rmail-loaddefs mm-decode mm-bodies mm-encode
mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047
rfc2045 ietf-drums mm-util mail-prsvr mail-utils elec-pair time-date
mule-util tooltip eldoc electric uniquify ediff-hook vc-hooks
lisp-float-type mwheel term/x-win x-win term/common-win x-dnd tool-bar
dnd fontset image regexp-opt fringe tabulated-list replace newcomment
text-mode elisp-mode lisp-mode prog-mode register page menu-bar
rfn-eshadow isearch timer select scroll-bar mouse jit-lock font-lock
syntax facemenu font-core term/tty-colors frame cl-generic cham georgian
utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean
japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european
ethiopic indian cyrillic chinese composite charscript charprop
case-table epa-hook jka-cmpr-hook help simple abbrev obarray minibuffer
cl-preloaded nadvice loaddefs button faces cus-face macroexp files
text-properties overlay sha1 md5 base64 format env code-pages mule
custom widget hashtable-print-readable backquote threads dbusbind
inotify lcms2 dynamic-setting system-font-setting font-render-setting
x-toolkit x multi-tty make-network-process emacs)

Memory information:
((conses 16 96878 15032)
 (symbols 48 20303 1)
 (miscs 40 69 168)
 (strings 32 29315 1561)
 (string-bytes 1 758564)
 (vectors 16 14757)
 (vector-slots 8 508710 8162)
 (floats 8 51 278)
 (intervals 56 278 13)
 (buffers 992 12))

[-- Attachment #2: Type: text/html, Size: 4285 bytes --]

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

end of thread, other threads:[~2019-05-01  0:55 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-04-20  4:00 bug#35334: 26.2; Changes to position of point are undone during with-current-buffer if window is visible but not current Sean McAfee
2019-04-20  4:10 ` Noam Postavsky
2019-04-21 23:32   ` Sean McAfee
2019-04-22  2:38     ` Noam Postavsky
2019-04-22  7:22       ` Eli Zaretskii
2019-04-27 21:05       ` Sean McAfee
2019-04-28  2:19         ` Noam Postavsky
2019-04-30 21:58           ` Sean McAfee
2019-05-01  0:55             ` Noam Postavsky
2019-04-27 21:07       ` Noam Postavsky

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).