From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Paul Eggert Newsgroups: gmane.emacs.bugs Subject: bug#9642: move-overlay creates an empty overlay with the evaporate property Date: Sun, 02 Oct 2011 18:09:43 -0700 Organization: UCLA Computer Science Department Message-ID: <4E890B57.2090602@cs.ucla.edu> References: <4E8648C6.5050905@cs.ucla.edu> <4E86C25D.5010108@cs.ucla.edu> <83hb3tce8w.fsf@gnu.org> <4E87F8D0.5090105@cs.ucla.edu> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1317604251 3042 80.91.229.12 (3 Oct 2011 01:10:51 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 3 Oct 2011 01:10:51 +0000 (UTC) Cc: 9642@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Oct 03 03:10:47 2011 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RAX3P-0005Jw-99 for geb-bug-gnu-emacs@m.gmane.org; Mon, 03 Oct 2011 03:10:47 +0200 Original-Received: from localhost ([::1]:34636 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RAX3O-0002ee-JL for geb-bug-gnu-emacs@m.gmane.org; Sun, 02 Oct 2011 21:10:46 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:48643) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RAX3L-0002eY-IX for bug-gnu-emacs@gnu.org; Sun, 02 Oct 2011 21:10:44 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RAX3K-0007ar-GN for bug-gnu-emacs@gnu.org; Sun, 02 Oct 2011 21:10:43 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:54235) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RAX3K-0007an-Er for bug-gnu-emacs@gnu.org; Sun, 02 Oct 2011 21:10:42 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1RAX4c-0007kC-Di for bug-gnu-emacs@gnu.org; Sun, 02 Oct 2011 21:12:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Paul Eggert Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 03 Oct 2011 01:12:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 9642 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 9642-submit@debbugs.gnu.org id=B9642.131760427029704 (code B ref 9642); Mon, 03 Oct 2011 01:12:02 +0000 Original-Received: (at 9642) by debbugs.gnu.org; 3 Oct 2011 01:11:10 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RAX3l-0007j2-Kw for submit@debbugs.gnu.org; Sun, 02 Oct 2011 21:11:10 -0400 Original-Received: from smtp.cs.ucla.edu ([131.179.128.62]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RAX3i-0007it-1o for 9642@debbugs.gnu.org; Sun, 02 Oct 2011 21:11:08 -0400 Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp.cs.ucla.edu (Postfix) with ESMTP id 8A9FFA6003E; Sun, 2 Oct 2011 18:09:44 -0700 (PDT) X-Virus-Scanned: amavisd-new at smtp.cs.ucla.edu Original-Received: from smtp.cs.ucla.edu ([127.0.0.1]) by localhost (smtp.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id GuohVSWeelp5; Sun, 2 Oct 2011 18:09:44 -0700 (PDT) Original-Received: from [192.168.1.10] (pool-71-189-109-235.lsanca.fios.verizon.net [71.189.109.235]) by smtp.cs.ucla.edu (Postfix) with ESMTPSA id 21EADA60002; Sun, 2 Oct 2011 18:09:44 -0700 (PDT) User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.23) Gecko/20110922 Thunderbird/3.1.15 In-Reply-To: X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Sun, 02 Oct 2011 21:12:02 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 1) 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:52090 Archived-At: On 10/01/11 23:56, Eli Zaretskii wrote: > I say we should fix any code that "traditionally" relies on any such > behavior, and stop heeding to requests of fixing undefined behavior. This sounds like a more-general issue, that affects many aspects of Emacs other than just this bug report, so I'll raise this on emacs-devel. But regardless of the more-general issue, the behavior of move-overlay is not undefined in this case. The Elisp documentation states that for overlays with the evaporate property, "If this property is non-nil, the overlay is deleted automatically if it becomes empty (i.e., if its length becomes zero)." This is a general statement about overlays, and it constrains the behavior of all Emacs built-ins. The documented constraint does not require move-overlay to raise an exception for out-of-range values, or to silently substitute an in-range value. All it says is that whenever move-overlay causes an overlay to become entry, it must delete the overlay. Since make-overlay does not do that, there is a bug in Emacs: either in the code, or in the documentation, or both.