From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Fraga, Eric" Subject: Re: how to highlight the background of my current paragraph? Date: Thu, 31 Oct 2019 15:56:05 +0000 Message-ID: <8736f8sycr.fsf@ucl.ac.uk> References: <87lft1tljb.fsf@skimble.plus.com> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:33317) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iQCny-00041j-Jj for emacs-orgmode@gnu.org; Thu, 31 Oct 2019 11:56:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iQCnx-0004N5-FD for emacs-orgmode@gnu.org; Thu, 31 Oct 2019 11:56:10 -0400 Received: from mail-eopbgr60126.outbound.protection.outlook.com ([40.107.6.126]:59269 helo=EUR04-DB3-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iQCnx-0004Kd-45 for emacs-orgmode@gnu.org; Thu, 31 Oct 2019 11:56:09 -0400 In-Reply-To: (Diego Zamboni's message of "Thu, 31 Oct 2019 08:52:45 +0100") Content-Language: en-US List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: Diego Zamboni Cc: Org-mode , Sharon Kimble On Thursday, 31 Oct 2019 at 08:52, Diego Zamboni wrote: > Since I use =3Dvisual-line-mode=3D as well in my org documents, the effec= t 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. --=20 Eric S Fraga via Emacs 27.0.50, Org release_9.2.6-552-g8c5a78