emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Ihor Radchenko <yantar92@posteo.net>
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/)]
Date: Tue, 04 Jul 2023 16:38:45 +0000	[thread overview]
Message-ID: <874jmjr5re.fsf@localhost> (raw)
In-Reply-To: <e8d406$4rf9kg@relay.proximus.be>

[-- Attachment #1: Type: text/plain, Size: 288 bytes --]

[ 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?

[-- Attachment #2: 0001-org-agenda-show-new-time-Fix-when-window-is-very-nar.patch --]
[-- Type: text/x-patch, Size: 1432 bytes --]

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: 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


[-- Attachment #3: Type: text/plain, Size: 1795 bytes --]



> 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>

       reply	other threads:[~2023-07-04 16:39 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <e8d406$4rf9kg@relay.proximus.be>
2023-07-04 16:38 ` Ihor Radchenko [this message]
     [not found] <ce9a33$4jv7eh@relay.proximus.be>
2023-07-05 13:15 ` [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/)] Ihor Radchenko
2023-07-03 18:06 Nick Römer via General discussions about Org-mode.
2023-07-04 12:29 ` Ihor Radchenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=874jmjr5re.fsf@localhost \
    --to=yantar92@posteo.net \
    --cc=emacs-orgmode@gnu.org \
    --cc=nick.romer@skynet.be \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).