unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#21716: 25.0.50; highlight-regexp gets confused when the highlighted text is pasted
@ 2015-10-20  6:13 Dima Kogan
  2015-10-20 15:22 ` Eli Zaretskii
  2021-05-26 22:29 ` Lars Ingebrigtsen
  0 siblings, 2 replies; 4+ messages in thread
From: Dima Kogan @ 2015-10-20  6:13 UTC (permalink / raw)
  To: 21716

Hi. I'm running a recent build of emacs: 

  https://github.com/emacs-mirror/emacs/commit/ce402dd

and I'm observing highlight-regexp get confused some times. Recipe:

1. emacs -Q

2. open or type a tiny .c source file such as:
=====================
int main(void)
{

}
=====================

3. mark 'main' and M-w

4. highlight 'main': M-s h r main, accept default face

5. yank on the empty line between {}. I expect the yanked text 'main' to
be highlighted. Instead I sometimes see "mai" being highlighted but not
the "n"; at other times I see nothing highlighted, but "mai" being
rendered with a different face than the "n". In any case, it's never
highlighted correctly.





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#21716: 25.0.50; highlight-regexp gets confused when the highlighted text is pasted
  2015-10-20  6:13 bug#21716: 25.0.50; highlight-regexp gets confused when the highlighted text is pasted Dima Kogan
@ 2015-10-20 15:22 ` Eli Zaretskii
  2021-05-26 22:29 ` Lars Ingebrigtsen
  1 sibling, 0 replies; 4+ messages in thread
From: Eli Zaretskii @ 2015-10-20 15:22 UTC (permalink / raw)
  To: Dima Kogan; +Cc: 21716

> From: Dima Kogan <dima@secretsauce.net>
> Date: Mon, 19 Oct 2015 23:13:19 -0700
> 
> 1. emacs -Q
> 
> 2. open or type a tiny .c source file such as:
> =====================
> int main(void)
> {
> 
> }
> =====================
> 
> 3. mark 'main' and M-w
> 
> 4. highlight 'main': M-s h r main, accept default face
> 
> 5. yank on the empty line between {}. I expect the yanked text 'main' to
> be highlighted. Instead I sometimes see "mai" being highlighted but not
> the "n"; at other times I see nothing highlighted, but "mai" being
> rendered with a different face than the "n". In any case, it's never
> highlighted correctly.

What I see here is that the moment 'main' becomes a complete C symbol,
like if I type a ';' or a '(' after yanking it, "main" becomes
highlighted exactly as expected.  So maybe this is a feature?

I do see that Emacs 24.5 highlighted "main" as soon as it was yanked,
so this is at least a change in behavior.





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#21716: 25.0.50; highlight-regexp gets confused when the highlighted text is pasted
  2015-10-20  6:13 bug#21716: 25.0.50; highlight-regexp gets confused when the highlighted text is pasted Dima Kogan
  2015-10-20 15:22 ` Eli Zaretskii
@ 2021-05-26 22:29 ` Lars Ingebrigtsen
  2021-05-26 23:02   ` Dima Kogan
  1 sibling, 1 reply; 4+ messages in thread
From: Lars Ingebrigtsen @ 2021-05-26 22:29 UTC (permalink / raw)
  To: Dima Kogan; +Cc: 21716

[-- Attachment #1: Type: text/plain, Size: 641 bytes --]

Dima Kogan <dima@secretsauce.net> writes:

> 2. open or type a tiny .c source file such as:
> =====================
> int main(void)
> {
>
> }
> =====================
>
> 3. mark 'main' and M-w
>
> 4. highlight 'main': M-s h r main, accept default face
>
> 5. yank on the empty line between {}. I expect the yanked text 'main' to
> be highlighted. Instead I sometimes see "mai" being highlighted but not
> the "n"; at other times I see nothing highlighted, but "mai" being
> rendered with a different face than the "n". In any case, it's never
> highlighted correctly.

I've tried the recipe in Emacs 28, and this seems to work better now:


[-- Attachment #2: Type: image/png, Size: 8689 bytes --]

[-- Attachment #3: Type: text/plain, Size: 328 bytes --]


So I'm going to go ahead and guess that this has been fixed in the five
years since this was reported, and I'm closing this bug report.  If you
can still see the bug, please respond to the debbugs address and we'll
reopen.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no

^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#21716: 25.0.50; highlight-regexp gets confused when the highlighted text is pasted
  2021-05-26 22:29 ` Lars Ingebrigtsen
@ 2021-05-26 23:02   ` Dima Kogan
  0 siblings, 0 replies; 4+ messages in thread
From: Dima Kogan @ 2021-05-26 23:02 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: 21716

Yeah, it appears to work now. Thanks much for going through the old
reports.





^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-05-26 23:02 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-10-20  6:13 bug#21716: 25.0.50; highlight-regexp gets confused when the highlighted text is pasted Dima Kogan
2015-10-20 15:22 ` Eli Zaretskii
2021-05-26 22:29 ` Lars Ingebrigtsen
2021-05-26 23:02   ` Dima Kogan

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).