From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.bugs Subject: bug#30028: 24.5; behavior and doc of `revert-buffer' wrt markers Date: Mon, 8 Jan 2018 09:35:48 -0800 (PST) Message-ID: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1515435442 20744 195.159.176.226 (8 Jan 2018 18:17:22 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 8 Jan 2018 18:17:22 +0000 (UTC) To: 30028@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Jan 08 19:17:18 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eYbz1-0004rN-M2 for geb-bug-gnu-emacs@m.gmane.org; Mon, 08 Jan 2018 19:17:15 +0100 Original-Received: from localhost ([::1]:49676 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eYc0z-0007kT-63 for geb-bug-gnu-emacs@m.gmane.org; Mon, 08 Jan 2018 13:19:17 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57696) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eYc0n-0007ij-JJ for bug-gnu-emacs@gnu.org; Mon, 08 Jan 2018 13:19:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eYc0k-000432-96 for bug-gnu-emacs@gnu.org; Mon, 08 Jan 2018 13:19:05 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:32960) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eYc0k-00042Y-23 for bug-gnu-emacs@gnu.org; Mon, 08 Jan 2018 13:19:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1eYc0j-0001gJ-Sz for bug-gnu-emacs@gnu.org; Mon, 08 Jan 2018 13:19:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 08 Jan 2018 18:19:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 30028 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.15154355396451 (code B ref -1); Mon, 08 Jan 2018 18:19:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 8 Jan 2018 18:18:59 +0000 Original-Received: from localhost ([127.0.0.1]:41641 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eYc0h-0001fz-JO for submit@debbugs.gnu.org; Mon, 08 Jan 2018 13:18:59 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:38384) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eYc0f-0001ff-9M for submit@debbugs.gnu.org; Mon, 08 Jan 2018 13:18:58 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eYc0Y-0003tU-VU for submit@debbugs.gnu.org; Mon, 08 Jan 2018 13:18:52 -0500 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:34060) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1eYc0Y-0003tF-Q3 for submit@debbugs.gnu.org; Mon, 08 Jan 2018 13:18:50 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57576) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eYc0X-0007aT-IB for bug-gnu-emacs@gnu.org; Mon, 08 Jan 2018 13:18:50 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eYc0U-0003ou-2Y for bug-gnu-emacs@gnu.org; Mon, 08 Jan 2018 13:18:49 -0500 Original-Received: from aserp2130.oracle.com ([141.146.126.79]:33004) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1eYc0T-0003oB-NS for bug-gnu-emacs@gnu.org; Mon, 08 Jan 2018 13:18:45 -0500 Original-Received: from pps.filterd (aserp2130.oracle.com [127.0.0.1]) by aserp2130.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w08IH36Q113274 for ; Mon, 8 Jan 2018 18:18:44 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=mime-version : message-id : date : from : sender : to : subject : content-type : content-transfer-encoding; s=corp-2017-10-26; bh=4OhOMCEY/g8S2FhgmYWBrqwVWUst0j+YRW0DhdRkQ+w=; b=h57lhcbqW8OU6051NDpHn1WQ9LK5impdQ/DDDYY3awrh8z3V0zAgAowRe0z87jX+Rvyi EX8VvNi4aF3ObLWzSpR72AQeSn6z5y8hb110qxBTWISLj9diUN7OPgcALJb62ldUXy0e V3cB/vrUb4hjgS6SzpGrJe4WLKZGPAWzzyxIR/QbiYXRgX7HoOdJZvYPUqGQwmPG6/fv JwM0Nb5BSUMIcvO5PKZMhs5411AX1hnBANQcC70QKoqOlaaAPaHo+PAIMmIqFOUb15SX bQ9nnzC50brS1vplAxPZ/xusFTq+zw9xgj5moS6OvzclaxDl37Otu7X2PVCeLOOJjCmZ Aw== Original-Received: from userv0022.oracle.com (userv0022.oracle.com [156.151.31.74]) by aserp2130.oracle.com with ESMTP id 2fcdd7052q-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Mon, 08 Jan 2018 18:18:44 +0000 Original-Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by userv0022.oracle.com (8.14.4/8.14.4) with ESMTP id w08HZodG003063 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Mon, 8 Jan 2018 17:35:51 GMT Original-Received: from abhmp0007.oracle.com (abhmp0007.oracle.com [141.146.116.13]) by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id w08HZnuM006683 for ; Mon, 8 Jan 2018 17:35:50 GMT X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 16.0.4627.0 (x86)] X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8768 signatures=668652 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=1 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1711220000 definitions=main-1801080260 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] [fuzzy] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.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" Xref: news.gmane.org gmane.emacs.bugs:141900 Archived-At: That markers are typically restored when you revert is important. This behavior is not very well documented, I think. 1. Doc: The elisp manual (node `Reverting'), but not the doc string, mentions that markers at the beginning and end of the buffer (after changes) are generally preserved (restored). The doc string should mention this also - it says nothing about markers. 2. Doc: This restoring of markers happens for visited files, but not necessarily for other buffers, presumably. The doc in at least the manual should make this clear. 3. Behavior: The manual says that preserving other markers, besides those described, "would be problematical". (You might want to change that to "problematic", but this is not important - http://grammarist.com/usage/problematic-problematical) I can understand that in some cases restoring a marker would not position it correctly. But I don't see why Emacs wouldn't/couldn't restore all markers anyway. Or does it? The doc does not make clear whether markers that are not "preserved" are deleted or just not necessarily in the correct positions. Please make clear just how (all) markers are handled. What criteria does Emacs use for filtering out markers that it decides not to restore? 4. Trying to track down where the marker handling (e.g. saving/restoring) takes place sent me down multiple levels of code. My guess (I don't have the C sources) is that it is actually done in `insert-file-contents'. But the doc for that function (both (elisp) `Reading from Files' and doc string) says even less about marker handling than does the doc for `revert-buffer'. Can we please get more informative doc about this handling? In GNU Emacs 24.5.1 (i686-pc-mingw32) of 2015-04-11 on LEG570 Windowing system distributor `Microsoft Corp.', version 6.1.7601 Configured using: `configure --prefix=3D/c/usr --host=3Di686-pc-mingw32'