From debbugs-submit-bounces@debbugs.gnu.org Tue Jul 05 13:44:57 2016 Received: (at submit) by debbugs.gnu.org; 5 Jul 2016 17:44:57 +0000 Received: from localhost ([127.0.0.1]:38560 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bKUP2-0000D2-Tv for submit@debbugs.gnu.org; Tue, 05 Jul 2016 13:44:57 -0400 Received: from eggs.gnu.org ([208.118.235.92]:56726) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bKUE3-0008Oh-OP for submit@debbugs.gnu.org; Tue, 05 Jul 2016 13:33:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bKUDx-0004sB-NT for submit@debbugs.gnu.org; Tue, 05 Jul 2016 13:33:30 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=BAYES_40,T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:49113) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bKUDx-0004q3-K7 for submit@debbugs.gnu.org; Tue, 05 Jul 2016 13:33:29 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47381) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bKUDt-0007az-Ow for bug-gnu-emacs@gnu.org; Tue, 05 Jul 2016 13:33:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bKUDp-0004gP-Iv for bug-gnu-emacs@gnu.org; Tue, 05 Jul 2016 13:33:24 -0400 Received: from catern.com ([104.131.201.120]:51009 helo=mail.catern.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bKUDp-0004cC-EW for bug-gnu-emacs@gnu.org; Tue, 05 Jul 2016 13:33:21 -0400 Received: from [127.0.0.1] (localhost [127.0.0.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.catern.com (Postfix) with ESMTPSA id BE33F4FF4F for ; Tue, 5 Jul 2016 17:33:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=catern.com; s=default; t=1467739994; bh=zWdDXTNjEIQnkMkpbd+PtX+h/TOjngi1w4pAL0zR5rk=; h=From:To:Subject:Date; b=JIBaTD6GR3+Ueka3mGHvHchU9adc+Sz1ds8uzJuhDUAHUk7zUSaP0MxRznFHXv6Qs GK4RJDNkP2REcDT1c9L2WKSXwe6hNdl1ebonK8wLSr2OlNCwGKx0FYds5OskWttfNe 6JVuqUnVlPYYvBZldWveBwbaNy28T4uytg3cF6h4= From: sbaugh@catern.com To: bug-gnu-emacs@gnu.org Subject: 24.5; mouse-on-link-p breaks for positions Date: Tue, 05 Jul 2016 13:32:49 -0400 Message-ID: <87zipw9eim.fsf@earth.catern.com> MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.1 (----) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Tue, 05 Jul 2016 13:44:55 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.1 (----) The documentation for mouse-on-link-p says: POS must be a buffer position in the current buffer or a mouse event location in the selected window (see `event-start'). However, doing M-: (mouse-on-link-p (point)) fails with a type error. And, in general, passing a buffer position to mouse-on-link-p fails with a type error. This appears to be due to this section of mouse-on-link-p: (let ((area (posn-area pos))) (when area (key-binding (vector area 'follow-link) nil t pos))) I would recommend wrapping this in a (and (consp pos) ...) to avoid running posn-area on buffer positions. The rest of the function works fine, this part was added later. From debbugs-submit-bounces@debbugs.gnu.org Thu Jul 07 12:16:46 2016 Received: (at 23899-done) by debbugs.gnu.org; 7 Jul 2016 16:16:46 +0000 Received: from localhost ([127.0.0.1]:41387 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bLByn-0000Tx-Rd for submit@debbugs.gnu.org; Thu, 07 Jul 2016 12:16:45 -0400 Received: from eggs.gnu.org ([208.118.235.92]:57661) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bLBym-0000Th-Bw for 23899-done@debbugs.gnu.org; Thu, 07 Jul 2016 12:16:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bLByc-0003H6-3b for 23899-done@debbugs.gnu.org; Thu, 07 Jul 2016 12:16:39 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_20,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:57186) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bLByc-0003Gd-0Z; Thu, 07 Jul 2016 12:16:34 -0400 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:1901 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1bLBya-0001cv-6c; Thu, 07 Jul 2016 12:16:32 -0400 Date: Thu, 07 Jul 2016 19:16:20 +0300 Message-Id: <8337nll8yz.fsf@gnu.org> From: Eli Zaretskii To: sbaugh@catern.com In-reply-to: <87zipw9eim.fsf@earth.catern.com> (sbaugh@catern.com) Subject: Re: bug#23899: 24.5; mouse-on-link-p breaks for positions References: <87zipw9eim.fsf@earth.catern.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -6.3 (------) X-Debbugs-Envelope-To: 23899-done Cc: 23899-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -6.3 (------) > From: sbaugh@catern.com > Date: Tue, 05 Jul 2016 13:32:49 -0400 > > The documentation for mouse-on-link-p says: > POS must be a buffer position in the current buffer or a mouse > event location in the selected window (see `event-start'). > However, doing M-: (mouse-on-link-p (point)) fails with a type > error. And, in general, passing a buffer position to mouse-on-link-p > fails with a type error. > > This appears to be due to this section of mouse-on-link-p: > (let ((area (posn-area pos))) > (when area > (key-binding (vector area 'follow-link) nil t pos))) > > I would recommend wrapping this in a (and (consp pos) ...) to avoid > running posn-area on buffer positions. The rest of the function works > fine, this part was added later. I don't think any code changes are required. This is just a documentation problem: what the doc string fails to tell is that the function needs POS as a mouse-click position, which is a list. If you want to invoke the function at point, you can get the argument by calling posn-at-point. I installed a change to that effect on the emacs-25 branch, and I'm marking this bug "done". Thanks. From unknown Sun Jun 22 03:54:03 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Fri, 05 Aug 2016 11:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator