1

I am reading the The Emacs Widget Library. The library describes the widget properties in general and not per widget. So I'd like some more insights about the link widget properties and use.

  • :notify property is a "function called each called each time the widget or a nested widget is changed".
    Does a widget click implies a call of this function?

  • :action property is a "function to handle user initiated events". "Pressing RET invokes the function specified by :action".
    Does this entail a widget click?

Do I have to set :follow-link 'mouse-face or is it the default value for the property?

If I run the following snippet immediately after starting Emacs:

(require 'widget)
(with-current-buffer (get-buffer-create "test")
  (kill-all-local-variables)
  (let ((inhibit-read-only t))
    (widget-create 'link
           :notify (lambda (&rest ignore) (message  "You clicked"))
           "my link")
    (widget-setup))
    (switch-to-buffer (current-buffer)))

I get the error:

gui-get-primary-selection: No selection is available 

I am using GNU Emacs 25.0.94.2 (x86_64-w64-mingw32) with Windows 10 x64.

migrated from stackoverflow.com Aug 30 '16 at 11:50

This question came from our site for professional and enthusiast programmers.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.