Questions tagged [timers]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
0 answers
40 views

Conditional run-at-time to update elfeed

I run Emacs in daemon mode on my Virtual Private Server and use elfeed along with elfeed-web to manage my RSS feeds and make them available at a basic but convenient web-page I can visit and browse ...
slackline's user avatar
  • 335
0 votes
1 answer
37 views

How can I make a function that interactively passes a time to run-at-time?

I want to make a function that calls run-at-time while setting its repeat to nil. The only thing I want to be asked to supply is the duration after which run-at-time should call a function. Evaluating ...
Orixi's user avatar
  • 5
1 vote
0 answers
35 views

Insert output of slow external process in current buffer, character-by-character

Imagine in the current buffer I have the text: Hello Bye I want to call an external program and add the output of it at the end of the buffer. The tricky thing is that the external program provides ...
scaramouche's user avatar
  • 1,734
-3 votes
1 answer
41 views

Coloured indicators defined by a time interval

Would it be possible to have a coloured indicator that light at each second, then starts all over again? I would have a 4 column row in a buffer. After a predefined time interval the background ...
Dilna's user avatar
  • 1
1 vote
1 answer
35 views

Timing a while loop

I am running two embedded loops that might take a long time. Would like to time the inner while loop. What can I do?
Dilna's user avatar
  • 1
3 votes
1 answer
50 views

How to detect when a function was activated by a timer?

