emacs-devel
[Top][All Lists]
Advanced

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

Re: Backtrace printing in batch mode ignores all customizations


From: Eli Zaretskii
Subject: Re: Backtrace printing in batch mode ignores all customizations
Date: Tue, 14 Jan 2020 21:57:06 +0200

> From: Paul Pogonyshev <address@hidden>
> Date: Tue, 14 Jan 2020 18:51:31 +0100
> Cc: Stefan Monnier <address@hidden>, Emacs developers <address@hidden>
> 
> > Paul said earlier that the latter condition, which tests
> > terminal-name, is always correct in batch mode.  If that is indeed so,
> > then why do we need to test noninteractive as well? it's redundant,
> > no?
> 
> It is true, but it feels sort of a side-effect to me. You even say
> yourself later that you don't like the condition as it goes into
> low-level internals. It is extremely non-obvious that it is also true
> in non-interactive mode.

It is as (un)obvious as the test against the name of the initial
terminal, because in batch mode we don't delete that terminal.

> I think it is better to explicitly have `(or noninteractive' rather
> than rely on it implicitly be a subcase of the second `or' operand
> (and forget it was meant to be when the second condition is
> refactored).

As I've said, I'd be okay with removing the test of the terminal name,
and using something much less subtle, but I hesitate to ask to do this
as part of the change on the released branch, since this "unclean"
test is already there.

> > And the request is to add a comment explaining the semantics of
> > only-backtrace.  Not how it is set -- this is clear from the code, --
> > but what does it mean in terms of the code after that which uses the
> > value.
> 
> How about this?
> 
>     ;; When operating without any user interaction, we are going to
> print current
>     ;; backtrace and kill Emacs, because there is no way to accept
> debugging commands.

Fine with me, but maybe for even more clarity, mention what we do in
addition in the case where user interaction is possible, so that the
last part of that sentence is more self-explanatory.

Thanks.



reply via email to

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