emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [Orgmode] Emphasis font-lock question.
@ 2006-09-08  6:59 Alex Bochannek
  2006-09-08 12:27 ` Carsten Dominik
  0 siblings, 1 reply; 5+ messages in thread
From: Alex Bochannek @ 2006-09-08  6:59 UTC (permalink / raw)
  To: emacs-orgmode

I just upgraded to 4.47 after being on 4.12 since March and noticed
that emphasis font locking has changed a bit. I like the way it's been
rewritten, but org-emph-re still doesn't match a typical pattern I
use. For example:

  */usr/local/bin*

Since org-emph-re uses "[^" border markers "]", and the first / is
part of markers, it won't emphasize. For now, I simply removed the
markers from the two character classes, but I thought I should run the
issue by people here.

Comments?

Alex.

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

* Re: [Orgmode] Emphasis font-lock question.
  2006-09-08  6:59 [Orgmode] Emphasis font-lock question Alex Bochannek
@ 2006-09-08 12:27 ` Carsten Dominik
  2006-09-08 17:04   ` Alex Bochannek
  0 siblings, 1 reply; 5+ messages in thread
From: Carsten Dominik @ 2006-09-08 12:27 UTC (permalink / raw)
  To: Alex Bochannek; +Cc: emacs-orgmode


On Sep 8, 2006, at 8:59, Alex Bochannek wrote:

> I just upgraded to 4.47 after being on 4.12 since March and noticed
> that emphasis font locking has changed a bit. I like the way it's been
> rewritten, but org-emph-re still doesn't match a typical pattern I
> use. For example:
>
>   */usr/local/bin*
>
> Since org-emph-re uses "[^" border markers "]", and the first / is
> part of markers, it won't emphasize. For now, I simply removed the
> markers from the two character classes, but I thought I should run the
> issue by people here.

If I remember correctly, these classes are necessary to make emphasis 
work correctly with stacked emphasis, for example */this is italic and 
bold at the same time/*.

I guess I could take them out if stacking is forbidden, in this case 
you example would fontify.

Comments?

- Carsten


>
> Comments?
>
> Alex.
>
>
> _______________________________________________
> Emacs-orgmode mailing list
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>
>

--
Carsten Dominik
Sterrenkundig Instituut "Anton Pannekoek"
Universiteit van Amsterdam
Kruislaan 403
NL-1098SJ Amsterdam
phone: +31 20 525 7477

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

* Re: [Orgmode] Emphasis font-lock question.
  2006-09-08 12:27 ` Carsten Dominik
@ 2006-09-08 17:04   ` Alex Bochannek
  2006-09-08 17:09     ` Ed Hirgelt
  0 siblings, 1 reply; 5+ messages in thread
From: Alex Bochannek @ 2006-09-08 17:04 UTC (permalink / raw)
  To: Carsten Dominik; +Cc: emacs-orgmode

Carsten Dominik <dominik@science.uva.nl> writes:

> If I remember correctly, these classes are necessary to make emphasis
> work correctly with stacked emphasis, for example */this is italic and
> bold at the same time/*.
>
> I guess I could take them out if stacking is forbidden, in this case
> you example would fontify.

It's OK to me if */foo/* means italic and bold (this is how Gnus
rendered your example), but */foo/bar* shouldn't. Markers, stacked or
otherwise, should come in symmetrical pairs.

Alex.

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

* Re: [Orgmode] Emphasis font-lock question.
  2006-09-08 17:04   ` Alex Bochannek
@ 2006-09-08 17:09     ` Ed Hirgelt
  2006-09-08 17:50       ` Alex Bochannek
  0 siblings, 1 reply; 5+ messages in thread
From: Ed Hirgelt @ 2006-09-08 17:09 UTC (permalink / raw)
  To: Alex Bochannek; +Cc: emacs-orgmode


[-- Attachment #1.1: Type: text/plain, Size: 755 bytes --]

On 9/8/06, Alex Bochannek <alexb@juniper.net> wrote:
>
>
> It's OK to me if */foo/* means italic and bold (this is how Gnus
> rendered your example), but */foo/bar* shouldn't. Markers, stacked or
> otherwise, should come in symmetrical pairs.


Nice example because there is a symmetric pair there.  I have always thought
that this was a very ambiguous notation.  I can see */foo/bar* meaning that
foo is in bold italic and bar is just bold with the two words run together.

For this reason (pesky slashes in path names, + as bullet characters,
underscores in names) I've abandoned this notation.  The @<> is more
verbose, but unambiguous.

-=Ed=-
-- 
Ed Hirgelt

Discovery consists of seeing what everybody has seen
and thinking what nobody has thought.

[-- Attachment #1.2: Type: text/html, Size: 1098 bytes --]

[-- Attachment #2: Type: text/plain, Size: 149 bytes --]

_______________________________________________
Emacs-orgmode mailing list
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

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

* Re: [Orgmode] Emphasis font-lock question.
  2006-09-08 17:09     ` Ed Hirgelt
@ 2006-09-08 17:50       ` Alex Bochannek
  0 siblings, 0 replies; 5+ messages in thread
From: Alex Bochannek @ 2006-09-08 17:50 UTC (permalink / raw)
  To: Ed Hirgelt; +Cc: emacs-orgmode

"Ed Hirgelt" <ehirgelt@gmail.com> writes:

> On 9/8/06, Alex Bochannek <alexb@juniper.net> wrote:
>
>
>     It's OK to me if */foo/* means italic and bold (this is how Gnus
>     rendered your example), but */foo/bar* shouldn't. Markers, stacked or
>     otherwise, should come in symmetrical pairs.
>
>
> Nice example because there is a symmetric pair there.  I have always thought
> that this was a very ambiguous notation.  I can see */foo/bar* meaning that foo
> is in bold italic and bar is just bold with the two words run together.

I am perfectly happy to restrict this notation to require identical
marker clusters surrounding the emphasized text. If you want to have
text with different emphasis styles run togeter, the below notation
seems safer.

> For this reason (pesky slashes in path names, + as bullet characters,
> underscores in names) I've abandoned this notation.  The @<> is more verbose,
> but unambiguous.

The less typing the better for me. I used to use enriched-mode and the
sequences did get a bit tedious.

Alex.

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

end of thread, other threads:[~2006-09-08 17:50 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-09-08  6:59 [Orgmode] Emphasis font-lock question Alex Bochannek
2006-09-08 12:27 ` Carsten Dominik
2006-09-08 17:04   ` Alex Bochannek
2006-09-08 17:09     ` Ed Hirgelt
2006-09-08 17:50       ` Alex Bochannek

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.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).