From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Ergus Newsgroups: gmane.emacs.devel Subject: Issue or feature? Date: Thu, 24 Dec 2020 04:05:49 +0100 Message-ID: <20201224030549.qtmvcjmi4zw4pcgw@Ergus> References: <20201224030549.qtmvcjmi4zw4pcgw.ref@Ergus> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="35855"; mail-complaints-to="usenet@ciao.gmane.io" To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Dec 24 04:07:40 2020 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ksGyZ-0009Fs-Kw for ged-emacs-devel@m.gmane-mx.org; Thu, 24 Dec 2020 04:07:39 +0100 Original-Received: from localhost ([::1]:36442 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ksGyY-0007Dk-LJ for ged-emacs-devel@m.gmane-mx.org; Wed, 23 Dec 2020 22:07:38 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:37480) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ksGxO-0006Ld-0c for emacs-devel@gnu.org; Wed, 23 Dec 2020 22:06:27 -0500 Original-Received: from sonic310-15.consmr.mail.bf2.yahoo.com ([74.6.135.125]:39819) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ksGxG-00083f-5h for emacs-devel@gnu.org; Wed, 23 Dec 2020 22:06:25 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aol.com; s=a2048; t=1608779171; bh=NIzr/mOOqnO3qSZsdg+D5/52nCMBZiy6ejBuMiSY0bQ=; h=Date:From:To:Subject:References:From:Subject; b=sy3zLUuaPRvZste1qt/yFVfXyZiSTj9aDMrvG1VcV9b/0+Ha6Jml6XSmzKeQsEoIZIo5Yte6p6lTD9EcqwCF6RH+0lJ60BFY828ccnNfG8dDDyxqGpndU9rX7/sOBBZy0DT7L2h9sprFqIpw2UjMQrNL5btcZqx+9aGDR1iY+XyaszCxV+zSplszvj1d6iItPeTIZJDkuOi+3UsqKbXgNKFwoOHoECpf2bZ8mHt5gUvJvsHEh/52b/h9B0i080qYJVg1xCK5AaonvYzalVc/Y7makIt8JhweGjEYXijjQNN4SOWPgZc4R8iJryKgtkYqBmrGPmQDUotxeuzTWEiOqQ== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1608779171; bh=1pK6x0XfPp+W3Y2odNchoANlNgCyvL+Fh8W8uwKnxAS=; h=Date:From:To:Subject:From:Subject; b=ZWqX+Y4g7zIlQIU4Tx28LS6eDSc/uBeTxqL8T+OdcftgfUyZ2r30kjs6Olap9oeiXShA7w/aAdh+H5AWv1UbguA/J/L1wRxEu/PlX9sZWB3k75b6etQQGg2EKclZxOqG9VH/GsCeQy7hyFbkcNgzQS3vUGDD/+YLaLJcQ2IILq1RxL+aUU/j7DUkaSjNOn8t12vMrup2dqC7jOXia7L4x+QB5MLSyRz8qg5ou/353ynI0lnmuXtpSeIvYYD651SIZYeAdw5jIe4NA3YvQiSITbb/omXasgotImAnkGqC3x0JxmtOAmB2MJln/yZ1L5PCfWKKXHYVBSl7F81Ui4CvyQ== X-YMail-OSG: qjohEToVM1nPdbiPXscPa1s8oAEWiiIzJMzF6fjUc7cqfJXSmnPpLGM6tC1ogMU X.M.WIL1kzvwDQX5vcVt6jdb8bqBJEb2eozKqkK8JsClTKP.gEgPbKDOGAoS.ewxj2lDtBJSFX4U yUtjFJcN84X4_eJEB1kjcroyklXOUtCQoj6MGcLJ4t8eYGbyHVrO58n1RkBcaT.a9HS27PgF8kW3 QwxYxPe4GyiqMMkVeDTXm5.6Rbg88p6aH3dGrYPBW6hIwPgN7of7XXzG43suhZu66ktLiSUIEnuu m2e2eTs4jY3J40G2dTjO_0.zqTuzs5hiZiR4YZeMD5qaJnZ3AzXblIMJFrYm6SN72HfMrGsUidho s9IGXvjxiPivbNvW7ky4BLuwEkNjAhDXulWLRx5GGvE0gyLfgDMpGGc69Ch0kLKTR1LbaEF_0wQC lgjT21FniOVrd9EwWfBeTskI94LhS8rOBCyCmf7ZvN7EMwdbO7ukXRKL_eww1bI0FmybokKlrNDO 5KddcswSOd2TPJqZWmxyTP1OgqwvwsWBuBj7blUvy4..IWvSj.yJFDqNNKnbmjr1CSYFpfN9.4Ap mQoscS..kyb2L15Ay8t8aq1S.0tS3l4UZ2oqkiEjAtHYPippGgJU9Z4aoDyjF4bCy7Qpa9br0qb4 yIOuAsbYU5hBxN5G5rd6.lv5pwNc8H9vov.rNiShg1Fp.heqAggBS8G8zeJGEWz2KbXxoF1J6dzD 8PnrieXbo5K07Pz8kn2.SiM1x3ZEVaL7Ks43AV0D801kTWd8_kGCJ_Eh228OI8b0Fv7b64uMeGzc LZaaxl0bJPJFCo4agbF3VVArOr6hyvaaFrMaT7_oio Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic310.consmr.mail.bf2.yahoo.com with HTTP; Thu, 24 Dec 2020 03:06:11 +0000 Original-Received: by smtp405.mail.ir2.yahoo.com (VZM Hermes SMTP Server) with ESMTPA ID 781364ca88c077f5770d372a87414e0f; Thu, 24 Dec 2020 03:06:06 +0000 (UTC) Content-Disposition: inline X-Mailer: WebService/1.1.17278 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.aol Apache-HttpAsyncClient/4.1.4 (Java/11.0.8) Received-SPF: pass client-ip=74.6.135.125; envelope-from=spacibba@aol.com; helo=sonic310-15.consmr.mail.bf2.yahoo.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:261648 Archived-At: Hi I have observed something that IMO is an unintended behavior. I have more or less this code in my init: ``` (add-hook 'prog-mode-hook (lambda () (run-with-idle-timer 1 nil #'flycheck-mode 1))) ... (add-hook 'prog-mode-hook (lambda () (run-with-idle-timer 1 nil #'turn-on-diff-hl-mode))) ``` Both functions: flycheck-mode and turn-on-diff-hl-mode seems to call some external commands (ispell and git) but then I get an error when debugging: ``` Debugger entered--Lisp error: (error "Failed (status 128): git --no-pager diff-index --e...") signal(error ("Failed (status 128): git --no-pager diff-index --e...")) error("Failed (%s): %s" "status 128" "git --no-pager diff-index --exit-code -U0 -p 4b825...") vc-do-command(" *diff-hl* " 1 "git" ("/home/ergo/.emacs.d/init.el") "--no-pager" "diff-index" "--exit-code" "-U0" "-p" "4b825dc642cb6eb9a060e54bf8d69288fbee4904" nil "--") apply(vc-do-command " *diff-hl* " 1 "git" ("/home/ergo/.emacs.d/init.el") ("--no-pager" "diff-index" "--exit-code" "-U0" "-p" "4b825dc642cb6eb9a060e54bf8d69288fbee4904" nil "--")) vc-git-command(" *diff-hl* " 1 ("/home/ergo/.emacs.d/init.el") "diff-index" "--exit-code" "-U0" "-p" "4b825dc642cb6eb9a060e54bf8d69288fbee4904" nil "--") apply(vc-git-command " *diff-hl* " 1 ("/home/ergo/.emacs.d/init.el") "diff-index" "--exit-code" ("-U0" "-p" "4b825dc642cb6eb9a060e54bf8d69288fbee4904" nil "--")) vc-git-diff(("/home/ergo/.emacs.d/init.el") "4b825dc642cb6eb9a060e54bf8d69288fbee4904" nil " *diff-hl* ") apply(vc-git-diff (("/home/ergo/.emacs.d/init.el") "4b825dc642cb6eb9a060e54bf8d69288fbee4904" nil " *diff-hl* ")) vc-call-backend(Git diff ("/home/ergo/.emacs.d/init.el") "4b825dc642cb6eb9a060e54bf8d69288fbee4904" nil " *diff-hl* ") diff-hl-changes-buffer("/home/ergo/.emacs.d/init.el" Git) diff-hl-changes() diff-hl-update() diff-hl-margin-mode(1) (if (display-graphic-p) nil (diff-hl-margin-mode 1)) (unless (display-graphic-p) (diff-hl-margin-mode 1)) (progn (turn-on-diff-hl-mode) (unless (display-graphic-p) (diff-hl-margin-mode 1))) (if (or (and buffer-file-name (not (file-remote-p buffer-file-name))) (eq major-mode 'vc-dir-mode)) (progn (turn-on-diff-hl-mode) (unless (display-graphic-p) (diff-hl-margin-mode 1)))) (when (or (and buffer-file-name (not (file-remote-p buffer-file-name))) (eq major-mode 'vc-dir-mode)) (turn-on-diff-hl-mode) (unless (display-graphic-p) (diff-hl-margin-mode 1))) my/diff-hl-mode() apply(my/diff-hl-mode nil) timer-event-handler([t 0 1 0 nil my/diff-hl-mode nil idle 0]) input-pending-p(t) sit-for(0) ispell-init-process() ispell-buffer-local-words() ispell-accept-buffer-local-defs() flyspell-accept-buffer-local-defs(force) flyspell-mode-on(nil) flyspell-mode(1) flyspell-prog-mode() apply(flyspell-prog-mode nil) timer-event-handler([t 0 1 0 nil flyspell-prog-mode nil idle 0]) ``` When I set different delays to the timers the error disappears. I have 5 different similar hooks: ``` C-h v prog-mode-hook ((lambda nil (run-with-idle-timer 1 nil #'flycheck-mode 1)) (lambda nil (run-with-idle-timer 1 nil #'company-mode 1)) (lambda nil (run-with-idle-timer 1 nil #'flyspell-prog-mode)) (lambda nil (run-with-idle-timer 1 nil #'diff-hl-mode 1)) (lambda nil (electric-pair-local-mode 1))) ``` But the problem seems to be related with the ones that start external processes only. I know how to fix his in my config, but I am wondering if this is a limitation for run-with-idle-timer? Or if such behavior needs to be (or is already) documented? Best, Ergus