all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Is C-X ESC ESC malfunctioning?
@ 2013-04-03 12:30 d.henman
  2013-04-03 13:02 ` Xue Fuqiao
  0 siblings, 1 reply; 4+ messages in thread
From: d.henman @ 2013-04-03 12:30 UTC (permalink / raw)
  To: emacs-devel


Simple check.

While editting in the buffer, I checked the word count using

M-x count-words

This works well.  I then added some more text into the buffer and used the 
C-x ESC ESC  to rerun the command. "repeat-complex-command" 

But the following error is displayed in the mini-buffer.

"eval: Wrong type argument: integer-or-marker-p, nil"

I expected the C-x ESC ESC to perform without error just as if I entered the 
M-x count-words

What should be expected here?



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Is C-X ESC ESC malfunctioning?
  2013-04-03 12:30 Is C-X ESC ESC malfunctioning? d.henman
@ 2013-04-03 13:02 ` Xue Fuqiao
  2013-04-03 13:34   ` Drew Adams
  0 siblings, 1 reply; 4+ messages in thread
From: Xue Fuqiao @ 2013-04-03 13:02 UTC (permalink / raw)
  To: d.henman; +Cc: emacs-devel

On Wed, 03 Apr 2013 21:30:15 +0900
"d.henman" <dhenman@gmail.com> wrote:

> While editting in the buffer, I checked the word count using
> M-x count-words
> This works well.  I then added some more text into the buffer and used the 
> C-x ESC ESC  to rerun the command. "repeat-complex-command" 
> But the following error is displayed in the mini-buffer.
> "eval: Wrong type argument: integer-or-marker-p, nil"

count-words is an interactive function: (count-words START END)

It count words between START and END, if called interactively, START and
END are the start and end of the buffer (if there is no active region).
If called from Lisp, it returns the number of words between START and
END, *without printing any message*.

If you use `repeat-complex-command' to perform the last command, it will
use `(count-words nil nil)'.  nil is not an integer or a marker, so an
error arises.

> I expected the C-x ESC ESC to perform without error just as if I entered the 
> M-x count-words
> What should be expected here?

I'm not sure whether it is a bug or a feature here.

-- 
Xue Fuqiao
http://www.gnu.org/software/emacs/



^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: Is C-X ESC ESC malfunctioning?
  2013-04-03 13:02 ` Xue Fuqiao
@ 2013-04-03 13:34   ` Drew Adams
  2013-04-03 22:23     ` Xue Fuqiao
  0 siblings, 1 reply; 4+ messages in thread
From: Drew Adams @ 2013-04-03 13:34 UTC (permalink / raw)
  To: 'Xue Fuqiao', 'd.henman'; +Cc: emacs-devel

> If you use `repeat-complex-command' to perform the last 
> command, it will use `(count-words nil nil)'.  nil is not
> an integer or a marker, so an error arises.
> 
> > I expected the C-x ESC ESC to perform without error just as 
> > if I entered the M-x count-words What should be expected here?
> 
> I'm not sure whether it is a bug or a feature here.

A bug.

(called-interactively 'any) returns nil here, so the code then calls
`narrow-to-region' with START and END each nil.




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Is C-X ESC ESC malfunctioning?
  2013-04-03 13:34   ` Drew Adams
@ 2013-04-03 22:23     ` Xue Fuqiao
  0 siblings, 0 replies; 4+ messages in thread
From: Xue Fuqiao @ 2013-04-03 22:23 UTC (permalink / raw)
  To: Drew Adams; +Cc: 'd.henman', emacs-devel

On Wed, 3 Apr 2013 06:34:01 -0700
"Drew Adams" <drew.adams@oracle.com> wrote:

> > If you use `repeat-complex-command' to perform the last 
> > command, it will use `(count-words nil nil)'.  nil is not
> > an integer or a marker, so an error arises.
> > > I expected the C-x ESC ESC to perform without error just as 
> > > if I entered the M-x count-words What should be expected here?
> > I'm not sure whether it is a bug or a feature here.

> A bug.
> (called-interactively 'any) returns nil here, so the code then calls
> `narrow-to-region' with START and END each nil.

Thank you.  I have filed a bug report #14136.

-- 
Xue Fuqiao
http://www.gnu.org/software/emacs/



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-04-03 22:23 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-03 12:30 Is C-X ESC ESC malfunctioning? d.henman
2013-04-03 13:02 ` Xue Fuqiao
2013-04-03 13:34   ` Drew Adams
2013-04-03 22:23     ` Xue Fuqiao

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.