unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#71669: 30.0.50; macOS: `emacs --geometry` flag broken, only `-geometry` works
@ 2024-06-20  7:51 Stefan Kangas
  2024-06-20 14:14 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
  0 siblings, 1 reply; 7+ messages in thread
From: Stefan Kangas @ 2024-06-20  7:51 UTC (permalink / raw)
  To: 71669

On macOS, this has no effect on the size of the initial frame:

     emacs -Q --geometry 10x10

This works as expected though:

    emacs -Q -g 10x10
    emacs -Q -geometry 10x10

On GNU/Linux, all flags work as expected.


In GNU Emacs 30.0.50 (build 1, aarch64-apple-darwin23.5.0, NS
 appkit-2487.60 Version 14.5 (Build 23F79)) of 2024-06-10 built on
 foo.local
Repository revision: 33fc77e1b64dab2ed33757d8dae94e87e9e0fc0b
Repository branch: master
Windowing system distributor 'Apple', version 10.3.2487
System Description:  macOS 14.5

Configured using:
 'configure --enable-checking=yes,glyphs
 --enable-check-lisp-object-type'





^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#71669: 30.0.50; macOS: `emacs --geometry` flag broken, only `-geometry` works
  2024-06-20  7:51 bug#71669: 30.0.50; macOS: `emacs --geometry` flag broken, only `-geometry` works Stefan Kangas
@ 2024-06-20 14:14 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2024-06-20 16:15   ` Stefan Kangas
  0 siblings, 1 reply; 7+ messages in thread
From: Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2024-06-20 14:14 UTC (permalink / raw)
  To: Stefan Kangas; +Cc: 71669

Stefan Kangas <stefankangas@gmail.com> writes:

> On macOS, this has no effect on the size of the initial frame:
>
>      emacs -Q --geometry 10x10
>
> This works as expected though:
>
>     emacs -Q -g 10x10
>     emacs -Q -geometry 10x10
>
> On GNU/Linux, all flags work as expected.
>
>
> In GNU Emacs 30.0.50 (build 1, aarch64-apple-darwin23.5.0, NS
>  appkit-2487.60 Version 14.5 (Build 23F79)) of 2024-06-10 built on
>  foo.local
> Repository revision: 33fc77e1b64dab2ed33757d8dae94e87e9e0fc0b
> Repository branch: master
> Windowing system distributor 'Apple', version 10.3.2487
> System Description:  macOS 14.5
>
> Configured using:
>  'configure --enable-checking=yes,glyphs
>  --enable-check-lisp-object-type'

Where is it documented that `--geometry' should be supported on all
systems?  Different windowing systems are each host to unique
conventions that our command-line options are supposed to observe, and
this item's being visibly excluded from list of such options for NS
systems suggests that its omission is no accident.





^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#71669: 30.0.50; macOS: `emacs --geometry` flag broken, only `-geometry` works
  2024-06-20 14:14 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2024-06-20 16:15   ` Stefan Kangas
  2024-06-21  1:22     ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
  0 siblings, 1 reply; 7+ messages in thread
From: Stefan Kangas @ 2024-06-20 16:15 UTC (permalink / raw)
  To: Po Lu; +Cc: 71669

Po Lu <luangruo@yahoo.com> writes:

> Where is it documented that `--geometry' should be supported on all
> systems?

1. man emacs
2. (info "(emacs) Window Size X")

> Different windowing systems are each host to unique
> conventions that our command-line options are supposed to observe, and
> this item's being visibly excluded from list of such options for NS
> systems suggests that its omission is no accident.

As I explained, it works when I say `-geometry` (one dash), so this
feature is already there.  The only issue is that `--geometry` (two
dashes) doesn't work.





^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#71669: 30.0.50; macOS: `emacs --geometry` flag broken, only `-geometry` works
  2024-06-20 16:15   ` Stefan Kangas
@ 2024-06-21  1:22     ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2024-06-21  1:43       ` Stefan Kangas
  0 siblings, 1 reply; 7+ messages in thread
From: Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2024-06-21  1:22 UTC (permalink / raw)
  To: Stefan Kangas; +Cc: 71669

Stefan Kangas <stefankangas@gmail.com> writes:

> Po Lu <luangruo@yahoo.com> writes:
>
>> Where is it documented that `--geometry' should be supported on all
>> systems?
>
> 1. man emacs
> 2. (info "(emacs) Window Size X")

Surely the name of this node is some indication of its applicability?

> As I explained, it works when I say `-geometry` (one dash), so this
> feature is already there.  The only issue is that `--geometry` (two
> dashes) doesn't work.

Yes, because it (the variant with two dashes) is specifically disabled
for the NS windowing system in common-win.el.





^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#71669: 30.0.50; macOS: `emacs --geometry` flag broken, only `-geometry` works
  2024-06-21  1:22     ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2024-06-21  1:43       ` Stefan Kangas
  2024-06-21  6:32         ` Eli Zaretskii
  0 siblings, 1 reply; 7+ messages in thread
From: Stefan Kangas @ 2024-06-21  1:43 UTC (permalink / raw)
  To: Po Lu; +Cc: 71669

Po Lu <luangruo@yahoo.com> writes:

> Stefan Kangas <stefankangas@gmail.com> writes:
>
>> Po Lu <luangruo@yahoo.com> writes:
>>
>>> Where is it documented that `--geometry' should be supported on all
>>> systems?
>>
>> 1. man emacs
>> 2. (info "(emacs) Window Size X")
>
> Surely the name of this node is some indication of its applicability?

