* bug#40653: 28.0.50; (fset 'yes-or-no-p 'y-or-n-p) has no effect in native-comp branch
@ 2020-04-16 7:59 Andrey Orst
2020-04-16 8:18 ` Eli Zaretskii
` (2 more replies)
0 siblings, 3 replies; 9+ messages in thread
From: Andrey Orst @ 2020-04-16 7:59 UTC (permalink / raw)
To: 40653
[-- Attachment #1: Type: text/plain, Size: 349 bytes --]
Call `emacs -q` do `M-x ansi-term RET` try to kill buffer - a prompt
with `yes` or `no` will be provided. Cancel and call `M-: (fset
'yes-or-no-p 'y-or-n-p) RET`, and try to kill ansi-term buffer
again. Prompt will still ask to input `yes` or `no` instead of `y` or
`n`. Works in master branch of Emacs run with `-q`.
--
Best regards,
Andrey Orst
[-- Attachment #2: Type: text/html, Size: 403 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* bug#40653: 28.0.50; (fset 'yes-or-no-p 'y-or-n-p) has no effect in native-comp branch
2020-04-16 7:59 bug#40653: 28.0.50; (fset 'yes-or-no-p 'y-or-n-p) has no effect in native-comp branch Andrey Orst
@ 2020-04-16 8:18 ` Eli Zaretskii
2020-04-16 8:21 ` Andrey Orst
2020-04-16 9:01 ` Andrea Corallo
2020-04-16 22:14 ` Sebastian Sturm
2 siblings, 1 reply; 9+ messages in thread
From: Eli Zaretskii @ 2020-04-16 8:18 UTC (permalink / raw)
To: Andrey Orst; +Cc: 40653
> From: Andrey Orst <andreyorst@gmail.com>
> Date: Thu, 16 Apr 2020 10:59:12 +0300
>
> Call `emacs -q` do `M-x ansi-term RET` try to kill buffer - a prompt
> with `yes` or `no` will be provided. Cancel and call `M-: (fset
> 'yes-or-no-p 'y-or-n-p) RET`, and try to kill ansi-term buffer
> again. Prompt will still ask to input `yes` or `no` instead of `y` or
> `n`. Works in master branch of Emacs run with `-q`.
I'm not sure I understand the issue. The last sentence seems to say
this works as expected on the master branch? That is, the prompt does
ask to input 'y' or 'n', right? Because that's what I see with
today's master.
^ permalink raw reply [flat|nested] 9+ messages in thread
* bug#40653: 28.0.50; (fset 'yes-or-no-p 'y-or-n-p) has no effect in native-comp branch
2020-04-16 8:18 ` Eli Zaretskii
@ 2020-04-16 8:21 ` Andrey Orst
2020-04-16 8:51 ` Eli Zaretskii
0 siblings, 1 reply; 9+ messages in thread
From: Andrey Orst @ 2020-04-16 8:21 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: 40653
[-- Attachment #1: Type: text/plain, Size: 993 bytes --]
On master branch the `fset` command does what expected - prompts that ask
for `yes` or `no` changed to ask `y` or `n`. On native-comp branch however
it has no effect and all prompts still ask for `yes` or `no` after `fset`
call.
On Thu, Apr 16, 2020 at 11:18 AM Eli Zaretskii <eliz@gnu.org> wrote:
> > From: Andrey Orst <andreyorst@gmail.com>
> > Date: Thu, 16 Apr 2020 10:59:12 +0300
> >
> > Call `emacs -q` do `M-x ansi-term RET` try to kill buffer - a prompt
> > with `yes` or `no` will be provided. Cancel and call `M-: (fset
> > 'yes-or-no-p 'y-or-n-p) RET`, and try to kill ansi-term buffer
> > again. Prompt will still ask to input `yes` or `no` instead of `y` or
> > `n`. Works in master branch of Emacs run with `-q`.
>
> I'm not sure I understand the issue. The last sentence seems to say
> this works as expected on the master branch? That is, the prompt does
> ask to input 'y' or 'n', right? Because that's what I see with
> today's master.
>
--
Best regards,
Andrey Orst
[-- Attachment #2: Type: text/html, Size: 1624 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* bug#40653: 28.0.50; (fset 'yes-or-no-p 'y-or-n-p) has no effect in native-comp branch
2020-04-16 8:21 ` Andrey Orst
@ 2020-04-16 8:51 ` Eli Zaretskii
0 siblings, 0 replies; 9+ messages in thread
From: Eli Zaretskii @ 2020-04-16 8:51 UTC (permalink / raw)
To: Andrey Orst; +Cc: 40653
> From: Andrey Orst <andreyorst@gmail.com>
> Date: Thu, 16 Apr 2020 11:21:19 +0300
> Cc: 40653@debbugs.gnu.org
>
> On master branch the `fset` command does what expected - prompts that ask for `yes` or `no` changed to
> ask `y` or `n`. On native-comp branch however it has no effect and all prompts still ask for `yes` or `no` after
> `fset` call.
Thanks for clarifying.
^ permalink raw reply [flat|nested] 9+ messages in thread
* bug#40653: 28.0.50; (fset 'yes-or-no-p 'y-or-n-p) has no effect in native-comp branch
2020-04-16 7:59 bug#40653: 28.0.50; (fset 'yes-or-no-p 'y-or-n-p) has no effect in native-comp branch Andrey Orst
2020-04-16 8:18 ` Eli Zaretskii
@ 2020-04-16 9:01 ` Andrea Corallo
2020-04-16 9:58 ` Andrey Orst
2020-04-16 22:14 ` Sebastian Sturm
2 siblings, 1 reply; 9+ messages in thread
From: Andrea Corallo @ 2020-04-16 9:01 UTC (permalink / raw)
To: Andrey Orst; +Cc: 40653, luknax, Stefan Monnier
Andrey Orst <andreyorst@gmail.com> writes:
> Call `emacs -q` do `M-x ansi-term RET` try to kill buffer - a prompt
> with `yes` or `no` will be provided. Cancel and call `M-: (fset
> 'yes-or-no-p 'y-or-n-p) RET`, and try to kill ansi-term buffer
> again. Prompt will still ask to input `yes` or `no` instead of `y` or
> `n`. Works in master branch of Emacs run with `-q`.
Hi Andrey,
The issue is that here we are shadowing with an alias a primitive C
subr.
Compiling speed 2 the assumption is that these are not redefined or
advised (the manual warns about doing that). Function calls to C
primitives at speed 2 are hardcoded for performance reasons in the
generated code.
We have a customize listing exceptions for that
`comp-never-optimize-functions'.
You should solve the issue adding `yes-or-no-p' to this customize and
recompiling.
Now what I'm not sure of is if we want to add `yes-or-no-p' by default
there given that `yes-or-no-p' is never perf critical. The only issue I
see is that could be the first exception of many.
On the other hand customizing `comp-never-optimize-functions' will solve
the issue only for external packages because you likely already have
compiled the whole Emacs with the default setting...
So yeah I think we should probably add `yes-or-no-p' to
`comp-never-optimize-functions' and accept that we will probably end-up
with few other ecceptions :/
Opinions on this are welcome.
Andrea
--
akrl@sdf.org
^ permalink raw reply [flat|nested] 9+ messages in thread
* bug#40653: 28.0.50; (fset 'yes-or-no-p 'y-or-n-p) has no effect in native-comp branch
2020-04-16 9:01 ` Andrea Corallo
@ 2020-04-16 9:58 ` Andrey Orst
2020-04-16 16:49 ` Andrea Corallo
0 siblings, 1 reply; 9+ messages in thread
From: Andrey Orst @ 2020-04-16 9:58 UTC (permalink / raw)
To: Andrea Corallo; +Cc: 40653, luknax, Stefan Monnier
[-- Attachment #1: Type: text/plain, Size: 902 bytes --]
>
> The issue is that here we are shadowing with an alias a primitive C
> subr.
>
> Compiling speed 2 the assumption is that these are not redefined or
> advised (the manual warns about doing that). Function calls to C
> primitives at speed 2 are hardcoded for performance reasons in the
> generated code.
We have a customize listing exceptions for that
> `comp-never-optimize-functions'.
>
You should solve the issue adding `yes-or-no-p' to this customize and
> recompiling.
>
Ah I see now. This makes sense, although also makes it harder to
configure.
On the other hand customizing `comp-never-optimize-functions' will solve
>
the issue only for external packages because you likely already have
> compiled the whole Emacs with the default setting...
>
IIUC I may need to modify the source code of the `comp.el` file, because it
gets used when doing `make`?
--
Best regards,
Andrey Orst
[-- Attachment #2: Type: text/html, Size: 2362 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* bug#40653: 28.0.50; (fset 'yes-or-no-p 'y-or-n-p) has no effect in native-comp branch
2020-04-16 9:58 ` Andrey Orst
@ 2020-04-16 16:49 ` Andrea Corallo
0 siblings, 0 replies; 9+ messages in thread
From: Andrea Corallo @ 2020-04-16 16:49 UTC (permalink / raw)
To: Andrey Orst; +Cc: 40653, luknax, Stefan Monnier
> IIUC I may need to modify the source code of the `comp.el` file,
> because it gets used when doing `make`?
Other options would have been to use something like
BYTE_COMPILE_EXTRA_FLAGS to modify its value during compilation but it
is really not practical.
886ded1b70 works for me, closing.
Thanks for reporting!
Andrea
--
akrl@sdf.org
^ permalink raw reply [flat|nested] 9+ messages in thread
* bug#40653: 28.0.50; (fset 'yes-or-no-p 'y-or-n-p) has no effect in native-comp branch
2020-04-16 7:59 bug#40653: 28.0.50; (fset 'yes-or-no-p 'y-or-n-p) has no effect in native-comp branch Andrey Orst
2020-04-16 8:18 ` Eli Zaretskii
2020-04-16 9:01 ` Andrea Corallo
@ 2020-04-16 22:14 ` Sebastian Sturm
2020-04-17 11:26 ` Andrea Corallo
2 siblings, 1 reply; 9+ messages in thread
From: Sebastian Sturm @ 2020-04-16 22:14 UTC (permalink / raw)
To: 40653
sorry for being a moron, I had used `counsel-describe-function` instead
of plain `describe-function` (which indeed shows the function as
natively compiled). I thought I had used `counsel-describe-function`
before, but I'm probably mistaken. In any case, apologies for the noise
and many thanks for your outstanding work on gccemacs!
^ permalink raw reply [flat|nested] 9+ messages in thread
* bug#40653: 28.0.50; (fset 'yes-or-no-p 'y-or-n-p) has no effect in native-comp branch
2020-04-16 22:14 ` Sebastian Sturm
@ 2020-04-17 11:26 ` Andrea Corallo
0 siblings, 0 replies; 9+ messages in thread
From: Andrea Corallo @ 2020-04-17 11:26 UTC (permalink / raw)
To: Sebastian Sturm; +Cc: 40653
Sebastian Sturm <mail@sebastian-sturm.de> writes:
> sorry for being a moron, I had used `counsel-describe-function`
> instead of plain `describe-function` (which indeed shows the function
> as natively compiled). I thought I had used
> `counsel-describe-function` before, but I'm probably mistaken.
No issue, thanks for reporting.
Andrea
--
akrl@sdf.org
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2020-04-17 11:26 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-04-16 7:59 bug#40653: 28.0.50; (fset 'yes-or-no-p 'y-or-n-p) has no effect in native-comp branch Andrey Orst
2020-04-16 8:18 ` Eli Zaretskii
2020-04-16 8:21 ` Andrey Orst
2020-04-16 8:51 ` Eli Zaretskii
2020-04-16 9:01 ` Andrea Corallo
2020-04-16 9:58 ` Andrey Orst
2020-04-16 16:49 ` Andrea Corallo
2020-04-16 22:14 ` Sebastian Sturm
2020-04-17 11:26 ` Andrea Corallo
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.