From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sebastian Christ Subject: Re: Emacs hangs sometimes for no reason Date: Thu, 19 Jan 2017 09:37:14 +0100 Message-ID: References: <375517626d9045a99b6c008b5aaf62dd@HE1PR01MB1898.eurprd01.prod.exchangelabs.com> <87pojobni4.fsf@ucl.ac.uk> <878tqc88zw.fsf@ucl.ac.uk> <87a8aowj6e.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:57900) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cU8EW-0002nX-70 for emacs-orgmode@gnu.org; Thu, 19 Jan 2017 03:38:13 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cU8ET-0007gN-4R for emacs-orgmode@gnu.org; Thu, 19 Jan 2017 03:38:12 -0500 Received: from [195.159.176.226] (port=56962 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cU8ES-0007fy-T4 for emacs-orgmode@gnu.org; Thu, 19 Jan 2017 03:38:09 -0500 Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1cU8Dx-0002Ii-2u for emacs-orgmode@gnu.org; Thu, 19 Jan 2017 09:37:37 +0100 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: emacs-orgmode@gnu.org >>>>> "SL" == Samuel Loury writes: SL> For what it's worth, when this happens, I generally pkill SL> -SIGUSR2 emacs. emacs reacts to the USR2 signal by stopping SL> everything and start a lisp debugging session. From there, I SL> reset all the org caches with this command: SL> (defun konix/org-element-cache-reset-all () SL> (interactive) SL> (mapc SL> (lambda (file) SL> (save-window-excursion SL> (save-excursion SL> (find-file file) SL> (org-element-cache-reset)))) SL> (org-agenda-files))) Thanks for this snippet. I know it's a little bit early but setting `org-element-use-cache' seems to do the trick for me. SL> Finally, I quit the debugging session and reset the debug on SL> quit with (toggle-debug-on-quit) and everything comes back to SL> normal. So, aren't you restarting Emacs after pkill -SIGUSR2 emacs? Regards, Sebastian -- Sebastian (Rudolfo) Christ http://rudolfochrist.github.io GPG Fingerprint: 306D 8FD3 DFB6 4E44 5061 CE71 6407 D6F8 2AC5 55DD