From: tomas@tuxteam.de
To: Christopher Dimech <dimech@gmx.com>
Cc: help-gnu-emacs@gnu.org
Subject: Re: Determining existence of text following point
Date: Tue, 18 May 2021 14:27:40 +0200 [thread overview]
Message-ID: <20210518122740.GE11623@tuxteam.de> (raw)
In-Reply-To: <trinity-7082f09b-4bb5-4079-8f4c-78bf7eaee027-1621340127135@3c-app-mailcom-bs13>
[-- Attachment #1: Type: text/plain, Size: 937 bytes --]
On Tue, May 18, 2021 at 02:15:27PM +0200, Christopher Dimech wrote:
[...]
> string-match looks as though it returns the index of the last match because
>
> (setq sa (string-match "[^[:blank:]]" " A neutrino is a fermion"))
> (setq sb (not (string-match "[^[:blank:]]" " A neutrino is a fermion")))
>
> gives
>
> sa: 2
> sb: nil
Sorry. I still don't understand.
- You send string-match to find a non-blank character
It does find one. If you don't specify more, that
will be the first one, i.e. the "A".
- Thus the value is 2. This is your first result.
- You negate that in your second setup (not ...). By
convention, in Lisp, 'nil' is the false value, everything
else is considered 'true'. Thus, (not (...)) evaluates
to (not 2) evaluates to nil. This is your second result.
Now what /is/ your problem? Your posts are sometimes... inscrutable
(to me, at least).
Cheers
- t
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
next prev parent reply other threads:[~2021-05-18 12:27 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-17 21:46 Determining existence of text following point michael-franzese
2021-05-17 22:02 ` Skip Montanaro
2021-05-17 22:31 ` michael-franzese
2021-05-17 23:05 ` Eric Abrahamsen
2021-05-17 23:15 ` michael-franzese
2021-05-17 23:36 ` Skip Montanaro
2021-05-18 0:09 ` Eric Abrahamsen
2021-05-18 0:37 ` michael-franzese
2021-05-18 8:24 ` michael-franzese
2021-05-18 8:56 ` Jean Louis
2021-05-18 9:31 ` Christopher Dimech
2021-05-18 9:42 ` Jean Louis
2021-05-18 9:54 ` Jean Louis
2021-05-18 10:08 ` Christopher Dimech
2021-05-18 11:07 ` tomas
2021-05-18 11:26 ` Christopher Dimech
2021-05-18 11:56 ` Jean Louis
2021-05-18 12:23 ` Christopher Dimech
2021-05-18 12:35 ` tomas
2021-05-18 12:50 ` Christopher Dimech
2021-05-18 12:02 ` tomas
2021-05-18 12:15 ` Christopher Dimech
2021-05-18 12:27 ` tomas [this message]
2021-05-18 12:43 ` Christopher Dimech
2021-05-18 12:44 ` Jean Louis
2021-05-18 12:28 ` Christopher Dimech
2021-05-18 12:47 ` Jean Louis
2021-05-18 20:50 ` michael-franzese
2021-05-18 22:04 ` Jean Louis
2021-05-18 22:17 ` Jean Louis
2021-05-19 7:28 ` michael-franzese
2021-05-19 8:05 ` michael-franzese
2021-05-19 10:23 ` Jean Louis
2021-05-19 10:32 ` michael-franzese
2021-05-19 12:31 ` michael-franzese
2021-05-17 23:53 ` michael-franzese
2021-05-18 8:47 ` Jean Louis
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=20210518122740.GE11623@tuxteam.de \
--to=tomas@tuxteam.de \
--cc=dimech@gmx.com \
--cc=help-gnu-emacs@gnu.org \
/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).