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 ms1.migadu.com with LMTPS id MN17NYvcEmZ91wAAqHPOHw:P1 (envelope-from ) for ; Sun, 07 Apr 2024 19:49:00 +0200 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 MN17NYvcEmZ91wAAqHPOHw (envelope-from ) for ; Sun, 07 Apr 2024 19:48:59 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=PknKk3eI; dmarc=pass (policy=none) header.from=gmail.com; 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" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1712512139; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=oZQj9TPdYDa2Sf+lsFsqmaeGLDPBq45tsv7HCjNAsEU=; b=mxMqGqcKyt8qym+9P0ljkhIsGVUmu/mdFHf3dq1YRnHTUzCmIRKRjGRyYpJljYc8/xdswZ AOoBjcgmw2gcVROobgsptpbJLC755I6SqWFGUz0/g/Rm57Mj/2v/dV7H9dS9f1O4D/aJlZ RFjmz+w7z7sooWrCKBYORMpfR36H7Kd6CqGjyTQ+wBH+lAjDr7YOtvZjnQwdjzdMwU3PsY 01qdjTe+Vh+Rgpem8RWJ30NvVknfftIeSq5eh+Ku4tqefHS01dQkCRk9EkiL82scZkGn91 cNvAZ8seiJORz7cLH9xL224xvKOapWusRkA4bYOOYaA1U1XZIO9z+gYb2OkmNQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=PknKk3eI; dmarc=pass (policy=none) header.from=gmail.com; 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" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1712512139; a=rsa-sha256; cv=none; b=giZ8I4MkTw4TmuCSrtExml4iOb7prKIaCoMUK7oaHHgjZJj4QGniguHZitgcI4GegYSlgv jA4AVgFDx6D50SCGoF/BldZbUR5ItJBXj3TT4trmGgz4Qk0QcF18JpurHtVB5HufQhNh5o IwmQ8/icuyw/wZLzIIztE5FDPU22TI5vvuWCkgkSeaIAP59m0XMcMLNRYZYVXOcQgD1z6O iZXzjZR6O0DBvprxXyZvlEL3jHmvh+tGmLNDz7y1scGBjtZmWyGyZpLsL+eu4KBK0iKd24 JZtoWVnUTYK7J2DvI0ZcsprFn6/SiJyTEPfk2zSYLBsn2Dckf7CPjWHlnuvOhg== 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 902753AE94 for ; Sun, 07 Apr 2024 19:48:59 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rtWcd-0004sD-4T; Sun, 07 Apr 2024 13:48:03 -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 1rtWca-0004rl-VG for emacs-orgmode@gnu.org; Sun, 07 Apr 2024 13:48:00 -0400 Received: from mail-ej1-x632.google.com ([2a00:1450:4864:20::632]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rtWcZ-0000gw-5P for emacs-orgmode@gnu.org; Sun, 07 Apr 2024 13:48:00 -0400 Received: by mail-ej1-x632.google.com with SMTP id a640c23a62f3a-a519ef3054bso288019566b.1 for ; Sun, 07 Apr 2024 10:47:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1712512077; x=1713116877; darn=gnu.org; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=oZQj9TPdYDa2Sf+lsFsqmaeGLDPBq45tsv7HCjNAsEU=; b=PknKk3eIHbKH4Gk6XK0h3JFicG26XtOaxSLQ2fkna5AnUxIJun6qFO2mHLYU75O7O3 UevmS0IwhAQv5OzK6aNHqamBAj519oZ/KlxRPXvD0/o1moGAgUhov1+HmOjQq3VQ98si yFIcHdxMmc4fV9hUmASwIs1j53u6bIr/f8I2WXj3H89c4o3imOps5cpegMvS8Lm9PSWb mEu/5aqVztlUPEJdMG1qSXA8WFhAbdZg/XanAD3hG02VwXfOAwhRTP+2G7A45vQ+9yNr 83RcbGAg6PyeJdC/pVhWujaUARpuXgNa2fxo3ycW5tnqCI8S4jD34MlaqK4CTl+5SOV2 v6kw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712512077; x=1713116877; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=oZQj9TPdYDa2Sf+lsFsqmaeGLDPBq45tsv7HCjNAsEU=; b=W2kOYkpOzTpAggqx3t13g39D4W/gpMs4CuNOd/BfvsZgJr2y9+aTFGNVpWBUUyQgJ0 vmDoxfNeWE7ubl9E8iY/2kTkAJdcGl/O1FBDCqHUI4Sd8vdbRuS6itpS611h+Py+ny5M lVNfVHWJ1iNhm8Eu3CLsWJnxs7jzw0zw60Wj28SXZBlVMYMxx4825Jy8RrT2BS9broNK IL4HW7J/D5SV4FA2J+AFwfww9oQZZW5+zYJICBA3TQRryqWTNhS/w0X6dzvWmCOKdIU+ TwFajjYyN3IPdymswEVPOC+qo1JIThNGq4NOVNSvsB3VwrpjV8cIJBUfy5p7eCVdCpFc g4cw== X-Gm-Message-State: AOJu0YwZW1WzDMVrHFSZfscs+yw5pQeDHtJCruAhyKnB/jppE7LQ3JH3 ZRQQno/Vzfh09ct+PvwkBjALWgjUOUQfFklobDm8dmXsVf7hEYILg3lp5IxhYZUbSLVaOY6PMbC sxvN3dugE3dU0qMRMJJiZYBGzH1eCa7Ll+6I= X-Google-Smtp-Source: AGHT+IFLSPtF3CqAzTAclupaJNwBM+98ghfXbJlL7zMaqgSR1idFau7cFTSt4bspPiyenlmf24jCAJIy3RDlzOtcgco= X-Received: by 2002:a17:907:9406:b0:a51:d475:ab9a with SMTP id dk6-20020a170907940600b00a51d475ab9amr917084ejc.60.1712512076421; Sun, 07 Apr 2024 10:47:56 -0700 (PDT) MIME-Version: 1.0 From: Bhavin Gandhi Date: Sun, 7 Apr 2024 23:17:19 +0530 Message-ID: Subject: [BUG] org-element-at-point warning with org-timer in agenda [9.7-pre, release_N/A-N/A-b45b39 @ /home/bhavin/.emacs.d/elpa/org-9.7pre0.20240405.140341/, ] To: emacs-orgmode@gnu.org Content-Type: multipart/alternative; boundary="000000000000fd23db061585496f" Received-SPF: pass client-ip=2a00:1450:4864:20::632; envelope-from=bhavin7392@gmail.com; helo=mail-ej1-x632.google.com X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 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_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 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-Spam-Score: -9.63 X-Migadu-Scanner: mx11.migadu.com X-Spam-Score: -9.63 X-Migadu-Queue-Id: 902753AE94 X-TUID: p+fKhW3DVaY/ --000000000000fd23db061585496f Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable When running org-timer-set-timer (bound to `;') in an Org agenda buffer, I get following warning: =E2=9B=94 Warning (org-element): =E2=80=98org-element-at-point=E2=80=99 can= not be used in non-Org buffer # (org-agenda-mode) I tried to understand the code of org-timer-set-timer. It runs (org-entry-get nil org-effort-property) initially to find the Efforts property. This in-turn calls org-element-at-point. I think the solution could be similar to https://orgmode.org/list/m2leawo9zo.fsf@hazy.com where we go to that heading first, and then call org-entry-get? Also, I guess it should check if the buffer is org-agenda-mode or org-mode before running the org-entry-get. Is this a good approach? If yes, I would like to come up with a patch for this. Emacs : GNU Emacs 29.3 (build 1, x86_64-redhat-linux-gnu, GTK+ Version 3.24.41, cairo version 1.18.0) of 2024-03-25 Package: Org mode version 9.7-pre (release_N/A-N/A-b45b39 @ /home/bhavin/.emacs.d/elpa/org-9.7pre0.20240405.140341/) --=20 Bhavin Gandhi (bhavin192) | https://geeksocket.in --000000000000fd23db061585496f Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
When running org-timer-set-timer (bound to `;') in an = Org agenda buffer,
I get following warning:

=E2=9B=94 Warning (or= g-element): =E2=80=98org-element-at-point=E2=80=99 cannot be used in non-Or= g buffer #<buffer *Org Agenda*> (org-agenda-mode)

I tried to u= nderstand the code of org-timer-set-timer. It runs
(org-entry-get nil or= g-effort-property) initially to find the Efforts
property. This in-turn = calls org-element-at-point.

I think the solution could be similar to=
https://or= gmode.org/list/m2leawo9zo.fsf@hazy.com where we go to that
heading f= irst, and then call org-entry-get?

Also, I guess it should check if = the buffer is org-agenda-mode or
org-mode before running the org-entry-g= et.
Is this a good approach? If yes, I would like to come up with a pat= ch for
this.

Emacs =C2=A0: GNU Emacs 29.3 (build 1, x86_64-redhat= -linux-gnu, GTK+ Version 3.24.41, cairo version 1.18.0)
=C2=A0of 2024-03= -25
Package: Org mode version 9.7-pre (release_N/A-N/A-b45b39 @ /home/bh= avin/.emacs.d/elpa/org-9.7pre0.20240405.140341/)

--
Bh= avin Gandhi (bhavin192) | https://geeksocket.in
--000000000000fd23db061585496f--