From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.bugs Subject: bug#20421: 25.0.50; doc string of `insert-buffer-substring' Date: Sat, 25 Apr 2015 07:22:31 -0700 (PDT) Message-ID: References: <72ff228c-ad59-4fcc-a9d1-9109c0bb13ec@default> <83siboy7aq.fsf@gnu.org> <553B714A.8050002@gmx.at> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1429971804 17651 80.91.229.3 (25 Apr 2015 14:23:24 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 25 Apr 2015 14:23:24 +0000 (UTC) To: martin rudalics , 20421@debbugs.gnu.org, eliz@gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Apr 25 16:23:11 2015 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Ym0z9-0002ic-4j for geb-bug-gnu-emacs@m.gmane.org; Sat, 25 Apr 2015 16:23:11 +0200 Original-Received: from localhost ([::1]:48505 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ym0z8-0001yo-HA for geb-bug-gnu-emacs@m.gmane.org; Sat, 25 Apr 2015 10:23:10 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:48956) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ym0z5-0001vP-7Q for bug-gnu-emacs@gnu.org; Sat, 25 Apr 2015 10:23:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ym0z1-0004A4-7B for bug-gnu-emacs@gnu.org; Sat, 25 Apr 2015 10:23:07 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:50105) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ym0z1-0004A0-36 for bug-gnu-emacs@gnu.org; Sat, 25 Apr 2015 10:23:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1Ym0z0-0002jK-KR for bug-gnu-emacs@gnu.org; Sat, 25 Apr 2015 10:23:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 25 Apr 2015 14:23:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 20421 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 20421-submit@debbugs.gnu.org id=B20421.142997176110448 (code B ref 20421); Sat, 25 Apr 2015 14:23:02 +0000 Original-Received: (at 20421) by debbugs.gnu.org; 25 Apr 2015 14:22:41 +0000 Original-Received: from localhost ([127.0.0.1]:39881 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Ym0ye-0002iQ-Ch for submit@debbugs.gnu.org; Sat, 25 Apr 2015 10:22:40 -0400 Original-Received: from userp1040.oracle.com ([156.151.31.81]:39728) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Ym0yb-0002iB-DE for 20421@debbugs.gnu.org; Sat, 25 Apr 2015 10:22:37 -0400 Original-Received: from userv0022.oracle.com (userv0022.oracle.com [156.151.31.74]) by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id t3PEMVen014157 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sat, 25 Apr 2015 14:22:31 GMT Original-Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by userv0022.oracle.com (8.13.8/8.13.8) with ESMTP id t3PEMURZ018205 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Sat, 25 Apr 2015 14:22:30 GMT Original-Received: from abhmp0003.oracle.com (abhmp0003.oracle.com [141.146.116.9]) by aserv0121.oracle.com (8.13.8/8.13.8) with ESMTP id t3PEMUqv010622; Sat, 25 Apr 2015 14:22:30 GMT In-Reply-To: <553B714A.8050002@gmx.at> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9 (901082) [OL 12.0.6691.5000 (x86)] X-Source-IP: userv0022.oracle.com [156.151.31.74] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:102020 Archived-At: > > I think that reader misunderstood something else: the difference > > between point and window-point. > > IIUC the issue at hand is more contrived. Conceptually, `window- > point' prescribes the position where to display the cursor in the > corresponding window and `window-point-insertion-type' prescribes > how the cursor should move when text is inserted at that position. =20 > But we also say: >=20 > As long as the selected window displays the current buffer, the > window's point and the buffer's point always move together; they > remain equal. >=20 > So inherently Emacs does override [at least the default value which > is nil of] `window-point-insertion-type' when appending at `window- > point' in the selected window. >=20 > Now apparently that code in `append-to-buffer' >=20 > (dolist (window windows) > (when (=3D (window-point window) point) > (set-window-point window (point)))) >=20 > tries to mimic the same behavior for all non-selected windows that > show the same buffer and whose `window-point' equals the pre-append > position of `point' in that buffer. >=20 > Our reader should be able to see why this code makes a difference > with emacs -Q as follows: >=20 > - Make a frame with two windows showing the same buffer > - Make one of these windows the selected one > - Make sure that both windows have the same value of `window-point' > (show the cursor at the same position) > - Call `append-to-buffer' to add some text to these windows' buffer. >=20 > With the code above, both windows should have the same value of > `window-point' now. Without that code, the point of the non- > selected window should have staid behind the added text. >=20 > I have no idea why `append-to-buffer' deliberately overrides the > value of `window-point-insertion-type' or why the default value of > `window-point-insertion-type' is nil. Maybe Stefan can clarify. Good info, which helps supplement the Q&A at SE (which links to this thread). I wasn't even aware of `window-point-insertion-type', which was introduced in Emacs 23 apparently.