all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Ehud Karni" <ehud@unix.mvs.co.il>
Cc: help-gnu-emacs@gnu.org
Subject: Re: Deleting chunks of whitespace
Date: Mon, 18 Nov 2002 20:07:24 +0200	[thread overview]
Message-ID: <200211181807.gAII7O0c032742@beta.mvs.co.il> (raw)
In-Reply-To: <ubs4myhbk.fsf@bambecksystems.com> (rvmolen@bambecksystems.com)

On 18 Nov 2002 08:26:55 -0800, rvmolen@bambecksystems.com (Richard V. Molen) wrote:
> 
> Thank you Ehud, this works nicely and does 95% of what I want.  And
> it's done with simple, resuable functions.
> 
> The remaining 5% occurs at the end of the buffer when there is still a
> word and maybe some extra newlines remaining.  Of course, this doesn't
> occur often and a couple of C-k's would clean it right up.

This is very easy to fix (change the `t' to `1' in the 3rd arg to
`re-search-forward', see its help) like this:

(defun forward-to-non-blank ()
  "go to 1st non blank (after blank) to right,
if there is none go to end of buffer"
  (interactive)
       (if (re-search-forward "[ \t\n][^ \t\n]" (point-max) 1)  
           (backward-char 1)))
                                                                   
Ehud.


-- 
 Ehud Karni           Tel: +972-3-7966-561  /"\
 Mivtach - Simon      Fax: +972-3-7966-667  \ /  ASCII Ribbon Campaign
 Insurance agencies   (USA) voice mail and   X   Against   HTML   Mail
 http://www.mvs.co.il  FAX:  1-815-5509341  / \
 mailto:ehud@unix.mvs.co.il                  Better  Safe  Than  Sorry

  reply	other threads:[~2002-11-18 18:07 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.1037375498.29003.help-gnu-emacs@gnu.org>
2002-11-15 17:24 ` Deleting chunks of whitespace Richard V. Molen
2002-11-15 17:42 ` Benjamin Rutt
2002-11-15 18:22 ` Benjamin Lewis
2002-11-15 19:42   ` Richard V. Molen
2002-11-15 20:02     ` Benjamin Lewis
2002-11-15 21:08       ` Richard V. Molen
2002-11-16 15:58         ` Ehud Karni
     [not found]         ` <mailman.1037463184.24264.help-gnu-emacs@gnu.org>
2002-11-18 16:26           ` Richard V. Molen
2002-11-18 18:07             ` Ehud Karni [this message]
     [not found]             ` <mailman.1037643734.10691.help-gnu-emacs@gnu.org>
2002-11-18 18:55               ` Richard V. Molen
2002-11-16 18:54 ` Kai Großjohann
2002-11-15 17:42 Moore, Mathew L
  -- strict thread matches above, loose matches on Subject: below --
2002-11-15 15:32 Moore, Mathew L

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=200211181807.gAII7O0c032742@beta.mvs.co.il \
    --to=ehud@unix.mvs.co.il \
    --cc=help-gnu-emacs@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.