From: Andreas Roehler <andreas.roehler@online.de>
To: Deniz Dogan <deniz.a.m.dogan@gmail.com>
Cc: Juri Linkov <juri@jurta.org>,
"Stephen J. Turnbull" <stephen@xemacs.org>,
emacs-devel@gnu.org
Subject: Re: Patch to change just-one-space
Date: Fri, 14 Aug 2009 14:19:00 +0200 [thread overview]
Message-ID: <4A855634.9020008@online.de> (raw)
In-Reply-To: <7b501d5c0908132359g7a309178pbb646c5b6b9a6ad3@mail.gmail.com>
Deniz Dogan wrote:
> 2009/8/14 Stephen J. Turnbull <stephen@xemacs.org>:
>> Deniz Dogan writes:
>> > 2009/8/14 Juri Linkov <juri@jurta.org>:
>>
>> > > No, it's a controversial change. Just imagine typing M-SPC at the end
>> > > of the paragraph.
>> >
>> > That's exactly why I wrote this change, because that's how I use my
>> > own version of M-SPC. I very rarely use the version that's in CVS now.
>>
>> I use the current definition a lot; usage patterns vary, it seems.
>>
>> In your typical use there are *no* non-newline spaces?
>
> No, it is usually a combination of spaces and newlines, e.g. in:
>
> <div>
> <p>
> c <a href="#">Hello</a>
> </p>
> </div>
>
> ...where point is at "c". Then I'd just merge the lines using M-SPC
> DEL or M-0 M-SPC. Then I would probably do it again:
>
> <div>
> <p><a href="#">Hello</a>c
> </p>
> </div>
>
> ...where point is at "c". The result:
>
> <div>
> <p><a href="#">Hello</a></p>
> </div>
>
>> It seems to me that a more flexible and discoverable (and to you
>> equivalent, up to default keybindings) idea would be to define
>> `paragraph-join' and `paragraph-break', and bind the former to M-SPC.
>
> Sounds interesting. So basically we would make `paragraph-join' the
> same as "my" version of `just-one-space'? Or did you have something
> different in mind?
>
Hi,
I use a similar thing quite often and instead of
fixup-whitespace. Its a useful feature IMO.
Here original behaviour is available via arg.
(defun my-fixup-whitespace (&optional arg)
"Fixup white space between objects around point.
Leave one space or none, according to the context.
With ARG, don't kill \\r\\n\\f"
(interactive "*P")
(save-excursion
(if (eq 4 (prefix-numeric-value arg))
(delete-horizontal-space)
;; 2007-11-28 a.roehler@web.de changed section start
(unless (bolp)
(skip-chars-backward " \t\r\n\f"))
(let ((start (point)))
(skip-chars-forward " \t\r\n\f")
(delete-region start (point)))
;; 2007-11-28 a.roehler@web.de changed section end
(if (or (looking-at "^\\|\\s)")
(save-excursion (forward-char -1)
(looking-at "$\\|\\s(\\|\\s'")))
nil
(insert ? )))))
;;;;
next prev parent reply other threads:[~2009-08-14 12:19 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-13 20:37 Patch to change just-one-space Deniz Dogan
2009-08-13 23:12 ` Xah Lee
2009-08-13 23:30 ` Deniz Dogan
2009-08-13 23:35 ` Daniel Colascione
2009-08-13 23:37 ` Deniz Dogan
2009-08-14 0:51 ` Robert J. Chassell
2009-08-14 0:58 ` Deniz Dogan
2009-08-14 10:37 ` Teemu Likonen
2009-12-31 20:55 ` Deniz Dogan
2010-11-22 20:35 ` Deniz Dogan
2010-11-22 22:16 ` Stefan Monnier
2010-11-23 8:29 ` Tassilo Horn
2010-12-06 18:22 ` Stefan Monnier
2010-12-07 0:34 ` Chong Yidong
2010-12-07 9:43 ` Tassilo Horn
2010-12-07 19:45 ` Tassilo Horn
2010-12-09 3:57 ` Stefan Monnier
2009-08-14 2:24 ` Xah Lee
2009-08-14 6:53 ` Deniz Dogan
2009-08-14 15:26 ` capitalize-dwim (was: Patch to change just-one-space) Stefan Monnier
2009-08-14 15:36 ` Xah Lee
2009-08-14 16:33 ` capitalize-dwim joakim
2009-08-15 2:31 ` capitalize-dwim Richard Stallman
2009-08-14 8:05 ` Patch to change just-one-space David Kastrup
2009-08-13 23:19 ` Juri Linkov
2009-08-13 23:33 ` Deniz Dogan
2009-08-14 2:10 ` Stephen J. Turnbull
2009-08-14 6:59 ` Deniz Dogan
2009-08-14 12:19 ` Andreas Roehler [this message]
2009-08-14 17:10 ` Stephen J. Turnbull
2009-08-14 15:12 ` Stefan Monnier
2009-08-14 15:16 ` Lennart Borgman
2009-08-14 1:14 ` Miles Bader
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=4A855634.9020008@online.de \
--to=andreas.roehler@online.de \
--cc=deniz.a.m.dogan@gmail.com \
--cc=emacs-devel@gnu.org \
--cc=juri@jurta.org \
--cc=stephen@xemacs.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.