emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "Hugh Daschbach" <hdasch@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Args out of range, XEmacs 21.4.21
Date: Thu, 4 Dec 2008 23:56:35 -0800	[thread overview]
Message-ID: <a6af35440812042356l14a0d757q34b5ab4da8fdc231@mail.gmail.com> (raw)

I'm a late comer.  Just found Carston's presentation at Google.  Nice
piece of work.  Many thanks.

Unfortunately, the first thing I did failed with an "Args out of range
error".  I've worked through that (described below).  And have just
finished converting all my sticky notes to org-mode.  Label me a
convert.

The "Args out of range" error is specific to XEmacs [running 21.4
(patch 21)].  I'm running org-mode from the git repository:

$ git-describe
release_6.13a-23-g269c5a8

My first experiment consisted of:

* 1234
* 4567 Meta-Up

That deleted the second line of text and threw the args range exception
   #<buffer "xxx.org">, 0, 1

Here's the traceback:

Debugger entered--Lisp error: (args-out-of-range #<buffer "xxx.org"> 0 1)
  map-extents((lambda (ex ignored) (if (< ... beg) (if ... ... ...)
(if ... ... ...))) #<buffer "xxx.org"> 0 1 nil end-closed outline)
  (save-excursion (map-extents (function ...) (current-buffer) beg end
nil (quote end-closed) (quote outline)))
  outline-discard-extents(0 1)
  outline-flag-region(0 1 nil)
  org-move-subtree-down(-1)
  org-move-subtree-up(1)
  call-interactively(org-move-subtree-up)
  org-metaup(nil)
  call-interactively(org-metaup)

Here's what I did to noutline.el to mask the issue:

diff --git a/xemacs/noutline.el b/xemacs/noutline.el
index f9ea1da..2463011 100644
--- a/xemacs/noutline.el
+++ b/xemacs/noutline.el
@@ -735,6 +735,8 @@ BEG and END default respectively to the beginning
and end of buffer."
 If FLAG is nil then text is shown, while if FLAG is t the text is hidden."
   (when (< to from)
     (setq from (prog1 to (setq to from))))
+  (when (< from (point-min))
+    (setq from (point-min)))
   ;; first clear it all out
   (outline-discard-extents from to)
   (when flag

I doubt this is a proper fix.  It likely just masks the real issue.
The line in org-move-subtree-down that called outline-flag-region with
FROM set to zero is:

    (outline-flag-region (1- (point)) (point) nil)

I haven't dug into why this isn't already reported or why it doesn't
occur with FSF Emacs.

But many thank for an excellent tool.

             reply	other threads:[~2008-12-05  7:56 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-05  7:56 Hugh Daschbach [this message]
2008-12-05  8:40 ` Args out of range, XEmacs 21.4.21 Carsten Dominik

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=a6af35440812042356l14a0d757q34b5ab4da8fdc231@mail.gmail.com \
    --to=hdasch@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /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).