bug#40238: Trying to customize the ispell choices buffer via display-buffer-alist has no effect

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

bug#40238: Trying to customize the ispell choices buffer via display-buffer-alist has no effect

Konrad Podczeck
There is no effect if in display-buffer-alist the ispell choices buffer is customized, e.g. in the form

   ("\\*Choices\\*"
    (display-buffer-reuse-window display-buffer-pop-up-frame)
     (pop-up-frame-parameters
     (tool-bar-lines . 0)
     (font . "Monaco-12")
     (left . 778)
     (top . 280) (height . 12) (width . 78)
     ))

Konrad




Reply | Threaded
Open this post in threaded view
|

bug#40238: Trying to customize the ispell choices buffer via display-buffer-alist has no effect

martin rudalics
 > There is no effect if in display-buffer-alist the ispell choices buffer is customized, e.g. in the form
 >
 >     ("\\*Choices\\*"
 >      (display-buffer-reuse-window display-buffer-pop-up-frame)
 >       (pop-up-frame-parameters
 >       (tool-bar-lines . 0)
 >       (font . "Monaco-12")
 >       (left . 778)
 >       (top . 280) (height . 12) (width . 78)
 >       ))

Intentionally so.  IIRC, displaying *Choices* was initially even more
rigid - it didn't use 'display-buffer' at all.

The solution is to set 'ispell-choices-win-default-height' to a very
large value so that in practice 'split-window' can never make a window
that high.  If after some time you come to the conclusion that this
trick works satisfactorily, we can mention it somewhere at your choice.

martin



Reply | Threaded
Open this post in threaded view
|

bug#40238: Trying to customize the ispell choices buffer via display-buffer-alist has no effect

Konrad Podczeck
Remembering what you told me, the problem with “x” to exit ispell is solvable by inserting (dedicated . t) in the customization below. The other problem is not affected by this.

Konrad

> Am 26.03.2020 um 16:52 schrieb Konrad Podczeck <[hidden email]>:
>
> Thanks!
>
> Basically this works fine. However, when I type ‘x’ to exit ispell, the buffer which was spelled appears a second time in the frame that showed the choices. If I type ‘q’ to quit ispell, the answer to the “yes-or-no” prompt has not the intended effect but becomes written in the frame showing the choices.
>
> Konrad
>
>
>> Am 26.03.2020 um 16:29 schrieb martin rudalics <[hidden email]>:
>>
>>> There is no effect if in display-buffer-alist the ispell choices buffer is customized, e.g. in the form
>>>
>>>    ("\\*Choices\\*"
>>>     (display-buffer-reuse-window display-buffer-pop-up-frame)
>>>      (pop-up-frame-parameters
>>>      (tool-bar-lines . 0)
>>>      (font . "Monaco-12")
>>>      (left . 778)
>>>      (top . 280) (height . 12) (width . 78)
>>>      ))
>>
>> Intentionally so.  IIRC, displaying *Choices* was initially even more
>> rigid - it didn't use 'display-buffer' at all.
>>
>> The solution is to set 'ispell-choices-win-default-height' to a very
>> large value so that in practice 'split-window' can never make a window
>> that high.  If after some time you come to the conclusion that this
>> trick works satisfactorily, we can mention it somewhere at your choice.
>>
>> martin
>




Reply | Threaded
Open this post in threaded view
|

bug#40238: Trying to customize the ispell choices buffer via display-buffer-alist has no effect

martin rudalics
In reply to this post by martin rudalics
 > Basically this works fine. However, when I type ‘x’ to exit ispell,
 > the buffer which was spelled appears a second time in the frame that
 > showed the choices. If I type ‘q’ to quit ispell, the answer to the
 > “yes-or-no” prompt has not the intended effect but becomes written in
 > the frame showing the choices.

It's a 'y-or-n-p' prompt here and it asks me (unfortunately in the
original frame) "Really kill Ispell process? ".  If I now type "y" here,
the frame gets killed.  With 'ispell-word' via M-$.

martin




Reply | Threaded
Open this post in threaded view
|

bug#40238: Trying to customize the ispell choices buffer via display-buffer-alist has no effect

Konrad Podczeck
I see. So, is there a customization, or some code, which gives, only for the ispell problem, an unconditional kill rather than a y-or-n-p?

