GNU bug report logs - #39168
27.0.50; Error on command line flags with use dump-file flag with other flags

Previous Next

Package: emacs;

Reported by: Yuan Fu <casouri <at> gmail.com>

Date: Sat, 18 Jan 2020 04:28:01 UTC

Severity: normal

Tags: moreinfo

Found in version 27.0.50

Done: Yuan Fu <casouri <at> gmail.com>

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 39168 in the body.
You can then email your comments to 39168 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#39168; Package emacs. (Sat, 18 Jan 2020 04:28:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Yuan Fu <casouri <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sat, 18 Jan 2020 04:28:01 GMT) Full text and rfc822 format available.

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

From: Yuan Fu <casouri <at> gmail.com>
To: Bug Report Emacs <bug-gnu-emacs <at> gnu.org>
Subject: 27.0.50; Error on command line flags with use dump-file flag with
 other flags
Date: Fri, 17 Jan 2020 23:26:48 -0500
- dump an image: emacs --batch -q --eval '(dump-emacs-portable
  "~/.emacs.d/emacs.pdmp")'
- start emacs: ~/bin/emacs -q --dump-file=/Users/yuan/.emacs.d/emacs.pdmp -g 151x50
- error: command-line-1: Unknown option ‘--dump-file=/Users/yuan/.emacs.d/emacs.pdmp’


In GNU Emacs 27.0.50 (build 3, x86_64-apple-darwin19.0.0, NS appkit-1894.10 Version 10.15.1 (Build 19B88))
of 2019-11-30 built on missSilver
Repository revision: e2828795d73637577c7726965974a047fe2d7119
Repository branch: master
Windowing system distributor 'Apple', version 10.3.1894
System Description:  Mac OS X 10.15.2

Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.
command-line-1: Unknown option ‘--dump-file=/Users/yuan/.emacs.d/emacs.pdmp’
Configured using:
'configure --with-modules --with-pdumper=yes
--oldincludedir=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/libxml2/'

Configured features:
NOTIFY KQUEUE ACL GNUTLS LIBXML2 ZLIB TOOLKIT_SCROLL_BARS NS MODULES
THREADS PDUMPER LCMS2

Important settings:
  value of $LC_CTYPE: UTF-8
  value of $LANG: en_CN.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Lisp Interaction

Minor modes in effect:
  tooltip-mode: t
  global-eldoc-mode: t
  eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug message rmc puny dired dired-loaddefs
format-spec rfc822 mml easymenu mml-sec password-cache epa derived epg
epg-config gnus-util rmail rmail-loaddefs text-property-search time-date
subr-x seq byte-opt gv bytecomp byte-compile cconv mm-decode mm-bodies
mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader cl-loaddefs
cl-lib sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils
tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type
mwheel term/ns-win ns-win ucs-normalize mule-util term/common-win
tool-bar dnd fontset image regexp-opt fringe tabulated-list replace
newcomment text-mode elisp-mode lisp-mode prog-mode register page
tab-bar menu-bar rfn-eshadow isearch timer select scroll-bar mouse
jit-lock font-lock syntax facemenu font-core term/tty-colors frame
minibuffer cl-generic cham georgian utf-8-lang misc-lang vietnamese
tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek
romanian slovak czech european ethiopic indian cyrillic chinese
composite charscript charprop case-table epa-hook jka-cmpr-hook help
simple abbrev obarray cl-preloaded nadvice loaddefs button faces
cus-face macroexp files text-properties overlay sha1 md5 base64 format
env code-pages mule custom widget hashtable-print-readable backquote
threads kqueue cocoa ns lcms2 multi-tty make-network-process emacs)

Memory information:
((conses 16 42181 10308)
(symbols 48 5889 1)
(strings 32 15052 1161)
(string-bytes 1 491530)
(vectors 16 9263)
(vector-slots 8 118824 9670)
(floats 8 19 27)
(intervals 56 127 0)
(buffers 1000 11))




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#39168; Package emacs. (Sat, 18 Jan 2020 09:04:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Yuan Fu <casouri <at> gmail.com>
Cc: 39168 <at> debbugs.gnu.org
Subject: Re: bug#39168: 27.0.50;
 Error on command line flags with use dump-file flag with other flags
