From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Peter Newsgroups: gmane.emacs.help Subject: Re: How to set background-color without damaging cut&paste ? Date: Wed, 4 Sep 2024 16:33:20 +0200 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="32719"; mail-complaints-to="usenet@ciao.gmane.io" Cc: help-gnu-emacs@gnu.org To: Yuri Khan Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Wed Sep 04 16:37:11 2024 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1slr8A-0008PU-Mh for geh-help-gnu-emacs@m.gmane-mx.org; Wed, 04 Sep 2024 16:37:10 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1slr7o-000217-Q5; Wed, 04 Sep 2024 10:36:48 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1slr7d-0001BL-OQ for help-gnu-emacs@gnu.org; Wed, 04 Sep 2024 10:36:38 -0400 Original-Received: from uucp.dinoex.org ([2a0b:f840::12]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1slr7b-0005DG-MQ for help-gnu-emacs@gnu.org; Wed, 04 Sep 2024 10:36:37 -0400 Original-Received: from uucp.dinoex.org (uucp.dinoex.org [IPv6:2a0b:f840:0:0:0:0:0:12]) by uucp.dinoex.org (8.18.1/8.18.1) with ESMTPS id 484Ea7xi072583 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Wed, 4 Sep 2024 16:36:07 +0200 (CEST) (envelope-from pmc@citylink.dinoex.sub.org) ARC-Seal: i=1; a=rsa-sha256; d=uucp.dinoex.org; s=M20221114; t=1725460569; cv=none; b=Fd4B91fwApjVnkQ4MrAGwwraFEZU/D3PfXZOyJScecJq/b2g3bOVwexiQYxXvNgtvV7dFiDUjFLi1Fw0hc8k74dFptlvbB0Bxj3+sid/kMz4sB+qdK3aZCJsezJKIEvHVegU2iLs+sKwMUIOsmh5+kOQSj4wL7IBW0tuFPiYLgk= ARC-Message-Signature: i=1; a=rsa-sha256; d=uucp.dinoex.org; s=M20221114; t=1725460569; c=relaxed/simple; bh=SDXvgsfEoXANsESYX06y1h8yolRak7wEuU0r7N84RE4=; h=Received:Received:Received:Received:X-Authentication-Warning:Date: From:To:Cc:Subject:Message-ID:References:MIME-Version:Content-Type: Content-Disposition:Content-Transfer-Encoding:In-Reply-To:X-Milter: X-Greylist; b=cUkYbZcPzVG3Mbqo9imrDTe5384xf5iTXfkFrCbLXsyywpQC6MnCSIZlr+p0qSTNWYoPmsbhTStLG4J7T33Phqbhlsx1gJpUMFsBxU6TuUceAaJTq/6rc7HGmVPiuoSRSNCjA+P4j7NLzX2+RIdqEb6WXhZvUxE2M3JR4hIe9iI= ARC-Authentication-Results: i=1; uucp.dinoex.org Original-Received: (from uucp@localhost) by uucp.dinoex.org (8.18.1/8.18.1/Submit) with UUCP id 484Ea7hl072582; Wed, 4 Sep 2024 16:36:07 +0200 (CEST) (envelope-from pmc@citylink.dinoex.sub.org) Original-Received: from disp.intra.daemon.contact (disp-e.intra.daemon.contact [IPv6:fd00:0:0:0:0:0:0:112]) by admn.intra.daemon.contact (8.18.1/8.18.1) with ESMTPS id 484EXZuw018944 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=OK); Wed, 4 Sep 2024 16:33:36 +0200 (CEST) (envelope-from pmc@citylink.dinoex.sub.org) Original-Received: from disp.intra.daemon.contact (localhost [127.0.0.1]) by disp.intra.daemon.contact (8.18.1/8.18.1) with ESMTPS id 484EXKTC040164 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Wed, 4 Sep 2024 16:33:20 +0200 (CEST) (envelope-from pmc@citylink.dinoex.sub.org) Original-Received: (from pmc@localhost) by disp.intra.daemon.contact (8.18.1/8.18.1/Submit) id 484EXKTb040163; Wed, 4 Sep 2024 16:33:20 +0200 (CEST) (envelope-from pmc@citylink.dinoex.sub.org) X-Authentication-Warning: disp.intra.daemon.contact: pmc set sender to pmc@citylink.dinoex.sub.org using -f Content-Disposition: inline In-Reply-To: X-Milter: Spamilter (Reciever: uucp.dinoex.org; Sender-ip: 0:0:2a0b:f840::; Sender-helo: uucp.dinoex.org; ) X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (uucp.dinoex.org [IPv6:2a0b:f840:0:0:0:0:0:12]); Wed, 04 Sep 2024 16:36:09 +0200 (CEST) Received-SPF: pass client-ip=2a0b:f840::12; envelope-from=pmc@citylink.dinoex.sub.org; helo=uucp.dinoex.org X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.help:147904 Archived-At: On Wed, Sep 04, 2024 at 07:41:02PM +0700, Yuri Khan wrote: ! You=E2=80=99re getting the default mouse selection handling by your termi= nal ! emulator, which is not guaranteed to be correct for full-screen ! applications. I think I figured it out a bit further. Syntax higlighting in C: /* bla bla * =20 */ main() { } So what is the difference with the first two lines? They are comments - and comments do not end until end-of-line! The third line is different, it is also a comment, but it ends - and therefore it is copied correctly! Somebody inside emacs did not bother to tell the curses library where these comments do actually end. Because it seems irrelevant, as anything subsequent on these lines will still be a comment. The curses library, however, is a honest servant and tells the very same to the X cutbuffer: this line doesn't end. And the cutbuffer then does what it is supposed to do: collect all the trailing spaces and add them to the line. I might assume something similar is done with the background-color setting: just not telling curses that (and where!) this line has an end. So, for now I refrain from setting background-color, and also set (global-font-lock-mode 0) which, I assume, should disable the entire color magic and get us back to the good old times of monochrome screens. But I would greatly appreciate if we could get this fixed.