From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Kangas Newsgroups: gmane.emacs.bugs Subject: bug#62988: 30.0.50; Add highlight line-or-region command to pulse.el Date: Tue, 5 Sep 2023 09:24:18 -0700 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="13287"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 62988@debbugs.gnu.org To: Gabriel Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Sep 05 18:25:20 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qdYrg-0003AS-Dc for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 05 Sep 2023 18:25:20 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qdYrQ-0000L2-07; Tue, 05 Sep 2023 12:25:04 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qdYrO-0000Kl-52 for bug-gnu-emacs@gnu.org; Tue, 05 Sep 2023 12:25:02 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qdYrN-0006GX-Sm for bug-gnu-emacs@gnu.org; Tue, 05 Sep 2023 12:25:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qdYrO-0005Rg-D2 for bug-gnu-emacs@gnu.org; Tue, 05 Sep 2023 12:25:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Kangas Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 05 Sep 2023 16:25:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62988 X-GNU-PR-Package: emacs Original-Received: via spool by 62988-submit@debbugs.gnu.org id=B62988.169393107020887 (code B ref 62988); Tue, 05 Sep 2023 16:25:02 +0000 Original-Received: (at 62988) by debbugs.gnu.org; 5 Sep 2023 16:24:30 +0000 Original-Received: from localhost ([127.0.0.1]:58215 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qdYqr-0005Qp-GQ for submit@debbugs.gnu.org; Tue, 05 Sep 2023 12:24:29 -0400 Original-Received: from mail-lf1-x135.google.com ([2a00:1450:4864:20::135]:48194) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qdYqo-0005QZ-45 for 62988@debbugs.gnu.org; Tue, 05 Sep 2023 12:24:28 -0400 Original-Received: by mail-lf1-x135.google.com with SMTP id 2adb3069b0e04-500b0f06136so4763756e87.0 for <62988@debbugs.gnu.org>; Tue, 05 Sep 2023 09:24:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1693931059; x=1694535859; darn=debbugs.gnu.org; h=cc:to:subject:message-id:date:mime-version:references:in-reply-to :from:from:to:cc:subject:date:message-id:reply-to; bh=vWh247LIMAu8v/VduAGScBEwVeAkF9t88twc4o4Kk40=; b=fiGrO3S23pG5PUpzyB3/cwR25Y29iZbY0DSyjvzgRrmVUM8y1sGVA6SBdGp9MGYKs8 OS4YXNX1mlqM1G7TCN7hZqE70RNk1gbIbysOtJL2JI4l1YNP8JFH0HhX/V2sTWt2rkgc av9ARlfIgydRH4XypxN09uSSmWBdm9BUxkliitSk5/YQK2zhLP1q3A+WNX7WX37/Li7F epQqtHlsudJi1Ul79XtmQxo1cxAc3Q4wSp6rgGRWUaZPRwJv5dK3Tv4RK9XNovsXuEmg NaNZj57Zr814jk16Z5flyNXoDrCdER1ZytdaO3y8HvFICFqODh3ADyPqzwQreEcggCgq x50g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693931059; x=1694535859; h=cc:to:subject:message-id:date:mime-version:references:in-reply-to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=vWh247LIMAu8v/VduAGScBEwVeAkF9t88twc4o4Kk40=; b=W0+Vcw6Jl2J9JlDSEvZzkD+6AcyvYtOhNEiTv0jTTawJ1JBr/hFQYvXIWcx/ltVm47 B12Yd1pwMjylda786EM47ucGVzoHkcg3len60cbYOch0wen5dW7RfQbiQQeOTODOIgHk iLVWO9ILw64ZDFdnJgnwzT0blDr0ufSSK9PDJBQJ9iENHAYy+kucms+zxve/kqjjc81A anE0G5kXJy/RUJqEOgXQPgKj6rHQvvyjPWgzlNldOK/EoC/xM421QBxfHpguEIWMfk/a tH8os1mMYoemCJiVKoqJ6R816x0AeWZdQSafW+Yt/kfkrdOM6HSguUZsqFeDBt1iLbhy /2fw== X-Gm-Message-State: AOJu0Yy3/Cdyy3gzXzxQ8SaMqCgyMd19JHzOj15uJ08Tg1SWbUNv/vIi knPt6BfeddeR8khpQCRisGVveG9keY5MWTHp30c= X-Google-Smtp-Source: AGHT+IGt3Or8jWfG3bOzMnCg40OZV2jIJBNt8svWtaAw4LFgicKqgotsXHFgoLfOqznxZXofEgk/iZNtFL6NZrp7CBc= X-Received: by 2002:a05:6512:3454:b0:500:75f1:c22e with SMTP id j20-20020a056512345400b0050075f1c22emr228657lfr.40.1693931058878; Tue, 05 Sep 2023 09:24:18 -0700 (PDT) Original-Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Tue, 5 Sep 2023 09:24:18 -0700 In-Reply-To: (Gabriel's message of "Fri, 21 Apr 2023 03:04:49 -0300") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:269377 Archived-At: Gabriel 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 > "" > #'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 > 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)