all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* why (error "Transposed region has length 0") ?
@ 2002-06-08 13:01 Paul Stoeber
  2002-06-09 15:19 ` Richard Stallman
  0 siblings, 1 reply; 2+ messages in thread
From: Paul Stoeber @ 2002-06-08 13:01 UTC (permalink / raw)


In GNU Emacs 21.2.1 (powerpc-unknown-linux-gnu)
 of 2002-05-26 on xyz
configured using `configure  --prefix=/e --without-x'
Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: C
  locale-coding-system: nil
  default-enable-multibyte-characters: nil



When transpose-regions is called with one region having zero length
(i.e. the arguments satisfy (or (= STARTR1 ENDR1) (= STARTR2 ENDR2))),
it says `(error "Transposed region has length 0")'.

The notion of transposition works naturally for empty regions too.  If both
regions are empty, it's a no-op.  If only one region is empty, it's relocation
of the other region to the point designated by the empty one.

Why the restriction?

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: why (error "Transposed region has length 0") ?
  2002-06-08 13:01 why (error "Transposed region has length 0") ? Paul Stoeber
@ 2002-06-09 15:19 ` Richard Stallman
  0 siblings, 0 replies; 2+ messages in thread
From: Richard Stallman @ 2002-06-09 15:19 UTC (permalink / raw)
  Cc: emacs-devel

The story of transpose-regions is peculiar.  It was meant to be used
in transpose-subr, but we never put it into service there because
nobody was ever convinced that it really worked correctly in all
cases (it is rather a complex thing to check) and nobody felt like debugging whatever problems it might have.

The function is used in just one Emacs package, hanoi.el.  I geuss
that has given it a certain amount of testing, but not very broadly.

The main motivation for transpose-regions was to reduce memory usage,
sinceit avoids copying both regions into strings.  Nowadays that
optimization may not be worth the trouble.  We could simply delete the
current transpose-region and use 6 lines of Lisp code (see
transpose-subr-1) instead.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2002-06-09 15:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-06-08 13:01 why (error "Transposed region has length 0") ? Paul Stoeber
2002-06-09 15:19 ` Richard Stallman

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.