all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Jean Louis <bugs@gnu.support>
To: Michael Heerdegen <michael_heerdegen@web.de>
Cc: help-gnu-emacs@gnu.org
Subject: Re: Error: End of file during parsing
Date: Tue, 27 Sep 2022 14:50:07 +0300	[thread overview]
Message-ID: <YzLjb+ka9hZXbCYi@protected.localdomain> (raw)
In-Reply-To: <875yh96r2n.fsf@web.de>

* Michael Heerdegen <michael_heerdegen@web.de> [2022-09-27 13:57]:
> Eli Zaretskii <eliz@gnu.org> writes:
> 
> > It did tell you: the error is at EOF.  That's where Emacs realized
> > that there is an error.  It cannot do that earlier.
> >
> > The problem is likely unbalanced parentheses somewhere.
> 
> Yes, likely.
> 
> If a file contains N open parens and N+1 closing parens, or the other
> way round, Emacs can't even know or conclude what the programmer
> actually wanted to write.  This kind of problem requires some manual
> error searching by the programmer.

I am manually using the number guessing method:

- If there are 12000 lines, I go to middle of that one, like line
  6000, somewhere from there up or to bottom, I do M-x eval-region

- Then if there is failure, I go to half between x and 6000, if it is
  in bottom region I go to line 9000 and eval region from 9000 to
  12000;

- Then if problem is between 6000 - 9000, then I go to to half of it,
  to line 7500 and again verify 50% of region;

That way I arrive fastest to the location.

Could that same algorithm be used in Emacs for function to narrow it
to lines from X to Y?

-- 
Jean

Take action in Free Software Foundation campaigns:
https://www.fsf.org/campaigns

In support of Richard M. Stallman
https://stallmansupport.org/



  parent reply	other threads:[~2022-09-27 11:50 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-27  6:20 Error: End of file during parsing Jean Louis
2022-09-27  6:31 ` Emanuel Berg
2022-09-27 13:28   ` Emanuel Berg
2022-09-27  6:46 ` Eli Zaretskii
2022-09-27 10:37   ` Michael Heerdegen
2022-09-27 11:48     ` Gregory Heytings
2022-09-27 15:06       ` Michael Heerdegen
2022-09-27 11:50     ` Jean Louis [this message]
2022-09-27 15:44       ` Michael Heerdegen
2022-09-28 11:42       ` Stefan Monnier via Users list for the GNU Emacs text editor
2022-10-03 23:35         ` Jean Louis
2022-10-04  1:41           ` Emanuel Berg
2022-10-10  6:08             ` Jean Louis
2022-10-10 23:24               ` Emanuel Berg
2022-10-11 19:00                 ` Jean Louis
2022-10-11 22:26                   ` Emanuel Berg
2022-10-12 13:14                     ` Jean Louis
2022-10-12 20:02                       ` Emanuel Berg
2022-10-15 14:28                         ` Alessandro Bertulli
2022-09-28  6:24 ` Christopher M. Miles

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=YzLjb+ka9hZXbCYi@protected.localdomain \
    --to=bugs@gnu.support \
    --cc=help-gnu-emacs@gnu.org \
    --cc=michael_heerdegen@web.de \
    /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.