all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* End of file during parsing
@ 2024-08-01 14:55 Arthur Alinovi
  2024-08-01 15:11 ` Stephen Berman
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Arthur Alinovi @ 2024-08-01 14:55 UTC (permalink / raw)
  To: help-gnu-emacs

In trying to move/rename a file in dired I get "end of file during
parsing".

From what I've read I should then use parens-mode to track down an
unmatched parentheses.

Regretably, I'm not quite sure how this is supposed to work. Having
invoked parens-mode am I then supposed to tab thru each parentheses in
my entire init.el file looking for the unmatched one?

There has to be an easier way.

Any hint would be appreciated.

Thank you

Arthur



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

* Re: End of file during parsing
  2024-08-01 14:55 End of file during parsing Arthur Alinovi
@ 2024-08-01 15:11 ` Stephen Berman
  2024-08-01 16:33   ` aalinovi
  2024-08-01 15:13 ` Thibaut Verron
  2024-08-02  4:39 ` Tassilo Horn
  2 siblings, 1 reply; 8+ messages in thread
From: Stephen Berman @ 2024-08-01 15:11 UTC (permalink / raw)
  To: Arthur Alinovi; +Cc: help-gnu-emacs

On Thu, 01 Aug 2024 10:55:15 -0400 Arthur Alinovi <aalinovi@riseup.net> wrote:

> In trying to move/rename a file in dired I get "end of file during
> parsing".
>
> From what I've read I should then use parens-mode to track down an
> unmatched parentheses.
>
> Regretably, I'm not quite sure how this is supposed to work. Having
> invoked parens-mode am I then supposed to tab thru each parentheses in
> my entire init.el file looking for the unmatched one?
>
> There has to be an easier way.
>
> Any hint would be appreciated.

Try `M-x check-parens'.

Steve Berman



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

* Re: End of file during parsing
  2024-08-01 14:55 End of file during parsing Arthur Alinovi
  2024-08-01 15:11 ` Stephen Berman
@ 2024-08-01 15:13 ` Thibaut Verron
  2024-08-02  4:39 ` Tassilo Horn
  2 siblings, 0 replies; 8+ messages in thread
From: Thibaut Verron @ 2024-08-01 15:13 UTC (permalink / raw)
  To: Arthur Alinovi; +Cc: help-gnu-emacs

Hi,


One thing you can try is to place a closing parenthesis at the end of the
file and see which opening paren it closes, if any. Then follow that one,
find the parenthesis which you thought would be the closing, see what this
one actually closes, etc. until you find the missing close.

For example, with the following:

> (defun foo (bar)

> (if (test arg)

> (call)

> ;;missing) for if

> (othercall)

> )

>

> (defun other ()

> (bla))

Placing a closing paren at the end closes the first defun. The closing
paren meant for the defun is actually closing the if. And the if is indeed
missing its closer.

Best wishes,

Thibaut

On Thu 1 Aug 2024, 16:55 Arthur Alinovi, <aalinovi@riseup.net> wrote:

> In trying to move/rename a file in dired I get "end of file during
> parsing".
>
> From what I've read I should then use parens-mode to track down an
> unmatched parentheses.
>
> Regretably, I'm not quite sure how this is supposed to work. Having
> invoked parens-mode am I then supposed to tab thru each parentheses in
> my entire init.el file looking for the unmatched one?
>
> There has to be an easier way.
>
> Any hint would be appreciated.
>
> Thank you
>
> Arthur
>
>


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

* Re: End of file during parsing
  2024-08-01 15:11 ` Stephen Berman
@ 2024-08-01 16:33   ` aalinovi
  2024-08-01 16:55     ` Stephen Berman
  0 siblings, 1 reply; 8+ messages in thread
From: aalinovi @ 2024-08-01 16:33 UTC (permalink / raw)
  To: Stephen Berman; +Cc: help-gnu-emacs

'M-x check-parens' doesn't find any unmatched parentheses.

Wouldn't this indicate that my problem lies elsewhere?

Also, if there is a problem with my init.el file, shouldn't I be getting
this error everytime I start emacs and not only when I try to move/rename
a file in dired?

Help appreciated.

Thanks
Arthur


In message <874j849t2o.fsf@gmx.net>, Stephen Berman writes:
>On Thu, 01 Aug 2024 10:55:15 -0400 Arthur Alinovi <aalinovi@riseup.net> wrote:
>
>> In trying to move/rename a file in dired I get "end of file during
>> parsing".
>>
>> From what I've read I should then use parens-mode to track down an
>> unmatched parentheses.
>>
>> Any hint would be appreciated.
>
>Try `M-x check-parens'.
>
>Steve Berman



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

* Re: End of file during parsing
  2024-08-01 16:33   ` aalinovi
