7 votes
Accepted

Looking for something like a `first-keypress-in-a-while-hook`

You could try: (defun my-run-fkpiawh () (remove-hook 'pre-command-hook #'my-run-fkpiawh) (run-hooks 'first-keypress-in-a-while-hook)) (run-with-idle-timer 1200 t (lambda () ...
user avatar
  • 25.4k
6 votes

Looking for something like a `first-keypress-in-a-while-hook`

I guess a solution of your problem is setting a flag with an idle timer, https://www.gnu.org/software/emacs/manual/html_node/elisp/Idle-Timers.html and checking/unsetting it with post-self-insert-...
user avatar
6 votes
Accepted

How can I test an idle timer with ERT?

Idle timers won't be touched until the call stack has been cleared, so sitting won't actually help, it is only once all execution has stopped with the timer be run, so in your case, the idle timer won'...
user avatar
5 votes
Accepted

Buffer local idle-timer

(defun run-with-local-idle-timer (secs repeat function &rest args) "Like `run-with-idle-timer', but always runs in the `current-buffer'. Cancels itself, if this buffer was killed." (let* (;; ...
user avatar
  • 3,276
4 votes
Accepted

run c-c c-k after edit text automatically

The function for doing this is called run-with-idle-timer. From the help for that function: (run-with-idle-timer SECS REPEAT FUNCTION &rest ARGS) Perform an action the next time Emacs is idle for ...
user avatar
  • 20.5k
4 votes
Accepted

Make use of an empty echo area to display information

A comment on this question mentions that a package named symon makes use of such a feature. It is achieved by spamming non-logged messages when the minibuffer is inactive, and by stopping the ...
user avatar
  • 4,113
2 votes
Accepted

Effect of multiple idle timers

After three seconds of idleness, both timers will be triggered (and experimentally it is likely to be the second function which runs first, although I'm not sure if that's always going to be the case)....
user avatar
  • 43.9k
2 votes
Accepted

force-window-update vs redisplay

(force-mode-line-update) or all with the optional t: "Force redisplay of the current buffer’s mode line and header line. With optional non-nil ALL, force redisplay of all mode lines and header ...
user avatar
  • 17.8k
2 votes

Count down timer and org

I can't help with the pop up but, in place of that, I suggest that you use a bell sound. You should have a wav sound file for this and you could use a bell sound like org-pomodoro's. From C-h f org-...
user avatar
  • 626
2 votes

run c-c c-k after edit text automatically

As I commented on the accepted answer, it might work fine for you in casual use -- in which case, that's great, and you can ignore this answer! What I think you need to do, for it to be most reliable,...
user avatar
1 vote
Accepted

How to temporarily disable/reset idle timers?

No idea whether this works, but what happens if you bind timer-idle-list to nil for the period when you want to prevent an idle timer from going off? C-h v says that it's the list of active timers. ...
user avatar
  • 70.3k
1 vote

How to block output of a command run with via `run-with-idle-timer`?

The O.P. could use advice to suppress messages for the function at issue, and there is an inhibit-message variable in recent versions of Emacs. However, it is such a small function that can easily be ...
user avatar
  • 17.8k
1 vote

Tracking time spent typing in a buffer

The minor mode buftime-mode defined below measures the active buffer time. By active buffer time I mean the time you are running commands interactively in the buffer. The modeline displays the active ...
user avatar
  • 30.5k
1 vote
Accepted

pabbrev-mode idle timer error

The error means that the file was mis-compiled. More specifically, for some reason, when the file was byte-compiled, Emacs had no knowledge about the pabbrev-debug-message macro and hence assumed it ...
user avatar
  • 25.4k
1 vote

Make use of an empty echo area to display information

The answer, IMO, is no. The echo area is for ephemeral messages. And lots of things explicitly erase anything that might have been echoed there. So realizing what you request in any reasonable way is ...
user avatar
  • 70.3k

Only top scored, non community-wiki answers of a minimum length are eligible