help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: An error I don't know how to debug


From: tpeplt
Subject: Re: An error I don't know how to debug
Date: Fri, 05 Apr 2024 11:00:40 -0400
User-agent: Gnus/5.13 (Gnus v5.13)

Renaud Bussières <renaudbussieres@gmail.com> writes:

> Hello,
>
> Before restarting Emacs, I played a bit in my 'init.el' (which is
> tangled from an Org file) and I also updated several packages. Now a
> bug shows up when I start Emacs:
>
> command-line: Buffer is read-only: #<buffer *scratch*>
>
> That line appears in the *Messages* buffer.
>
> Also, strangely, I use the 'dashboard.el' package and its footer line
> appears at the bottom even if the variable is set so it shouldn't show
> up. It used to not show up, but because of this bug I guess (??), it
> doesn't behave like it should?
>
> I tried the "check-paren" function on the 'init.el', it doesn't find
> anything. I tried starting Emacs with the '--debug-init' option, it
> doesn't say anything.
>
> Note that the first message I got was:
>
> doom-mode-line--create-bar-image: Buffer is read-only: #<buffer *scratch*>
>
> So I though this could be where the problem is, although I didn't
> change anything related to the doom-mode-line bar option. I used to
> (setopt doom-modeline-bar-with 0.1) so it doesn't appear, I changed
> that to '1', and now the error changed to the one above,
> 'command-line: ...'.
>
> Any clue how I could fix this? I don't even know where the error comes from.
>
> Thanks for your support,
> Renaud
>
>

You can try the following in order to narrow down the source of the
problem:

1. Start emacs from a shell prompt using the -q (alternatively,
   --no-init-file) option: $ emacs -q

2. In emacs, type C-x C-f (bound to ‘find-file’, by default).  At the
   prompt "Find file: ...", enter the name of your Emacs initialization
   file.

3. Step through your initialization file, evaluating each expression,
   using C-x C-e (bound to ‘eval-last-sexp’).  Use M-C-f (bound to
   ‘forward-sexp’) to advance to the end of each top-level expression
   before evaluating it.  You can define a keyboard macro to reduce the
   repetitive combination.

      - C-x (       ; start kmacro
      - M-C-f
      - C-x C-e
      - C-x )       ; end kmacro
      - C-x e       ; run kmacro
      - e           ; repeat last kmacro

   Paying attention to the messages that are displayed as you do this,
   you should be able to locate the expression that leads to the problem
   that you are seeing (something is turning on read-only mode in the
   *scratch* buffer)

4. Also, examine the docstring for the option that you set using
   ‘setopt’ with C-h v to see whether you are setting it to a valid
   value.

-- 
The lyf so short, the craft so long to lerne.
- Geoffrey Chaucer, The Parliament of Birds.



reply via email to

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