~protesilaos/pulsar

3 2

Pulse when something in pulsar-pulse-functions is called by another function

Details
Message ID
<ypi9y1ob5z62.fsf@gmail.com>
DKIM signature
missing
Download raw message
Hi Prot,
I currently have to explicitly add evil-window-next and evil-window-prev
to pulsar-pulse-functions to make them pulse, even though they
internally use other-window which is in pulsar-pulse-functions. 

Can you make it so that I don't have to do this? There are many such
evil functions so adding them manually is not ideal

Thanks,
Chinmay
Details
Message ID
<87a60q5hq9.fsf@protesilaos.com>
In-Reply-To
<ypi9y1ob5z62.fsf@gmail.com> (view parent)
DKIM signature
missing
Download raw message
> From: Chinmay Dalal <dalal.chinmay.0101@gmail.com>
> Date: Sun,  5 Mar 2023 14:50:14 +0530
>
> Hi Prot,

Hello Chinmay

> I currently have to explicitly add evil-window-next and evil-window-prev
> to pulsar-pulse-functions to make them pulse, even though they
> internally use other-window which is in pulsar-pulse-functions. 
>
> Can you make it so that I don't have to do this? There are many such
> evil functions so adding them manually is not ideal

Can you share the definition of those commands?  We need to see how they
call 'other-window' internally.  Maybe they are doing something else as
well.

All the best,
Prot

-- 
Protesilaos Stavrou
https://protesilaos.com
Details
Message ID
<ypi97cvsyc0e.fsf@gmail.com>
In-Reply-To
<87a60q5hq9.fsf@protesilaos.com> (view parent)
DKIM signature
missing
Download raw message
Protesilaos Stavrou <info@protesilaos.com> writes:

> Can you share the definition of those commands?  We need to see how they
> call 'other-window' internally.  Maybe they are doing something else as
> well.

;; Defined in ~/.local/state/emacs/elpaca/builds/evil/evil-commands.el
(evil-define-command evil-window-next (count)
  "Move the cursor to the next window in the cyclic order.
With COUNT go to the count-th window in the order starting from
top-left."
  :repeat nil
  (interactive "<c>")
  (if (not count)
      (other-window +1)
    (evil-window-top-left)
    (other-window (1- (min count (length (window-list)))))))


;; Defined in ~/.local/state/emacs/elpaca/builds/evil/evil-commands.el
(evil-define-command evil-window-prev (count)
  "Move the cursor to the previous window in the cyclic order.
With COUNT go to the count-th window in the order starting from
top-left."
  :repeat nil
  (interactive "<c>")
  (if (not count)
      (other-window -1)
    (evil-window-top-left)
    (other-window (1- (min count (length (window-list)))))))

https://github.com/emacs-evil/evil/blob/2b2ba3cbeabe1f239b6b0ebdaddcb68dd158bd1f/evil-commands.el#L4528-L4548
Details
Message ID
<ypi9mt4i48fw.fsf@gmail.com>
In-Reply-To
<ypi97cvsyc0e.fsf@gmail.com> (view parent)
DKIM signature
missing
Download raw message
I'm sure you have a good reason for this, but why is it not possible to
just add an advice to all the functions in pulsar-pulse-functions ?
Reply to thread Export thread (mbox)