all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Rahguzar <rahguzar@zohomail.eu>
Cc: look@strawberrytea.xyz, emacs-devel@gnu.org
Subject: Re: improving debug output of get-buffer
Date: Thu, 02 Nov 2023 18:44:32 +0200	[thread overview]
Message-ID: <83y1fg6r67.fsf@gnu.org> (raw)
In-Reply-To: <87pm0si3jq.fsf@zohomail.eu> (message from Rahguzar on Thu, 02 Nov 2023 16:11:48 +0100)

> From: Rahguzar <rahguzar@zohomail.eu>
> Cc: StrawberryTea <look@strawberrytea.xyz>,  emacs-devel@gnu.org
> Date: Thu, 02 Nov 2023 16:11:48 +0100
> 
> I was the other participant in the original discussion that led to this
> thread.

Once again: too bad that the whole discussion, with all its details,
does not happen on our bug tracker, but on some GitHub site.  The
details should be posted here, all of them, to help us understand and
investigate the issues.

> >> That makes sense. But basically, we were using with-current-buffer, which uses
> >> set-buffer and it took time to realize the “(wrong-type-argument stringp nil)”
> >> error was from that with-current-buffer.
> >
> > And the backtrace didn't tell you the error was from set-buffer?
> 
> No backtrace stopped before `set-buffer`.

Even if you set debug-on-error non-nil?  If so, I'd love to see a
reproduction recipe to understand why this happens.

> The backtrace was
> 
> Debugger entered--Lisp error: (wrong-type-argument stringp nil)
>   eshell-syntax-highlighting--highlight-elisp(113 120)

So you are saying that if instead we'd see

  Debugger entered--Lisp error: (wrong-type-argument string-or-buffer-p nil)
    eshell-syntax-highlighting--highlight-elisp(113 120)

it would have been much better?  Would you mind explaining to me how
would that be much more helpful?  Because I don't see it.

> where the function `eshell-syntax-highlighting--highlight-elisp` uses
> the `with-current-buffer`.

And knowing that eshell-syntax-highlighting--highlight-elisp calls
with-current-buffer, the error message still made no sense?  How so?

> > In any case, your original question was about get-buffer, not about
> > set-buffer.  Are you actually asking about set-buffer?
> 
> `set-buffer` is more relevant yes.

We could improve the diagnostics of set-buffer.  But I'm still at a
loss how that would have helped you here when "stringp nil" did not.



  reply	other threads:[~2023-11-02 16:44 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-02 15:11 improving debug output of get-buffer Rahguzar
2023-11-02 16:44 ` Eli Zaretskii [this message]
2023-11-02 16:57   ` Rahguzar
2023-11-04  8:45     ` Eli Zaretskii
  -- strict thread matches above, loose matches on Subject: below --
2023-11-01 18:06 StrawberryTea
2023-11-01 19:38 ` Eli Zaretskii
2023-11-01 20:02   ` StrawberryTea
2023-11-02  6:00     ` Eli Zaretskii

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=83y1fg6r67.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=look@strawberrytea.xyz \
    --cc=rahguzar@zohomail.eu \
    /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.