all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Albert Reiner <areiner@tph.tuwien.ac.at>
Subject: Re: how-many to number?
Date: 28 Sep 2005 16:00:38 +0200	[thread overview]
Message-ID: <vw8r7b9thq1.fsf@berry.phys.ntnu.no> (raw)
In-Reply-To: 1127914526.834249.240930@g14g2000cwa.googlegroups.com

["rgb" <rbielaws@i1.net>, 28 Sep 2005 06:35:26 -0700]:
> C-h f how-many <ret>
> 
> Print and return number of matches for regexp following point.
> When called from Lisp and interactive is omitted or nil, *just return
> the number, do not print it*; if interactive is t, the function behaves
> in all respects has if it had been called interactively.

Thanks; I don't get this on GNU Emacs 21.3.1 (i386-redhat-linux-gnu, X
toolkit, Xaw3d scroll bars) of 2005-02-04 on bugs.build.redhat.com:

,----[ C-h f how-many RET ]
| how-many is an interactive compiled Lisp function in `replace'.
| (how-many REGEXP &optional RSTART REND)
| 
| Print number of matches for REGEXP following point.
| 
| If REGEXP contains upper case characters (excluding those preceded by `\'),
| the matching is case-sensitive.
| 
| Second and third arg RSTART and REND specify the region to operate on.
| 
| Interactively, in Transient Mark mode when the mark is active, operate
| on the contents of the region.  Otherwise, operate from point to the
| end of the buffer.
`----

So I guess that changed recently.  My current work-around:

    (read (how-many "\\b\\w+\\b" (point-min) (point-max)))

, which is ugly but seems to work.

Thanks for your help,

Albert.

  reply	other threads:[~2005-09-28 14:00 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-09-28 12:40 how-many to number? Albert Reiner
2005-09-28 13:35 ` rgb
2005-09-28 14:00   ` Albert Reiner [this message]
2005-09-29  3:15     ` Neon Absentius
     [not found]     ` <mailman.9034.1127965324.20277.help-gnu-emacs@gnu.org>
2005-09-29 13:17       ` Albert Reiner

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=vw8r7b9thq1.fsf@berry.phys.ntnu.no \
    --to=areiner@tph.tuwien.ac.at \
    /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.