From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2.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 OBwfCkCD6GatLwAAe85BDQ:P1 (envelope-from ) for ; Mon, 16 Sep 2024 19:13:04 +0000 Received: from aspmx1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2.migadu.com with LMTPS id OBwfCkCD6GatLwAAe85BDQ (envelope-from ) for ; Mon, 16 Sep 2024 21:13:04 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=U+BIvnZL; 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=1726513984; 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:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=mUoBkKy7Xo7i7vYF76htb2Jwx/8CQtB1W6dJE0B5Viw=; b=VUTFvt1rpRd1gYiEKs63AiRbk8UE6wgZc43bx4ZlUdLUIv3TJUFbPWEpgrdC5hTVi9ovtW 2B1Da45dDBdbkJTHO6CX8VMaE3NZa/lItn01FEdDiqOVLA+tzQtHVL+/C2UWF8yrmNo4Zw MUL7+w76i9Rx6RpTR/MlK8tITXnr5awKgOkQvBGUk4MuRscrFK87QanwUOh02Sr2b+A0uu mo1cZWeo7BMVgjCEZ3JvRW3zdfgiwWV+Kfm39S0/pWZAbWXBY/+yGU3vuOL7FOfvNpW3iV N8dILKZdNrtoVqvoNOyXpKMPA4W+UcWgRCMKm6FPpXyeEt52t6VT8AW73svRvQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1726513984; a=rsa-sha256; cv=none; b=C6VX28NrtKRu7zaHIzWh/g+1BV4LIa10cJXFJotseVRbgxxjXcasYSgrBMpZZFmqkLKdSS ch0SSu4a+6Gtru2x0dUy/o4FacXAvyP9Cf0kdeB6RgL1rOdKqSdky1DyP6GXZpn/tLe0Sy 8gldUlIPthW50ZsBaRBtFdr6iK3NbC4jfE1ushpU96Ez7LE5zQJokKcxYmy8eul/6b7AwY PxiixTHg6hJn8TsJ27R5jQXkZicNG0ol1/lFBnklt/+1FV8VwT4QcO8o6tCPPjPpGUxwK2 dNC3IArcoPpUTKegmixB3BllI7+QQ313/AuPIlqMfHLVlAEn4eyHCyHdOMKx7g== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=U+BIvnZL; 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 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 95893784F7 for ; Mon, 16 Sep 2024 21:13:03 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sqH8x-0006ep-Ps; Mon, 16 Sep 2024 15:12:15 -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 1sqH8v-0006YI-TT for emacs-orgmode@gnu.org; Mon, 16 Sep 2024 15:12:13 -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 1sqH8t-0004Xp-O9 for emacs-orgmode@gnu.org; Mon, 16 Sep 2024 15:12:13 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id E08A0240027 for ; Mon, 16 Sep 2024 21:12:01 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1726513921; bh=Jao6fRZUHjctWNeHw5eLAKnpdBVKbv7WlXEzcrfeNtU=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type: From; b=U+BIvnZL7Q9ri3EXRQltYyVDbCgmVx/cB/GLIYgmv0zxJwqkIyxL6qCw+hJ47joS9 5r98JuVRdO8h2LJ3tnuntHABc9jz0xIsCfugaRBcoFZwrE40oHYJ77aiA7Q7rvrMbq JEZvlPZS4jQyKbZ1j16tU9WYtmUvz2Y4tGwWp4NH/vXpHJAWn8lBcTZXWEr7T0bzHz 7SzkujgL1TOxv2KpQEEuAI6CTBmi1qSXj/eVGTESvnip0KHIDriVXS6JZ4ansxwr46 2/T48pMdtEQPmYJghOcBhcncDKu3s2H6S8qROi2P1JtOe1e/RUQnfcadl4K14pzToi E6YxlJCxrvXEg== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4X6vfn2Fjfz9rxD; Mon, 16 Sep 2024 21:12:01 +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: Date: Mon, 16 Sep 2024 19:13:37 +0000 Message-ID: <878qvro1i6.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=185.67.36.65; envelope-from=yantar92@posteo.net; helo=mout01.posteo.de X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 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.83 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-Scanner: mx12.migadu.com X-Migadu-Spam-Score: -9.73 X-Migadu-Queue-Id: 95893784F7 X-Spam-Score: -9.73 X-TUID: /3faSEpy+y3P Serghei Iakovlev writes: > I encountered an issue with `org-mode' in my Emacs configuration > related to periodic clearing of the refile cache during idle time. I > am using the following code snippet, which runs during idle time to > clear the cache of refile targets: > > --8<---------------cut here---------------start------------->8--- > (run-with-idle-timer 600 t (lambda () > (require 'org-refile) > (org-refile-cache-clear) > (org-refile-get-targets))) > --8<---------------cut here---------------end--------------->8--- > ... > --8<---------------cut here---------------start------------->8--- > Debugger entered--Lisp error: (wrong-type-argument stringp nil) > looking-at(nil) > org-refile-get-targets() > ... > org-refile-targets '((nil :maxlevel . 4) (my-org-opened-buffer-files :maxlevel . 4) > (org-agenda-files :maxlevel . 4)) You are running `org-refile-get-targets' using idle timer. It means that it may be called in any buffer. At the same time, you have (nil :maxlevel .4) in your `org-refile-targets', instructing Org mode to examine current buffer for refile targets. Since you are on 9.6.15, Org mode should actually barf if `org-refile-targets' is called in non-Org buffer. So, I am a bit puzzled why you are running into errors that seemingly originate from deeper into `org-refile-get-targets' logic (there is a single `looking-at' call in `org-refile-get-targets' and it is after checking major mode). 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? -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at