Software⏱️ 3 min read📅 2026-06-19

How to Fix: How to fix Emacs client *ERROR*: Arithmetic error

Emacs client error fix for GNU Emacs 23.1.1

Quick Answer: Try using the -t flag to force terminal mode when running emacsclient.

GNU Emacs 23.1.1 is experiencing an issue with the *ERROR*: Arithmetic error when using emacsclient after starting Emacs in daemon mode.

This problem can be frustrating for users who rely on the emacsclient program for efficient text editing and processing.

💡 Why You Are Getting This Error

  • The primary cause of this issue lies in the way Emacs handles its daemon mode. When Emacs is started with the --daemon flag, it creates a separate process that runs in the background, which can lead to issues when using emacsclient.
  • An alternative possible reason for this problem could be related to the way Emacs interacts with the shell, possibly due to differences in how the two handle input/output operations.

✅ Best Solutions to Fix It

Fixing the issue by modifying Emacs's daemon mode settings

  1. Step 1: To resolve this issue, you can try setting the --daemon flag to --no-daemon when starting Emacs. This will allow emacsclient to communicate with the Emacs process without issues.
  2. Step 2: Alternatively, you can also try using the --batch flag instead of --daemon, as it provides a similar functionality but does not create a separate process in the background.
  3. Step 3: It is recommended to consult the Emacs documentation for more information on how to configure and use its daemon mode.

Workaround by forcing terminal mode when running emacsclient

  1. Step 1: To work around this issue, you can try using the -t flag when running emacsclient. This will force the program to run in terminal mode, which may help prevent the arithmetic error.
  2. Step 2: This workaround may not be ideal for all users, but it can provide a temporary solution until the underlying issue is resolved.

💡 Conclusion

In conclusion, resolving the *ERROR*: Arithmetic error when using emacsclient after starting Emacs in daemon mode requires modifying Emacs's daemon mode settings or using a workaround by forcing terminal mode. By following these steps and consulting the Emacs documentation, users can resolve this issue and enjoy efficient text editing and processing.

Did this fix your problem?

If not, try searching for specific error codes.

🔍 Search Error Database

❓ Frequently Asked Questions