all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: joakim@verona.se
To: Eli Zaretskii <eliz@gnu.org>
Cc: shanemhansen@gmail.com, 24041@debbugs.gnu.org
Subject: bug#24041: 25.1.50; xwidget + -nw mode gives segfault
Date: Mon, 22 Aug 2016 21:52:58 +0200	[thread overview]
Message-ID: <m3twecfun9.fsf@exodia.verona.se> (raw)
In-Reply-To: <83vaysfxk8.fsf@gnu.org> (Eli Zaretskii's message of "Mon, 22 Aug 2016 21:49:59 +0300")

Eli Zaretskii <eliz@gnu.org> writes:

>> From: Robert Cochran <robert-emacs@cochranmail.com>
>> Cc: Robert Cochran <robert-emacs@cochranmail.com>,  shanemhansen@gmail.com,  24041@debbugs.gnu.org
>> Date: Mon, 22 Aug 2016 11:30:15 -0700
>> 
>> > My only comment is that you could call check_x_display_info with Qnil
>> > as its argument.
>> 
>> I did think about that. But then it arguably does the wrong thing:
>> `check_x_display_info` with `Qnil` only signals an error when there have
>> never been X windows, eg, opening and closing an X window satisfies the
>> check from then on. It no longer crashes in that instance, but I
>> personally don't think that's the right behavior; if my starting frame
>> isn't capable of displaying an xwidget, say so! Hence checking with the
>> current frame.
>
> Joakim, is it certain that the xwidget will always be shown in the
> frame that is the selected one at the time make-xwidget is called?

make-xwidget doesnt actualy show the widget.

There is code like this in xwidget-insert:
    (put-text-property (point) (+ 1 (point))
                       'display (list 'xwidget ':xwidget id))


>
>> Thanks for your reassurance! My one gripe about this patch is that I
>> didn't figure out how to kill the buffer after xwidget creation failure
>> (leaving it seems rather ugly IMO), but I just now realized what I can
>> do. As long as it's not considered wrong to kill a mode's buffer on
>> error, would you also consider this patch to go along with it?
>
> I'm not sure if this is TRT.  I'd rather erase-buffer at the beginning
> of xwidget-webkit-new-session, and leave the buffer alone if we signal
> an error.  The buffer might have contents that the user will hate
> losing, for diagnostic purposes if nothing else.
>
> Joakim, WDYT?

I tried to model the code originaly after what the various emacs image
modes did, mostly along the principle of least surprise. I think emacs
normally works like Eli describes above, so I'd go with that yes.



-- 
Joakim Verona





  reply	other threads:[~2016-08-22 19:52 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-20 16:04 bug#24041: 25.1.50; xwidget + -nw mode gives segfault Shane Hansen
2016-08-19 18:36 ` Robert Cochran
2016-08-20  7:32   ` Eli Zaretskii
2016-08-20 21:33     ` Robert Cochran
2016-08-21  2:40       ` Eli Zaretskii
2016-08-22  2:12         ` Robert Cochran
2016-08-22 14:41           ` Eli Zaretskii
2016-08-22 18:30             ` Robert Cochran
2016-08-22 18:49               ` Eli Zaretskii
2016-08-22 19:52                 ` joakim [this message]
2016-08-22 20:28                   ` Robert Cochran
2016-08-23  2:40                     ` Eli Zaretskii
2019-08-28 20:04 ` Lars Ingebrigtsen
2019-08-29 11:00   ` Robert Pluim

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m3twecfun9.fsf@exodia.verona.se \
    --to=joakim@verona.se \
    --cc=24041@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=shanemhansen@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.