From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#12817: 24.2; The button library does not work on the header line Date: Tue, 04 Dec 2012 15:19:46 -0500 Message-ID: References: <877gpyllag.fsf@luz3.i-did-not-set--mail-host-address--so-tickle-me> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1354652414 16402 80.91.229.3 (4 Dec 2012 20:20:14 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 4 Dec 2012 20:20:14 +0000 (UTC) Cc: 12817@debbugs.gnu.org To: Damien Cassou Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Dec 04 21:20:26 2012 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 1Tfyyg-0002zv-2K for geb-bug-gnu-emacs@m.gmane.org; Tue, 04 Dec 2012 21:20:26 +0100 Original-Received: from localhost ([::1]:32818 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TfyyU-0003qn-1h for geb-bug-gnu-emacs@m.gmane.org; Tue, 04 Dec 2012 15:20:14 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:46714) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TfyyL-0003lI-VP for bug-gnu-emacs@gnu.org; Tue, 04 Dec 2012 15:20:12 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TfyyF-0001Zc-TK for bug-gnu-emacs@gnu.org; Tue, 04 Dec 2012 15:20:05 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:43406) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TfyyF-0001ZY-Ps for bug-gnu-emacs@gnu.org; Tue, 04 Dec 2012 15:19:59 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1TfyyI-0003Xi-Fi for bug-gnu-emacs@gnu.org; Tue, 04 Dec 2012 15:20:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 04 Dec 2012 20:20:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 12817 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 12817-submit@debbugs.gnu.org id=B12817.135465239313600 (code B ref 12817); Tue, 04 Dec 2012 20:20:02 +0000 Original-Received: (at 12817) by debbugs.gnu.org; 4 Dec 2012 20:19:53 +0000 Original-Received: from localhost ([127.0.0.1]:53657 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Tfyy9-0003XI-BS for submit@debbugs.gnu.org; Tue, 04 Dec 2012 15:19:53 -0500 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.182]:26891) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Tfyy7-0003X9-BZ for 12817@debbugs.gnu.org; Tue, 04 Dec 2012 15:19:51 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av0EAG6Zu09soXOY/2dsb2JhbABEtBGBCIIVAQEEAVYjBQsLNBIUGA0kiBwFC7l6BJBEA4hCmnGBWIMH X-IronPort-AV: E=Sophos;i="4.75,637,1330923600"; d="scan'208";a="209078666" Original-Received: from 108-161-115-152.dsl.teksavvy.com (HELO pastel.home) ([108.161.115.152]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 04 Dec 2012 15:19:47 -0500 Original-Received: by pastel.home (Postfix, from userid 20848) id 2BE6E58C73; Tue, 4 Dec 2012 15:19:46 -0500 (EST) In-Reply-To: <877gpyllag.fsf@luz3.i-did-not-set--mail-host-address--so-tickle-me> (Damien Cassou's message of "Tue, 06 Nov 2012 17:59:35 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 140.186.70.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-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:67918 Archived-At: > the button library does not work if a button is created on the header-line: > (require 'button) > (defun my-button-action (button) > (message "HERE I AM")) > (define-button-type 'my-button-type > 'action #'my-button-action > 'follow-link t) > (setq test-button (copy-sequence "CLICK ME")) > (make-text-button test-button nil > 'type 'my-button-type) > (setq header-line-format test-button) > After evaluating these lines, a button appear with the text "CLICK ME" > in blue and underlined. But clicking this button does nothing. I was > expecting that clicking the button would trigger 'my-button-action and > display the message "HERE I AM". Sounds like a reasonable expectation. > There is a library that makes 'button work on header-line: > https://raw.github.com/tarsius/header-button/master/header-button.el Would someone be able to turn the above code into a patch to button.el that makes your sample code work (i.e. make `make-text-button' work in a header, instead of introducing an ad-hoc `header-button-format')? Stefan PS: BTW, the "follow-link does not work here" comment points at a misfeature of follow-link, indeed. I think `follow-link' should be implemented in function-key-map rather than in mouse-drag-region.