emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: how to highlight the background of my current paragraph?


From: Fraga, Eric
Subject: Re: how to highlight the background of my current paragraph?
Date: Thu, 31 Oct 2019 15:56:05 +0000

On Thursday, 31 Oct 2019 at 08:52, Diego Zamboni wrote:
> Since I use =visual-line-mode= as well in my org documents, the effect is
> to highlight the whole current paragraph (which is a single line in the
> file).

In case you find this useful, I found that highlighting the whole
paragraph was too much; I want just the actual "physical" line where
point is highlighted, whether it continues on or not.  I do this:

#+begin_src emacs-lisp
  (defun esf/get-visual-line-range ()
    (let (b e)
      (save-excursion
        (beginning-of-visual-line)
        (setq b (point))
        (end-of-visual-line)
        (setq e (point))
        )
      (cons b e)))
  (setq hl-line-range-function #'esf/get-visual-line-range)
#+end_src

Of course, this is not what the OP wanted so excuse the diversion.

-- 
Eric S Fraga via Emacs 27.0.50, Org release_9.2.6-552-g8c5a78



reply via email to

[Prev in Thread] Current Thread [Next in Thread]