[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [BUG] error wholenump in org agenda on reschedule [9.6.1 (9.6.1-??-f
From: |
Ihor Radchenko |
Subject: |
Re: [BUG] error wholenump in org agenda on reschedule [9.6.1 (9.6.1-??-fe92a3c @ /data/data/com.termux/files/home/.config/emacs/.local/straight/build-28.3/org/)] |
Date: |
Tue, 04 Jul 2023 16:38:45 +0000 |
[ Adding Org ML back to CC ]
Nick Römer <nick.romer@skynet.be> writes:
> Debugger entered--Lisp error: (wrong-type-argument wholenump -2)
> move-to-column(-2 t) org-move-to-column(-2 t)
> org-agenda-show-new-time ...
Thanks!
Does the attached patch solve the problem?
>From cd7c52972ea93029278f462fb0240e49aaba4fa2 Mon Sep 17 00:00:00 2001
Message-ID:
<cd7c52972ea93029278f462fb0240e49aaba4fa2.1688488637.git.yantar92@posteo.net>
From: Ihor Radchenko <yantar92@posteo.net>
Date: Tue, 4 Jul 2023 19:34:41 +0300
Subject: [PATCH] org-agenda-show-new-time: Fix when window is very narrow
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
* lisp/org-agenda.el (org-agenda-show-new-time): When window is
narrower than timestamp, do not try to display timestamps starting at
negative column.
Reported-by: Nick Römer <nick.romer@skynet.be>
Link: 4196e86e.19136.1891ceef131.Webtop.154@skynet.be">https://orgmode.org/list/4196e86e.19136.1891ceef131.Webtop.154@skynet.be
---
lisp/org-agenda.el | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
index 89c10403b..5594c7453 100644
--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el
@@ -10100,8 +10100,10 @@ (defun org-agenda-show-new-time (marker stamp
&optional prefix)
(line-end-position)
'(display nil))
(org-move-to-column
- (- (window-max-chars-per-line)
- (length stamp))
+ (min
+ 1 ;; narrow buffer and wide timestamp
+ (- (window-max-chars-per-line)
+ (length stamp)))
t)
(add-text-properties
(1- (point)) (line-end-position)
--
2.41.0
> Debugger entered--Lisp error: (wrong-type-argument wholenump -2)
> move-to-column(-2 t) org-move-to-column(-2 t)
> org-agenda-show-new-time(#<marker (moves after insertion) at 554 in todo.org>
> "Scheduled to <2023-07-04 Tue>" " S") org-agenda-schedule(nil "2023-07-04")
> #f(compiled-function () #<bytecode 0x1d27617b>)()
> org-agenda-bulk-action(nil) funcall-interactively(org-agenda-bulk-action
> nil) call-interactively(org-agenda-bulk-action nil nil)
> command-execute(org-agenda-bulk-action)
> -------- Original message --------From: Ihor Radchenko <yantar92@posteo.net>
> Date: 04/07/23 14:29 (GMT+01:00) To: Nick Römer <nick.romer@skynet.be> Cc:
> emacs-orgmode@gnu.org Subject: Re: [BUG] error wholenump in org agenda on
> reschedule [9.6.1
> (9.6.1-??-fe92a3c @
>
> /data/data/com.termux/files/home/.config/emacs/.local/straight/build-28.3/org/)]
> Nick Römer via "General discussions about Org-mode."<emacs-orgmode@gnu.org>
> writes:> In org agenda view, on terminal Emacs version running in termux on
> my > Samsung galaxy A10, I get an Error "wholenump -3" when selecting one or
> > more TODOs with the "m" key and subsequently trying to reschedule using >
> the key sequence "x s". However, if I zoom out a bit (using the pincer >
> gesture) the error does not happen.May you share the backtrace? (after M-x
> toggle-debug-on-error)-- Ihor Radchenko // yantar92,Org mode
> contributor,Learn more about Org mode at <https://orgmode.org/>.Support Org
> development at <https://liberapay.com/org-mode>,or support my work at
> <https://liberapay.com/yantar92>
--
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>