GNU bug report logs -
#8266
:complete-function in define-widget does not work as it used to
Previous Next
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 8266 in the body.
You can then email your comments to 8266 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
:
bug#8266
; Package
emacs
.
(Wed, 16 Mar 2011 23:40:03 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Lennart Borgman <lennart.borgman <at> gmail.com>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Wed, 16 Mar 2011 23:40:03 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
I have used constructs like this many times, but now the
:complete-function does not work any more. It gives me "idx" (which I
expect) but insert it in the wrong place.
To show it evaluate the code below and do "M-x customize-option RET
idxsearch-engine RET" and try to complete the choice.
(defvar idxsearch-engines
'((idxdocidxer-search "DocIndexer")
(idxgds-search "Google Desktop Search")
(idxwds-search "Windows Desktop Search"))
"Search engines.")
(defun idxsearch-funp (fun)
(assoc fun idxsearch-engines))
(define-widget 'idxsearch-function 'function
"A index search function known by `idxsearch."
:complete-function (lambda ()
(interactive)
(lisp-complete-symbol 'idxsearch-funp))
:prompt-match 'idxsearch-funp
:prompt-history 'widget-function-prompt-value-history
:match-alternatives '(idxsearch-funp)
:validate (lambda (widget)
(unless (idxsearch-funp (widget-value widget))
(widget-put widget :error (format "Unknown index
search function: %S"
(widget-value widget)))
widget))
:value 'fundamental-mode
:tag "Index search specific function")
(defcustom idxsearch-engine (cond
((idxgds-query-url-p) 'idxgds-search)
(t (if (eq system-type 'windows-nt)
'idxwds-search
'idxdocidxer-search)))
"Desktop search engine for `idxsearch' to use."
:type 'idxsearch-function
:group 'idxsearch)
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#8266
; Package
emacs
.
(Wed, 22 Feb 2012 21:50:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 8266 <at> debbugs.gnu.org (full text, mbox):
Lennart Borgman wrote:
> I have used constructs like this many times, but now the
> :complete-function does not work any more. It gives me "idx" (which I
> expect) but insert it in the wrong place.
I don't see anything like this in the current trunk on GNU/Linux.
I added
(defalias 'idxgds-query-url-p 'ignore)
because the example is incomplete.
I used entered "idx" in the customize and field and used M-x
widget-complete.
> To show it evaluate the code below and do "M-x customize-option RET
> idxsearch-engine RET" and try to complete the choice.
>
>
> (defvar idxsearch-engines
> '((idxdocidxer-search "DocIndexer")
> (idxgds-search "Google Desktop Search")
> (idxwds-search "Windows Desktop Search"))
> "Search engines.")
>
> (defun idxsearch-funp (fun)
> (assoc fun idxsearch-engines))
>
> (define-widget 'idxsearch-function 'function
> "A index search function known by `idxsearch."
> :complete-function (lambda ()
> (interactive)
> (lisp-complete-symbol 'idxsearch-funp))
> :prompt-match 'idxsearch-funp
> :prompt-history 'widget-function-prompt-value-history
> :match-alternatives '(idxsearch-funp)
> :validate (lambda (widget)
> (unless (idxsearch-funp (widget-value widget))
> (widget-put widget :error (format "Unknown index
> search function: %S"
> (widget-value widget)))
> widget))
> :value 'fundamental-mode
> :tag "Index search specific function")
>
> (defcustom idxsearch-engine (cond
> ((idxgds-query-url-p) 'idxgds-search)
> (t (if (eq system-type 'windows-nt)
> 'idxwds-search
> 'idxdocidxer-search)))
> "Desktop search engine for `idxsearch' to use."
> :type 'idxsearch-function
> :group 'idxsearch)
bug closed, send any further explanations to
8266 <at> debbugs.gnu.org and Lennart Borgman <lennart.borgman <at> gmail.com>
Request was from
Chong Yidong <cyd <at> gnu.org>
to
control <at> debbugs.gnu.org
.
(Sun, 20 Jan 2013 02:56:02 GMT)
Full text and
rfc822 format available.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Sun, 17 Feb 2013 12:24:03 GMT)
Full text and
rfc822 format available.
This bug report was last modified 12 years and 188 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.