all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#34065: 26.1; Make edebug-eval-expression support code completion
@ 2019-01-14  9:08 Xu Chunyang
  2019-01-20  2:14 ` Federico Tedin
  0 siblings, 1 reply; 6+ messages in thread
From: Xu Chunyang @ 2019-01-14  9:08 UTC (permalink / raw)
  To: 34065

When type e (edebug-eval-expression) within Edebug, I notice there is no code completion, unlike
M-: (eval-expression). So I wonder if edebug-eval-expression can behave
like eval-expression, I guess simply replacing read-from-minibuffer with
read--expression should work, though I've not tried.





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

* bug#34065: 26.1; Make edebug-eval-expression support code completion
  2019-01-14  9:08 bug#34065: 26.1; Make edebug-eval-expression support code completion Xu Chunyang
@ 2019-01-20  2:14 ` Federico Tedin
  2019-02-20  4:37   ` mail
  0 siblings, 1 reply; 6+ messages in thread
From: Federico Tedin @ 2019-01-20  2:14 UTC (permalink / raw)
  To: Xu Chunyang, 34065

[-- Attachment #1: Type: text/plain, Size: 527 bytes --]

Xu Chunyang <mail@xuchunyang.me> writes:

> When type e (edebug-eval-expression) within Edebug, I notice there is no code completion, unlike
> M-: (eval-expression). So I wonder if edebug-eval-expression can behave
> like eval-expression, I guess simply replacing read-from-minibuffer with
> read--expression should work, though I've not tried.

I've created a small patch which replaces `read-from-minibuffer' for
`read--expression' in `edebug-eval-expression'. I would appreciate it if
a maintainer could take a quick look.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: patch --]
[-- Type: text/x-diff, Size: 1069 bytes --]

From ce40da7d2b254be1eee5e5f96d674504525f9b72 Mon Sep 17 00:00:00 2001
From: Federico Tedin <federicotedin@gmail.com>
Date: Sat, 19 Jan 2019 23:02:36 -0300
Subject: [PATCH 1/1] Use read--expression to read expressions in Edebug

