From: Sean McAfee <eefacm@gmail.com>
To: 35334@debbugs.gnu.org
Subject: bug#35334: 26.2; Changes to position of point are undone during with-current-buffer if window is visible but not current
Date: Fri, 19 Apr 2019 21:00:02 -0700 [thread overview]
Message-ID: <CANan03YX6X1EVcgxT1axzR1npysjDcZQZzovj8kzP1UM_wtxKw@mail.gmail.com> (raw)
[-- 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 --]
next reply other threads:[~2019-04-20 4:00 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-20 4:00 Sean McAfee [this message]
2019-04-20 4:10 ` bug#35334: 26.2; Changes to position of point are undone during with-current-buffer if window is visible but not current 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
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=CANan03YX6X1EVcgxT1axzR1npysjDcZQZzovj8kzP1UM_wtxKw@mail.gmail.com \
--to=eefacm@gmail.com \
--cc=35334@debbugs.gnu.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.