unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#66245: [PATCH] ; Silence macOS 14 warning
@ 2023-09-27 19:00 Eshel Yaron via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2023-09-28 10:35 ` Alan Third
  2023-09-29 11:35 ` Stefan Kangas
  0 siblings, 2 replies; 15+ messages in thread
From: Eshel Yaron via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2023-09-27 19:00 UTC (permalink / raw)
  To: 66245

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

Tags: patch

Hi,

After updating to macOS 14 (and rebuilding Emacs), I see the following
warning whenever I start Emacs:

    WARNING: Secure coding is not enabled for restorable state! Enable secure coding by implementing NSApplicationDelegate.applicationSupportsSecureRestorableState: and returning YES.

This patch does exactly what the warning suggests, and it silences the
warning.

TBH I'm not entirely sure I understand the implications of implementing
`applicationSupportsSecureRestorableState`.  IIUC it makes Emacs opt-in
to the "secure state restoration" mechanism in contrast to a former
(supposedly less secure) mechanism, but AFAICT Emacs doesn't opt-in to
state restoration in the NS port in the first place...


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Silence-macOS-14-warning.patch --]
[-- Type: text/patch, Size: 738 bytes --]

From 10a9205535c20ff951c61fb84a32b9ab6511fc67 Mon Sep 17 00:00:00 2001
From: Eshel Yaron <me@eshelyaron.com>
Date: Wed, 27 Sep 2023 20:46:26 +0200
Subject: [PATCH] ; Silence macOS 14 warning

* src/nsterm.m: Implement 'applicationSupportsSecureRestorableState'
to silence warning on macOS 14.
---
 src/nsterm.m | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/nsterm.m b/src/nsterm.m
index 4e0dfa58c63..e46b71a499b 100644
--- a/src/nsterm.m
+++ b/src/nsterm.m
@@ -6110,6 +6110,11 @@ - (void)antialiasThresholdDidChange:(NSNotification *)notification
 
 */
 
+- (BOOL) applicationSupportsSecureRestorableState:(NSApplication *)app
+{
+  return YES;
+}
+
 - (void) terminate: (id)sender
 {
   struct input_event ie;
-- 
2.42.0


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

end of thread, other threads:[~2023-09-29 15:36 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-27 19:00 bug#66245: [PATCH] ; Silence macOS 14 warning Eshel Yaron via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-09-28 10:35 ` Alan Third
2023-09-28 13:46   ` Eshel Yaron via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-09-28 21:47     ` Alan Third
2023-09-28 22:16       ` Stefan Kangas
2023-09-28 22:37         ` Alan Third
2023-09-29  1:38           ` Yuan Fu
2023-09-29  9:34           ` Stefan Kangas
2023-09-29 15:10             ` Eli Zaretskii
2023-09-29  9:21         ` Gerd Möllmann
2023-09-29  9:38           ` Stefan Kangas
2023-09-29 10:11             ` Gerd Möllmann
2023-09-29 15:36               ` Alan Third
2023-09-29 14:55       ` Eli Zaretskii
2023-09-29 11:35 ` 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).