help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: emacs insert icrement numbers


From: wenbinye
Subject: Re: emacs insert icrement numbers
Date: 17 Aug 2006 06:53:52 -0700
User-agent: G2/0.2

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 via email to

[Prev in Thread] Current Thread [Next in Thread]