When running a function inside a timer, there are some constraints on whats possible. Adding timers should not be done (according to the documentation). Communicating with a sub-process is limited (...
ideasman42's user avatar
  • 8,756
1 vote
0 answers
30 views

Get backtrace while busy

Something in my configuration causes emacs to occasionally hang or enter a very long busy loop. I have been adding things to my .emacs for several decades, so figuring out what the problem is by ...
Troy Daniels's user avatar
1 vote
1 answer
160 views

Identifying functions that trigger timers and cause redisplays when profiling Emacs execution

I'm experiencing serious performance degradation whenever I'm in dart-mode and LSP is enabled. This is a strange one because Emacs I don't experience any performance degradation on a fresh instance ...
migdsb's user avatar
  • 113
4 votes
1 answer
46 views

Buffer file replaced with lockfile/backupfile location

I have been suffering this issue for a few months, unable to reproduce it until now. In short, the issue is that when creating a new file, editing it, and then deciding to rename the file, the buffer'...
kballou's user avatar
  • 125
1 vote
0 answers
30 views

How to impose a timeout on ert tests?

When using ert I'd sometimes like to have tests abort after some timeout. I could program this in advance in the test-case but this is not what I need. Imagine a situation where I use ert-run-tests-...
phs's user avatar
  • 1,227
0 votes
2 answers
899 views

Trying to set org-clock-sound for org-timer

I'm trying to set up a notification alert for org timer. I'm using Dunst on Arch for notifications. Used the following lines in my config file: (require 'org) (setq org-clock-sound "~/Downloads/...
alphaQ's user avatar
  • 1
4 votes
1 answer
245 views

Timer runs immediately then periodically

I have a timer I want to run every day at 4am. Thus, I put something like this in my configuration. (defvar my/timer nil) (unless my/timer (setq my/timer (run-at-time "04:00am" (* 24 60 ...
Firmin Martin's user avatar
2 votes
1 answer
332 views

start-process: Setting current directory: No such file or directory

I have a timer which call a function itself calling start-process. Whenever the current buffer's directory changed (deleted/moved), I have the error start-process: Setting current directory: No such ...
Firmin Martin's user avatar
0 votes
1 answer
142 views

Locking an org-timer into the mode-line

Context. I frequently use org-mode timers The org-mode clock (which just displays the clock in the org-mode mode-line) A custom "target time" clock, which shows a point in time (either a ...
George's user avatar
  • 919
3 votes
2 answers
255 views

How to time org-mode code block execution?

Is there an easy way to time how long it takes to execute source code blocks in org-mode (maybe with header arguments or similar), if so, how? Or do I have to implement it in the code itself? I'm ...
MithicSpirit's user avatar
0 votes
1 answer
650 views

Error running timer (wrong-number-of-arguments equals 3)

I am trying to automatically change my Emacs theme according to time set (Thanks to answer provided by Dan). My code looks like this: (setq emacs-curr-theme nil) (setq emacs-light-theme 'faff) (setq ...
nOtFoRgEeKs's user avatar
4 votes
1 answer
359 views

run-at-time in the future only

I want to capture a journal entry several times a day. Here was my initial solution: (setq org-capture-templates '(("w" "Weekly" item (file+olp+...
Joe Corneli's user avatar
  • 1,808
1 vote
1 answer
197 views

Can I set a timer to run at 7am tomorrow?

It seems to me I can either set a time for today or some relative time in the future. But can I combine the two somehow to set a timer for 7am tomorrow, for example?
Tom's user avatar
  • 1,240
1 vote
0 answers
60 views

Get time since last keystroke

I would like to know how many seconds have passed since the last keystroke (or character that showed up in the screen, whatever is easier). Is there a timer that is associated to self-insert-command? ...
scaramouche's user avatar
  • 1,734
0 votes
0 answers
157 views

Error running timer ‘ac-update-greedy’: (void-variable org-link-types)

I very recently updated to Emacs 26.3 and Org 9.2.6, and am getting the above-mentioned error whenever I type "[[" in an org-mode buffer to type a hyperlink. Unsurprisingly, no error after turning off ...
granti128's user avatar
5 votes
2 answers
815 views

Timer on modeline: how to update modeline every second?

As part of my custom mode-line, I've included a feature that displays a countdown timer (timers are created using the chronos package) when it recognises that there is one running. Works great, but ...
jamesmaj's user avatar
  • 341
2 votes
1 answer
121 views

Toggle timer function

I want to write a function that starts a timer if timer does not exists or stop it if that one exists. I mean something like: (defun toggle-mytimer () (interactive) (if (timerp TIMER_NAME) ...
Gabriele Nicolardi's user avatar
4 votes
1 answer
395 views

Prevent Emacs from messaging when it writes recentf

I've configured Emacs to save recentf every five minutes by using this code: (run-at-time nil (* 5 60) 'recentf-save-list) It works great, but after writing recentf Emacs feels it has to tell me ...
izkon's user avatar
  • 1,858
1 vote
1 answer
165 views

Time-of-day triggers

How can I set timers in Emacs to trigger at certain times of day? Midnight mode adds hooks for a single "midnight" time, but I would like to create separate hooks for multiple clock times.
Matthew Piziak's user avatar
1 vote
1 answer
1k views

Count down timer and org

count down timer This code starts a count down timer every time org file is opened , but asks for a permission to reset timer every time . Can it be automated, meaning it should start counting as soon ...
Vaibhav's user avatar
  • 583
0 votes
0 answers
175 views

Monitoring and restarting background processes in Emacs

I have a background process to sync and index email. The two function calls in there, (mail-sync) and (mail-index) are calls with start-process. I then run the mail-background function periodically ...
pwalsh's user avatar
  • 245
1 vote
0 answers
739 views

Enabling Company CAPF backend with timer in Major Mode

I've be working on a new major mode for a DSL. I'm planning to use the CAPF backend for company mode and would like to provide the integration. The completion at point functions produce the correct ...
superlizardmo's user avatar
1 vote
1 answer
58 views

Change buffer displayed in window after x amount of time

I find myself switching between buffers constantly to double check activity in other buffers. Is it possible for windows to display different buffers after x amount of time? In other words can I get "...
Us3rname's user avatar
3 votes
1 answer
936 views

Error running timer "show-paren-function" when displaying matching line in message/mini buffer

I want to display the line contains matching bracket in the message/mini buffer at the bottom of emacs. I found some code on emacs Wiki, after put it in init file, emacs do show the maching line in ...
cdnszip's user avatar
  • 347
6 votes
3 answers
121 views

How to detect if `read-event` or `y-or-n-p` is running?

In haskell-doc-mode we have a timer that shows useful tips in minibuffer when cursor is idle for a moment. In other part of Haskell Mode there is code asking questions using y-or-n-p or read-event. ...
Gracjan Polak's user avatar
10 votes
2 answers
373 views

How to set temporary halt after C-x C-c?

If I run C-x C-c in emacs, it will close immediately. If I set confirm-kill-emacs to y-or-n-p it will ask for confirmation before closing. Instead of y-or-n-p, I want to set some temporary timer for ...
Chillar Anand's user avatar
1 vote
1 answer
407 views

run-at-time under certain circumstance [closed]

I need to backup few files on my Mac, and it can be done inside of Emacs by calling a function. But it is a tedious task to do everyday and sometimes I forgot doing it. I wonder if I can automate it ...
yi.tang.uni's user avatar
  • 1,017
9 votes
1 answer
4k views

Is it possible to execute a function or command at a specific time?

Is it possible to execute a function or command at a specific time? As an explicit example, is it possible to kill emacs at a specific time (time determined by the OS).
Name's user avatar
  • 7,829