all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Introduce eldoc support in minibuffer
@ 2011-07-01 15:39 Thierry Volpiatto
  2011-07-02 18:34 ` Thierry Volpiatto
  2011-07-02 22:47 ` Dan Nicolaescu
  0 siblings, 2 replies; 8+ messages in thread
From: Thierry Volpiatto @ 2011-07-01 15:39 UTC (permalink / raw
  To: emacs-devel

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

Hi,
when editing code in minibuffer (M-:) eldoc is not available.
This patch provide this feature.
eldoc is displayed in mode-line.
It provide a macro that can be put around any code that use minibuffer
like this:

(with-eldoc-in-minibuffer (read-string "test: "))

It take care of other minibuffers and display eldoc only in the ones
called with `with-eldoc-in-minibuffer'.

Of course you can disable this feature with `eldoc-in-minibuffer' set to
nil.


-- 
A+ Thierry
Get my Gnupg key:
gpg --keyserver pgp.mit.edu --recv-keys 59F29997 

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

commit d15988386dc0ac17f31a9912b1d7ae7a9c9ee980
Author: Thierry Volpiatto <thierry.volpiatto@gmail.com>
Date:   Fri Jul 1 14:10:25 2011 +0200

    eldoc-in-minibuffer
    
    Introduce eldoc support for minibuffer.
    
    * lisp/emacs-lisp/eldoc.el
    
    (eldoc-in-minibuffer,
    eldoc-in-minibuffer-show-fn,
    eldoc-show-in-mode-line-delay,): New user variables
    
    (with-eldoc-in-minibuffer): Macro to enable eldoc support in any code that use minibuffer as input.
    
    (eldoc-show-in-mode-line,
    eldoc-mode-in-minibuffer,
    eldoc-store-minibuffer): New, used by `with-eldoc-in-minibuffer'
    
    * lisp/emacs-lisp/pp.el
    (pp-eval-expression): Enable eldoc support.
    
    * lisp/simple.el
    (eval-expression): Same.
    
    * lisp/emacs-lisp/edebug.el
    (edebug-eval-expression): Same.

diff --git a/lisp/emacs-lisp/edebug.el b/lisp/emacs-lisp/edebug.el
index f84de03..ccc3c8d 100644
--- a/lisp/emacs-lisp/edebug.el
+++ b/lisp/emacs-lisp/edebug.el
@@ -3702,13 +3702,15 @@ Return the result of the last expression."
 (defalias 'edebug-format 'format)
 (defalias 'edebug-message 'message)
 
+
 (defun edebug-eval-expression (edebug-expr)
   "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 (with-eldoc-in-minibuffer
+                       (read-from-minibuffer
+                        "Eval: " nil read-expression-map t
+                        'read-expression-history))))
   (princ
    (edebug-outside-excursion
     (setq values (cons (edebug-eval edebug-expr) values))
diff --git a/lisp/emacs-lisp/eldoc.el b/lisp/emacs-lisp/eldoc.el
index cd9b779..fd78433 100644
--- a/lisp/emacs-lisp/eldoc.el
+++ b/lisp/emacs-lisp/eldoc.el
@@ -204,6 +204,89 @@ With prefix ARG, turn ElDoc mode on if and only if ARG is positive."
 	    (omessage (message nil)))))
   eldoc-last-message)
 
+;;; Minibuffer support.
+;;  Enable displaying eldoc info in something else
+;;  Than minibuffer when this one is in use.
+;;
+(defcustom eldoc-in-minibuffer t
+  "Turn on eldoc in minibuffer."
+  :group 'eldoc
+  :type 'bolean)
+
+(defcustom eldoc-in-minibuffer-show-fn 'eldoc-show-in-mode-line
+  "A function to display eldoc info.
+Should take one arg: the string to display"
+  :group 'eldoc
+  :type 'function)
+
+(defcustom eldoc-show-in-mode-line-delay 12
+  "The time we show eldoc when emacs is idle."
+  :group 'eldoc
+  :type 'number)
+
+;; Internal.
+(defvar eldoc-active-minibuffers-list nil
+  "Store actives minibuffers with eldoc enabled.")
+
+(defun eldoc-store-minibuffer ()
+  "Store minibuffer buffer name in `eldoc-active-minibuffers-list'.
+This function is called by each minibuffer started with eldoc support.
+See `with-eldoc-in-minibuffer'."
+  (with-selected-window (minibuffer-window)
+    (push (buffer-name) eldoc-active-minibuffers-list)))
+
+(defmacro with-eldoc-in-minibuffer (&rest body)
+  "Enable eldoc support for minibuffer input that run in BODY."
+  (declare (indent 0) (debug t))
+  `(let ((timer (and eldoc-in-minibuffer
+                     (run-with-idle-timer
+                      eldoc-idle-delay
+                      'repeat 'eldoc-mode-in-minibuffer))))
+     (unwind-protect
+         (minibuffer-with-setup-hook
+             ;; When minibuffer is activated in body,
+             ;; store it.
+             'eldoc-store-minibuffer
+           ,@body)
+       (and timer (cancel-timer timer))
+       ;; Each time a minibuffer exit or abort
+       ;; his buffer is removed from stack,
+       ;; assuming we can only exit the active minibuffer
+       ;; on top of stack.
+       (setq eldoc-active-minibuffers-list
+             (cdr eldoc-active-minibuffers-list)))))
+
+(defun eldoc-show-in-mode-line (str)
+  "Display string STR in mode-line."
+  (with-current-buffer (with-selected-window
+                           (minibuffer-selected-window)
+                         (current-buffer))
+    (let ((mode-line-format (concat " " str)))
+      (force-mode-line-update)
+      (sit-for eldoc-show-in-mode-line-delay))
+    (force-mode-line-update)))
+
+(defun eldoc-mode-in-minibuffer ()
+  "Show eldoc for current minibuffer input."
+  (let ((buf (with-selected-window (minibuffer-window)
+               (buffer-name))))
+    ;; If this minibuffer have been started with
+    ;;`with-eldoc-in-minibuffer' give it eldoc support
+    ;; and update mode-line, otherwise do nothing.
+    (when (member buf eldoc-active-minibuffers-list)
+      (let* ((str-all (minibuffer-completion-contents))
+             (sym     (when str-all
+                        (with-temp-buffer
+                          (insert str-all)
+                          (goto-char (point-max))
+                          (unless (looking-back ")\\|\"")
+                            (forward-char -1))
+                          (eldoc-current-symbol))))
+             (doc     (or (eldoc-get-var-docstring sym)
+                          (eldoc-get-fnsym-args-string
+                           (car (eldoc-fnsym-in-current-sexp))))))
+        (when doc (funcall eldoc-in-minibuffer-show-fn doc))))))
+
 ;; This function goes on pre-command-hook for XEmacs or when using idle
 ;; timers in Emacs.  Motion commands clear the echo area for some reason,
 ;; which make eldoc messages flicker or disappear just before motion
diff --git a/lisp/emacs-lisp/pp.el b/lisp/emacs-lisp/pp.el
index 2d1b886..13dd650 100644
--- a/lisp/emacs-lisp/pp.el
+++ b/lisp/emacs-lisp/pp.el
@@ -133,8 +133,9 @@ after OUT-BUFFER-NAME."
   "Evaluate EXPRESSION and pretty-print its value.
 Also add the value to the front of the list in the variable `values'."
   (interactive
-   (list (read-from-minibuffer "Eval: " nil read-expression-map t
-			       'read-expression-history)))
+   (list (with-eldoc-in-minibuffer
+           (read-from-minibuffer "Eval: " nil read-expression-map t
+                                 'read-expression-history))))
   (message "Evaluating...")
   (setq values (cons (eval expression) values))
   (pp-display-expression (car values) "*Pp Eval Output*"))
diff --git a/lisp/simple.el b/lisp/simple.el
index b36cf2e..7ed5ea3 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -1163,9 +1163,10 @@ If `eval-expression-debug-on-error' is non-nil, which is the default,
 this command arranges for all errors to enter the debugger."
   (interactive
    (list (let ((minibuffer-completing-symbol t))
-	   (read-from-minibuffer "Eval: "
-				 nil read-expression-map t
-				 'read-expression-history))
+           (with-eldoc-in-minibuffer
+             (read-from-minibuffer "Eval: "
+                                   nil read-expression-map t
+                                   'read-expression-history)))
 	 current-prefix-arg))
 
   (if (null eval-expression-debug-on-error)

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

* Re: Introduce eldoc support in minibuffer
  2011-07-01 15:39 Introduce eldoc support in minibuffer Thierry Volpiatto
@ 2011-07-02 18:34 ` Thierry Volpiatto
  2011-07-02 22:47 ` Dan Nicolaescu
  1 sibling, 0 replies; 8+ messages in thread
From: Thierry Volpiatto @ 2011-07-02 18:34 UTC (permalink / raw
  To: emacs-devel

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

Thierry Volpiatto <thierry.volpiatto@gmail.com> writes:

> Hi,
> when editing code in minibuffer (M-:) eldoc is not available.
> This patch provide this feature.
> eldoc is displayed in mode-line.
> It provide a macro that can be put around any code that use minibuffer
> like this:
>
> (with-eldoc-in-minibuffer (read-string "test: "))
>
> It take care of other minibuffers and display eldoc only in the ones
> called with `with-eldoc-in-minibuffer'.
>
> Of course you can disable this feature with `eldoc-in-minibuffer' set to
> nil.

Here the second version of patch.
Show in mode-line next to minibuffer.
Work with frames.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: patch-eldoc-in-minibuffer-0.patch --]
[-- Type: text/x-diff, Size: 7153 bytes --]

commit a51ad175ee8e345b1ae5631f6d2ae6aafcb6fc0e
Author: Thierry Volpiatto <thierry.volpiatto@gmail.com>
Date:   Sat Jul 2 15:39:24 2011 +0200

    eldoc-in-minibuffer
    
    Introduce eldoc support for minibuffer.
    
    * lisp/emacs-lisp/eldoc.el
    
    (eldoc-in-minibuffer,
    eldoc-in-minibuffer-show-fn,
    eldoc-show-in-mode-line-delay,): New user variables
    
    (with-eldoc-in-minibuffer): Macro to enable eldoc support in any code that use minibuffer as input.
    
    (eldoc-show-in-mode-line,
    eldoc-mode-in-minibuffer,
    eldoc-store-minibuffer): New, used by `with-eldoc-in-minibuffer'
    
    * lisp/emacs-lisp/pp.el
    (pp-eval-expression): Enable eldoc support.
    
    * lisp/simple.el
    (eval-expression): Same.
    
    * lisp/emacs-lisp/edebug.el
    (edebug-eval-expression): Same.

diff --git a/lisp/emacs-lisp/edebug.el b/lisp/emacs-lisp/edebug.el
index f84de03..ccc3c8d 100644
--- a/lisp/emacs-lisp/edebug.el
+++ b/lisp/emacs-lisp/edebug.el
@@ -3702,13 +3702,15 @@ Return the result of the last expression."
 (defalias 'edebug-format 'format)
 (defalias 'edebug-message 'message)
 
+
 (defun edebug-eval-expression (edebug-expr)
   "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 (with-eldoc-in-minibuffer
+                       (read-from-minibuffer
+                        "Eval: " nil read-expression-map t
+                        'read-expression-history))))
   (princ
    (edebug-outside-excursion
     (setq values (cons (edebug-eval edebug-expr) values))
diff --git a/lisp/emacs-lisp/eldoc.el b/lisp/emacs-lisp/eldoc.el
index cd9b779..e43b4ce 100644
--- a/lisp/emacs-lisp/eldoc.el
+++ b/lisp/emacs-lisp/eldoc.el
@@ -204,6 +204,92 @@ With prefix ARG, turn ElDoc mode on if and only if ARG is positive."
 	    (omessage (message nil)))))
   eldoc-last-message)
 
+;;; Minibuffer support.
+;;  Enable displaying eldoc info in something else
+;;  Than minibuffer when this one is in use.
+;;
+(defcustom eldoc-in-minibuffer t
+  "Turn on eldoc in minibuffer."
+  :group 'eldoc
+  :type 'bolean)
+
+(defcustom eldoc-in-minibuffer-show-fn 'eldoc-show-in-mode-line
+  "A function to display eldoc info.
+Should take one arg: the string to display"
+  :group 'eldoc
+  :type 'function)
+
+(defcustom eldoc-show-in-mode-line-delay 12
+  "The time we show eldoc when emacs is idle."
+  :group 'eldoc
+  :type 'number)
+
+;; Internal.
+(defvar eldoc-active-minibuffers-list nil
+  "Store actives minibuffers with eldoc enabled.")
+
+(defun eldoc-store-minibuffer ()
+  "Store minibuffer buffer name in `eldoc-active-minibuffers-list'.
+This function is called by each minibuffer started with eldoc support.
+See `with-eldoc-in-minibuffer'."
+  (with-selected-window (minibuffer-window)
+    (push (buffer-name) eldoc-active-minibuffers-list)))
+
+(defmacro with-eldoc-in-minibuffer (&rest body)
+  "Enable eldoc support for minibuffer input that run in BODY."
+  (declare (indent 0) (debug t))
+  `(let ((timer (and eldoc-in-minibuffer
+                     (run-with-idle-timer
+                      eldoc-idle-delay
+                      'repeat 'eldoc-mode-in-minibuffer))))
+     (unwind-protect
+         (minibuffer-with-setup-hook
+             ;; When minibuffer is activated in body,
+             ;; store it.
+             'eldoc-store-minibuffer
+           ,@body)
+       (and timer (cancel-timer timer))
+       ;; Each time a minibuffer exit or abort
+       ;; his buffer is removed from stack,
+       ;; assuming we can only exit the active minibuffer
+       ;; on top of stack.
+       (setq eldoc-active-minibuffers-list
+             (cdr eldoc-active-minibuffers-list)))))
+
+(defun eldoc-show-in-mode-line (str)
+  "Display string STR in the mode-line next to minibuffer."
+  (let (mode-line-in-non-selected-windows)
+    (with-current-buffer (window-buffer
+                          (with-selected-frame (selected-frame)
+                            (window-in-direction
+                             'above (minibuffer-window))))
+      (make-local-variable 'mode-line-format)
+      (let ((mode-line-format (concat " " str)))
+        (force-mode-line-update nil)
+        (sit-for eldoc-show-in-mode-line-delay))
+      (force-mode-line-update))))
+
+(defun eldoc-mode-in-minibuffer ()
+  "Show eldoc for current minibuffer input."
+  (let ((buf (with-selected-window (minibuffer-window)
+               (buffer-name))))
+    ;; If this minibuffer have been started with
+    ;;`with-eldoc-in-minibuffer' give it eldoc support
+    ;; and update mode-line, otherwise do nothing.
+    (when (member buf eldoc-active-minibuffers-list)
+      (let* ((str-all (minibuffer-completion-contents))
+             (sym     (when str-all
+                        (with-temp-buffer
+                          (insert str-all)
+                          (goto-char (point-max))
+                          (unless (looking-back ")\\|\"")
+                            (forward-char -1))
+                          (eldoc-current-symbol))))
+             (doc     (or (eldoc-get-var-docstring sym)
+                          (eldoc-get-fnsym-args-string
+                           (car (eldoc-fnsym-in-current-sexp))))))
+        (when doc (funcall eldoc-in-minibuffer-show-fn doc))))))
+
 ;; This function goes on pre-command-hook for XEmacs or when using idle
 ;; timers in Emacs.  Motion commands clear the echo area for some reason,
 ;; which make eldoc messages flicker or disappear just before motion
diff --git a/lisp/emacs-lisp/pp.el b/lisp/emacs-lisp/pp.el
index 2d1b886..13dd650 100644
--- a/lisp/emacs-lisp/pp.el
+++ b/lisp/emacs-lisp/pp.el
@@ -133,8 +133,9 @@ after OUT-BUFFER-NAME."
   "Evaluate EXPRESSION and pretty-print its value.
 Also add the value to the front of the list in the variable `values'."
   (interactive
-   (list (read-from-minibuffer "Eval: " nil read-expression-map t
-			       'read-expression-history)))
+   (list (with-eldoc-in-minibuffer
+           (read-from-minibuffer "Eval: " nil read-expression-map t
+                                 'read-expression-history))))
   (message "Evaluating...")
   (setq values (cons (eval expression) values))
   (pp-display-expression (car values) "*Pp Eval Output*"))
diff --git a/lisp/simple.el b/lisp/simple.el
index b36cf2e..7ed5ea3 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -1163,9 +1163,10 @@ If `eval-expression-debug-on-error' is non-nil, which is the default,
 this command arranges for all errors to enter the debugger."
   (interactive
    (list (let ((minibuffer-completing-symbol t))
-	   (read-from-minibuffer "Eval: "
-				 nil read-expression-map t
-				 'read-expression-history))
+           (with-eldoc-in-minibuffer
+             (read-from-minibuffer "Eval: "
+                                   nil read-expression-map t
+                                   'read-expression-history)))
 	 current-prefix-arg))
 
   (if (null eval-expression-debug-on-error)

[-- Attachment #3: Type: text/plain, Size: 84 bytes --]


-- 
A+ Thierry
Get my Gnupg key:
gpg --keyserver pgp.mit.edu --recv-keys 59F29997 

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

* Re: Introduce eldoc support in minibuffer
  2011-07-01 15:39 Introduce eldoc support in minibuffer Thierry Volpiatto
  2011-07-02 18:34 ` Thierry Volpiatto
@ 2011-07-02 22:47 ` Dan Nicolaescu
  2011-07-03  4:55   ` Thierry Volpiatto
  1 sibling, 1 reply; 8+ messages in thread
From: Dan Nicolaescu @ 2011-07-02 22:47 UTC (permalink / raw
  To: Thierry Volpiatto; +Cc: emacs-devel

Thierry Volpiatto <thierry.volpiatto@gmail.com> writes:

> Hi,
> when editing code in minibuffer (M-:) eldoc is not available.
> This patch provide this feature.
> eldoc is displayed in mode-line.

Can the code that displays something in the modeline be used for something else?

It could be used as a (much more functional) tooltip.
For example C-s is great, but if one does not read the manual is hard to
know about all it can do.  If we could display little help messages it
would be easy to teach users about various nice features.



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

* Re: Introduce eldoc support in minibuffer
  2011-07-02 22:47 ` Dan Nicolaescu
@ 2011-07-03  4:55   ` Thierry Volpiatto
  2011-07-03  6:03     ` Thierry Volpiatto
  2011-07-05 14:41     ` Dan Nicolaescu
  0 siblings, 2 replies; 8+ messages in thread
From: Thierry Volpiatto @ 2011-07-03  4:55 UTC (permalink / raw
  To: Dan Nicolaescu; +Cc: emacs-devel

Dan Nicolaescu <dann@gnu.org> writes:

> Thierry Volpiatto <thierry.volpiatto@gmail.com> writes:
>
>> Hi,
>> when editing code in minibuffer (M-:) eldoc is not available.
>> This patch provide this feature.
>> eldoc is displayed in mode-line.
>
> Can the code that displays something in the modeline be used for something else?
Yes, try (eldoc-show-in-mode-line "foo")

> It could be used as a (much more functional) tooltip.
> For example C-s is great, but if one does not read the manual is hard to
> know about all it can do.  If we could display little help messages it
> would be easy to teach users about various nice features.
I don't use isearch, so i don't know what to display in mode-line, but i
imagine you can display something useful in mode-line, like a minimal
help depending of the context of your search.
I already use that in some places in ioccur and anything.
You can also in addition of a minimal help in mode-line display a
_full window_ with all the binding of isearch but without quitting isearch
like C-h m does actually.
It's not hard to do, just create a help function for isearch and bind it
in isearch map.

For example:
Try M-x anything-buffer+ then C-c ? to see what i mean.

-- 
A+ Thierry
Get my Gnupg key:
gpg --keyserver pgp.mit.edu --recv-keys 59F29997 



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

* Re: Introduce eldoc support in minibuffer
  2011-07-03  4:55   ` Thierry Volpiatto
@ 2011-07-03  6:03     ` Thierry Volpiatto
  2011-07-05 14:41     ` Dan Nicolaescu
  1 sibling, 0 replies; 8+ messages in thread
From: Thierry Volpiatto @ 2011-07-03  6:03 UTC (permalink / raw
  To: emacs-devel

Thierry Volpiatto <thierry.volpiatto@gmail.com> writes:

> It's not hard to do, just create a help function for isearch and bind it
> in isearch map.
This is the code of anything.el adapted for isearch:

#+BEGIN_SRC lisp
(defun isearch-help-internal (bufname insert-content-fn)
  (save-window-excursion
    (switch-to-buffer (get-buffer-create bufname))
    (delete-other-windows)
    (erase-buffer)
    (funcall insert-content-fn)
    (setq mode-line-format "%b (SPC,C-v:NextPage  b,M-v:PrevPage  other:Exit)")
    (setq cursor-type nil)
    (goto-char 1)
    (isearch-help-event-loop)))

(defun isearch-help-event-loop ()
  (ignore-errors
    (catch 'exit-isearch-help
      (loop for event = (read-key) do
           (case event
             ((?\C-v ? )  (scroll-up))
             ((?\M-v ?b) (scroll-down))
             (t (throw 'exit-isearch-help (isearch-update))))))))

(defun isearch-help ()
  (interactive)
  (isearch-help-internal
   " *Isearch Help*"
   (lambda ()
     (insert (substitute-command-keys isearch-help-message)))))

(defvar isearch-help-message "\\{isearch-mode-map}")
(define-key isearch-mode-map (kbd "C-?") 'isearch-help)


#+END_SRC

Improve isearch-help-message as needed, and provide a minimal help in
mode-line:

C-?: Help, C-s: Do_this, C-r: Do_that etc...
 
-- 
A+ Thierry
Get my Gnupg key:
gpg --keyserver pgp.mit.edu --recv-keys 59F29997 




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

* Re: Introduce eldoc support in minibuffer
  2011-07-03  4:55   ` Thierry Volpiatto
  2011-07-03  6:03     ` Thierry Volpiatto
@ 2011-07-05 14:41     ` Dan Nicolaescu
  2011-07-05 17:51       ` Thierry Volpiatto
  1 sibling, 1 reply; 8+ messages in thread
From: Dan Nicolaescu @ 2011-07-05 14:41 UTC (permalink / raw
  To: Thierry Volpiatto; +Cc: emacs-devel

Thierry Volpiatto <thierry.volpiatto@gmail.com> writes:

> Dan Nicolaescu <dann@gnu.org> writes:
>
>> Thierry Volpiatto <thierry.volpiatto@gmail.com> writes:
>>
>>> Hi,
>>> when editing code in minibuffer (M-:) eldoc is not available.
>>> This patch provide this feature.
>>> eldoc is displayed in mode-line.
>>
>> Can the code that displays something in the modeline be used for something else?
> Yes, try (eldoc-show-in-mode-line "foo")

I was thinking more of something that is not necessarily related to
eldoc, like an API that can be used to display in modeline and maybe a
minor mode to turn on/off.



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

* Re: Introduce eldoc support in minibuffer
  2011-07-05 14:41     ` Dan Nicolaescu
@ 2011-07-05 17:51       ` Thierry Volpiatto
  2011-07-06 15:25         ` Dan Nicolaescu
  0 siblings, 1 reply; 8+ messages in thread
From: Thierry Volpiatto @ 2011-07-05 17:51 UTC (permalink / raw
  To: Dan Nicolaescu; +Cc: emacs-devel

Dan Nicolaescu <dann@gnu.org> writes:

> Thierry Volpiatto <thierry.volpiatto@gmail.com> writes:
>
>> Dan Nicolaescu <dann@gnu.org> writes:
>>
>>> Thierry Volpiatto <thierry.volpiatto@gmail.com> writes:
>>>
>>>> Hi,
>>>> when editing code in minibuffer (M-:) eldoc is not available.
>>>> This patch provide this feature.
>>>> eldoc is displayed in mode-line.
>>>
>>> Can the code that displays something in the modeline be used for something else?
>> Yes, try (eldoc-show-in-mode-line "foo")
>
> I was thinking more of something that is not necessarily related to
> eldoc, like an API that can be used to display in modeline and maybe a
> minor mode to turn on/off.
No, that is for eldoc essentially.

-- 
A+ Thierry
Get my Gnupg key:
gpg --keyserver pgp.mit.edu --recv-keys 59F29997 



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

* Re: Introduce eldoc support in minibuffer
  2011-07-05 17:51       ` Thierry Volpiatto
@ 2011-07-06 15:25         ` Dan Nicolaescu
  0 siblings, 0 replies; 8+ messages in thread
From: Dan Nicolaescu @ 2011-07-06 15:25 UTC (permalink / raw
  To: Thierry Volpiatto; +Cc: emacs-devel

Thierry Volpiatto <thierry.volpiatto@gmail.com> writes:

> Dan Nicolaescu <dann@gnu.org> writes:
>
>> Thierry Volpiatto <thierry.volpiatto@gmail.com> writes:
>>
>>> Dan Nicolaescu <dann@gnu.org> writes:
>>>
>>>> Thierry Volpiatto <thierry.volpiatto@gmail.com> writes:
>>>>
>>>>> Hi,
>>>>> when editing code in minibuffer (M-:) eldoc is not available.
>>>>> This patch provide this feature.
>>>>> eldoc is displayed in mode-line.
>>>>
>>>> Can the code that displays something in the modeline be used for something else?
>>> Yes, try (eldoc-show-in-mode-line "foo")
>>
>> I was thinking more of something that is not necessarily related to
>> eldoc, like an API that can be used to display in modeline and maybe a
>> minor mode to turn on/off.
> No, that is for eldoc essentially.

Wouldn't it be better if it was a bit more generic so other parts of
emacs could use it?



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

end of thread, other threads:[~2011-07-06 15:25 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-01 15:39 Introduce eldoc support in minibuffer Thierry Volpiatto
2011-07-02 18:34 ` Thierry Volpiatto
2011-07-02 22:47 ` Dan Nicolaescu
2011-07-03  4:55   ` Thierry Volpiatto
2011-07-03  6:03     ` Thierry Volpiatto
2011-07-05 14:41     ` Dan Nicolaescu
2011-07-05 17:51       ` Thierry Volpiatto
2011-07-06 15:25         ` Dan Nicolaescu

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.