[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: message in minibuffer
From: |
Drew Adams |
Subject: |
RE: message in minibuffer |
Date: |
Sat, 19 Nov 2005 16:10:51 -0800 |
I am a newbie in writing lisp code. When my code displays a message in
the minibuffer using the (message ...) syntax, I always have double
quotes around the output. I have noticed in other packages that
messages appear without the double quotes yet the code uses the same
syntax
How do I get rid of the double quotes in the mini-buffer?
Post your code, so we can see what it does.
`message' displays a literal string argument without double-quotes. However,
if your string _contains_ double-quotes, then they will be shown by
`message', as they are characters in the string itself.
This will not display any double-quotes: (message "This is a message")
This will display double-quotes: (message "\"Quoted message\"")
If you are doing (message foo), then make sure the value of `foo' is not a
string that contains double-quotes. In particular, be aware that if you set
a string-valued variable `foo' using `set-variable' or Customize, you should
not include double-quotes in the value you enter.
Keep in mind also that the first argument to `message' is a format string.
See function `format' for the proper use of `%' in format strings. If, for
example, you use `%S' instead of `%s', then a string value will be displayed
surrounded by double-quotes. For example:
(setq foo "aaa")
(message "Here is a string value: %S." foo) ->
Here is a string value: "aaa".
(message "Here is a string value: %s." foo) ->
Here is a string value: aaa.
- message in minibuffer, wkomornicki, 2005/11/19
- RE: message in minibuffer,
Drew Adams <=
- Message not available