emacs-devel
[Top][All Lists]
Advanced

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

Re: Should this package be included into the NS port?


From: George Plymale II
Subject: Re: Should this package be included into the NS port?
Date: Fri, 18 May 2018 17:21:38 -0400

> I’ve had a dig around and it looks as though emacsclient is able to
> open a new GUI frame, so it’s not quite as dire as I’d previously
> thought.

Oh, neat. I hadn't tested that, so that's good to know.

> There are two problems, though.

> * Application Menu

> When the last NS frame is deleted the menus aren’t updated, so I think
> they’ll be the menus as defined for the last frame. They should
> probably be cut right back to just the ‘Emacs’ menu, and perhaps
> ‘help’.

Won't those menus just get updated once a new frame is created? I'm not
exactly sure what the implications of this are.

> (NOTE: The menus are a bit of a mess, Nick Helm and I have been
> discussing them in bug#31371.)

I read your discussion at bug#31371 ( here's link for others' reference:
https://lists.gnu.org/archive/html/bug-gnu-emacs/2018-05/msg00149.html ).
Strangely, this bug doesn't occur at all on the Emacs Mac Port. The Help
menu search actually works fantastically on the Mac Port. It can show
info nodes, menu items, and it actually works when you click on
them. Here's a screenshot: 

Attachment: Help menu.png
Description: Help menu on the Emacs Mac Port


There's no freezing, no focus issues, nothing liked what you guys
described in bug#31371. It works completely as expected.

> * Dock Menu

> This has a ‘new frame’ option but just plain doesn’t work. I think the
> problem is the way it’s trying to create a new frame:

>     - (void)newFrame: (id)sender
>     {
>       NSTRACE ("[EmacsApp newFrame:]");
    
>       struct frame *emacsframe = SELECTED_FRAME ();
>       NSEvent *theEvent = [NSApp currentEvent];
    
>       if (!emacs_event)
>         return;
>       emacs_event->kind = NS_NONKEY_EVENT;
>       emacs_event->code = KEY_NS_NEW_FRAME;
>       emacs_event->modifiers = 0;
>       EV_TRAILER (theEvent);
>     }

> This seems to rely on there being an existing NS frame, but we’ve
> deleted the last one. I assume if we were clever we’d be able to use
> the, still open, terminal frame.

> Is there some other way of creating a new GUI frame? I assume there
> must be since emacsclient can do it.

I suppose you must be right that there's another way to do it, but I
don't know what that would be. I could try and dig around in the code if
you'd like.

> * ALSO!

> Closing the terminal frame when there are no GUI frames left results
> in a crash. I guess Emacs doesn’t think it needs to clean up the NS
> stuff or something? I don’t really know what’s going on there.

Strange, I don't see a "crash" in the Emacs Mac Port. I don't notice any
abnormal exit status, error, or system popup, if that's what you mean. I
don't know what could be going on there either, but I'm tending to think
that we need to follow the Emacs Mac Port's example in at least some of
these instances.

reply via email to

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