GNU bug report logs - #67452
30.0.50; [PATCH] Make split-root-window functions handle argument

Previous Next

Package: emacs;

Reported by: Cy <cycoding23 <at> gmail.com>

Date: Sun, 26 Nov 2023 08:47:02 UTC

Severity: normal

Tags: patch

Found in version 30.0.50

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 67452 in the body.
You can then email your comments to 67452 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#67452; Package emacs. (Sun, 26 Nov 2023 08:47:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Cy <cycoding23 <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sun, 26 Nov 2023 08:47:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Cy <cycoding23 <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 30.0.50; [PATCH] Make split-root-window functions handle argument
Date: Sun, 26 Nov 2023 00:42:54 -0800
[Message part 1 (text/plain, inline)]
Hello,

I noticed the split-root-window-below and split-root-window-right 
commands fail when passing an argument using C-u:

split-root-window-right: Wrong type argument: number-or-marker-p, (4)

I have edited these functions to remedy this error, and attached a 
patch. I hope that the changes are satisfactory.

Best,

Cy
[0001-Make-split-root-window-functions-handle-argument.patch (text/x-patch, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#67452; Package emacs. (Sun, 26 Nov 2023 11:02:02 GMT) Full text and rfc822 format available.

Message #8 received at 67452 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Cy <cycoding23 <at> gmail.com>, martin rudalics <rudalics <at> gmx.at>
Cc: 67452 <at> debbugs.gnu.org
Subject: Re: bug#67452: 30.0.50;
 [PATCH] Make split-root-window functions handle argument
Date: Sun, 26 Nov 2023 13:01:19 +0200
> Date: Sun, 26 Nov 2023 00:42:54 -0800
> From: Cy <cycoding23 <at> gmail.com>
> 
> I noticed the split-root-window-below and split-root-window-right 
> commands fail when passing an argument using C-u:
> 
> split-root-window-right: Wrong type argument: number-or-marker-p, (4)
> 
> I have edited these functions to remedy this error, and attached a 
> patch. I hope that the changes are satisfactory.

I guess we should do this for consistency with other split-window-*
commands?  Martin, any reasons the split-root-window-* commands didn't
follow the example of the corresponding split-window-* commands?

In any case, to make the split-root-window-* commands support C-u we
just need to change the interactive spec from "P" to "p", there's no
need for anything more complex.

Thanks.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#67452; Package emacs. (Mon, 27 Nov 2023 09:22:01 GMT) Full text and rfc822 format available.

Message #11 received at 67452 <at> debbugs.gnu.org (full text, mbox):

From: martin rudalics <rudalics <at> gmx.at>
To: Eli Zaretskii <eliz <at> gnu.org>, Cy <cycoding23 <at> gmail.com>
Cc: 67452 <at> debbugs.gnu.org, hugo <at> heagren.com
Subject: Re: bug#67452: 30.0.50; [PATCH] Make split-root-window functions
 handle argument
Date: Mon, 27 Nov 2023 10:20:36 +0100
> I guess we should do this for consistency with other split-window-*
> commands?  Martin, any reasons the split-root-window-* commands didn't
> follow the example of the corresponding split-window-* commands?

No idea.  Maybe Hugo Heagren can tell.

> In any case, to make the split-root-window-* commands support C-u we
> just need to change the interactive spec from "P" to "p", there's no
> need for anything more complex.

I think so.  Here 'split-window-below' and 'split-window-right' use

  (let* ((size (and size (prefix-numeric-value size)))

maybe to "just work" when being passed an invalid SIZE argument but I
don't remember the details.

martin




Reply sent to Eli Zaretskii <eliz <at> gnu.org>:
You have taken responsibility. (Wed, 29 Nov 2023 14:17:01 GMT) Full text and rfc822 format available.

Notification sent to Cy <cycoding23 <at> gmail.com>:
bug acknowledged by developer. (Wed, 29 Nov 2023 14:17:01 GMT) Full text and rfc822 format available.

Message #16 received at 67452-done <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: martin rudalics <rudalics <at> gmx.at>
Cc: hugo <at> heagren.com, 67452-done <at> debbugs.gnu.org, cycoding23 <at> gmail.com
Subject: Re: bug#67452: 30.0.50; [PATCH] Make split-root-window functions
 handle argument
Date: Wed, 29 Nov 2023 16:16:19 +0200
> Date: Mon, 27 Nov 2023 10:20:36 +0100
> Cc: 67452 <at> debbugs.gnu.org, hugo <at> heagren.com
> From: martin rudalics <rudalics <at> gmx.at>
> 
>  > I guess we should do this for consistency with other split-window-*
>  > commands?  Martin, any reasons the split-root-window-* commands didn't
>  > follow the example of the corresponding split-window-* commands?
> 
> No idea.  Maybe Hugo Heagren can tell.
> 
>  > In any case, to make the split-root-window-* commands support C-u we
>  > just need to change the interactive spec from "P" to "p", there's no
>  > need for anything more complex.
> 
> I think so.  Here 'split-window-below' and 'split-window-right' use
> 
>    (let* ((size (and size (prefix-numeric-value size)))
> 
> maybe to "just work" when being passed an invalid SIZE argument but I
> don't remember the details.

Thanks, I've now installed the change on the emacs-29 branch, using
the "p" interactive spec, and I'm closing this bug.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#67452; Package emacs. (Sun, 24 Dec 2023 17:45:01 GMT) Full text and rfc822 format available.

Message #19 received at 67452 <at> debbugs.gnu.org (full text, mbox):

From: Juri Linkov <juri <at> linkov.net>
To: 67452 <at> debbugs.gnu.org
Subject: Re: bug#67452: 30.0.50; [PATCH] Make split-root-window functions
 handle argument
Date: Sun, 24 Dec 2023 19:41:37 +0200
> Thanks, I've now installed the change on the emacs-29 branch, using
> the "p" interactive spec, and I'm closing this bug.

The commit cd477bf07d8 broke normal use of split-root-window commands
without arguments:

0. emacs-29 -Q
1. C-x 2
2. C-x w 3

Debugger entered--Lisp error: (error "Window #<window 7> too small for splitting")
  error("Window %s too small for splitting" #<window 7>)
  split-window(#<window 7> 1 t)
  split-window-right(1 #<window 7>)
  split-root-window-right(1)
  funcall-interactively(split-root-window-right 1)
  command-execute(split-root-window-right)

because the "p" interactive spec uses SIZE=1.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#67452; Package emacs. (Mon, 25 Dec 2023 13:02:02 GMT) Full text and rfc822 format available.

Message #22 received at 67452 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Juri Linkov <juri <at> linkov.net>
Cc: 67452 <at> debbugs.gnu.org
Subject: Re: bug#67452: 30.0.50;
 [PATCH] Make split-root-window functions handle argument
Date: Mon, 25 Dec 2023 15:00:49 +0200
> From: Juri Linkov <juri <at> linkov.net>
> Date: Sun, 24 Dec 2023 19:41:37 +0200
> 
> > Thanks, I've now installed the change on the emacs-29 branch, using
> > the "p" interactive spec, and I'm closing this bug.
> 
> The commit cd477bf07d8 broke normal use of split-root-window commands
> without arguments:
> 
> 0. emacs-29 -Q
> 1. C-x 2
> 2. C-x w 3
> 
> Debugger entered--Lisp error: (error "Window #<window 7> too small for splitting")
>   error("Window %s too small for splitting" #<window 7>)
>   split-window(#<window 7> 1 t)
>   split-window-right(1 #<window 7>)
>   split-root-window-right(1)
>   funcall-interactively(split-root-window-right 1)
>   command-execute(split-root-window-right)
> 
> because the "p" interactive spec uses SIZE=1.

Thanks, should be fixed now on the emacs-29 branch.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#67452; Package emacs. (Sat, 30 Dec 2023 07:44:02 GMT) Full text and rfc822 format available.

Message #25 received at 67452-done <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: juri <at> linkov.net
Cc: 67452-done <at> debbugs.gnu.org
Subject: Re: bug#67452: 30.0.50;
 [PATCH] Make split-root-window functions handle argument
Date: Sat, 30 Dec 2023 09:43:07 +0200
> Cc: 67452 <at> debbugs.gnu.org
> Date: Mon, 25 Dec 2023 15:00:49 +0200
> From: Eli Zaretskii <eliz <at> gnu.org>
> 
> > From: Juri Linkov <juri <at> linkov.net>
> > Date: Sun, 24 Dec 2023 19:41:37 +0200
> > 
> > > Thanks, I've now installed the change on the emacs-29 branch, using
> > > the "p" interactive spec, and I'm closing this bug.
> > 
> > The commit cd477bf07d8 broke normal use of split-root-window commands
> > without arguments:
> > 
> > 0. emacs-29 -Q
> > 1. C-x 2
> > 2. C-x w 3
> > 
> > Debugger entered--Lisp error: (error "Window #<window 7> too small for splitting")
> >   error("Window %s too small for splitting" #<window 7>)
> >   split-window(#<window 7> 1 t)
> >   split-window-right(1 #<window 7>)
> >   split-root-window-right(1)
> >   funcall-interactively(split-root-window-right 1)
> >   command-execute(split-root-window-right)
> > 
> > because the "p" interactive spec uses SIZE=1.
> 
> Thanks, should be fixed now on the emacs-29 branch.

No further comments, so I presume the bug was fixed, and I'm closing
it.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 27 Jan 2024 12:24:08 GMT) Full text and rfc822 format available.

This bug report was last modified 1 year and 105 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.