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#23909: 25.1.50; `button-label' must be called in the buffer where the button is in but not mentioned in document Date: Thu, 07 Jul 2016 18:24:18 +0300 Message-ID: <838txdlbdp.fsf@gnu.org> References: Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1467905224 13932 80.91.229.3 (7 Jul 2016 15:27:04 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 7 Jul 2016 15:27:04 +0000 (UTC) Cc: 23909@debbugs.gnu.org To: Jiajie Chen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Jul 07 17:26:54 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 1bLBCV-0008Kc-5p for geb-bug-gnu-emacs@m.gmane.org; Thu, 07 Jul 2016 17:26:51 +0200 Original-Received: from localhost ([::1]:40612 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bLBCU-0001HN-5w for geb-bug-gnu-emacs@m.gmane.org; Thu, 07 Jul 2016 11:26:50 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:34312) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bLBAo-00069Y-FO for bug-gnu-emacs@gnu.org; Thu, 07 Jul 2016 11:25:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bLBAk-0007x3-4B for bug-gnu-emacs@gnu.org; Thu, 07 Jul 2016 11:25:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:57248) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bLBAk-0007wy-1B for bug-gnu-emacs@gnu.org; Thu, 07 Jul 2016 11:25:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1bLBAj-0007gI-TW for bug-gnu-emacs@gnu.org; Thu, 07 Jul 2016 11:25:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 07 Jul 2016 15:25:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 23909 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 23909-submit@debbugs.gnu.org id=B23909.146790507929494 (code B ref 23909); Thu, 07 Jul 2016 15:25:01 +0000 Original-Received: (at 23909) by debbugs.gnu.org; 7 Jul 2016 15:24:39 +0000 Original-Received: from localhost ([127.0.0.1]:41352 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bLBAN-0007fd-Kz for submit@debbugs.gnu.org; Thu, 07 Jul 2016 11:24:39 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:43157) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bLBAL-0007fO-Nw for 23909@debbugs.gnu.org; Thu, 07 Jul 2016 11:24:38 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bLBAF-0007nN-3j for 23909@debbugs.gnu.org; Thu, 07 Jul 2016 11:24:32 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:56262) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bLBAF-0007mz-0V; Thu, 07 Jul 2016 11:24:31 -0400 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:1843 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1bLBAD-0005iR-58; Thu, 07 Jul 2016 11:24:29 -0400 In-reply-to: (message from Jiajie Chen on Thu, 07 Jul 2016 18:19:11 +0800) 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:120569 Archived-At: > From: Jiajie Chen > Date: Thu, 07 Jul 2016 18:19:11 +0800 > > The definition of button-label is: > > #+BEGIN_SRC elisp > (defun button-label (button) > "Return BUTTON's text label." > (if (button--area-button-p button) > (substring-no-properties (button--area-button-string button)) > (buffer-substring-no-properties (button-start button) > (button-end button)))) > #+END_SRC > > So when the function is called in a different buffer, it > returns a wrong result. AFAICT, all of the functions in button.el operate on buttons in the current buffer, although only a few mention that explicitly in their doc strings. Patches to mention that in the doc strings are welcome. Thanks.