bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: bug#12833: 24.2.50; Avoid questions asked in the echo area to be ove


From: Sebastien Vauban
Subject: Re: bug#12833: 24.2.50; Avoid questions asked in the echo area to be overridden by messages
Date: Wed, 05 Dec 2012 09:49:41 +0100
User-agent: Gnus/5.130006 (Ma Gnus v0.6) Emacs/24.3.50 (windows-nt)

Hi Stefan,

Stefan Monnier wrote:
>> What does that change in case of interactive question?
>>
>>     If I do 1 require before asking a question to the user, the message about
>>     that require should hardly be visible (if visible at all -- because
>>     actions happen so quickly).  The question should use the space of the
>>     information message, point.
>
> I see, yes, that would make sense.

Does that mean it will be fixed that way?

BTW, I tested a workaround in the meanwhile: let-binding
`minibuffer-message-timeout' to 0.

--8<---------------cut here---------------start------------->8---
       (defadvice require (around require-around)
         "Leave a trace of packages being loaded."
         (let* ((feature (ad-get-arg 0))
                (require-depth (or (and (boundp 'require-depth) require-depth)
                                   0))
                (prefix (concat (make-string (* 2 require-depth) ? ) "+-> "))
                (minibuffer-message-timeout 0))
           (cond ((featurep feature)
                  (message "(info) %sRequiring `%s'... already loaded"
                           prefix feature)
                  (setq ad-return-value feature))
                 (t
                  (let ((lvn/time-start))
                    (message "(info) %sRequiring `%s'..." prefix feature)
                    (setq lvn/time-start (float-time))
                    (let ((require-depth (1+ require-depth)))
                      ad-do-it)
                    (message "(info) %sRequiring `%s'... %s (loaded in %.2f s)"
                             prefix feature
                             (locate-library (symbol-name feature))
                             (- (float-time) lvn/time-start)))))))

       (ad-activate 'require))
--8<---------------cut here---------------end--------------->8---

However, that does not work: questions are still overridden for 2 seconds by
old messages.

Setting it globally, in my .emacs, to 0 does well work.

Am I missing something?

Best regards,
  Seb


-- 
Sebastien Vauban


reply via email to

[Prev in Thread] Current Thread [Next in Thread]