GNU bug report logs -
#62988
30.0.50; Add highlight line-or-region command to pulse.el
Previous Next
To reply to this bug, email your comments to 62988 AT debbugs.gnu.org.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#62988
; Package
emacs
.
(Fri, 21 Apr 2023 06:11:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Gabriel <gabriel376 <at> hotmail.com>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Fri, 21 Apr 2023 06:11:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
severity: wishlist
My suggestion is to add a new command (i.e. an interactive function) to
pulse.el to highlight the current line or region. The basic functions
already exist, but no command is provided. This command is useful, for
example, in videos, demos or pair-programming sessions where the user
wish to highlight the current line or region for the audience.
Although pulse.el is part of CEDET, it provides general-purpose
functions not coupled to CEDET.
Example: apply patch and bind the new command to F1 key
(keymap-set global-map
"<f1>"
#'pulse-momentary-highlight-line-or-region)
============================================================
[0001-Add-command-to-highlight-line-or-region-to-pulse.el.patch (text/x-diff, inline)]
From 30681b98fed3e90a653a741a644c94ee4f89a719 Mon Sep 17 00:00:00 2001
From: Gabriel do Nascimento Ribeiro <gabriel376 <at> hotmail.com>
Date: Fri, 21 Apr 2023 02:51:47 -0300
Subject: [PATCH 1/1] Add command to highlight line or region to pulse.el
* lisp/cedet/pulse.el
(pulse-momentary-highlight-line-or-region): New command.
---
lisp/cedet/pulse.el | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/lisp/cedet/pulse.el b/lisp/cedet/pulse.el
index 37b41fbe8c3..c76668152f7 100644
--- a/lisp/cedet/pulse.el
+++ b/lisp/cedet/pulse.el
@@ -215,6 +215,14 @@ pulse-momentary-highlight-region
(overlay-put o 'pulse-delete t)
(pulse-momentary-highlight-overlay o face)))
+;;;###autoload
+(defun pulse-momentary-highlight-line-or-region ()
+ "Highlight current region, when active, or current line, otherwise."
+ (interactive)
+ (if (use-region-p)
+ (pulse-momentary-highlight-region (region-beginning) (region-end))
+ (pulse-momentary-highlight-one-line)))
+
;;; Random integration with other tools
(defvar pulse-command-advice-flag nil)
--
2.34.1
[Message part 3 (text/plain, inline)]
============================================================
---
Gabriel
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#62988
; Package
emacs
.
(Tue, 05 Sep 2023 16:25:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 62988 <at> debbugs.gnu.org (full text, mbox):
Gabriel <gabriel376 <at> hotmail.com> writes:
> My suggestion is to add a new command (i.e. an interactive function) to
> pulse.el to highlight the current line or region. The basic functions
> already exist, but no command is provided. This command is useful, for
> example, in videos, demos or pair-programming sessions where the user
> wish to highlight the current line or region for the audience.
>
> Although pulse.el is part of CEDET, it provides general-purpose
> functions not coupled to CEDET.
Indeed. I guess this is only in the lisp/cedet for hysterical raisins.
> Example: apply patch and bind the new command to F1 key
>
> (keymap-set global-map
> "<f1>"
> #'pulse-momentary-highlight-line-or-region)
Your patch and the feature makes sense to me, and I guess some users
might want it. I think it should be called out in NEWS, and then it can
go in.
> ============================================================
>
>>From 30681b98fed3e90a653a741a644c94ee4f89a719 Mon Sep 17 00:00:00 2001
> From: Gabriel do Nascimento Ribeiro <gabriel376 <at> hotmail.com>
> Date: Fri, 21 Apr 2023 02:51:47 -0300
> Subject: [PATCH 1/1] Add command to highlight line or region to pulse.el
>
> * lisp/cedet/pulse.el
> (pulse-momentary-highlight-line-or-region): New command.
> ---
> lisp/cedet/pulse.el | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> diff --git a/lisp/cedet/pulse.el b/lisp/cedet/pulse.el
> index 37b41fbe8c3..c76668152f7 100644
> --- a/lisp/cedet/pulse.el
> +++ b/lisp/cedet/pulse.el
> @@ -215,6 +215,14 @@ pulse-momentary-highlight-region
> (overlay-put o 'pulse-delete t)
> (pulse-momentary-highlight-overlay o face)))
>
> +;;;###autoload
> +(defun pulse-momentary-highlight-line-or-region ()
> + "Highlight current region, when active, or current line, otherwise."
> + (interactive)
> + (if (use-region-p)
> + (pulse-momentary-highlight-region (region-beginning) (region-end))
> + (pulse-momentary-highlight-one-line)))
> +
> ;;; Random integration with other tools
>
> (defvar pulse-command-advice-flag nil)
This bug report was last modified 1 year and 287 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.