all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Xue Fuqiao <xfq.free@gmail.com>
To: Kevin Rodgers <kevin.d.rodgers@gmail.com>
Cc: help-gnu-emacs <help-gnu-emacs@gnu.org>
Subject: Re: About `char' in momentary-string-display
Date: Fri, 18 Oct 2013 15:44:17 +0800	[thread overview]
Message-ID: <CAAF+z6FvfRrGgXpQbbMev+Geo8R1d9o4kWZEUD8zzGyB9Evstw@mail.gmail.com> (raw)
In-Reply-To: <l3onvq$ram$1@ger.gmane.org>

On Thu, Oct 17, 2013 at 9:17 PM, Kevin Rodgers
<kevin.d.rodgers@gmail.com> wrote:
> On 10/17/13 7:06 AM, Xue Fuqiao wrote:
>> In (info "(elisp) Temporary Displays"):
>>
>>   -- Function: momentary-string-display string position&optional char
>>
>>            message
>> [...]
>>       Thus, typing CHAR will simply remove the string from the display,
>>       while typing (say) `C-f' will remove the string from the display
>>       and later (presumably) move point forward.  The argument CHAR is a
>>       space by default.
>>
>> I tried evaluating ‘(momentary-string-display "foo" 1)’ in the *scratch*
>> buffer and typed ‘C-f’, but the point didn't move forward.  Instead, a
>> ‘[6]’ is echoed in the *Messages* buffer.  I don't know what the ‘[6]’
>> stands for, but the codepoint for ^F is #x6 (ACK).  So I think there may
>> be a link between them.
>>
>> But anyway, why didn't the point move forward (the point wasn't at eob)?
>> Can anyone point me in the right direction?
>
> CHAR defaults to SPC, but you typed C-f.  What happens if you type SPC?

Thanks for your attention.  If I type SPC, Emacs (as expected) ignores
it.  But what I'm asking is about the case when CHAR ≠ the-character-i-press.

> What happens if you specify C-f as CHAR:
> (momentary-string-display "foo" 1 ?\C-f)

It doesn't make sense, I think.  Emacs will simply remove "foo" from the
display, and ignore the "C-f".  It is the same as pressing SPC with
‘(momentary-string-display "foo" 1)’.

-- 
Best regards, Xue Fuqiao.
http://www.gnu.org/software/emacs/



  reply	other threads:[~2013-10-18  7:44 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-17 13:06 About `char' in momentary-string-display Xue Fuqiao
2013-10-17 13:17 ` Kevin Rodgers
2013-10-18  7:44   ` Xue Fuqiao [this message]
2013-10-17 20:12 ` Kai Großjohann
2013-10-18  7:51   ` Xue Fuqiao
2013-10-18 22:19     ` Kai Großjohann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAAF+z6FvfRrGgXpQbbMev+Geo8R1d9o4kWZEUD8zzGyB9Evstw@mail.gmail.com \
    --to=xfq.free@gmail.com \
    --cc=help-gnu-emacs@gnu.org \
    --cc=kevin.d.rodgers@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.