From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#13743: 24.2.93; Segmentation fault when trying to [s]teal a file opened elsewhere Date: Mon, 25 Feb 2013 10:25:15 -0500 Message-ID: References: <5125ADA9.3070603@cs.ucla.edu> <51283965.2020107@yandex.ru> <837glzkqvc.fsf@gnu.org> <83621ilvk9.fsf@gnu.org> <512A31A0.4040804@yandex.ru> <83ehg5k8xe.fsf@gnu.org> <512AFC18.4090504@yandex.ru> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1361805930 2546 80.91.229.3 (25 Feb 2013 15:25:30 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 25 Feb 2013 15:25:30 +0000 (UTC) Cc: 13743@debbugs.gnu.org To: Dmitry Gutov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Feb 25 16:25:53 2013 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 1U9zw7-0007hE-RA for geb-bug-gnu-emacs@m.gmane.org; Mon, 25 Feb 2013 16:25:51 +0100 Original-Received: from localhost ([::1]:44271 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U9zvm-0006id-UF for geb-bug-gnu-emacs@m.gmane.org; Mon, 25 Feb 2013 10:25:30 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:43466) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U9zvh-0006Wu-Nv for bug-gnu-emacs@gnu.org; Mon, 25 Feb 2013 10:25:28 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U9zvf-0000MK-6s for bug-gnu-emacs@gnu.org; Mon, 25 Feb 2013 10:25:25 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:44276) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U9zvf-0000MC-1r for bug-gnu-emacs@gnu.org; Mon, 25 Feb 2013 10:25:23 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1U9zxG-0002Zi-1E for bug-gnu-emacs@gnu.org; Mon, 25 Feb 2013 10:27:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 25 Feb 2013 15:27:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 13743 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 13743-submit@debbugs.gnu.org id=B13743.13618060219890 (code B ref 13743); Mon, 25 Feb 2013 15:27:01 +0000 Original-Received: (at 13743) by debbugs.gnu.org; 25 Feb 2013 15:27:01 +0000 Original-Received: from localhost ([127.0.0.1]:49740 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1U9zxD-0002ZS-Ly for submit@debbugs.gnu.org; Mon, 25 Feb 2013 10:27:00 -0500 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.182]:12491) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1U9zx9-0002ZK-Uo for 13743@debbugs.gnu.org; Mon, 25 Feb 2013 10:26:58 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av8EABK/CFHO+KLv/2dsb2JhbABEuzWDWRdzgh4BAQQBViMQCw4mEhQYDSSIHgbBLZEKA4hhnBmBXoMV X-IPAS-Result: Av8EABK/CFHO+KLv/2dsb2JhbABEuzWDWRdzgh4BAQQBViMQCw4mEhQYDSSIHgbBLZEKA4hhnBmBXoMV X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; d="scan'208";a="2401925" Original-Received: from 206-248-162-239.dsl.teksavvy.com (HELO pastel.home) ([206.248.162.239]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 25 Feb 2013 10:25:14 -0500 Original-Received: by pastel.home (Postfix, from userid 20848) id 1D09F6BD7C; Mon, 25 Feb 2013 10:25:15 -0500 (EST) In-Reply-To: <512AFC18.4090504@yandex.ru> (Dmitry Gutov's message of "Mon, 25 Feb 2013 09:52:24 +0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.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:71783 Archived-At: >> The manifestation of the problem will be that modify_region will be >> called in this case, although we don't actually modify anything. You >> will probably see the "modified" indicator on the mode line, something >> that shouldn't have happened. > That is indeed what happens. > OTOH, the existing behavior in this area is rather messy anyway: Not only that, but it's not clear why "that shouldn't have happened". It's good to optimize away the whole add-text-properties when it ends up doing nothing, but it's just an optimization. And I don't think it's an important one here, since (as Dmitry points out) the likely most common case (of having `start' be right at the beginning of an interval object) didn't work anyway, and furthermore most calls to add-text-properties are likely to be protected by inhibit-modification-hooks. Stefan