Gnus development mailing list
 help / color / mirror / Atom feed
* Too much emphasis matching on some filenames
@ 1999-10-06 21:26 Kevin the Bandicoot
  1999-10-06 22:02 ` Karl Kleinpaste
  0 siblings, 1 reply; 4+ messages in thread
From: Kevin the Bandicoot @ 1999-10-06 21:26 UTC (permalink / raw)


I'm only a recent convert to gnus, tell me to pipe down if I'm saying
something dumb.

I'm running pgnus 0.96 and I noticed article viewing doing a bit too
much emphasis matching on a filename in a message.

     Blah blah /usr/bin/foo blah blah /proc/<pid>/fd blah blah.

The first filename is ok, but the second one gets the "proc" part
shown as italics.  (C-u g or whatever to see raw what I'm writing.)
I think it's because gnus-emphasis-alist allows an open bracket to
match after /proc/, and "<" is an open bracket in the syntax table.

I don't think /emphasis/ in normal text would have an open bracket
immediately after, nor a close bracket immediately before, I think
there'd be white space in between.  Is there a reason the regexps are
setup the way they are?

I also thought the matching could be tightened by requiring whitespace
after a trailing punctuation -?!.,;:"  That would keep it away from
/root/.profile and *foo*.el and the like.  Allowing multiple "!"s,
"?"s or "."s would be good, so /italics/!!! would work.

-- 
"Wait a minute, this sounds like rock and/or roll."  -- Rev. Lovejoy


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

* Re: Too much emphasis matching on some filenames
  1999-10-06 21:26 Too much emphasis matching on some filenames Kevin the Bandicoot
@ 1999-10-06 22:02 ` Karl Kleinpaste
  1999-10-06 23:13   ` Kevin the Bandicoot
  0 siblings, 1 reply; 4+ messages in thread
From: Karl Kleinpaste @ 1999-10-06 22:02 UTC (permalink / raw)


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

Kevin the Bandicoot <user42@zip.com.au> writes:
> Is there a reason the regexps are setup the way they are?

Yes: Because they're bloody painful to work on, and they've gotten as
far as they have through raw intellectual sweat, almost all Lars'.

This came up a month or more ago, and then Lars commented on it thus,
when he came up for air a couple weeks back:


[-- Attachment #2: Type: message/rfc822, Size: 2930 bytes --]

From: Lars Magne Ingebrigtsen <larsi@gnus.org>
To: ding@gnus.org
Subject: Re: Underlines -- WIBNI
Date: 24 Sep 1999 21:08:53 +0200
Message-ID: <m3d7v8160q.fsf@quimbies.gnus.org>

Karl Kleinpaste <karl@justresearch.com> writes:

> There appear to be inconsistent conditions (regexps need work?) in
> which emphasis is carried out.

The regexp needing work is this:

"\\(\\s-\\|^\\|[-\"]\\|\\s(\\|\\s)\\)\\(%s\\(\\w+\\(\\s-+\\w+\\)*[.,]?\\)%s\\)\\(\\s-\\|[-?!.,;:\"]\\|\\s(\\|\\s)\\)"

And just looking at it makes me want to look at something else.  Which 
I think I will do.

But if anybody want to fix this, please do.

-- 
(domestic pets only, the antidote for overdose, milk.)
  larsi@gnus.org * Lars Magne Ingebrigtsen

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

* Re: Too much emphasis matching on some filenames
  1999-10-06 22:02 ` Karl Kleinpaste
@ 1999-10-06 23:13   ` Kevin the Bandicoot
  1999-11-06 18:18     ` Lars Magne Ingebrigtsen
  0 siblings, 1 reply; 4+ messages in thread
From: Kevin the Bandicoot @ 1999-10-06 23:13 UTC (permalink / raw)


Kevin the Bandicoot <user42@zip.com.au> writes:
> Is there a reason the regexps are setup the way they are?

Karl Kleinpaste <karl@justresearch.com> writes:
> Yes: Because they're bloody painful to work on, and they've gotten as
> far as they have through raw intellectual sweat, almost all Lars'.
>
> This came up a month or more ago, and then Lars commented on it thus,
> when he came up for air a couple weeks back:
>
> ...

Thanks.  Here is a string with my suggestions.

"\\(\\s-\\|^\\|[-\"]\\|\\s(\\)\\(%s\\(\\w+\\(\\s-+\\w+\\)*[.,]?\\)%s\\)\\(\\s-\\|[-,;:\"]\\s-\\|[?!.]+\\s-\\|\\s)\\)"

I think the one for underlining is good as it stands.

Nearby though I think there's a typo in the docstring for
gnus-emphasis-underline-italic, it shows an underlined bold as an
example.

-- 
No ma'am, we're musicians.


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

* Re: Too much emphasis matching on some filenames
  1999-10-06 23:13   ` Kevin the Bandicoot
@ 1999-11-06 18:18     ` Lars Magne Ingebrigtsen
  0 siblings, 0 replies; 4+ messages in thread
From: Lars Magne Ingebrigtsen @ 1999-11-06 18:18 UTC (permalink / raw)


Kevin the Bandicoot <user42@zip.com.au> writes:

> Thanks.  Here is a string with my suggestions.
> 
> "\\(\\s-\\|^\\|[-\"]\\|\\s(\\)\\(%s\\(\\w+\\(\\s-+\\w+\\)*[.,]?\\)%s\\)\\(\\s-\\|[-,;:\"]\\s-\\|[?!.]+\\s-\\|\\s)\\)"

Thanks for the fix; I've applied it to Pterodactyl Gnus v0.98.1.

-- 
(domestic pets only, the antidote for overdose, milk.)
   larsi@gnus.org * Lars Magne Ingebrigtsen


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

end of thread, other threads:[~1999-11-06 18:18 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-10-06 21:26 Too much emphasis matching on some filenames Kevin the Bandicoot
1999-10-06 22:02 ` Karl Kleinpaste
1999-10-06 23:13   ` Kevin the Bandicoot
1999-11-06 18:18     ` Lars Magne Ingebrigtsen

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 NNTP newsgroup(s).