all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Reversing lines chunks at a time
@ 2008-09-16  9:07 Rupert Swarbrick
  2008-09-16 10:23 ` harven
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Rupert Swarbrick @ 2008-09-16  9:07 UTC (permalink / raw)
  To: help-gnu-emacs

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


Hi,

I have the following sort of transformation that I have to do fairly
often. For example, when writing LaTeX code, I might have a line in
maths mode which looks like

  G_*[n] = G_* \times \Delta^n

(this defines the left hand side to be the Cartesian product of a G with
a star and a capital delta with a superscript n, for those reading who
aren't au fait with LaTeX). Anyway, suppose I wanted the product the
other way round:

  G_*[n] = \Delta^n \times G_*

I'm using Auctex, which is pretty brilliant, but it's syntax table
breaks at quite a few characters other than whitespace for word
boundaries. I don't particularly want to change that: it seems
reasonable, but it means that the transpose-* commands don't really help
in this case: you end up mangling together bits of the various
sections.

Moreover, I sometimes don't bother, say, putting a space before the
\times, which is still perfectly fine LaTeX, but it means that there
would be no way for Auctex to sensibly see what to do.

At the moment, I do a crazy jumping forward and back, killing and
yanking, but I suspect there's a better way! Before I started hacking
elisp, I was wondering whether there was already a neat way to solve
this sort of problem that I didn't know about?


Many thanks,

Rupert

[-- Attachment #2: Type: application/pgp-signature, Size: 314 bytes --]

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

end of thread, other threads:[~2008-09-17 21:18 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-09-16  9:07 Reversing lines chunks at a time Rupert Swarbrick
2008-09-16 10:23 ` harven
2008-09-17 18:54   ` Rupert Swarbrick
2008-09-16 20:24 ` Xah
2008-09-17 18:58   ` Rupert Swarbrick
2008-09-17 21:18     ` Xah
2008-09-17 17:14 ` rgb
2008-09-17 18:49   ` Rupert Swarbrick

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.