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: How to set background-color without damaging cut&paste ? Date: Wed, 4 Sep 2024 01:28:08 +0200 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="32454"; mail-complaints-to="usenet@ciao.gmane.io" To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Wed Sep 04 01:37:23 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 1sld5P-0008Kh-US for geh-help-gnu-emacs@m.gmane-mx.org; Wed, 04 Sep 2024 01:37:23 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sld4j-0002mj-H9; Tue, 03 Sep 2024 19:36:41 -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 1sld4h-0002mM-R1 for help-gnu-emacs@gnu.org; Tue, 03 Sep 2024 19:36:39 -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 1sld4f-00041C-M1 for help-gnu-emacs@gnu.org; Tue, 03 Sep 2024 19:36:39 -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 483Na7Xp001193 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO) for ; Wed, 4 Sep 2024 01:36:08 +0200 (CEST) (envelope-from pmc@citylink.dinoex.sub.org) ARC-Seal: i=1; a=rsa-sha256; d=uucp.dinoex.org; s=M20221114; t=1725406570; cv=none; b=QSZS9od0b5Th/8OzpF6fLAI+ydNEe/+yuCOAu7I/yBi0lD3u1gSxYul5OIuTiqgxtjpLftOnHKi5IREnHwbyYVkaWruMgbCowRDEB2p6DORanV67mL++lww3jKwOzHsYy4vo/YXLO63T0msHJkW32R6lgf/2Yp36Z/DSBYyJMAQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=uucp.dinoex.org; s=M20221114; t=1725406570; c=relaxed/simple; bh=0JypD70QQpfQ7d4PxfAC/jTmqFVmSjVZFlUxejnos7Q=; h=Received:Received:Received:Received:X-Authentication-Warning:Date: From:To:Subject:Message-ID:MIME-Version:Content-Type: Content-Disposition:X-Milter:X-Greylist; b=Vr5WwDu6K/A5jG8gIhUQcM8lYDNZZAo8At4hUuQevIFnt5bE/T/pJTC7rLe5bjUyjDlG5tkMPqMPBT4J+dz0eZuT+YxPYaJPdN+WWbsU3ZlPG6SQfxQ3H1NegxgoCbMgdpRSNeYtt+CFKb4+uv9wKMtb+STN74ijMrzVrWk2bIA= ARC-Authentication-Results: i=1; uucp.dinoex.org X-MDaemon-Deliver-To: Original-Received: (from uucp@localhost) by uucp.dinoex.org (8.18.1/8.18.1/Submit) with UUCP id 483Na7qj001192 for help-gnu-emacs@gnu.org; Wed, 4 Sep 2024 01: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 483NUYBE046387 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=OK) for ; Wed, 4 Sep 2024 01:30:34 +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 483NS8RK033155 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO) for ; Wed, 4 Sep 2024 01:28:08 +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 483NS8IU033154 for help-gnu-emacs@gnu.org; Wed, 4 Sep 2024 01:28:08 +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 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 01:36:10 +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:147894 Archived-At: Hi, I'm using xterm. I want to set the background to paperwhite. I tried this, but it makes cut&paste unuseable: (unless (display-graphic-p) (if (string-equal (getenv "TERM") "xterm-256color") (add-to-list 'default-frame-alist '(background-color . "brightwhite")) (add-to-list 'default-frame-alist '(background-color . "white"))) ) Then, given a file with this content: First Line Second Line Without the color setting, I can move the mouse over the first line, click thrice and hold to the second line; then middle-click into a hexdumper gives this: 00000000 46 69 72 73 74 20 4c 69 6e 65 0a 53 65 63 6f 6e |First Line.Secon| 00000010 64 20 4c 69 6e 65 0a |d Line.| However, after setting the background-color, the result is this: 00000000 46 69 72 73 74 20 4c 69 6e 65 20 20 20 20 20 20 |First Line | 00000010 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00000020 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00000030 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00000040 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00000050 0a 53 65 63 6f 6e 64 20 4c 69 6e 65 20 20 20 20 |.Second Line | 00000060 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00000070 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00000080 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00000090 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 000000a0 20 0a | .| It basically fills the remainder from eol to the window-border with spaces. Is there an other means to set the color? I could send an ansi sequence in advance, but then how do I get the original color back later? emacs is 29.4,3, compiled with ACL : off GNUTLS : off JSON : off KQUEUE : off MAILUTILS : off MODULES : on NATIVECOMP : off SOURCES : off SQLITE3 : off THREADS : off TREESITTER : on XML : off