I am new to Emacs and Emacs-Lisp. I have the following code:

(message "Her age is: %d" 10)
(message "Her name is: %s" "Nancy")
(message "My list is: %S" (list 7 4 2))

When I evaluate, it displays JUST the last line in the echo area.

My list is: 7 4 2

It does NOT display the first 2 lines.

Of course, on C-h e it displays all the 3 lines in Buffer > message area in new frame.

Is there a way I can display ALL the 3 lines in echo area itself, in addition to message buffer frame, like the following?

Her age is: 10
Her name is: Nancy
My list is: (7 4 2)

Emacs does display all 3 lines, but it displays them one by one, and each next message erases the previous one. IOW, the echo area shows the result of the last command, and each command erases the previous output.

Try evaluating this:

  (message "Her age is: %d" 10)
  (sleep-for 1)
  (message "Her name is: %s" "Nancy")
  (sleep-for 1)
  (message "My list is: %S" (list 7 4 2))
  (sleep-for 1))

You will see all 3 messages one-by-one for 1 second each.

To see them all simultaneously, you need to use a single message call:

(message "Her age is: %d\nHer name is: %s\nMy list is: %S" 
         10 "Nancy" (list 7 4 2))
  • Sir, is there a way I can see them all with different message calls? I mean, by way of adding some commands to .emacs file? So that Emacs does not erase the previous results. – tom_kp Jul 20 '17 at 15:41
  • @user16438: how do you imagine that? the echo area growing in size as you are using emacs? Pretty soon it will not fit your screen. – sds Jul 20 '17 at 16:06
  • Sir, I tried this. Now, it just displays first and second line, one by one, for fraction of a second and goes off, and displays just the third line.there after. My question is: is there any configuration I can do to .emacs so that this work in normal way. Else, I will have to configure the Buffer screen. Am I right? – tom_kp Jul 20 '17 at 19:08
  • I am afraid you lost me. When you eval the last form in my answer, you do get all 3 lines, don't you? – sds Jul 20 '17 at 19:11
  • Sir, The first line appear for ~1/3 of a second and disappear, then second line appear for ~1/3 of a second and disappear, then the third line appear and remain in the echo area. – tom_kp Jul 21 '17 at 13:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.