From: Mauro Aranda <maurooaranda@gmail.com>
To: 11562@debbugs.gnu.org
Subject: bug#11562: 24.0.97; Error "Not in an editable field" when `M-TAB' in editable Customize field
Date: Sat, 5 Oct 2019 10:48:34 -0300 [thread overview]
Message-ID: <CABczVweaDUToYP=e+RRi4k5_499fg9ADQ2rJ=AEshMfuw6w0Tw@mail.gmail.com> (raw)
In-Reply-To: <F5089604D7824B3A98BF7536D6CC224D@us.oracle.com>
[-- 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
next prev parent reply other threads:[~2019-10-05 13:48 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
2019-10-07 1:36 ` bug#11562: 24.0.97; Error "Not in an editable field" when `M-TAB' in editable Customize field Lars Ingebrigtsen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CABczVweaDUToYP=e+RRi4k5_499fg9ADQ2rJ=AEshMfuw6w0Tw@mail.gmail.com' \
--to=maurooaranda@gmail.com \
--cc=11562@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.