From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id 6PAJLFrD6maXMgAAqHPOHw:P1 (envelope-from ) for ; Wed, 18 Sep 2024 12:11:06 +0000 Received: from aspmx1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id 6PAJLFrD6maXMgAAqHPOHw (envelope-from ) for ; Wed, 18 Sep 2024 14:11:06 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=none; 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=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=serghei.pl (policy=none) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1726661466; 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: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post; bh=ZrLWEZvCMrEqfG0br8BiaOGQM0X1qjO5AKP+PsbSkQA=; b=jSEuiXJR6EwwbsArpCAeSto0DKoEdrrzA4vMKUl/Nn8XKkzPj32VL9Jl3jOAg8z6c/rsx2 J1LeKUUZhPB0paQ8FCgMdf9Siz2rb7zTGQfuA47s5LJtIKfHrqTbsCbBpkcyyaTVw+Gd4b DwsYR0ELrPAA6cq8QLoUwQtO0rLxKd0QwVecRXazLywchbpZiPNNGrsSQ3mYXfunjHFnLU 7mzIOtWh1C+FMnbWP6hNAeyF5luFML0TG+tXxJlmY5gXTjs0eOt9fzwhfyRCQeMwhJ16KJ bcXoqRpr3tnzRilTucaT1NfnuUG8wjT0AcDUswqozbpnOkPBjKXFTLWGy6SkDg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1726661466; a=rsa-sha256; cv=none; b=eAVeS5gNZElBvLTeYito42UJEWQoIcFePsJLZBcwAFoZrri+WO1jRDvED/CgKTsbbjBYcy OhZUEih085/v70k0f6wxFfQFNklRp+1hsYnJ+0E1svYH3zz6L/iU61iKkpMqilku3IN4QF oeWX+mqgzRFe4KHQWvISXygHqB/Yx+MlIIiUR7pBW6NIwRzSHRurqNnUyFdZprd/hEZ9PD Sv7oRsyVCNH9NYDTNiL1K6u+YAU6l58p/P2q/Er8+xc/RVfJGyi2ojqXeHt+/bzTbkN3tO +8BAmP7SGV57kIwvEaUpZwiYdWThubBI9v/sTaBGEgZ9lg69pS8OOkFOa0F9yA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; 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=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=serghei.pl (policy=none) 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 3A12D85CAA for ; Wed, 18 Sep 2024 14:11:06 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sqtVa-0003lV-Jh; Wed, 18 Sep 2024 08:10:10 -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 1sqtVY-0003ko-I0 for emacs-orgmode@gnu.org; Wed, 18 Sep 2024 08:10:08 -0400 Received: from ciao.gmane.io ([116.202.254.214]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sqtVW-00061m-PQ for emacs-orgmode@gnu.org; Wed, 18 Sep 2024 08:10:08 -0400 Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1sqtVS-0004TH-BD for emacs-orgmode@gnu.org; Wed, 18 Sep 2024 14:10:02 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: emacs-orgmode@gnu.org From: Serghei Iakovlev Subject: Re: [BUG] org-refile-get-targets wrong-type-argument [9.6.15 (release_9.6.15 @ /Applications/Emacs.app/Contents/Resources/lisp/org/)] Date: Wed, 18 Sep 2024 13:30:34 +0200 Message-ID: References: <878qvro1i6.fsf@localhost> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.4 Cc: Ihor Radchenko Cancel-Lock: sha1:QAtRp2V0QhkK+0ns3DftvkK/JPQ= Received-SPF: pass client-ip=116.202.254.214; envelope-from=geo-emacs-orgmode@m.gmane-mx.org; helo=ciao.gmane.io X-Spam_score_int: 1 X-Spam_score: 0.1 X-Spam_bar: / X-Spam_report: (0.1 / 5.0 requ) BAYES_00=-1.9, HEADER_FROM_DIFFERENT_DOMAINS=0.248, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, SUBJ_LACKS_WORDS=1.744 autolearn=no 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-Scanner: mx12.migadu.com X-Migadu-Spam-Score: -4.41 X-Migadu-Queue-Id: 3A12D85CAA X-Spam-Score: -4.41 X-TUID: eGEFWc+T+Ao7 > 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—often at night, 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 — 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. -- Serghei Iakovlev