unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: tomas@tuxteam.de
To: Hongyi Zhao <hongyi.zhao@gmail.com>
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 17:01:24 +0200	[thread overview]
Message-ID: <20210722150124.GB28761@tuxteam.de> (raw)
In-Reply-To: <CAGP6POLExrOyTM9H7EY1u6yWvT=gXX_KBwie1pD0WPKgkDs4cQ@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1429 bytes --]

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. 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.

Cheers
 - t

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

  reply	other threads:[~2021-07-22 15:01 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 [this message]
2021-07-22 15:21                                                   ` Hongyi Zhao
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=20210722150124.GB28761@tuxteam.de \
    --to=tomas@tuxteam.de \
    --cc=help-gnu-emacs@gnu.org \
    --cc=hongyi.zhao@gmail.com \
    --cc=moasenwood@zoho.eu \
    /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).