unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: wenbinye@gmail.com
Subject: Re: emacs insert icrement numbers
Date: 17 Aug 2006 06:53:52 -0700	[thread overview]
Message-ID: <1155822832.705184.223680@h48g2000cwc.googlegroups.com> (raw)
In-Reply-To: <ur6zfwkte.fsf@HY56D61.pg.com>

the function gse-number-rectangle use function read-number which is not
compatible
with old version. You have to change the line marked as following:

  (interactive
   (list
    (region-beginning) ; start
    (region-end) ; end
    (if (functionp 'read-number)
;; change this line  (read-number "First number [1]: " t "1") to this
        (read-number "First number [1]: " 1) ; start-at
      (string-to-int (read-string "First number [1]: " nil nil "1"))) ;
start-at
    (read-string "Suffix: " nil 'gse-number-rectangle-history) ;
suffix-text
    current-prefix-arg)) ; prefix

Chris McMahan wrote:
> I was a real fan of this function, but it has ceased to work in the
> latest versions of emacs.
>
> Does anybody have a version that works under emacs-22, or a fix for
> the existing version (2004.12.22)?
>
> Here's the error message I get:
>
> if: Wrong number of arguments: #[(prompt &optional default)
> "<a string of non-printable characters>" [n default prompt str nil string-match
> "\\(\\):[ ]*\\'" replace-match format " (default %s)" ...] 8], 3
>
> - Chris
>
> wenbinye@gmail.com writes:
>
> > There is a elisp: gse-number-rect which can do this:
> > C-u M-x gse-number-rect
> > Step0ut wrote:
> >> Hi everyone,
> >>
> >> I am using emacs as an editor for c++ and latex.
> >> I am using the command Ctrl-xrt to insert rectangles (usually numbers) quite
> >> often.
> >> My question is:
> >> Is it possible to insert numbers that increament in each line?
> >> e.g.  0
> >>        1
> >>        2
> >>        ...
> >>        99
> >>
> >> Alternatively I was also thinking if it is possible to replace an existing
> >> string (M-x replace-regexp) with an icrement number. It will do the job as
> >> well.
> >>
> >> --
> >> View this message in context: http://www.nabble.com/emacs-insert-icrement-numbers-tf2120701.html#a5848953
> >> Sent from the Emacs - Help forum at Nabble.com.
> >
>
> --
>      (.   .)
>   =ooO=(_)=Ooo=====================================
>   Chris McMahan | first_initiallastname@one.dot.net
>   =================================================

  reply	other threads:[~2006-08-17 13:53 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.5271.1155819472.9609.help-gnu-emacs@gnu.org>
2006-08-17 13:23 ` emacs insert icrement numbers wenbinye
2006-08-17 13:31   ` Chris McMahan
2006-08-17 13:53     ` wenbinye [this message]
2006-08-17 19:31       ` Chris McMahan
2006-08-17 13:58 ` Pascal Bourguignon
2006-08-17 19:34   ` Chris McMahan
2006-08-17 21:58   ` Jim Ottaway
     [not found]   ` <mailman.5302.1155852315.9609.help-gnu-emacs@gnu.org>
2006-08-18  6:38     ` David Kastrup
2006-08-17 10:41 Step0ut
2006-08-23  0:37 ` Bill Wohler

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=1155822832.705184.223680@h48g2000cwc.googlegroups.com \
    --to=wenbinye@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.
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).