all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Richard Stallman <rms@gnu.org>
To: Thierry Volpiatto <thierry.volpiatto@gmail.com>
Cc: emacs-devel@gnu.org
Subject: Re: proposal: edit-rectangle
Date: Fri, 07 Oct 2016 16:31:00 -0400	[thread overview]
Message-ID: <E1bsbnI-0007S4-Jd@fencepost.gnu.org> (raw)
In-Reply-To: <87pondz5an.fsf@gmail.com> (message from Thierry Volpiatto on Thu, 06 Oct 2016 20:44:00 +0200)

[[[ To any NSA and FBI agents reading my email: please consider    ]]]
[[[ whether defending the US Constitution against all enemies,     ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]

  > Also, after inserting the new rectangle, undo should restore buffer as
  > before, just need for this to add `buffer-disable-undo` in first fn and
  > `buffer-enable-undo` in second fn.

A smarter way to handle it is to scan the undo list at the end of
edit-rectangle, and convert those specific undo entries so that they
describe the same changes as having been made directly in the buffer.
That way, you could undo those individual changes one by one.

  > The results are a bit awkward if you `restore-rectangle' with more lines
  > than you started with, but I don't have any ideas offhand for
  > obviously better behavior.

Perhaps duplicate the last line of the surrounding text so that you have
enough lines to put the rectangle into.



-- 
Dr Richard Stallman
President, Free Software Foundation (gnu.org, fsf.org)
Internet Hall-of-Famer (internethalloffame.org)
Skype: No way! See stallman.org/skype.html.




  reply	other threads:[~2016-10-07 20:31 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-06 17:08 proposal: edit-rectangle John Wiegley
2016-10-06 17:34 ` Kaushal Modi
2016-10-06 18:08   ` John Wiegley
2016-10-06 20:49     ` Stefan Monnier
2016-10-06 21:00       ` Kaushal Modi
2016-10-06 18:19 ` Thierry Volpiatto
2016-10-06 18:44 ` Thierry Volpiatto
2016-10-07 20:31   ` Richard Stallman [this message]
2016-10-06 19:17 ` Dmitri Paduchikh
2016-10-06 19:38 ` John Mastro
2016-10-06 20:23 ` Alain Schneble
2016-10-06 20:26   ` Kaushal Modi
2016-10-06 20:31   ` John Wiegley
2016-10-06 21:07 ` Stefan Monnier
2016-10-06 21:42 ` Alain Schneble
2016-10-06 21:53   ` Alain Schneble

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=E1bsbnI-0007S4-Jd@fencepost.gnu.org \
    --to=rms@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=thierry.volpiatto@gmail.com \
    /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.