Date: Sat, 18 Jan 2020 11:03:10 +0200
> From: Yuan Fu <casouri <at> gmail.com>
> Date: Fri, 17 Jan 2020 23:26:48 -0500
> 
> 
> - dump an image: emacs --batch -q --eval '(dump-emacs-portable
>   "~/.emacs.d/emacs.pdmp")'
> - start emacs: ~/bin/emacs -q --dump-file=/Users/yuan/.emacs.d/emacs.pdmp -g 151x50
> - error: command-line-1: Unknown option ‘--dump-file=/Users/yuan/.emacs.d/emacs.pdmp’

Not _any_ other flag, but flags parsed in command-line-1.

If we restored Emacs from a dump file, we should filter --dump-file
(and the following argument, if --dump-file doesn't end in a '=') in
init_cmdargs, so that startup.el doesn't see it.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#39168; Package emacs. (Sat, 18 Jan 2020 14:30:02 GMT) Full text and rfc822 format available.

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

From: Yuan Fu <casouri <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 39168 <at> debbugs.gnu.org
Subject: Re: bug#39168: 27.0.50; Error on command line flags with use
 dump-file flag with other flags
Date: Sat, 18 Jan 2020 09:29:02 -0500
BTW, I can’t use —dump-file flag with ~, otherwise it complains

    emacs: could not load dump file "~/.emacs.d/cache/emacs.pdmp": could not open file

Using a root path (/Users/yuan/.emacs.d/…) works fine. Is this expected?

Yuan



Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#39168; Package emacs. (Sat, 18 Jan 2020 15:24:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Yuan Fu <casouri <at> gmail.com>
Cc: 39168 <at> debbugs.gnu.org
Subject: Re: bug#39168: 27.0.50; Error on command line flags with use
 dump-file flag with other flags
Date: Sat, 18 Jan 2020 17:23:32 +0200
> From: Yuan Fu <casouri <at> gmail.com>
> Date: Sat, 18 Jan 2020 09:29:02 -0500
> Cc: 39168 <at> debbugs.gnu.org
> 
> BTW, I can’t use —dump-file flag with ~, otherwise it complains
> 
>     emacs: could not load dump file "~/.emacs.d/cache/emacs.pdmp": could not open file
> 
> Using a root path (/Users/yuan/.emacs.d/…) works fine. Is this expected?

Yes, I think so.  Emacs loads the dump file very early during startup,
and the various known directories are not yet set up at that point.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#39168; Package emacs. (Fri, 24 Apr 2020 15:59:02 GMT) Full text and rfc822 format available.

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

From: Yuan Fu <ykf5041 <at> psu.edu>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 39168 <at> debbugs.gnu.org
Subject: Re: bug#39168: 27.0.50; Error on command line flags with use 
 dump-file flag with other flags
Date: Fri, 24 Apr 2020 11:58:05 -0400
I’m still seeing this in the latest master build. Could you give me some
pointers on how to fix this? If it’s not too complicated maybe I can fix
it.

Yuan




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#39168; Package emacs. (Fri, 24 Apr 2020 16:33:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Yuan Fu <ykf5041 <at> psu.edu>
Cc: 39168 <at> debbugs.gnu.org
Subject: Re: bug#39168: 27.0.50; Error on command line flags with use 
 dump-file flag with other flags
Date: Fri, 24 Apr 2020 19:31:53 +0300
> From: Yuan Fu <ykf5041 <at> psu.edu>
> Date: Fri, 24 Apr 2020 11:58:05 -0400
> Cc: 39168 <at> debbugs.gnu.org
> 
> I’m still seeing this in the latest master build. Could you give me some
> pointers on how to fix this?

I thought I did just that in

  https://debbugs.gnu.org/cgi/bugreport.cgi?bug=39168#8

Do you have follow-up questions?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#39168; Package emacs. (Fri, 24 Apr 2020 17:47:02 GMT) Full text and rfc822 format available.

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

From: Yuan Fu <ykf5041 <at> psu.edu>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 39168 <at> debbugs.gnu.org
Subject: Re: bug#39168: 27.0.50; Error on command line flags with use 
 dump-file flag with other flags
Date: Fri, 24 Apr 2020 13:45:51 -0400

> On Apr 24, 2020, at 12:31 PM, Eli Zaretskii <eliz <at> gnu.org> wrote:
> 
>> From: Yuan Fu <ykf5041 <at> psu.edu>
>> Date: Fri, 24 Apr 2020 11:58:05 -0400
>> Cc: 39168 <at> debbugs.gnu.org
>> 
>> I’m still seeing this in the latest master build. Could you give me some
>> pointers on how to fix this?
> 
> I thought I did just that in
> 
>  https://nam01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdebbugs.gnu.org%2Fcgi%2Fbugreport.cgi%3Fbug%3D39168%238&amp;data=02%7C01%7Cykf5041%40psu.edu%7C73225549a67c47daa17708d7e86d09d7%7C7cf48d453ddb4389a9c1c115526eb52e%7C0%7C0%7C637233427328246054&amp;sdata=NKZV6igzz0KyKIbM%2Fla8f4DPb7quGe2CdV1aA%2FqSSdA%3D&amp;reserved=0
> 
> Do you have follow-up questions?

Ah, yes. How can I check if Emacs is restored from a portable dump file? I see strcmp (temacs, "pdump”) in main but I don’t think that’s in scope in init_cmdargs. Thanks.

Yuan



Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#39168; Package emacs. (Fri, 24 Apr 2020 18:06:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Yuan Fu <ykf5041 <at> psu.edu>
Cc: 39168 <at> debbugs.gnu.org
Subject: Re: bug#39168: 27.0.50; Error on command line flags with use 
 dump-file flag with other flags
Date: Fri, 24 Apr 2020 21:05:12 +0300
> From: Yuan Fu <ykf5041 <at> psu.edu>
> Date: Fri, 24 Apr 2020 13:45:51 -0400
> Cc: 39168 <at> debbugs.gnu.org
> 
> > Do you have follow-up questions?
> 
> Ah, yes. How can I check if Emacs is restored from a portable dump file?

One way is to use the function pdumper-stats.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#39168; Package emacs. (Fri, 24 Apr 2020 19:45:02 GMT) Full text and rfc822 format available.

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

From: Yuan Fu <ykf5041 <at> psu.edu>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 39168 <at> debbugs.gnu.org
Subject: Re: bug#39168: 27.0.50; Error on command line flags with use 
 dump-file flag with other flags
Date: Fri, 24 Apr 2020 15:44:40 -0400

> On Apr 24, 2020, at 2:05 PM, Eli Zaretskii <eliz <at> gnu.org> wrote:
> 
>> From: Yuan Fu <ykf5041 <at> psu.edu>
>> Date: Fri, 24 Apr 2020 13:45:51 -0400
>> Cc: 39168 <at> debbugs.gnu.org
>> 
>>> Do you have follow-up questions?
>> 
>> Ah, yes. How can I check if Emacs is restored from a portable dump file?
> 
> One way is to use the function pdumper-stats.

Thinking more about it, maybe I shouldn’t check if Emacs is restored from a portable dump file, since having “—dump-file” in argv should mean that Emacs is restored from a portable dump file anyway.

Yuan



Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#39168; Package emacs. (Fri, 24 Apr 2020 20:25:02 GMT) Full text and rfc822 format available.

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

From: Yuan Fu <ykf5041 <at> psu.edu>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 39168 <at> debbugs.gnu.org
Subject: Re: bug#39168: 27.0.50; Error on command line flags with use 
 dump-file flag with other flags
Date: Fri, 24 Apr 2020 16:24:25 -0400
[Message part 1 (text/plain, inline)]
Here is my first attempt. The implementation of argmatch gives me an impression that when the flag only have one dash, you are not supposed to add “=“ after it. IOW, -dump-file=xxx is a misuse. BTW, I don’t see a test for emacs startup in /test/src. Are there test cases that I should test against?

[dump-file.patch (application/octet-stream, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#39168; Package emacs. (Fri, 24 Jul 2020 00:19:01 GMT) Full text and rfc822 format available.

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

From: Yuan Fu <ykf5041 <at> psu.edu>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 39168 <at> debbugs.gnu.org
Subject: Re: bug#39168: 27.0.50; Error on command line flags with use 
 dump-file flag with other flags
Date: Thu, 23 Jul 2020 20:18:05 -0400
I almost forgot about this, any updates?

Yuan

> On Apr 24, 2020, at 4:24 PM, Yuan Fu <ykf5041 <at> psu.edu> wrote:
> 
> Here is my first attempt. The implementation of argmatch gives me an impression that when the flag only have one dash, you are not supposed to add “=“ after it. IOW, -dump-file=xxx is a misuse. BTW, I don’t see a test for emacs startup in /test/src. Are there test cases that I should test against?
> 
> <dump-file.patch>





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#39168; Package emacs. (Thu, 10 Feb 2022 07:39:02 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Yuan Fu <casouri <at> gmail.com>
Cc: 39168 <at> debbugs.gnu.org
Subject: Re: bug#39168: 27.0.50; Error on command line flags with use
 dump-file flag with other flags
Date: Thu, 10 Feb 2022 08:37:46 +0100
Yuan Fu <casouri <at> gmail.com> writes:

> - dump an image: emacs --batch -q --eval '(dump-emacs-portable
>   "~/.emacs.d/emacs.pdmp")'
> - start emacs: ~/bin/emacs -q --dump-file=/Users/yuan/.emacs.d/emacs.pdmp -g 151x50
> - error: command-line-1: Unknown option ‘--dump-file=/Users/yuan/.emacs.d/emacs.pdmp’

(I'm going through old bug reports that unfortunately weren't resolved
at the time.)

I tried reproducing this on the current Emacs trunk:

larsi <at> giant:~/src/emacs/trunk$ ./src/emacs --batch -q --eval '(dump-emacs-portable  "/tmp/emacs.pdmp")'
Dumping fingerprint: 242a38e947fb351c885b84edcc58743b99c0803abfc37d2f3a62eb0ed696c781
Dump complete
Byte counts: header=100 hot=7603292 discardable=135072 cold=3591048
Reloc counts: hot=428962 discardable=5173
larsi <at> giant:~/src/emacs/trunk$ ./src/emacs -Q --dump-file /tmp/emacs.pdmp 

But it seems to work fine there.  Are you still seeing this issue in
recent Emacs versions?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Added tag(s) moreinfo. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Thu, 10 Feb 2022 07:39:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#39168; Package emacs. (Sat, 19 Feb 2022 23:52:01 GMT) Full text and rfc822 format available.

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

From: Yuan Fu <casouri <at> gmail.com>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 39168 <at> debbugs.gnu.org
Subject: Re: bug#39168: 27.0.50; Error on command line flags with use
 dump-file flag with other flags
Date: Sat, 19 Feb 2022 15:51:31 -0800
> 
> But it seems to work fine there.  Are you still seeing this issue in
> recent Emacs versions?

No. I tried and it works fine now. Closed this report. Many thanks for your work Lars!

Yuan



Reply sent to Yuan Fu <casouri <at> gmail.com>:
You have taken responsibility. (Sat, 19 Feb 2022 23:53:02 GMT) Full text and rfc822 format available.

Notification sent to Yuan Fu <casouri <at> gmail.com>:
bug acknowledged by developer. (Sat, 19 Feb 2022 23:53:02 GMT) Full text and rfc822 format available.

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

From: Yuan Fu <casouri <at> gmail.com>
To: 39168-done <at> debbugs.gnu.org
Subject: Fwd: bug#39168: 27.0.50; Error on command line flags with use
 dump-file flag with other flags
Date: Sat, 19 Feb 2022 15:52:04 -0800




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

This bug report was last modified 2 years and 9 days ago.

Previous Next


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