unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Hongyi Zhao <hongyi.zhao@gmail.com>
To: tomas@tuxteam.de
Cc: help-gnu-emacs <help-gnu-emacs@gnu.org>,
	Emanuel Berg <moasenwood@zoho.eu>
Subject: Re: [External] : Re: Regexp for matching control character, say, FORM FEED. (Was: Re: The `^L' appeared in built-in help.)
Date: Thu, 22 Jul 2021 23:21:56 +0800	[thread overview]
Message-ID: <CAGP6PO+1H4XA-mH34FCuwa2_f0HGk9Av6i2sb7qB3eDHLV-J=A@mail.gmail.com> (raw)
In-Reply-To: <20210722150124.GB28761@tuxteam.de>

On Thu, Jul 22, 2021 at 11:01 PM <tomas@tuxteam.de> wrote:
>
> On Thu, Jul 22, 2021 at 10:53:53PM +0800, Hongyi Zhao wrote:
> > On Thu, Jul 22, 2021 at 10:38 PM <tomas@tuxteam.de> wrote:
> > >
> > > On Thu, Jul 22, 2021 at 09:56:09PM +0800, Hongyi Zhao wrote:
> > >
> > > [...]
> > >
> > > > Suppose I've the following content in scratch buffer:
> > > >
> > > > (re-search-forward "\f")
> > > > ^L
> > > >
> > > > I put the point at the end of sexp line, and hit `C-j' to evaluate it.
> > > > I find that each time after the sexp has been evaluated successfully,
> > > > the `^L' line will be moved to the next line. See the screenshot in
> > > > the attachment, where I've evaluated the sexp 4 times.
> > > >
> > > > Any hints for this behavior?
> > >
> > > That depends on what C-j is bound to. What does say "describe-key",
> > > aka C-h C-k?
> >
> > `C-h k C-j RET':
> > ;;;
> > C-j runs the command eval-print-last-sexp (found in
> > lisp-interaction-mode-map), which is an interactive compiled Lisp
> > function in ‘elisp-mode.el’.
>
> Ah. You seem to be in a "lisp interaction" buffer.

I'm in scratch buffer, and the "lisp interaction" is its default major mode.

> Then it's clear:
> it's the `print' part of `eval-print-last-sexp' what is inserting
> stuff in your buffer: the value of (re-search-forward "\f").
>
> Before it does a newline (that is what moves the ^L forward), then the
> searching and moving of point happens, then (you should see that, too,
> the expression's value (point's position, an integer) is inserted: you
> should get a number after the ^L, too.

Thank you for your explanation.

Best,
HY



  reply	other threads:[~2021-07-22 15:21 UTC|newest]

Thread overview: 66+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-06  2:34 The `^L' appeared in built-in help Hongyi Zhao
2021-07-06  2:46 ` [External] : " Drew Adams
2021-07-06  2:53   ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-07-06 14:56     ` Drew Adams
2021-07-06 15:56       ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-07-06 17:04         ` Drew Adams
2021-07-06 17:12           ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-07-06  2:51 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-07-06  3:44   ` Hongyi Zhao
2021-07-06  4:06     ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-07-06  8:26       ` Hongyi Zhao
2021-07-06  8:31         ` Hongyi Zhao
2021-07-06  9:12           ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-07-06  9:40             ` Hongyi Zhao
2021-07-06 10:06               ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-07-06 11:07                 ` Hongyi Zhao
2021-07-06 11:22                   ` Hongyi Zhao
2021-07-06 11:55                     ` Hongyi Zhao
2021-07-06 12:09                       ` Hongyi Zhao
2021-07-06 16:13                       ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-07-06 16:12                     ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-07-07  3:03                       ` Hongyi Zhao
2021-07-13  3:06                         ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-07-06 16:12                   ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-07-07  1:40                     ` Hongyi Zhao
2021-07-13  3:07                       ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-07-18  6:34                         ` Hongyi Zhao
2021-07-19  0:27                           ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-07-20  1:27       ` Hongyi Zhao
2021-07-20  1:42         ` [External] : " Drew Adams
2021-07-20  2:02           ` Hongyi Zhao
2021-07-20  4:28             ` Drew Adams
2021-07-20  5:56               ` Hongyi Zhao
2021-07-20 10:29                 ` Hongyi Zhao
2021-07-20 14:48                   ` Drew Adams
2021-07-20 16:28                   ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-07-21  2:03                     ` Hongyi Zhao
2021-07-21  2:26                       ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-07-21  4:44                         ` Drew Adams
2021-07-21  7:15                           ` Regexp for matching control character, say, FORM FEED. (Was: Re: The `^L' appeared in built-in help.) Hongyi Zhao
2021-07-21 17:08                             ` [External] : " Drew Adams
2021-07-22  1:13                               ` Hongyi Zhao
2021-07-22  1:28                                 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-07-22  1:39                                   ` Drew Adams
2021-07-22  1:42                                     ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-07-22  3:52                                       ` Drew Adams
2021-07-22  4:14                                         ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-07-22  8:04                                           ` Hongyi Zhao
2021-07-22 13:56                                           ` Hongyi Zhao
2021-07-22 14:38                                             ` tomas
2021-07-22 14:53                                               ` Hongyi Zhao
2021-07-22 15:01                                                 ` tomas
2021-07-22 15:21                                                   ` Hongyi Zhao [this message]
2021-07-22 22:07                                                 ` [External] : Re: Regexp for matching control character, say, FORM FEED Michael Heerdegen
2021-07-23  1:09                                                   ` Hongyi Zhao
2021-07-22 17:07                                             ` [External] : Re: Regexp for matching control character, say, FORM FEED. (Was: Re: The `^L' appeared in built-in help.) Drew Adams
2021-07-22 17:11                                               ` tomas
2021-08-01  2:41                                                 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-07-22  8:06                                 ` tomas
2021-07-22  9:45                                   ` Hongyi Zhao
2021-07-22 10:06                                     ` tomas
2021-07-22 10:27                                       ` Hongyi Zhao
2021-07-22 12:14                                         ` tomas
2021-08-01  2:31                                   ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-07-06  4:19 ` The `^L' appeared in built-in help 2QdxY4RzWzUUiLuE
2021-07-06  4:29   ` Emanuel Berg via Users list for the GNU Emacs text editor

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to='CAGP6PO+1H4XA-mH34FCuwa2_f0HGk9Av6i2sb7qB3eDHLV-J=A@mail.gmail.com' \
    --to=hongyi.zhao@gmail.com \
    --cc=help-gnu-emacs@gnu.org \
    --cc=moasenwood@zoho.eu \
    --cc=tomas@tuxteam.de \
    /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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).