unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#72118: Option -Q is ignored on PGTK when accompanied by --display
@ 2024-07-14 20:48 Peter Oliver
  2024-07-14 20:55 ` bug#72118: [PATCH] " Peter Oliver
  2024-07-20  9:01 ` bug#72118: " Eli Zaretskii
  0 siblings, 2 replies; 7+ messages in thread
From: Peter Oliver @ 2024-07-14 20:48 UTC (permalink / raw)
  To: 72118

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

When Emacs 29.4 is built with PGTK, I am surprised by the behaviour of the following shell command:

emacs --display :1 -Q

My ~/.emacs is loaded, not skipped!  However, if I run the following, it is skipped as expected:

emacs -d :1 -Q

I have a patch, which I shall send in shortly…

-- 
Peter Oliver

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

* bug#72118: [PATCH] Option -Q is ignored on PGTK when accompanied by --display
  2024-07-14 20:48 bug#72118: Option -Q is ignored on PGTK when accompanied by --display Peter Oliver
@ 2024-07-14 20:55 ` Peter Oliver
  2024-08-04  7:12   ` Eli Zaretskii
  2024-07-20  9:01 ` bug#72118: " Eli Zaretskii
  1 sibling, 1 reply; 7+ messages in thread
From: Peter Oliver @ 2024-07-14 20:55 UTC (permalink / raw)
  To: 72118

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

Patch attached.

-- 
Peter Oliver

[-- Attachment #2: Type: text/plain, Size: 1751 bytes --]

From 2f348ffee3777a8e2b02814d8cc50d282d98d366 Mon Sep 17 00:00:00 2001
From: Peter Oliver <git@mavit.org.uk>
Date: Sun, 14 Jul 2024 21:50:33 +0100
Subject: [PATCH 1/2] Apply --display kluge for PGTK too

* src/emacs.c (main): The --display option needs the same handling
with the PGTK backend as it does with the X11 backends.  (Bug#72118)
---
 src/emacs.c | 4 ++--
 src/lisp.h  | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/emacs.c b/src/emacs.c
index 712826d57b7..ec284b16f8d 100644
--- a/src/emacs.c
+++ b/src/emacs.c
@@ -181,7 +181,7 @@ #define MAIN_PROGRAM
    data on the first attempt to change it inside asynchronous code.  */
 bool running_asynch_code;
 
-#if defined (HAVE_X_WINDOWS) || defined (HAVE_NS)
+#if defined (HAVE_X_WINDOWS) || defined (HAVE_PGTK) || defined (HAVE_NS)
 /* If true, -d was specified, meaning we're using some window system.  */
 bool display_arg;
 #endif
@@ -2014,7 +2014,7 @@ main (int argc, char **argv)
   {
     int count_before = skip_args;
 
-#ifdef HAVE_X_WINDOWS
+#if defined (HAVE_X_WINDOWS) || defined (HAVE_PGTK)
     char *displayname = 0;
 
     /* Skip any number of -d options, but only use the last one.  */
diff --git a/src/lisp.h b/src/lisp.h
index 5fa48cec2f0..05daceb5dff 100644
--- a/src/lisp.h
+++ b/src/lisp.h
@@ -4889,7 +4889,7 @@ fast_c_string_match_ignore_case (Lisp_Object regexp,
 extern char **initial_argv;
 extern int initial_argc;
 extern char const *emacs_wd;
-#if defined (HAVE_X_WINDOWS) || defined (HAVE_NS)
+#if defined (HAVE_X_WINDOWS) || defined (HAVE_PGTK) || defined (HAVE_NS)
 extern bool display_arg;
 #endif
 extern Lisp_Object decode_env_path (const char *, const char *, bool);
-- 
2.45.2


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

* bug#72118: Option -Q is ignored on PGTK when accompanied by --display
  2024-07-14 20:48 bug#72118: Option -Q is ignored on PGTK when accompanied by --display Peter Oliver
  2024-07-14 20:55 ` bug#72118: [PATCH] " Peter Oliver
@ 2024-07-20  9:01 ` Eli Zaretskii
  2024-08-04  7:51   ` Eli Zaretskii
  1 sibling, 1 reply; 7+ messages in thread
From: Eli Zaretskii @ 2024-07-20  9:01 UTC (permalink / raw)
  To: Peter Oliver, Po Lu; +Cc: 72118

> Date: Sun, 14 Jul 2024 21:48:12 +0100 (BST)
> From: Peter Oliver <p.d.oliver@mavit.org.uk>
> 
> 
> When Emacs 29.4 is built with PGTK, I am surprised by the behaviour of the following shell command:
> 
> emacs --display :1 -Q
> 
> My ~/.emacs is loaded, not skipped!  However, if I run the following, it is skipped as expected:
> 
> emacs -d :1 -Q
> 
> I have a patch, which I shall send in shortly…

Po Lu, any comments?





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

* bug#72118: [PATCH] Option -Q is ignored on PGTK when accompanied by --display
  2024-07-14 20:55 ` bug#72118: [PATCH] " Peter Oliver
@ 2024-08-04  7:12   ` Eli Zaretskii
  2024-08-04  7:59     ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
  0 siblings, 1 reply; 7+ messages in thread
From: Eli Zaretskii @ 2024-08-04  7:12 UTC (permalink / raw)
  To: Peter Oliver, Po Lu; +Cc: 72118