* lisp/emacs-lisp/edebug.el: Use read--expression instead of
  read-from-minibuffer to read Emacs Elisp expressions (Bug#34065).
---
 lisp/emacs-lisp/edebug.el | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/lisp/emacs-lisp/edebug.el b/lisp/emacs-lisp/edebug.el
index 2cd8e48d6e..8b4cb1adc7 100644
--- a/lisp/emacs-lisp/edebug.el
+++ b/lisp/emacs-lisp/edebug.el
@@ -3602,9 +3602,7 @@ edebug-eval-expression
   "Evaluate an expression in the outside environment.
 If interactive, prompt for the expression.
 Print result in minibuffer."
-  (interactive (list (read-from-minibuffer
-		      "Eval: " nil read-expression-map t
-		      'read-expression-history)))
+  (interactive (list (read--expression "Eval: ")))
   (princ
    (edebug-outside-excursion
     (setq values (cons (edebug-eval expr) values))
-- 
2.17.1


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

* bug#34065: 26.1; Make edebug-eval-expression support code completion
  2019-01-20  2:14 ` Federico Tedin
@ 2019-02-20  4:37   ` mail
  2019-03-12 23:14     ` Federico Tedin
  0 siblings, 1 reply; 6+ messages in thread
From: mail @ 2019-02-20  4:37 UTC (permalink / raw)
  To: Federico Tedin, 34065@debbugs.gnu.org



20.01.2019, 10:15, "Federico Tedin" <federicotedin@gmail.com>:
> Xu Chunyang <mail@xuchunyang.me> writes:
>
>>  When type e (edebug-eval-expression) within Edebug, I notice there is no code completion, unlike
>>  M-: (eval-expression). So I wonder if edebug-eval-expression can behave
>>  like eval-expression, I guess simply replacing read-from-minibuffer with
>>  read--expression should work, though I've not tried.
>
> I've created a small patch which replaces `read-from-minibuffer' for
> `read--expression' in `edebug-eval-expression'. I would appreciate it if
> a maintainer could take a quick look.

I'm not a maintainer. Your patch looks good to me. Today I notice it's possible to change the interactive form via Advising Functions, so I plan to put the following to my init file until the patch is applied.

(define-advice edebug-eval-expression (:before (_expr) better-interactive-form)
  "Fix the original interactive form."
  (interactive (list (read--expression "Edebug Eval: "))))





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

* bug#34065: 26.1; Make edebug-eval-expression support code completion
  2019-02-20  4:37   ` mail
@ 2019-03-12 23:14     ` Federico Tedin
  2019-03-22  4:02       ` Stefan Monnier
  2019-03-22 21:25       ` Federico Tedin
  0 siblings, 2 replies; 6+ messages in thread
From: Federico Tedin @ 2019-03-12 23:14 UTC (permalink / raw)
  To: mail; +Cc: 34065@debbugs.gnu.org

[-- Attachment #1: Type: text/plain, Size: 563 bytes --]

> I'm not a maintainer. Your patch looks good to me. Today I notice it's
> possible to change the interactive form via Advising Functions, so I
> plan to put the following to my init file until the patch is applied.
>
> (define-advice edebug-eval-expression (:before (_expr) better-interactive-form)
>   "Fix the original interactive form."
>   (interactive (list (read--expression "Edebug Eval: "))))

Great! I'm attaching a more complete patch with a ChangeLog-style
message. If a maintainer doesn't pick it up after some days, I'll try
messaging emacs-devel.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: patch --]
[-- Type: text/x-diff, Size: 1063 bytes --]

From cd03509c544455b746a61550c57476ddddae6a3f Mon Sep 17 00:00:00 2001
From: Federico Tedin <federicotedin@gmail.com>
Date: Tue, 12 Mar 2019 20:06:49 -0300
Subject: [PATCH 1/1] Make edebug-eval-expression support code completion

* lisp/emacs-lisp/edebug.el (edebug-eval-expression): Use
  read--expression instead of read-from-minibuffer. (Bug#34065)
---
 lisp/emacs-lisp/edebug.el | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/lisp/emacs-lisp/edebug.el b/lisp/emacs-lisp/edebug.el
index 2cd8e48d6e..8b4cb1adc7 100644
--- a/lisp/emacs-lisp/edebug.el
+++ b/lisp/emacs-lisp/edebug.el
@@ -3602,9 +3602,7 @@ edebug-eval-expression
   "Evaluate an expression in the outside environment.
 If interactive, prompt for the expression.
 Print result in minibuffer."
-  (interactive (list (read-from-minibuffer
-		      "Eval: " nil read-expression-map t
-		      'read-expression-history)))
+  (interactive (list (read--expression "Eval: ")))
   (princ
    (edebug-outside-excursion
     (setq values (cons (edebug-eval expr) values))
-- 
2.17.1


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

* bug#34065: 26.1; Make edebug-eval-expression support code completion
  2019-03-12 23:14     ` Federico Tedin
@ 2019-03-22  4:02       ` Stefan Monnier
  2019-03-22 21:25       ` Federico Tedin
  1 sibling, 0 replies; 6+ messages in thread
From: Stefan Monnier @ 2019-03-22  4:02 UTC (permalink / raw)
  To: Federico Tedin; +Cc: mail, monnier

Version:27.1

> Great! I'm attaching a more complete patch with a ChangeLog-style
> message.

¡Che!  ¡Gracias!
Pushed to `master`,


        Stefan





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

* bug#34065: 26.1; Make edebug-eval-expression support code completion
  2019-03-12 23:14     ` Federico Tedin
  2019-03-22  4:02       ` Stefan Monnier
@ 2019-03-22 21:25       ` Federico Tedin
  1 sibling, 0 replies; 6+ messages in thread
From: Federico Tedin @ 2019-03-22 21:25 UTC (permalink / raw)
  To: 34065; +Cc: monnier

Thank you for merging this, Stefan! (and the other patch as well)





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

end of thread, other threads:[~2019-03-22 21:25 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-01-14  9:08 bug#34065: 26.1; Make edebug-eval-expression support code completion Xu Chunyang
2019-01-20  2:14 ` Federico Tedin
2019-02-20  4:37   ` mail
2019-03-12 23:14     ` Federico Tedin
2019-03-22  4:02       ` Stefan Monnier
2019-03-22 21:25       ` Federico Tedin

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.