From: Eli Zaretskii <eliz@gnu.org>
To: Giorgos Keramidas <keramida@ceid.upatras.gr>
Cc: cyd@stupidchicken.com, emacs-devel@gnu.org
Subject: Re: trunk is trying to access X windows selection in -nw mode
Date: Tue, 31 Aug 2010 04:29:00 -0400 [thread overview]
Message-ID: <E1OqMDE-0006Aw-6C@fencepost.gnu.org> (raw)
In-Reply-To: <871v9fqmhq.fsf@kobe.laptop> (message from Giorgos Keramidas on Tue, 31 Aug 2010 10:17:53 +0300)
> From: Giorgos Keramidas <keramida@ceid.upatras.gr>
> Date: Tue, 31 Aug 2010 10:17:53 +0300
> Cc: emacs-devel@gnu.org
>
> On Mon, 30 Aug 2010 19:10:24 -0400, Chong Yidong <cyd@stupidchicken.com> wrote:
> > Giorgos Keramidas <keramida@ceid.upatras.gr> writes:
> >
> >> When running in 'emacs -nw' mode, the latest builds of trunk on my
> >> laptop display an error in the modeline:
> >>
> >> X windows are not in use or not initialized
> >
> > Could you try to figure out what code is emitting this error? Run Emacs
> > in gdb with checkpoints on `error'.
>
> The stack trace is:
>
> (gdb) bt
> #0 error (m=0x81f8cd0 "X windows are not in use or not initialized") at eval.c:2035
> #1 0x080ee3fd in check_x () at xfns.c:220
> #2 0x080fac47 in Fx_own_selection_internal (selection_name=138393082, selection_value=145865153) at xselect.c:2075
> #3 0x0818e388 in Ffuncall (nargs=3, args=0xbfbfe120) at eval.c:2993
> #4 0x081c36c9 in Fbyte_code (bytestr=137023001, vector=137023021,
> maxdepth=Variable "maxdepth" is not available.
> ) at bytecode.c:679
> #5 0x0818ddf4 in funcall_lambda (fun=137022965, nargs=2, arg_vector=0xbfbfe260) at eval.c:3174
> #6 0x0818e10f in Ffuncall (nargs=3, args=0xbfbfe25c) at eval.c:3047
> #7 0x0818e5db in call2 (fn=138393058, arg1=138393082, arg2=145865153) at eval.c:2804
> #8 0x08133484 in command_loop_1 () at keyboard.c:1814
The culprit is the code below in keyboard.c, it should never call
x-set-selection if the frame returns nil from display-selections-p
(this could be replaced with a test of the frame kind).
else
{
/* Even if not deactivating the mark, set PRIMARY if
`select-active-regions' is non-nil. */
if ((EQ (Vselect_active_regions, Qonly)
? EQ (CAR_SAFE (Vtransient_mark_mode), Qonly)
: (!NILP (Vselect_active_regions)
&& !NILP (Vtransient_mark_mode)))
&& !EQ (Vthis_command, Qhandle_switch_frame))
{
int beg = XINT (Fmarker_position (current_buffer->mark));
int end = XINT (make_number (PT));
if (beg < end)
call2 (Qx_set_selection, QPRIMARY,
make_buffer_string (beg, end, 0));
next prev parent reply other threads:[~2010-08-31 8:29 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-30 18:33 trunk is trying to access X windows selection in -nw mode Giorgos Keramidas
2010-08-30 23:10 ` Chong Yidong
2010-08-31 7:17 ` Giorgos Keramidas
2010-08-31 8:29 ` Eli Zaretskii [this message]
2010-08-31 16:02 ` Chong Yidong
2010-08-31 17:40 ` Giorgos Keramidas
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=E1OqMDE-0006Aw-6C@fencepost.gnu.org \
--to=eliz@gnu.org \
--cc=cyd@stupidchicken.com \
--cc=emacs-devel@gnu.org \
--cc=keramida@ceid.upatras.gr \
/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 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).