unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Dumping emacs after find-file
@ 2012-11-18 23:01 Burton Samograd
  2012-11-19  3:48 ` Eli Zaretskii
  0 siblings, 1 reply; 5+ messages in thread
From: Burton Samograd @ 2012-11-18 23:01 UTC (permalink / raw)
  To: help-gnu-emacs

Hi,

I'm trying out dumping emacs from --batch mode.  When I put the
following into a file dump.el and run it with "emacs --batch --load
dump.el" , I can run the resulting dumped executable and see that there
is a buffer named "x" with the contents "this is a test":

(progn
  (switch-to-buffer "x")
  (insert "this is a test")
  (dump-emacs "testing" "~/src/emacs-git/src/emacs"))

The following does not produce and dumped executable at all:

(progn
  (find-file "~/.emacs.d/init.el")
  (switch-to-buffer "x")
  (insert "this is a test")
  (dump-emacs "testing" "~/src/emacs-git/src/emacs"))

I thought this was because there was an open buffer pointing to a file
on the filesystem, so I tried the following:

(progn
  (find-file "~/.emacs.d/init.el")
  (set-visited-file-name nil)
  (switch-to-buffer "x")
  (insert "this is a test")
  (dump-emacs "testing" "~/src/emacs-git/src/emacs"))

This also produces no dumped executable.  It seems that having buffers
in the heap/core is fine, but not after they have been loaded with
find-file.  Is there an explanation for this?  I can't see any reason in
the code after a quick glance so I thought I would ask.

--
Burton Samograd







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

* Re: Dumping emacs after find-file
  2012-11-18 23:01 Dumping emacs after find-file Burton Samograd
@ 2012-11-19  3:48 ` Eli Zaretskii
  2012-11-19  5:01   ` Burton Samograd
  0 siblings, 1 reply; 5+ messages in thread
From: Eli Zaretskii @ 2012-11-19  3:48 UTC (permalink / raw)
  To: help-gnu-emacs

> From: Burton Samograd <burton@samograd.ca>
> Date: Sun, 18 Nov 2012 16:01:35 -0700
> 
> The following does not produce and dumped executable at all:

What do you mean by "does not produce"?  What _does_ it do?



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

* Re: Dumping emacs after find-file
  2012-11-19  3:48 ` Eli Zaretskii
@ 2012-11-19  5:01   ` Burton Samograd
  2012-11-19 16:16     ` Eli Zaretskii
  0 siblings, 1 reply; 5+ messages in thread
From: Burton Samograd @ 2012-11-19  5:01 UTC (permalink / raw)
  To: help-gnu-emacs

Eli Zaretskii <eliz@gnu.org> writes:

>> From: Burton Samograd <burton@samograd.ca>
>> Date: Sun, 18 Nov 2012 16:01:35 -0700
>> 
>> The following does not produce and dumped executable at all:
>
> What do you mean by "does not produce"?  What _does_ it do?

I mean it doesn't produce an executable and does nothing else other than
exit.  I gave the code so you can easily run it yourself.

--
Burton Samograd




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

* Re: Dumping emacs after find-file
  2012-11-19  5:01   ` Burton Samograd
@ 2012-11-19 16:16     ` Eli Zaretskii
  2012-11-19 18:09       ` Burton Samograd
  0 siblings, 1 reply; 5+ messages in thread
From: Eli Zaretskii @ 2012-11-19 16:16 UTC (permalink / raw)
  To: help-gnu-emacs

> From: Burton Samograd <burton@samograd.ca>
> Date: Sun, 18 Nov 2012 22:01:28 -0700
> 
> Eli Zaretskii <eliz@gnu.org> writes:
> 
> >> From: Burton Samograd <burton@samograd.ca>
> >> Date: Sun, 18 Nov 2012 16:01:35 -0700
> >> 
> >> The following does not produce and dumped executable at all:
> >
> > What do you mean by "does not produce"?  What _does_ it do?
> 
> I mean it doesn't produce an executable and does nothing else other than
> exit.

My crystal ball says that it crashes, and you somehow miss the signs
of the crash.  If that is what happens, please submit a bug report
about this.

> I gave the code so you can easily run it yourself.

I did, and it worked for me.  (You don't say which version of Emacs
and on what OS, so perhaps this is system-dependent.)



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

* Re: Dumping emacs after find-file
  2012-11-19 16:16     ` Eli Zaretskii
@ 2012-11-19 18:09       ` Burton Samograd
  0 siblings, 0 replies; 5+ messages in thread
From: Burton Samograd @ 2012-11-19 18:09 UTC (permalink / raw)
  To: help-gnu-emacs

Eli Zaretskii <eliz@gnu.org> writes:

>> From: Burton Samograd <burton@samograd.ca>
>> Date: Sun, 18 Nov 2012 22:01:28 -0700
>> 
>> Eli Zaretskii <eliz@gnu.org> writes:
>> 
>> >> From: Burton Samograd <burton@samograd.ca>
>> >> Date: Sun, 18 Nov 2012 16:01:35 -0700
>> >> 
>> >> The following does not produce and dumped executable at all:
>> >
>> > What do you mean by "does not produce"?  What _does_ it do?
>> 
>> I mean it doesn't produce an executable and does nothing else other than
>> exit.
>
> My crystal ball says that it crashes, and you somehow miss the signs
> of the crash.  If that is what happens, please submit a bug report
> about this.

It doesn't seem to be crashing from what I can gather, and it just
exists because it's running in --batch mode and the script is done.
Really, the only thing that's going wrong is that the excutable image is
not being written to disk; maybe it is crashing but it's not obvious.

>
>> I gave the code so you can easily run it yourself.
>
> I did, and it worked for me.  (You don't say which version of Emacs
> and on what OS, so perhaps this is system-dependent.)

I'm running the current git development sources pulled this weekend.  It
could be an issue with development, but I thought I would ask here first
in case it was a known issue/limitation of dumping.

I'll try a few more experiments before I submit an official bug report.

--
Burton




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

end of thread, other threads:[~2012-11-19 18:09 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-18 23:01 Dumping emacs after find-file Burton Samograd
2012-11-19  3:48 ` Eli Zaretskii
2012-11-19  5:01   ` Burton Samograd
2012-11-19 16:16     ` Eli Zaretskii
2012-11-19 18:09       ` Burton Samograd

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