From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.bugs Subject: bug#24368: 25.1; Assertion failure in attach_marker Date: Tue, 06 Sep 2016 18:09:58 +0200 Message-ID: <57CEEA56.106@gmx.at> References: <57CD1DE1.9090003@gmx.at> <57CD8192.4090905@gmx.at> <57CD8968.5050909@gmx.at> <837faqcnzf.fsf@gnu.org> <57CDAC95.5020308@gmx.at> <83y436b5dy.fsf@gnu.org> <57CDB23B.6060805@gmx.at> <83vayab3v0.fsf@gnu.org> <57CE65E4.2060105@gmx.at> <83inu9awwr.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: blaine.gmane.org 1473178896 2571 195.159.176.226 (6 Sep 2016 16:21:36 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 6 Sep 2016 16:21:36 +0000 (UTC) Cc: 24368@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Sep 06 18:21:29 2016 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 1bhJ7i-0007YM-4A for geb-bug-gnu-emacs@m.gmane.org; Tue, 06 Sep 2016 18:21:22 +0200 Original-Received: from localhost ([::1]:34873 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bhJ7g-0006IR-0K for geb-bug-gnu-emacs@m.gmane.org; Tue, 06 Sep 2016 12:21:20 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:53895) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bhIxl-0006up-Tq for bug-gnu-emacs@gnu.org; Tue, 06 Sep 2016 12:11:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bhIxi-00073I-Hs for bug-gnu-emacs@gnu.org; Tue, 06 Sep 2016 12:11:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:53862) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bhIxi-00073D-EP for bug-gnu-emacs@gnu.org; Tue, 06 Sep 2016 12:11:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1bhIxi-0003GT-56 for bug-gnu-emacs@gnu.org; Tue, 06 Sep 2016 12:11:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: martin rudalics Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 06 Sep 2016 16:11:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 24368 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 24368-submit@debbugs.gnu.org id=B24368.147317821712491 (code B ref 24368); Tue, 06 Sep 2016 16:11:02 +0000 Original-Received: (at 24368) by debbugs.gnu.org; 6 Sep 2016 16:10:17 +0000 Original-Received: from localhost ([127.0.0.1]:51574 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bhIwy-0003FP-Ux for submit@debbugs.gnu.org; Tue, 06 Sep 2016 12:10:17 -0400 Original-Received: from mout.gmx.net ([212.227.15.19]:53335) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bhIww-0003FA-T1 for 24368@debbugs.gnu.org; Tue, 06 Sep 2016 12:10:15 -0400 Original-Received: from [192.168.1.100] ([212.95.7.16]) by mail.gmx.com (mrgmx002) with ESMTPSA (Nemesis) id 0MdKgV-1bPMQG1ju7-00IWEi; Tue, 06 Sep 2016 18:10:07 +0200 In-Reply-To: <83inu9awwr.fsf@gnu.org> X-Provags-ID: V03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VdVCkV19ISYApTXgXfzGYrBwe 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:123023 Archived-At: > On second thought, I don't think attach_marker should be touched at > all. It is too low-level, and the assertions compile to nothing in a > build without --enable-checking, so we will be left without any > protection in the production version. Right. The init_iterator problem cannot be solved this way. > Instead, I think the callers of attach_marker should make sure charpos > and bytepos come from the same buffer, and are therefore in sync. The > patch below implements that; WDYT? It fixes all issues I've encountered so far ;-) > I agree that erroring out of goto-char in this case is sub-optimal at > best. Could we drop that restriction with your changes? I'd rather have this handled safely at one place only. > I chose neither ;-) The patch below seems to fix all of your test > cases, including the original problem with window-state-get, even > before it was fixed. It also lifts the restriction on goto-char. > > Comments? Install! > P.S. After fixing the crashes and correcting window--state-get-1, > running your original test case causes "C-x 1" stop working: it has no > effect. Looks like this is because Emacs thinks the window is the > major non-side window, although actually I have *scratch* and *Help*, > so the command ought to work. Is this related or unrelated to the > issue at hand? I'm not sure what you mean with "stop working". The idea is that C-x 1 when invoked in *scratch* should leave the *Help* window alone. If you split *scratch* via C-x 2 and after that you do C-x 1, only the other *scratch* window should get deleted. C-x 1 invoked in *Help* should cause an error. I'm currently trying to fix errors and write documentation on side windows - that's how I stumbled into this marker issue in the first place. martin