emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Highlighting list item bullets
@ 2018-09-14  9:43 Alex Helfet
  2018-09-18 15:40 ` Grant Rettke
  0 siblings, 1 reply; 2+ messages in thread
From: Alex Helfet @ 2018-09-14  9:43 UTC (permalink / raw)
  To: emacs-orgmode

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

I wanted syntax highlighting for list item bullets (e.g. '-') in my org
mode setup.

I have a very early prototype working and wanted some feedback about
whether you would be interested in this feature upstream, or perhaps
including it in a package would be a better bet.

The code is in a github gist:
https://gist.github.com/fluffysquirrels/1aaec7cab234893bfd46cdad721dda85

The code is rough but very short and readable. I have some test cases
working, with a screenshot of how they look on my machine.

Thanks!

Alex

[-- Attachment #2: Type: text/html, Size: 689 bytes --]

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

* Re: Highlighting list item bullets
  2018-09-14  9:43 Highlighting list item bullets Alex Helfet
@ 2018-09-18 15:40 ` Grant Rettke
  0 siblings, 0 replies; 2+ messages in thread
From: Grant Rettke @ 2018-09-18 15:40 UTC (permalink / raw)
  To: alex.helfet; +Cc: Org-mode

On Tue, Sep 18, 2018 at 8:25 AM Alex Helfet <alex.helfet@googlemail.com> wrote:
> I have a very early prototype working and wanted some feedback about whether you would be interested in this feature upstream, or perhaps
> including it in a package would be a better bet.

That looks great.

There are already more than a few snippets out there to do something
like that that but they all probably do it differently. For example
mine just because I wanted em-dashes

(font-lock-add-keywords
 'org-mode
 '(("^[[:space:]]*\\(-\\) "
    0 (prog1 () (compose-region (match-beginning 1) (match-end 1) "—")))))

So you've got my vote for putting it in a package:

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

end of thread, other threads:[~2018-09-18 15:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-14  9:43 Highlighting list item bullets Alex Helfet
2018-09-18 15:40 ` Grant Rettke

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