From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#23899: 24.5; mouse-on-link-p breaks for positions Date: Thu, 07 Jul 2016 19:16:20 +0300 Message-ID: <8337nll8yz.fsf@gnu.org> References: <87zipw9eim.fsf@earth.catern.com> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1467908644 7002 80.91.229.3 (7 Jul 2016 16:24:04 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 7 Jul 2016 16:24:04 +0000 (UTC) Cc: 23899-done@debbugs.gnu.org To: sbaugh@catern.com Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Jul 07 18:23:53 2016 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 1bLC5e-00073s-Bx for geb-bug-gnu-emacs@m.gmane.org; Thu, 07 Jul 2016 18:23:50 +0200 Original-Received: from localhost ([::1]:41067 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bLC5d-00034e-EK for geb-bug-gnu-emacs@m.gmane.org; Thu, 07 Jul 2016 12:23:49 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:48806) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bLBz9-000459-7b for bug-gnu-emacs@gnu.org; Thu, 07 Jul 2016 12:17:12 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bLBz4-0003Ns-9T for bug-gnu-emacs@gnu.org; Thu, 07 Jul 2016 12:17:07 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:57284) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bLBz4-0003No-6O for bug-gnu-emacs@gnu.org; Thu, 07 Jul 2016 12:17:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1bLBz4-0000Uf-2l for bug-gnu-emacs@gnu.org; Thu, 07 Jul 2016 12:17:02 -0400 Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-To: bug-gnu-emacs@gnu.org Resent-Date: Thu, 07 Jul 2016 16:17:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 23899 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Mail-Followup-To: 23899@debbugs.gnu.org, eliz@gnu.org, sbaugh@catern.com Original-Received: via spool by 23899-done@debbugs.gnu.org id=D23899.14679082061861 (code D ref 23899); Thu, 07 Jul 2016 16:17:01 +0000 Original-Received: (at 23899-done) by debbugs.gnu.org; 7 Jul 2016 16:16:46 +0000 Original-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 Original-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 Original-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 Original-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 Original-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 In-reply-to: <87zipw9eim.fsf@earth.catern.com> (sbaugh@catern.com) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] 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:120573 Archived-At: > 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.