> Date: Sun, 14 Jul 2024 21:55:04 +0100 (BST)
> From: Peter Oliver <p.d.oliver@mavit.org.uk>
> 
> Patch attached.
> 
> -- 
> Peter Oliver
> 
> From 2f348ffee3777a8e2b02814d8cc50d282d98d366 Mon Sep 17 00:00:00 2001
> From: Peter Oliver <git@mavit.org.uk>
> Date: Sun, 14 Jul 2024 21:50:33 +0100
> Subject: [PATCH 1/2] Apply --display kluge for PGTK too
> 
> * src/emacs.c (main): The --display option needs the same handling
> with the PGTK backend as it does with the X11 backends.  (Bug#72118)
> ---
>  src/emacs.c | 4 ++--
>  src/lisp.h  | 2 +-
>  2 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/src/emacs.c b/src/emacs.c
> index 712826d57b7..ec284b16f8d 100644
> --- a/src/emacs.c
> +++ b/src/emacs.c
> @@ -181,7 +181,7 @@ #define MAIN_PROGRAM
>     data on the first attempt to change it inside asynchronous code.  */
>  bool running_asynch_code;
>  
> -#if defined (HAVE_X_WINDOWS) || defined (HAVE_NS)
> +#if defined (HAVE_X_WINDOWS) || defined (HAVE_PGTK) || defined (HAVE_NS)
>  /* If true, -d was specified, meaning we're using some window system.  */
>  bool display_arg;
>  #endif
> @@ -2014,7 +2014,7 @@ main (int argc, char **argv)
>    {
>      int count_before = skip_args;
>  
> -#ifdef HAVE_X_WINDOWS
> +#if defined (HAVE_X_WINDOWS) || defined (HAVE_PGTK)
>      char *displayname = 0;
>  
>      /* Skip any number of -d options, but only use the last one.  */
> diff --git a/src/lisp.h b/src/lisp.h
> index 5fa48cec2f0..05daceb5dff 100644
> --- a/src/lisp.h
> +++ b/src/lisp.h
> @@ -4889,7 +4889,7 @@ fast_c_string_match_ignore_case (Lisp_Object regexp,
>  extern char **initial_argv;
>  extern int initial_argc;
>  extern char const *emacs_wd;
> -#if defined (HAVE_X_WINDOWS) || defined (HAVE_NS)
> +#if defined (HAVE_X_WINDOWS) || defined (HAVE_PGTK) || defined (HAVE_NS)
>  extern bool display_arg;
>  #endif
>  extern Lisp_Object decode_env_path (const char *, const char *, bool);
> -- 
> 2.45.2
> 

Po Lu, any objections to installing this on the emacs-30 branch?





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

* bug#72118: Option -Q is ignored on PGTK when accompanied by --display
  2024-07-20  9:01 ` bug#72118: " Eli Zaretskii
@ 2024-08-04  7:51   ` Eli Zaretskii
  0 siblings, 0 replies; 7+ messages in thread
From: Eli Zaretskii @ 2024-08-04  7:51 UTC (permalink / raw)
  To: luangruo; +Cc: 72118, p.d.oliver

Ping!

> Cc: 72118@debbugs.gnu.org
> Date: Sat, 20 Jul 2024 12:01:13 +0300
> From: Eli Zaretskii <eliz@gnu.org>
> 
> > Date: Sun, 14 Jul 2024 21:48:12 +0100 (BST)
> > From: Peter Oliver <p.d.oliver@mavit.org.uk>
> > 
> > 
> > When Emacs 29.4 is built with PGTK, I am surprised by the behaviour of the following shell command:
> > 
> > emacs --display :1 -Q
> > 
> > My ~/.emacs is loaded, not skipped!  However, if I run the following, it is skipped as expected:
> > 
> > emacs -d :1 -Q
> > 
> > I have a patch, which I shall send in shortly…
> 
> Po Lu, any comments?
> 
> 
> 
> 





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

* bug#72118: [PATCH] Option -Q is ignored on PGTK when accompanied by --display
  2024-08-04  7:12   ` Eli Zaretskii
@ 2024-08-04  7:59     ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2024-08-17  8:06       ` Eli Zaretskii
  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-08-04  7:59 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 72118, Peter Oliver

Eli Zaretskii <eliz@gnu.org> writes:

> Po Lu, any objections to installing this on the emacs-30 branch?

No, please go ahead.





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

* bug#72118: [PATCH] Option -Q is ignored on PGTK when accompanied by --display
  2024-08-04  7:59     ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2024-08-17  8:06       ` Eli Zaretskii
  0 siblings, 0 replies; 7+ messages in thread
From: Eli Zaretskii @ 2024-08-17  8:06 UTC (permalink / raw)
  To: Po Lu; +Cc: 72118-done, p.d.oliver

> From: Po Lu <luangruo@yahoo.com>
> Cc: Peter Oliver <p.d.oliver@mavit.org.uk>,  72118@debbugs.gnu.org
> Date: Sun, 04 Aug 2024 15:59:28 +0800
> 
> Eli Zaretskii <eliz@gnu.org> writes:
> 
> > Po Lu, any objections to installing this on the emacs-30 branch?
> 
> No, please go ahead.

Now done, and closing the bug.





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

end of thread, other threads:[~2024-08-17  8:06 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-14 20:48 bug#72118: Option -Q is ignored on PGTK when accompanied by --display Peter Oliver
2024-07-14 20:55 ` bug#72118: [PATCH] " Peter Oliver
2024-08-04  7:12   ` Eli Zaretskii
2024-08-04  7:59     ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-08-17  8:06       ` Eli Zaretskii
2024-07-20  9:01 ` bug#72118: " Eli Zaretskii
2024-08-04  7:51   ` Eli Zaretskii

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).