From: Peter <pmc@citylink.dinoex.sub.org>
To: Yuri Khan <yuri.v.khan@gmail.com>
Cc: help-gnu-emacs@gnu.org
Subject: Re: How to set background-color without damaging cut&paste ?
Date: Wed, 4 Sep 2024 16:33:20 +0200 [thread overview]
Message-ID: <ZthvsNygZURQdcd6@disp.intra.daemon.contact> (raw)
In-Reply-To: <CAP_d_8VNSfE-Ltd6x7_jF4FU1gUF9kMqLQsmZb=KPv+QzZDT6w@mail.gmail.com>
On Wed, Sep 04, 2024 at 07:41:02PM +0700, Yuri Khan wrote:
! You’re getting the default mouse selection handling by your terminal
! 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 <line is filled with spaces>
* <line is filled with spaces>
*/ <line is correctly terminated!>
main() <line is correctly terminated!>
{ <line is correctly terminated!>
} <line is correctly terminated!>
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.
next prev parent reply other threads:[~2024-09-04 14:33 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-03 23:28 How to set background-color without damaging cut&paste ? Peter
2024-09-04 11:40 ` Eli Zaretskii
2024-09-04 12:41 ` Yuri Khan
2024-09-04 13:51 ` Peter
2024-09-04 14:33 ` Peter [this message]
2024-09-04 14:43 ` Eli Zaretskii
2024-09-09 13:24 ` Stefan Monnier via Users list for the GNU Emacs text editor
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=ZthvsNygZURQdcd6@disp.intra.daemon.contact \
--to=pmc@citylink.dinoex.sub.org \
--cc=help-gnu-emacs@gnu.org \
--cc=yuri.v.khan@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.