unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Alan Third <alan@idiocy.org>
To: Michael Dixon <dixius99@gmail.com>
Cc: 38031@debbugs.gnu.org, Nathaniel Bass <nw3455@gmail.com>,
	Stefan Kangas <stefan@marxist.se>
Subject: bug#38031: 26.3; Trying to invoke the macOS File Open window causes Emacs to crash on macOS Catalina
Date: Tue, 14 Jan 2020 21:39:30 +0000	[thread overview]
Message-ID: <20200114213930.GA63294@breton.holly.idiocy.org> (raw)
In-Reply-To: <6CCDA5A5-9265-41F1-A7DE-4E8CE0DD4431@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 572 bytes --]

On Fri, Nov 08, 2019 at 06:17:30PM -0500, Michael Dixon wrote:
> I tried a whole variety of distributions. I tried the brew cask
> (26.3), the emacs-plus formula used for spacemacs (26.3), the
> prebuilt Emacs for Mac OSX (26.3), homebrew-emacs-head (another brew
> formula, both 26.3 and 27.0.50), and now the one I just built (I
> tried both with and without your patch, both 27.0.5.0, since that’s
> what I get with master).

Can you try the attached patch. It *completely* removes the
EmacsOpenPanel and EmacsSavePanel classes. It might do the trick.
-- 
Alan Third

[-- Attachment #2: 0001-Remove-EmacsOpenPanel-and-EmacsSavePanel-bug-38031.patch --]
[-- Type: text/plain, Size: 2161 bytes --]

From b631a258e1171c377e193e010ceab42ea1958788 Mon Sep 17 00:00:00 2001
From: Alan Third <alan@idiocy.org>
Date: Tue, 14 Jan 2020 21:36:14 +0000
Subject: [PATCH] Remove EmacsOpenPanel and EmacsSavePanel (bug#38031)

---
 src/nsfns.m  | 25 +------------------------
 src/nsterm.h | 16 ----------------
 2 files changed, 1 insertion(+), 40 deletions(-)

diff --git a/src/nsfns.m b/src/nsfns.m
index 42bd88eeb4..3be4e390e0 100644
--- a/src/nsfns.m
+++ b/src/nsfns.m
@@ -1634,7 +1634,7 @@ Frames are listed from topmost (first) to bottommost (last).  */)
     dirS = [dirS stringByExpandingTildeInPath];
 
   panel = isSave ?
-    (id)[EmacsSavePanel savePanel] : (id)[EmacsOpenPanel openPanel];
+    (id)[NSSavePanel savePanel] : (id)[NSOpenPanel openPanel];
 
   [panel setTitle: promptS];
 
@@ -3089,29 +3089,6 @@ The position is returned as a cons cell (X . Y) of the
   return ret;
 }
 
-@implementation EmacsSavePanel
-- (BOOL)performKeyEquivalent:(NSEvent *)theEvent
-{
-  BOOL ret = handlePanelKeys (self, theEvent);
-  if (! ret)
-    ret = [super performKeyEquivalent:theEvent];
-  return ret;
-}
-@end
-
-
-@implementation EmacsOpenPanel
-- (BOOL)performKeyEquivalent:(NSEvent *)theEvent
-{
-  // NSOpenPanel inherits NSSavePanel, so passing self is OK.
-  BOOL ret = handlePanelKeys (self, theEvent);
-  if (! ret)
-    ret = [super performKeyEquivalent:theEvent];
-  return ret;
-}
-@end
-
-
 @implementation EmacsFileDelegate
 /* --------------------------------------------------------------------------
    Delegate methods for Open/Save panels
diff --git a/src/nsterm.h b/src/nsterm.h
index 8baa65f578..7d12ecc243 100644
--- a/src/nsterm.h
+++ b/src/nsterm.h
@@ -597,22 +597,6 @@ #define NSTRACE_UNSILENCE()
 @end
 
 
-/* ==========================================================================
-
-   File open/save panels
-   This and next override methods to handle keyboard input in panels.
-
-   ========================================================================== */
-
-@interface EmacsSavePanel : NSSavePanel
-{
-}
-@end
-@interface EmacsOpenPanel : NSOpenPanel
-{
-}
-@end
-
 @interface EmacsFileDelegate : NSObject
 {
 }
-- 
2.24.0


  reply	other threads:[~2020-01-14 21:39 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-02 10:19 bug#38031: 26.3; Trying to invoke the macOS File Open window causes Emacs to crash on macOS Catalina Michael Dixon
2019-11-03 20:39 ` Alan Third
2019-11-03 21:02   ` Michael Dixon
2019-11-04 20:06     ` Alan Third
2019-11-08  0:39       ` Stefan Kangas
2019-11-08  5:06         ` Nathaniel Bass
2019-11-08 19:47           ` Alan Third
2019-11-08 21:33             ` Michael Dixon
2019-11-08 23:08               ` Alan Third
2019-11-08 23:17                 ` Michael Dixon
2020-01-14 21:39                   ` Alan Third [this message]
2020-01-15  3:00                     ` Michael Dixon
2020-01-15 19:00                       ` Alan Third
2020-01-15 21:48                         ` Michael Dixon
2020-01-17 18:53                           ` Alan Third
2020-01-17 23:49                             ` Michael Dixon
2020-01-18 15:22                               ` Alan Third
2020-01-18 16:39                                 ` Michael Dixon
2020-01-18 20:50                                   ` Alan Third
2020-01-24 10:00                                     ` Alan Third
2019-11-08  7:02 ` Andrii Kolomoiets
2019-12-05 11:20 ` Michael Dixon
2019-12-06  1:57   ` Michael Dixon
2019-12-19  7:37 ` bug#38031: Same error Lars Hovdan Molden via Bug reports for GNU Emacs, the Swiss army knife of text editors

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200114213930.GA63294@breton.holly.idiocy.org \
    --to=alan@idiocy.org \
    --cc=38031@debbugs.gnu.org \
    --cc=dixius99@gmail.com \
    --cc=nw3455@gmail.com \
    --cc=stefan@marxist.se \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).