From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id aDnBKQrk72aFegAAqHPOHw:P1 (envelope-from ) for ; Sun, 22 Sep 2024 09:31:54 +0000 Received: from aspmx1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id aDnBKQrk72aFegAAqHPOHw (envelope-from ) for ; Sun, 22 Sep 2024 11:31:54 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=YAYFyJlu; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=posteo.net ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1726997514; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=PB7HL/p8wGpsY0Fa5cFxHAPWMlFaUwUcG/cpqNDIzmc=; b=qz8T0D8s3G4uIAI8dTeyuappqCNWIsj2aKH2acCgt7l+a/EJcOoQ5tS+In+hng2e3tgoZg jZVKwZJ/Rl5Sp0jGU98YtZPrYIxgZTZjXXPnof1ULfFjhphb8kT/CtT5A1OkUkYRSDiDjC BVUPiULxbmNwuwnwdLyHbqNnW5NoI9AgLGeOMuKNACpuZiU95+mEo38S0uSBo/aCXfe7R1 H8cwTi3IWRBaZBzwkrK85Qg0xXjzOS0CRz5FJgPce0I791mKQAw8PMPk0MuihPUxH4QR8L 90sVlzmXkEJ+8mJGUZMsHW7Psx1VKwbddqCNHETHs0WQ4idPhqJ1UTdWdTW7Gg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=YAYFyJlu; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=posteo.net ARC-Seal: i=1; s=key1; d=yhetil.org; t=1726997514; a=rsa-sha256; cv=none; b=QZKfoUUHD4+Fy5y0eZ/+lcI/prL4HJR454KBuzv9IcGgzBj9vVdDqoBxeWawHZPaTJtPt0 o/CQas9K+aasjDa6IKcMjohEmfB2WoezFHpsuRjEIgidscYB4beCAYoY3r7gRvWje8RnRW dKju13ClRlF8vVVMkZYtaXb/rx7MXZB7H/FMXn5gmWZJw7f9vcy3XPIsbUkrzuyQSSmYzq 3d9v9fVHOsYIVO5xnJSkF7wIM5H+96ekUh0rm1+sRMInb4oZhMSW3NG2wTq0PWEVUTa6bB IswdV+ontvRnQgNnz30GOsZIPwAK3BClfG6JrypAvDD/506FtOwUHGDJVTfZ9w== Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 61455697D for ; Sun, 22 Sep 2024 11:31:54 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ssIqy-0005qB-TK; Sun, 22 Sep 2024 05:26:04 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ssIqv-0005pq-Q2 for emacs-orgmode@gnu.org; Sun, 22 Sep 2024 05:26:02 -0400 Received: from mout01.posteo.de ([185.67.36.65]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ssIqt-00044p-MJ for emacs-orgmode@gnu.org; Sun, 22 Sep 2024 05:26:01 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 19B85240028 for ; Sun, 22 Sep 2024 11:25:55 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1726997155; bh=I1cQxTJBQpjulAPNbgNtOrtcX9vi2I2mfKcXQ37h+18=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type: Content-Transfer-Encoding:From; b=YAYFyJluZ3EOGNEfNL84X5/rbpGJxLfsbnwlZmJN0W/0iTK04m2a1UP/zzHYUCR0v NTIYHM9eH35O4sey1bvY4QnKQn7+TU3UTgu3uOhu78JEJglqEjNzcU8onHGcQRULOl yynOYwMgqhGKGnrAdPcfSzJMywVRaL8PTcGlnegbWs6bF/Z0t8yB6lWbtPcl2AbhPQ SFeceWLNGywdebQRb4fDHj3S46eweJj+7557Z6L9odQWHO+GsYDsg3plV10ZJalrpe 0HG07J1Y8WJcDYfFN2aVVqw26fGUhVFOQZTs6UmHNwKMLxC2ByNR+/XQteztrf4u14 NTxS7L8hagL1A== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4XBLMk0Sx2z9rxF; Sun, 22 Sep 2024 11:25:53 +0200 (CEST) From: Ihor Radchenko To: Serghei Iakovlev Cc: emacs-orgmode@gnu.org Subject: Re: [BUG] org-refile-get-targets wrong-type-argument [9.6.15 (release_9.6.15 @ /Applications/Emacs.app/Contents/Resources/lisp/org/)] In-Reply-To: References: <878qvro1i6.fsf@localhost> Date: Sun, 22 Sep 2024 09:27:28 +0000 Message-ID: <87wmj4qbr3.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=185.67.36.65; envelope-from=yantar92@posteo.net; helo=mout01.posteo.de X-Spam_score_int: -24 X-Spam_score: -2.5 X-Spam_bar: -- X-Spam_report: (-2.5 / 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, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, SUBJ_LACKS_WORDS=1.911 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: emacs-orgmode-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Queue-Id: 61455697D X-Migadu-Scanner: mx11.migadu.com X-Spam-Score: -9.75 X-Migadu-Spam-Score: -9.75 X-TUID: lUUrOWb6TUDP [ Adding Org mailing list back to the CC ] > -(defun my-org-opened-buffer-files () > - "Return the list of org files currently opened in Emacs." > - (delq nil > - (mapcar (lambda (x) > - (if (and (buffer-file-name x) > - (string-match "\\.org$" > - (buffer-file-name x))) > - (buffer-file-name x))) > - (buffer-list)))) > - > It was added as part of one of my experiments, and I apparently don't > need this functionality at all. So, I can easily remove it to test > this hypothesis. Unfortunately, I don't have any other leads at the > moment. > > I would greatly appreciate any advice on how to investigate this > further or understand the root cause of the problem. What you might do is adding a check whether `org-complex-heading-regexp' is nil in any of the buffers returned by your `my-org-opened-buffer-files' and raise an error telling which buffer it is. You may then check what's up with that buffer. Best, Ihor Serghei Iakovlev writes: > The following message is a courtesy copy of an article > that has been posted to gmane.emacs.orgmode as well. > > >> My only guess is that some of your Org buffers is not properly >> initialized somehow. Maybe the timer is triggering in the middle of Org >> mode loading or something? > > I find it challenging to pinpoint the exact cause of the issue. > However, I can provide some additional context that might help. The > problem seems to occur when I'm not using my laptop=E2=80=94often at nigh= t, > which aligns with the time `run-with-idle-timer' is triggered. > During these moments, my configuration and environment are relatively > static, as the workstation is idle. I usually leave it in that state > in the evening, and the problem is only noticeable in the morning. > > It's worth noting that the issue doesn't happen consistently =E2=80=94 not > every night or even every week. It just occasionally arises, leaving > me puzzled about what might need adjustment or modification to > prevent it. Given its sporadic nature, I'm at a loss for how to > reproduce it consistently. > > There is literally one lead, and it's this code snippet that I just > removed from my configuration: > > --8<---------------cut here---------------start------------->8--- > diff --git a/init.el b/init.el > index d18e70c..fbb0d62 100644 > --- a/init.el > +++ b/init.el > @@ -1685,21 +1685,10 @@ > (define-key my-keyboard-map (kbd "b") #'my/org-move-bookmark-to-notes) > > ;;;;; Org Refile > -(defun my-org-opened-buffer-files () > - "Return the list of org files currently opened in Emacs." > - (delq nil > - (mapcar (lambda (x) > - (if (and (buffer-file-name x) > - (string-match "\\.org$" > - (buffer-file-name x))) > - (buffer-file-name x))) > - (buffer-list)))) > - > ;; Refile targets include this file and any file contributing > ;; to the agenda - up to 4 levels deep. > (setq org-refile-targets > '((nil :maxlevel . 4) ; nil means current buffer > - (my-org-opened-buffer-files :maxlevel . 4) > (org-agenda-files :maxlevel . 4))) > > ;; Targets start with the file name allows creating level 1 tasks. > --8<---------------cut here---------------end--------------->8--- > > It was added as part of one of my experiments, and I apparently don't > need this functionality at all. So, I can easily remove it to test > this hypothesis. Unfortunately, I don't have any other leads at the > moment. > > I would greatly appreciate any advice on how to investigate this > further or understand the root cause of the problem. > > > --=20 > Serghei Iakovlev --=20 Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at