It's not very helpful, no.

>> As I explained, it works when I say `-geometry` (one dash), so this
>> feature is already there.  The only issue is that `--geometry` (two
>> dashes) doesn't work.
>
> Yes, because it (the variant with two dashes) is specifically disabled
> for the NS windowing system in common-win.el.

I assume that you mean the part setting `command-line-ns-option-alist`.

Do you agree that this is a bug?





^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#71669: 30.0.50; macOS: `emacs --geometry` flag broken, only `-geometry` works
  2024-06-21  1:43       ` Stefan Kangas
@ 2024-06-21  6:32         ` Eli Zaretskii
  2024-06-21 18:09           ` Stefan Kangas
  0 siblings, 1 reply; 7+ messages in thread
From: Eli Zaretskii @ 2024-06-21  6:32 UTC (permalink / raw)
  To: Stefan Kangas; +Cc: luangruo, 71669

> Cc: 71669@debbugs.gnu.org
> From: Stefan Kangas <stefankangas@gmail.com>
> Date: Fri, 21 Jun 2024 01:43:09 +0000
> 
> Po Lu <luangruo@yahoo.com> writes:
> 
> > Stefan Kangas <stefankangas@gmail.com> writes:
> >
> >> Po Lu <luangruo@yahoo.com> writes:
> >>
> >>> Where is it documented that `--geometry' should be supported on all
> >>> systems?
> >>
> >> 1. man emacs
> >> 2. (info "(emacs) Window Size X")
> >
> > Surely the name of this node is some indication of its applicability?
> 
> It's not very helpful, no.
> 
> >> As I explained, it works when I say `-geometry` (one dash), so this
> >> feature is already there.  The only issue is that `--geometry` (two
> >> dashes) doesn't work.
> >
> > Yes, because it (the variant with two dashes) is specifically disabled
> > for the NS windowing system in common-win.el.
> 
> I assume that you mean the part setting `command-line-ns-option-alist`.
> 
> Do you agree that this is a bug?

Not necessarily.  My reading of the VC history is that before commit
d7d8c62a57e7, which unified the NS handling of command-line arguments
with the rest of GUI platforms, there was no support for -g (in any of
its forms, including -geometry and --geometry) on macOS.  So it could
be that the fact we now support -g and -geometry is a bug.

If you add --geometry to command-line-ns-option-alist, does it work as
expected, with all formats of -geometry that are supposed to be
supported?  If yes, we could enable that on macOS and see if anything
breaks or someone complains.  But maybe if you try this, you will find
the reason why this switch is not fully supported on NS.





^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#71669: 30.0.50; macOS: `emacs --geometry` flag broken, only `-geometry` works
  2024-06-21  6:32         ` Eli Zaretskii
@ 2024-06-21 18:09           ` Stefan Kangas
  0 siblings, 0 replies; 7+ messages in thread
From: Stefan Kangas @ 2024-06-21 18:09 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: luangruo, 71669-done

Eli Zaretskii <eliz@gnu.org> writes:

> Not necessarily.  My reading of the VC history is that before commit
> d7d8c62a57e7, which unified the NS handling of command-line arguments
> with the rest of GUI platforms, there was no support for -g (in any of
> its forms, including -geometry and --geometry) on macOS.  So it could
> be that the fact we now support -g and -geometry is a bug.

In d7d8c62a57e7 it was actually still commented out.  Proper support was
only added 4 years later, in commit e543ae917.

The fact that "--geometry" wasn't commented out at the time looks like
it was just an oversight.

> If you add --geometry to command-line-ns-option-alist, does it work as
> expected, with all formats of -geometry that are supposed to be
> supported?  If yes, we could enable that on macOS and see if anything
> breaks or someone complains.  But maybe if you try this, you will find
> the reason why this switch is not fully supported on NS.

It works fine, so I pushed a patch to master.  Closing this now, thanks.





^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2024-06-21 18:09 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-20  7:51 bug#71669: 30.0.50; macOS: `emacs --geometry` flag broken, only `-geometry` works Stefan Kangas
2024-06-20 14:14 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-06-20 16:15   ` Stefan Kangas
2024-06-21  1:22     ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-06-21  1:43       ` Stefan Kangas
2024-06-21  6:32         ` Eli Zaretskii
2024-06-21 18:09           ` Stefan Kangas

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).