From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Problem binding mouse-1 to Info-mouse-follow-nearest-node Date: Mon, 11 Apr 2011 19:59:41 +0300 Message-ID: <83r598raf6.fsf@gnu.org> References: <4DA2CB77.805@gmx.at> <4DA2F5BC.6040400@gmx.at> <83zknwrgds.fsf@gnu.org> <4DA323FB.8010302@gmx.at> Reply-To: Eli Zaretskii NNTP-Posting-Host: lo.gmane.org X-Trace: dough.gmane.org 1302577078 16348 80.91.229.12 (12 Apr 2011 02:57:58 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 12 Apr 2011 02:57:58 +0000 (UTC) Cc: emacs-devel@gnu.org To: martin rudalics Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Apr 12 04:57:54 2011 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from [140.186.70.17] (helo=lists.gnu.org) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Q9Tnd-0004nt-SZ for ged-emacs-devel@m.gmane.org; Tue, 12 Apr 2011 04:57:54 +0200 Original-Received: from localhost ([::1]:50489 helo=lists2.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q9Tnd-00080z-H4 for ged-emacs-devel@m.gmane.org; Mon, 11 Apr 2011 22:57:53 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:56495) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q9SlX-0003HZ-V6 for emacs-devel@gnu.org; Mon, 11 Apr 2011 21:51:55 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q9KSp-0002rf-NL for emacs-devel@gnu.org; Mon, 11 Apr 2011 12:59:48 -0400 Original-Received: from mtaout20.012.net.il ([80.179.55.166]:49007) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q9KSp-0002rb-FV for emacs-devel@gnu.org; Mon, 11 Apr 2011 12:59:47 -0400 Original-Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0LJH00G00Z09OA00@a-mtaout20.012.net.il> for emacs-devel@gnu.org; Mon, 11 Apr 2011 19:59:46 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([77.127.31.148]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0LJH00ESLZ7JJ0N0@a-mtaout20.012.net.il>; Mon, 11 Apr 2011 19:59:46 +0300 (IDT) In-reply-to: <4DA323FB.8010302@gmx.at> X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: Solaris 10 (beta) X-Received-From: 80.179.55.166 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org X-Broken-Reverse-DNS: no host name found for IP address 140.186.70.17 Xref: news.gmane.org gmane.emacs.devel:138414 Archived-At: > Date: Mon, 11 Apr 2011 17:53:31 +0200 > From: martin rudalics > CC: emacs-devel@gnu.org > > > The immediate problem which triggers the error is that deactivate-mark > > is called after Info-mouse-follow-nearest-node already changed the > > node displayed in the *info* buffer, which involves narrowing the > > buffer to a different range of character positions, and that causes > > the region to reference the portion of the buffer outside the current > > restriction. > > We could simply try doing > > (buffer-substring-no-properties > (max (region-beginning) (point-min)) > (min (region-end) (point-max))) > > in `deactivate-mark'. But I have no idea how the region should be > defined when it's not entirely within the accessible portion of a > buffer. If it were up to me, I'd like first to understand (a) how come there's an active region in this case, (b) why deactivate-mark doesn't try to validate the region, and (c) why doesn't narrowing clip the region to the accessible portion.