emacs-devel
[Top][All Lists]
Advanced

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

Re: emacs master + org Wrong type argument: number-or-marker-p


From: Alan Mackenzie
Subject: Re: emacs master + org Wrong type argument: number-or-marker-p
Date: Mon, 1 Aug 2022 20:05:44 +0000

On Mon, Aug 01, 2022 at 19:16:44 +0000, Gregory Heytings wrote:


> > No, functions must be balanced with respect to the specbind stack. The 
> > bytecode machinery assumes this to be the case.


> Thanks for the clarification, I'll keep that in mind in the future.


> > So please revert all changes relating to the new narrow-to-region 
> > argument and submit a new patch. It's better than somehow trying to 
> > patch up the current unworkable approach.


> That won't be necessary, it was actually easy to fix.  Now done on master, 
> and we are back to the statu quo ante with respect to byte compilation. 
> Of course another 'make boostrap' is necessary.

I see in

    commit 9d8a6c82838f2f24e76a67379b02956aa668d7cf
    Author: Gregory Heytings <gregory@heytings.org>
    Date:   Mon Aug 1 19:11:01 2022 +0000

the following text:

    +Note that, in rare circumstances, Emacs may decide to leave, for
    +performance reasons, the accessible portion of the buffer unchanged
    +after a call to @code{narrow-to-region}.

You cannot do this.  narrow-to-region and widen aren't nice-to-have
optional extras, they are essential parts of program functionality.  If
you stop them working properly, programs will break.  It is a bit like
the Lisp machine randomly failing to perform some car operations.

If you must do something like this, why don't you throw an error when an
"invalid" narrow-to-region or widen is attempted?  This would at least
allow the programmer to do some debugging.

Would it also be possible to add in some commentry motivating this
unusual action?  All I can see from looking at the source (xdisp.c) is
that it probably has something to do with long lines.

-- 
Alan Mackenzie (Nuremberg, Germany).



reply via email to

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