all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Allen Li <darkfeline@felesatra.moe>
Cc: psainty@orcon.net.nz, 31243-done@debbugs.gnu.org
Subject: bug#31243: 26.1; kmacro-insert-counter increments incorrectly
Date: Fri, 11 May 2018 12:16:14 +0300	[thread overview]
Message-ID: <83wowao8m9.fsf@gnu.org> (raw)
In-Reply-To: <CADbSrJwDfhfZbbQXejdujCkw_5G97Ba=2sUKZE4K=w6wAm27fw@mail.gmail.com> (message from Allen Li on Mon, 23 Apr 2018 00:58:00 -0700)

> From: Allen Li <darkfeline@felesatra.moe>
> Date: Mon, 23 Apr 2018 00:58:00 -0700
> Cc: 31243@debbugs.gnu.org,
> 	bug-gnu-emacs <bug-gnu-emacs-bounces+psainty=orcon.net.nz@gnu.org>
> 
> On Sun, Apr 22, 2018 at 9:56 PM, Phil Sainty <psainty@orcon.net.nz> wrote:
> > Not a bug?  I believe your expectations are incorrect.
> >
> >> C-u <f3> ;; kmacro-start-macro-or-insert-counter
> >
> >
> > This insert the *previous* macro counter.  Which is sort of "undefined" for
> > the first iteration, but zero in practice.
> 
> Ah, I see.  I guess what I'm looking for is C-u 0 <f3> (or
> alternatively C-u <f3> the second time rather than the first time).
> 
> I don't think the documentaton is very clear, because the meaning of
> "previous" is ambiguous:
> 
> With C-u, inserts previous ‘kmacro-counter’ (but do not modify counter).

Indeed, the doc string could use an improvement, and in particular,
using "previous" was misleading.  I've now clarified the doc strings,
and made a point of using "current value" in all places, instead ofg
sometimes using "previous".

One comment about what's been said by Phil:

> >> C-u <f3> ;; kmacro-start-macro-or-insert-counter
> >
> >
> > This insert the *previous* macro counter.  Which is sort of "undefined" for
> > the first iteration, but zero in practice.

Actually, the value of the counter is documented to be initialized to
zero before defining the macro, so it's non "undefined" at this stage.

Thanks, I'm closing the bug report.





      reply	other threads:[~2018-05-11  9:16 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-23  2:33 bug#31243: 26.1; kmacro-insert-counter increments incorrectly Allen Li
2018-04-23  2:40 ` bug#31243: [PATCH] Fix kmacro-insert-counter inserting the wrong counter Allen Li
2018-04-23  4:56 ` bug#31243: 26.1; kmacro-insert-counter increments incorrectly Phil Sainty
2018-04-23  7:58   ` Allen Li
2018-05-11  9:16     ` Eli Zaretskii [this message]

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=83wowao8m9.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=31243-done@debbugs.gnu.org \
    --cc=darkfeline@felesatra.moe \
    --cc=psainty@orcon.net.nz \
    /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.