unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: "Arni Magnusson" <arnima@hafro.is>
To: "Stefan Monnier" <monnier@iro.umontreal.ca>
Cc: 2887@emacsbugs.donarmstrong.com
Subject: bug#2887: Suggestions for simple.el
Date: Sat, 4 Apr 2009 23:35:28 -0000 (GMT)	[thread overview]
Message-ID: <11531.194.144.135.59.1238888128.squirrel@www.hafro.is> (raw)
In-Reply-To: <jwvprfs1oyf.fsf-monnier+emacsbugreports@gnu.org>

Thank you, Stefan, for the prompt reply and interest. Please find below my
list of raisons d'être.

Arni



`backward-delete-word'
`delete-word'

Users can delete words while leaving the kill-ring unchanged. For example,
the user has copied a table from somewhere and is now deleting some words
before yanking the table where it belongs. It would be frustrating for the
user to yank and see recently deleted words instead of the table.



`kill-line-or-region'

Users can bind C-k to kill lines and regions (do what I mean), as an
alternative to the default C-k and C-w setup.



`pull-line-down'
`pull-line-up'

Users can move lines up and down more effectively thank with
`transpose-lines'.



`pos-at-beginning-of-line'
`pos-at-end-of-line'

Useful when writing a variety of editing functions. Should be in simple.el
for the same resons as `line-beginning-position' and `line-end-position'
are there.



`zap-back-to-char'
`zap-up-to-char'

Zapping is typically to delete garbage until some important location. The
existing `zap-to-char' often deletes the beginning of that important
location, an opening brace or the like.



`clean-trails'

Like `delete-trailing-white', but reports how many lines were cleaned, and
deletes ^M as well. Many programs and programmers write files with
trailing spaces and ^M glyphs. It's nice to be able to clean those and get
body count in one keystroke.



`delete-all-blank-lines'

It's often useful to get rid of extra vertical spacing in source code,
output files, etc., sometimes undoing after enjoying the squeezed view.
Without this command, it would take a lot of keystrokes to delete all
blank lines while retaining the cursor buffer position.



`delete-indentation-nospace'

The `delete-indentation' command is very useful, but it often creates an
unwanted space. Users will probably bind this command to a keystroke close
to the `delete-indentation' keystroke.



`goto-longest-line'

Users can find out the maximum width (columns) of a text file, to check
the coding style or for some other reason. Sometimes it's easiest to call
"wc -L" via `shell-command' or `dired-do-shell-command', but
`goto-longest-line' will often be quicker and moves the cursor to the
longest line, for closer examination.

I remember when I wrote this command I thought about implementing a
separate non-interactive function called `longest-line' that would just
return the line number. Then `goto-longest-line' would call `longest-line'
to do the calculations, and other functions might call `longest-line' with
some other purpose than moving the cursor to it. I would be happy to
contribute a two-function implementation instead, since `longest-line'
might be useful for many users.



`downcase-word-or-region'
`upcase-word-or-region'

Users can bind M-l and M-u to downcase/upcase words or regions (do what I
mean), as an alternative to the default C-x C-l, C-x C-u, M-l, and M-u
setup.








  reply	other threads:[~2009-04-04 23:35 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-04 13:32 bug#2887: Suggestions for simple.el Arni Magnusson
2009-04-04 14:21 ` Stefan Monnier
2009-04-04 23:35   ` Arni Magnusson [this message]
2009-04-05  3:27     ` Stefan Monnier
2009-04-05 14:26       ` Leo
2009-04-05 20:17       ` Arni Magnusson
2009-04-05 21:59         ` Lennart Borgman
2009-04-06  2:14         ` Stefan Monnier
2009-04-06  3:02           ` Drew Adams
2009-04-07  2:46           ` Arni Magnusson
2009-04-07 14:02             ` Stefan Monnier
2009-04-07 16:09               ` Drew Adams
     [not found]               ` <008701c9b79b$41f3f250$0200a8c0@us.oracle.com>
2009-04-07 17:18                 ` Stefan Monnier
2009-04-07 17:22                 ` Chong Yidong
     [not found]                 ` <87iqlg4bwl.fsf@cyd.mit.edu>
2009-04-07 17:26                   ` Drew Adams
2009-04-07 21:43                   ` Stefan Monnier
2009-04-18  0:08               ` Arni Magnusson
2009-04-18 19:32                 ` Stefan Monnier
2009-04-19  1:13                   ` Arni Magnusson
2009-04-19  1:40                     ` Arni Magnusson
2009-04-19  3:14                     ` Stefan Monnier
2009-04-19 13:41                       ` Arni Magnusson
2020-09-19 21:50 ` Lars Ingebrigtsen

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.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=11531.194.144.135.59.1238888128.squirrel@www.hafro.is \
    --to=arnima@hafro.is \
    --cc=2887@emacsbugs.donarmstrong.com \
    --cc=monnier@iro.umontreal.ca \
    /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.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).