all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#34506: 27.0.50: push-button bug with basic text-property button
@ 2019-02-16 22:08 Bob Weiner
  2019-02-17 15:24 ` Eli Zaretskii
  0 siblings, 1 reply; 16+ messages in thread
From: Bob Weiner @ 2019-02-16 22:08 UTC (permalink / raw)
  To: 34506

From the Elisp manual (https://www.gnu.org/software/emacs/manual/html_node/elisp/Manipulating-Buttons.html), we have these accurate explanations:

  — Function: button-at pos
  Return the button at position pos in the current buffer, or nil. If the button at pos is a text property button, the return value is a marker pointing to pos.

  — Function: button-activate button &optional use-mouse-action
  Call button's action property (i.e., invoke the function that is the value of that property, passing it the single argument button). If use-mouse-action is non-nil, try to invoke the button's mouse-action property instead of action; if the button has no mouse-action property, use action as normal.

-----

With point on a "Choose" button in a customize-group buffer, point is on
a text-property button and (button-at (point)) returns a marker object
rather than a button whose action is a marker object.  Thus, if one
calls (push-button) at that location, it sends this marker object as the
button argument to 'button-activate' which then triggers an error when
it tries to funcall the button's action which is nil in this case.
Shouldn't there be additional logic that checks if the button itself is
a marker and then uses the button as the action in that case?

Related to this:  (button-type (button-at (point))) returns nil which seems
to contradict the fact that button-at returns non-nil.

Am I missing things here or does button-activate need additional code?

Thanks,

Bob


-------



In GNU Emacs 27.0.50 (build 13, x86_64-apple-darwin16.7.0, NS appkit-1504.83 Version 10.12.6 (Build 16G1036))
 of 2017-12-17 built on bka-iMac.local
Repository revision: 36375d35aa06e84865cce678559ddfa8f79a9775
Windowing system distributor 'Apple', version 10.3.1561
Recent messages:
[Sat 04:46:35 PM] 
[Sat 04:46:35 PM] 
[Sat 04:46:35 PM] Result: nil
[Sat 04:46:37 PM] 
[Sat 04:46:37 PM] 
[Sat 04:46:37 PM] Result: nil
[Sat 04:46:38 PM] 
[Sat 04:46:38 PM] nil
[Sat 04:47:16 PM] 
Back to top level

Configured using:
 'configure --with-ns --with-imagemagick --without-pop --with-mailutils
 CC=clang 'CFLAGS=-O3 -g''

Configured features:
JPEG NOTIFY ACL GNUTLS LIBXML2 ZLIB TOOLKIT_SCROLL_BARS NS LCMS2

Important settings:
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Custom

Minor modes in effect:
  recentf-mode: t
  treemacs-follow-mode: t
  treemacs-filewatch-mode: t
  treemacs-git-mode: deferred
  treemacs-fringe-indicator-mode: t
  async-bytecomp-package-mode: t
  diff-auto-refine-mode: t
  desktop-save-mode: t
  winner-mode: t
  which-key-mode: t
  which-function-mode: t
  persistent-scratch-autosave-mode: t
  global-edit-server-edit-mode: t
  delete-selection-mode: t
  auto-compile-on-load-mode: t
  auto-compile-on-save-mode: t
  column-number-indicator-zero-based: t
  dynamic-completion-mode: t
  eros-mode: t
  shell-dirtrack-mode: t
  show-paren-mode: t
  global-company-mode: t
  company-mode: t
  ace-window-display-mode: t
  major-mode-icons-mode: t
  minibuffer-depth-indicate-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  column-number-mode: t
  line-number-mode: t
  transient-mark-mode: t






^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2019-04-07  3:14 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-02-16 22:08 bug#34506: 27.0.50: push-button bug with basic text-property button Bob Weiner
2019-02-17 15:24 ` Eli Zaretskii
2019-02-17 23:46   ` Robert Weiner
2019-02-18 15:47     ` Eli Zaretskii
2019-02-18 16:56       ` Robert Weiner
2019-02-18 17:36         ` Eli Zaretskii
2019-02-18 20:52         ` Basil L. Contovounesios
2019-02-18 20:51       ` Basil L. Contovounesios
2019-02-18 22:54         ` Robert Weiner
2019-02-19  3:08           ` Basil L. Contovounesios
2019-02-19  3:29         ` Eli Zaretskii
2019-02-19 15:26           ` Basil L. Contovounesios
2019-02-20  5:22             ` Robert Weiner
2019-02-25  2:40               ` Basil L. Contovounesios
2019-03-02 12:34                 ` Eli Zaretskii
2019-04-07  3:14                   ` Basil L. Contovounesios

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.