@ 2024-08-01 16:55     ` Stephen Berman
  0 siblings, 0 replies; 8+ messages in thread
From: Stephen Berman @ 2024-08-01 16:55 UTC (permalink / raw)
  To: aalinovi; +Cc: help-gnu-emacs

On Thu, 01 Aug 2024 12:33:31 -0400 aalinovi@riseup.net wrote:

> 'M-x check-parens' doesn't find any unmatched parentheses.
>
> Wouldn't this indicate that my problem lies elsewhere?

Probably.

> Also, if there is a problem with my init.el file, shouldn't I be getting
> this error everytime I start emacs and not only when I try to move/rename
> a file in dired?

It could be due to an error in a function called from your init file,
which wouldn't be triggered just by loading the init file.  But you can
start emacs with the command line flag --debug-init to get a backtrace
if loading your init file does raise an error.  But for the problem
you're having in Dired, it might help to check the item "Enter Debugger
on Error" in the Options menu; then when you invoke the Dired command
that raises the error, you should get a backtrace.  If you do and don't
see what the problem is, you could post the backtrace here and maybe
someone else will see the problem.  If you don't get a backtrace, the
next thing I would try is stepping through the source of the Dired
command with Edebug, but if you've never done that, you'll have to spend
some time learning how to use it; Edebug is documented in the Elisp
manual, (info "(elisp) Edebug").

Steve Berman

> Help appreciated.
>
> Thanks
> Arthur
>
>
> In message <874j849t2o.fsf@gmx.net>, Stephen Berman writes:
>>On Thu, 01 Aug 2024 10:55:15 -0400 Arthur Alinovi <aalinovi@riseup.net> wrote:
>>
>>> In trying to move/rename a file in dired I get "end of file during
>>> parsing".
>>>
>>> From what I've read I should then use parens-mode to track down an
>>> unmatched parentheses.
>>>
>>> Any hint would be appreciated.
>>
>>Try `M-x check-parens'.
>>
>>Steve Berman



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

* Re: End of file during parsing
  2024-08-01 14:55 End of file during parsing Arthur Alinovi
  2024-08-01 15:11 ` Stephen Berman
  2024-08-01 15:13 ` Thibaut Verron
@ 2024-08-02  4:39 ` Tassilo Horn
  2 siblings, 0 replies; 8+ messages in thread
From: Tassilo Horn @ 2024-08-02  4:39 UTC (permalink / raw)
  To: Arthur Alinovi; +Cc: help-gnu-emacs

Arthur Alinovi <aalinovi@riseup.net> writes:

Hi Arthur,

> In trying to move/rename a file in dired I get "end of file during
> parsing".

Do M-x toggle-debug-on-error RET and move/rename again.  That should pop
up a *backtrace* buffer when the error happens which you can post here
and which should indidacte the problem.

Bye,
  Tassilo



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

* End of file during parsing
@ 2024-08-02 13:34 Arthur Alinovi
  2024-08-02 19:22 ` Björn Bidar
  0 siblings, 1 reply; 8+ messages in thread
From: Arthur Alinovi @ 2024-08-02 13:34 UTC (permalink / raw)
  To: help-gnu-emacs

My thanks to Steve Berman, Thibaut Verron and Tassilo Horn for taking
the time to assist me with my problem. Apparently, my difficulty was
related to a bit of code in my init.el file:

(use-package async
  :ensure t
  :init (dired-async-mode 1))

This stems from my bad habit of copying and pasting bits of code I find
on-line without having any idea what they do or if I even need them.

Thanks again

Arthur





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

* Re: End of file during parsing
  2024-08-02 13:34 Arthur Alinovi
@ 2024-08-02 19:22 ` Björn Bidar
  0 siblings, 0 replies; 8+ messages in thread
From: Björn Bidar @ 2024-08-02 19:22 UTC (permalink / raw)
  To: Arthur Alinovi; +Cc: help-gnu-emacs

Arthur Alinovi <aalinovi@riseup.net> writes:

> My thanks to Steve Berman, Thibaut Verron and Tassilo Horn for taking
> the time to assist me with my problem. Apparently, my difficulty was
> related to a bit of code in my init.el file:
>
> (use-package async
>   :ensure t
>   :init (dired-async-mode 1))
>

You can active dired-async-mode just like this:
(use-package async
  :config
  (setopt async-bytecomp-package-mode nil))

(use-package dired-async  ; Part of async
  :after dired
  :config (dired-async-mode 1))


I have the use-package block for dired-async just after the one after
async, I don't know if it matters.

PS: Please reply in the thread, somehow the reference was missing which
broke the thread.



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

end of thread, other threads:[~2024-08-02 19:22 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-01 14:55 End of file during parsing Arthur Alinovi
2024-08-01 15:11 ` Stephen Berman
2024-08-01 16:33   ` aalinovi
2024-08-01 16:55     ` Stephen Berman
2024-08-01 15:13 ` Thibaut Verron
2024-08-02  4:39 ` Tassilo Horn
  -- strict thread matches above, loose matches on Subject: below --
2024-08-02 13:34 Arthur Alinovi
2024-08-02 19:22 ` Björn Bidar

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.