GNU bug report logs - #72118
Option -Q is ignored on PGTK when accompanied by --display

Previous Next

Package: emacs;

Reported by: Peter Oliver <p.d.oliver <at> mavit.org.uk>

Date: Sun, 14 Jul 2024 20:49:02 UTC

Severity: normal

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 72118 in the body.
You can then email your comments to 72118 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#72118; Package emacs. (Sun, 14 Jul 2024 20:49:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Peter Oliver <p.d.oliver <at> mavit.org.uk>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sun, 14 Jul 2024 20:49:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Peter Oliver <p.d.oliver <at> mavit.org.uk>
To: bug-gnu-emacs <at> gnu.org
Subject: Option -Q is ignored on PGTK when accompanied by --display
Date: Sun, 14 Jul 2024 21:48:12 +0100 (BST)
[Message part 1 (text/plain, inline)]
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

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#72118; Package emacs. (Sun, 14 Jul 2024 20:57:02 GMT) Full text and rfc822 format available.

Message #8 received at 72118 <at> debbugs.gnu.org (full text, mbox):

From: Peter Oliver <p.d.oliver <at> mavit.org.uk>
To: 72118 <at> debbugs.gnu.org
Subject: [PATCH] Option -Q is ignored on PGTK when accompanied by --display
Date: Sun, 14 Jul 2024 21:55:04 +0100 (BST)
[Message part 1 (text/plain, inline)]
Patch attached.

-- 
Peter Oliver
[0001-Apply-display-kluge-for-PGTK-too.patch (text/plain, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#72118; Package emacs. (Sat, 20 Jul 2024 09:02:01 GMT) Full text and rfc822 format available.

Message #11 received at 72118 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Peter Oliver <p.d.oliver <at> mavit.org.uk>,
 Po Lu <luangruo <at> yahoo.com>
Cc: 72118 <at> debbugs.gnu.org
Subject: Re: bug#72118: Option -Q is ignored on PGTK when accompanied by
 --display
Date: Sat, 20 Jul 2024 12:01:13 +0300
> Date: Sun, 14 Jul 2024 21:48:12 +0100 (BST)
> From: Peter Oliver <p.d.oliver <at> 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?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#72118; Package emacs. (Sun, 04 Aug 2024 07:13:02 GMT) Full text and rfc822 format available.

Message #14 received at 72118 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Peter Oliver <p.d.oliver <at> mavit.org.uk>,
 Po Lu <luangruo <at> yahoo.com>
Cc: 72118 <at> debbugs.gnu.org
Subject: Re: bug#72118: [PATCH] Option -Q is ignored on PGTK when accompanied
 by --display
Date: Sun, 04 Aug 2024 10:12:20 +0300
> Date: Sun, 14 Jul 2024 21:55:04 +0100 (BST)
> From: Peter Oliver <p.d.oliver <at> mavit.org.uk>
> 
> Patch attached.
> 
> -- 
> Peter Oliver
> 
> From 2f348ffee3777a8e2b02814d8cc50d282d98d366 Mon Sep 17 00:00:00 2001
> From: Peter Oliver <git <at> 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?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#72118; Package emacs. (Sun, 04 Aug 2024 07:53:02 GMT) Full text and rfc822 format available.

Message #17 received at 72118 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: luangruo <at> yahoo.com
Cc: 72118 <at> debbugs.gnu.org, p.d.oliver <at> mavit.org.uk
Subject: Re: bug#72118: Option -Q is ignored on PGTK when accompanied by
 --display
Date: Sun, 04 Aug 2024 10:51:32 +0300
Ping!

> Cc: 72118 <at> debbugs.gnu.org
> Date: Sat, 20 Jul 2024 12:01:13 +0300
> From: Eli Zaretskii <eliz <at> gnu.org>
> 
> > Date: Sun, 14 Jul 2024 21:48:12 +0100 (BST)
> > From: Peter Oliver <p.d.oliver <at> 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?
> 
> 
> 
> 




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#72118; Package emacs. (Sun, 04 Aug 2024 08:01:02 GMT) Full text and rfc822 format available.

Message #20 received at 72118 <at> debbugs.gnu.org (full text, mbox):

From: Po Lu <luangruo <at> yahoo.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 72118 <at> debbugs.gnu.org, Peter Oliver <p.d.oliver <at> mavit.org.uk>
Subject: Re: bug#72118: [PATCH] Option -Q is ignored on PGTK when
 accompanied by --display
Date: Sun, 04 Aug 2024 15:59:28 +0800
Eli Zaretskii <eliz <at> gnu.org> writes:

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

No, please go ahead.




Reply sent to Eli Zaretskii <eliz <at> gnu.org>:
You have taken responsibility. (Sat, 17 Aug 2024 08:08:02 GMT) Full text and rfc822 format available.

Notification sent to Peter Oliver <p.d.oliver <at> mavit.org.uk>:
bug acknowledged by developer. (Sat, 17 Aug 2024 08:08:02 GMT) Full text and rfc822 format available.

Message #25 received at 72118-done <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Po Lu <luangruo <at> yahoo.com>
Cc: 72118-done <at> debbugs.gnu.org, p.d.oliver <at> mavit.org.uk
Subject: Re: bug#72118: [PATCH] Option -Q is ignored on PGTK when
 accompanied by --display
Date: Sat, 17 Aug 2024 11:06:34 +0300
> From: Po Lu <luangruo <at> yahoo.com>
> Cc: Peter Oliver <p.d.oliver <at> mavit.org.uk>,  72118 <at> debbugs.gnu.org
> Date: Sun, 04 Aug 2024 15:59:28 +0800
> 
> Eli Zaretskii <eliz <at> 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.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 14 Sep 2024 11:24:06 GMT) Full text and rfc822 format available.

This bug report was last modified 155 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.