GNU bug report logs - #23909
25.1.50; `button-label' must be called in the buffer where the button is in but not mentioned in document

Previous Next

Package: emacs;

Reported by: Jiajie Chen <jiegec <at> qq.com>

Date: Thu, 7 Jul 2016 10:21:02 UTC

Severity: minor

Tags: fixed

Found in version 25.1.50

Fixed in version 27.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


Message #8 received at 23909 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Jiajie Chen <jiegec <at> qq.com>
Cc: 23909 <at> debbugs.gnu.org
Subject: Re: 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
> From: Jiajie Chen <jiegec <at> qq.com>
> 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.




This bug report was last modified 5 years and 223 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.