> Am 26.03.2020 um 18:36 schrieb martin rudalics <[hidden email]>:
>
> > Basically this works fine. However, when I type ‘x’ to exit ispell,
> > the buffer which was spelled appears a second time in the frame that
> > showed the choices. If I type ‘q’ to quit ispell, the answer to the
> > “yes-or-no” prompt has not the intended effect but becomes written in
> > the frame showing the choices.
>
> It's a 'y-or-n-p' prompt here and it asks me (unfortunately in the
> original frame) "Really kill Ispell process? ".  If I now type "y" here,
> the frame gets killed.  With 'ispell-word' via M-$.
>
> martin
>




Reply | Threaded
Open this post in threaded view
|

bug#40238: Trying to customize the ispell choices buffer via display-buffer-alist has no effect

martin rudalics
 > I see. So, is there a customization, or some code, which gives, only
 > for the ispell problem, an unconditional kill rather than a y-or-n-p?

What is the "ispell problem"?  Does typing "x" or C-g not do what you
want?  My knowledge of ispell.el is limited to the occasional use of M-$
quitting via C-g.

martin



Reply | Threaded
Open this post in threaded view
|

bug#40238: Trying to customize the ispell choices buffer via display-buffer-alist has no effect

martin rudalics
 > The point is that “q” kills the entire (external) ispell process,
 > while “x” or “C-g” do not. But I found the relevant code in ispell.el,
 > and it was an easy matter to change it so that “q” does the job
 > without asking y-or-n.

But this part of the quit behavior is not related to whether you display
the choices on the same or another frame.  Right?

martin




Reply | Threaded
Open this post in threaded view
|

bug#40238: Trying to customize the ispell choices buffer via display-buffer-alist has no effect

Konrad Podczeck


> Am 27.03.2020 um 10:02 schrieb martin rudalics <[hidden email]>:
>
> > The point is that “q” kills the entire (external) ispell process,
> > while “x” or “C-g” do not. But I found the relevant code in ispell.el,
> > and it was an easy matter to change it so that “q” does the job
> > without asking y-or-n.
>
> But this part of the quit behavior is not related to whether you display
> the choices on the same or another frame.  Right?


This I dont’ know. I just changed the code, in ispell.el, lines 2320 and 2326, from

                   ((= char ?q)
                    (if (y-or-n-p "Really kill Ispell process? ")
                        (progn
                          (ispell-kill-ispell t) ; terminate process.
                          (setq ispell-quit (or (not ispell-checking-message)
                                                (point))
                                ispell-pdict-modified-p nil))
                      t)) ; continue if they don't quit.

into

                   ((= char ?q)
                    ;; (if (y-or-n-p "Really kill Ispell process? ")
                        (progn
                          (ispell-kill-ispell t) ; terminate process.
                          (setq ispell-quit (or (not ispell-checking-message)
                                                (point))
                                ispell-pdict-modified-p nil))
                        ;; t)
                   ) ; continue if they don't quit.


Konrad

>
> martin
>




Reply | Threaded
Open this post in threaded view
|

bug#40238: Trying to customize the ispell choices buffer via display-buffer-alist has no effect

martin rudalics
 > This I dont’ know. I just changed the code, in ispell.el, lines 2320 and 2326, from
 >
 >   ((= char ?q)
 >    (if (y-or-n-p "Really kill Ispell process? ")
 > (progn
 >  (ispell-kill-ispell t) ; terminate process.
 >  (setq ispell-quit (or (not ispell-checking-message)
 > (point))
 > ispell-pdict-modified-p nil))
 >      t)) ; continue if they don't quit.
 >
 > into
 >
 >   ((= char ?q)
 >    ;; (if (y-or-n-p "Really kill Ispell process? ")
 > (progn
 >  (ispell-kill-ispell t) ; terminate process.
 >  (setq ispell-quit (or (not ispell-checking-message)
 > (point))
 > ispell-pdict-modified-p nil))
 > ;; t)
 >   ) ; continue if they don't quit.

We could reserve "Q" for killing Ispell without asking questions.  But I
have no idea of the ispell mnemonics and already find "q" for killing
and "X" for suspending (which never suspends anything here IIUC) quite
confusing.  Maybe an ispell expert can help us.

martin