unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#11562: 24.0.97; Error "Not in an editable field" when `M-TAB' in editable Customize field
@ 2012-05-26  3:12 Drew Adams
  2012-09-16 23:52 ` bug#11562: 24.0.97; Error "Not in an editable field" when `M-TAB' in editable Customizefield Drew Adams
  2019-10-05 13:48 ` bug#11562: 24.0.97; Error "Not in an editable field" when `M-TAB' in editable Customize field Mauro Aranda
  0 siblings, 2 replies; 4+ messages in thread
From: Drew Adams @ 2012-05-26  3:12 UTC (permalink / raw)
  To: 11562

emacs -Q
 
(defcustom foo '(current-time-string)
  "@@@@@@@@@@@@@@@"
  :type 'sexp)
 
M-x customize-option foo
 
Type this into the editable field:
 
(current-
 
Then hit `M-TAB'.  You get this inappropriate error message:
 
"Not in an editable field"
 
If completion is not available, the message should say that.  It should
not claim that the field is not editable when it is.
 

In GNU Emacs 24.0.97.1 (i386-mingw-nt5.1.2600)
 of 2012-05-16 on MARVIN
Windowing system distributor `Microsoft Corp.', version 5.1.2600
Configured using:
 `configure --with-gcc (4.6) --no-opt --enable-checking --cflags
 -ID:/devel/emacs/libs/libXpm-3.5.8/include
 -ID:/devel/emacs/libs/libXpm-3.5.8/src
 -ID:/devel/emacs/libs/libpng-dev_1.4.3-1/include
 -ID:/devel/emacs/libs/zlib-dev_1.2.5-2/include
 -ID:/devel/emacs/libs/giflib-4.1.4-1/include
 -ID:/devel/emacs/libs/jpeg-6b-4/include
 -ID:/devel/emacs/libs/tiff-3.8.2-1/include
 -ID:/devel/emacs/libs/gnutls-3.0.9/include'
 






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

* bug#11562: 24.0.97; Error "Not in an editable field" when `M-TAB' in editable Customizefield
  2012-05-26  3:12 bug#11562: 24.0.97; Error "Not in an editable field" when `M-TAB' in editable Customize field Drew Adams
@ 2012-09-16 23:52 ` Drew Adams
  2019-10-05 13:48 ` bug#11562: 24.0.97; Error "Not in an editable field" when `M-TAB' in editable Customize field Mauro Aranda
  1 sibling, 0 replies; 4+ messages in thread
From: Drew Adams @ 2012-09-16 23:52 UTC (permalink / raw)
  To: 11562

ping






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

* bug#11562: 24.0.97; Error "Not in an editable field" when `M-TAB' in editable Customize field
  2012-05-26  3:12 bug#11562: 24.0.97; Error "Not in an editable field" when `M-TAB' in editable Customize field Drew Adams
  2012-09-16 23:52 ` bug#11562: 24.0.97; Error "Not in an editable field" when `M-TAB' in editable Customizefield Drew Adams
@ 2019-10-05 13:48 ` Mauro Aranda
  2019-10-07  1:36   ` Lars Ingebrigtsen
  1 sibling, 1 reply; 4+ messages in thread
From: Mauro Aranda @ 2019-10-05 13:48 UTC (permalink / raw)
  To: 11562


[-- Attachment #1.1: Type: text/plain, Size: 525 bytes --]

tags 11562 + patch
quit

"Drew Adams" <drew.adams@oracle.com> writes:

> emacs -Q
>
> (defcustom foo '(current-time-string)
>   "@@@@@@@@@@@@@@@"
>   :type 'sexp)
>
> M-x customize-option foo
>
> Type this into the editable field:
>
> (current-
>
> Then hit `M-TAB'.  You get this inappropriate error message:
>
> "Not in an editable field"
>
> If completion is not available, the message should say that.  It should
> not claim that the field is not editable when it is.

I attach a patch to fix this.

Best regards,
Mauro.

[-- Attachment #1.2: Type: text/html, Size: 838 bytes --]

[-- Attachment #2: 0001-Fix-message-when-no-completions-available-for-editab.patch --]
[-- Type: text/x-patch, Size: 1443 bytes --]

From d0f1970d061c3ee977d1d8ec0072afd016d4a0c2 Mon Sep 17 00:00:00 2001
From: Mauro Aranda <maurooaranda@gmail.com>
Date: Wed, 2 Oct 2019 11:11:01 -0300
Subject: [PATCH] Fix message when no completions available for editable field
 (Bug#11562)

* lisp/wid-edit.el (widget-completions-at-point): Detect here if point
is not in an editable field.
(widget-complete): And here say there are no completions available.
---
 lisp/wid-edit.el | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/lisp/wid-edit.el b/lisp/wid-edit.el
index 916d41a..a5999c0 100644
--- a/lisp/wid-edit.el
+++ b/lisp/wid-edit.el
@@ -1166,7 +1166,7 @@ widget-complete
                               (plist-get completion-extra-properties
                                          :predicate))))
      (t
-      (error "Not in an editable field")))))
+      (error "No completions available for this field")))))
 ;; We may want to use widget completion in buffers where the major mode
 ;; hasn't added widget-completions-at-point to completion-at-point-functions,
 ;; so it's not really obsolete (yet).
@@ -1174,8 +1174,9 @@ widget-complete
 
 (defun widget-completions-at-point ()
   (let ((field (widget-field-find (point))))
-    (when field
-      (widget-apply field :completions-function))))
+    (if field
+        (widget-apply field :completions-function)
+      (error "Not in an editable field"))))
 
 ;;; Setting up the buffer.
 
-- 
2.7.4


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

* bug#11562: 24.0.97; Error "Not in an editable field" when `M-TAB' in editable Customize field
  2019-10-05 13:48 ` bug#11562: 24.0.97; Error "Not in an editable field" when `M-TAB' in editable Customize field Mauro Aranda
@ 2019-10-07  1:36   ` Lars Ingebrigtsen
  0 siblings, 0 replies; 4+ messages in thread
From: Lars Ingebrigtsen @ 2019-10-07  1:36 UTC (permalink / raw)
  To: Mauro Aranda; +Cc: 11562

Mauro Aranda <maurooaranda@gmail.com> writes:

>> If completion is not available, the message should say that.  It should
>> not claim that the field is not editable when it is.
>
> I attach a patch to fix this.

Thanks; applied to Emacs 27.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





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

end of thread, other threads:[~2019-10-07  1:36 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-05-26  3:12 bug#11562: 24.0.97; Error "Not in an editable field" when `M-TAB' in editable Customize field Drew Adams
2012-09-16 23:52 ` bug#11562: 24.0.97; Error "Not in an editable field" when `M-TAB' in editable Customizefield Drew Adams
2019-10-05 13:48 ` bug#11562: 24.0.97; Error "Not in an editable field" when `M-TAB' in editable Customize field Mauro Aranda
2019-10-07  1:36   ` Lars Ingebrigtsen

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).