all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Stuart D. Herring" <herring@lanl.gov>
Cc: emacs-devel@gnu.org
Subject: Re: transpose-sexps
Date: Thu, 4 Jan 2007 14:49:14 -0800 (PST)	[thread overview]
Message-ID: <36997.128.165.123.18.1167950954.squirrel@webmail.lanl.gov> (raw)
In-Reply-To: <200701050002.14238.pogonyshev@gmx.net>

> It's not just confusing, it's a bug.  If it doesn't work and this is not
> (easily) fixable, make it do nothing or report an error.  Producing
> confusing
> results is worse than doing nothing.
>
> Paul

In the list case, it's not a bug, because it's impossible to guess the
user's intentions.  In
  (-!-foo bar) (baz spam)
with point as always at -!-, is the "current sexp" (to be transposed with
the following one) the symbol foo, or the list (foo bar)?

For the string case, it would be possible to "fix" this, but to do nothing
or report an error requires detecting the case just as much as doing the
right thing.  It is the detection which is hard -- just ask the CC mode
people trying to sort out defun detection.  Even in Lisp it's equivalent
to asking how many unescaped " characters precede point, not counting
those in comments (whose identification itself requires counting " in the
same manner).  Perhaps some clever caching or hints from the user could
make that reasonable to implement, but there is no useful change at all
that is easily made.

Davis

-- 
This product is sold by volume, not by mass.  If it appears too dense or
too sparse, it is because mass-energy conversion has occurred during
shipping.

  reply	other threads:[~2007-01-04 22:49 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-01-04 21:34 transpose-sexps Paul Pogonyshev
2007-01-04 21:48 ` transpose-sexps Stuart D. Herring
2007-01-04 22:02   ` transpose-sexps Paul Pogonyshev
2007-01-04 22:49     ` Stuart D. Herring [this message]
2007-01-04 22:53     ` transpose-sexps Andreas Schwab
2007-01-04 23:28       ` transpose-sexps Paul Pogonyshev
2007-01-05  9:13         ` transpose-sexps Miles Bader
2007-01-05 20:02           ` transpose-sexps Paul Pogonyshev
2007-01-08 18:06             ` transpose-sexps Stuart D. Herring
2007-01-08 21:16               ` transpose-sexps Paul Pogonyshev
2007-01-08 21:22                 ` transpose-sexps Stuart D. Herring
2007-01-09  2:08                   ` transpose-sexps Stefan Monnier
2007-01-08 18:00           ` transpose-sexps Stuart D. Herring
2007-01-05  9:38         ` transpose-sexps Andreas Schwab
2007-01-05  0:30     ` transpose-sexps Richard Stallman

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

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

  git send-email \
    --in-reply-to=36997.128.165.123.18.1167950954.squirrel@webmail.lanl.gov \
    --to=herring@lanl.gov \
    --cc=emacs-devel@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 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.