From unknown Sun Jun 22 00:09:12 2025 X-Loop: help-debbugs@gnu.org Subject: bug#23899: 24.5; mouse-on-link-p breaks for positions Resent-From: sbaugh@catern.com Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 05 Jul 2016 17:45:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 23899 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 23899@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.1467740697812 (code B ref -1); Tue, 05 Jul 2016 17:45:02 +0000 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 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-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 unknown Sun Jun 22 00:09:12 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: sbaugh@catern.com Subject: bug#23899: closed (Re: bug#23899: 24.5; mouse-on-link-p breaks for positions) Message-ID: References: <8337nll8yz.fsf@gnu.org> <87zipw9eim.fsf@earth.catern.com> X-Gnu-PR-Message: they-closed 23899 X-Gnu-PR-Package: emacs Reply-To: 23899@debbugs.gnu.org Date: Thu, 07 Jul 2016 16:17:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1467908222-1893-1" This is a multi-part message in MIME format... ------------=_1467908222-1893-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #23899: 24.5; mouse-on-link-p breaks for positions which was filed against the emacs package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 23899@debbugs.gnu.org. --=20 23899: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D23899 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1467908222-1893-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit 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. ------------=_1467908222-1893-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit 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. ------------=_1467908222-1893-1--