emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "Fraga, Eric" <e.fraga@ucl.ac.uk>
To: Diego Zamboni <diego@zzamboni.org>
Cc: Org-mode <emacs-orgmode@gnu.org>,
	Sharon Kimble <boudiccas@skimble.plus.com>
Subject: Re: how to highlight the background of my current paragraph?
Date: Thu, 31 Oct 2019 15:56:05 +0000	[thread overview]
Message-ID: <8736f8sycr.fsf@ucl.ac.uk> (raw)
In-Reply-To: <CAGY83EeKEQ_ZP+UBFs9rB9uOgEVOJ6zq6fRVeTxJtNcV7E9xMQ@mail.gmail.com>	(Diego Zamboni's message of "Thu, 31 Oct 2019 08:52:45 +0100")

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	other threads:[~2019-10-31 15:56 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-31  7:35 how to highlight the background of my current paragraph? Sharon Kimble
2019-10-31  7:52 ` Diego Zamboni
2019-10-31 15:56   ` Fraga, Eric [this message]
2019-10-31 16:03     ` Diego Zamboni
2019-10-31 16:10       ` Diego Zamboni
2019-10-31 16:22         ` Fraga, Eric
2019-10-31 16:43           ` Fraga, Eric
2019-11-01 11:44         ` Sharon Kimble

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8736f8sycr.fsf@ucl.ac.uk \
    --to=e.fraga@ucl.ac.uk \
    --cc=boudiccas@skimble.plus.com \
    --cc=diego@zzamboni.org \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).