From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Andreas Roehler Newsgroups: gmane.emacs.devel Subject: Re: Patch to change just-one-space Date: Fri, 14 Aug 2009 14:19:00 +0200 Message-ID: <4A855634.9020008@online.de> References: <7b501d5c0908131337g300e8895i465719007e29074c@mail.gmail.com> <87ljlns61x.fsf@mail.jurta.org> <7b501d5c0908131633h74ecc2c3s9ff607de840a6064@mail.gmail.com> <87ab2387rn.fsf@uwakimon.sk.tsukuba.ac.jp> <7b501d5c0908132359g7a309178pbb646c5b6b9a6ad3@mail.gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1250252312 19464 80.91.229.12 (14 Aug 2009 12:18:32 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 14 Aug 2009 12:18:32 +0000 (UTC) Cc: Juri Linkov , "Stephen J. Turnbull" , emacs-devel@gnu.org To: Deniz Dogan Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Aug 14 14:18:25 2009 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1Mbvjj-0004lG-J4 for ged-emacs-devel@m.gmane.org; Fri, 14 Aug 2009 14:18:23 +0200 Original-Received: from localhost ([127.0.0.1]:41678 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Mbvji-0006TM-Kl for ged-emacs-devel@m.gmane.org; Fri, 14 Aug 2009 08:18:22 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Mbvjc-0006TH-5V for emacs-devel@gnu.org; Fri, 14 Aug 2009 08:18:16 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MbvjX-0006T5-9M for emacs-devel@gnu.org; Fri, 14 Aug 2009 08:18:15 -0400 Original-Received: from [199.232.76.173] (port=35014 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MbvjX-0006Sx-2U for emacs-devel@gnu.org; Fri, 14 Aug 2009 08:18:11 -0400 Original-Received: from moutng.kundenserver.de ([212.227.17.9]:50901) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MbvjW-0005cq-2V for emacs-devel@gnu.org; Fri, 14 Aug 2009 08:18:10 -0400 Original-Received: from [192.168.178.27] (p54BEAAC8.dip0.t-ipconnect.de [84.190.170.200]) by mrelayeu.kundenserver.de (node=mrbap2) with ESMTP (Nemesis) id 0MKt72-1MbvjM3PZx-000C8N; Fri, 14 Aug 2009 14:18:02 +0200 User-Agent: Thunderbird 2.0.0.19 (X11/20081227) In-Reply-To: <7b501d5c0908132359g7a309178pbb646c5b6b9a6ad3@mail.gmail.com> X-Provags-ID: V01U2FsdGVkX18Ps+5qqE1zM6RqBzl6Ooeq5zubtHiMyNyIHlz tBOVgjX17qsa97IbzLkI84olbDiy6dT+rEiY/jDydVAqcz40Hy 2nAQM3zhRS3SANv4EAFb/QIK4JVQ6vIIEUvuHX0de0= X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:114241 Archived-At: Deniz Dogan wrote: > 2009/8/14 Stephen J. Turnbull : >> Deniz Dogan writes: >> > 2009/8/14 Juri Linkov : >> >> > > 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: > >
>

> c Hello >

>
> > ...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: > >
>

Helloc >

>
> > ...where point is at "c". The result: > >
>

Hello

>
> >> 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 ? ))))) ;;;;