unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Hi-Angel <hiangel999@gmail.com>
To: Thorsten Bonow <thorsten.bonow@withouthat.org>
Cc: help-gnu-emacs@gnu.org
Subject: Re: package: iPhone behavior insert . After a word and twice space
Date: Mon, 27 Nov 2017 00:28:53 +0300	[thread overview]
Message-ID: <CAHGDjgAadi-1GPAwWxQh+pJLXB1zYYipQ2bqDb3CbHs27hOsPA@mail.gmail.com> (raw)
In-Reply-To: <87fu90aipc.fsf@withouthat.org>

On 26 November 2017 at 23:27, Thorsten Bonow
<thorsten.bonow@withouthat.org> wrote:
>>>>>> Uwe Brauer <oub@mat.ucm.es> writes:
>
>>>>> "Uwe" == Uwe Brauer <oub@mat.ucm.es> writes:
>> https://emacs.stackexchange.com/questions/3941/when-typing-automatically-transform-spc-spc-into-period-spc-spc
>
>> (defun freaky-space () (interactive) (cond ((looking-back "\\(?:^\\|\\.\\)
>> +") (insert " ")) ((eq this-command last-command) (backward-delete-char 1)
>> (insert ".  "))  (t (insert " "))))
>
>> (define-key text-mode-map " " 'freaky-space)
>
>> Not bad.
>
> Nice.  But this solution only works in text modes.  I think it might be
> confusing after getting used to and relying on it, e.g. if you don't have this
> feature when writing a comment in some programming language.  And when your
> sentence already has a dot, typing two spaces adds another one.

Yeah, I think the proper solution would be to make it working rather
in an IM, e.g. ibus or fcitx, or whatever. This way it would work not
only in Emacs, but for every application in the system. I don't have
any tips for how to do it though.



  parent reply	other threads:[~2017-11-26 21:28 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-26 15:22 package: iPhone behavior insert . After a word and twice space Uwe Brauer
2017-11-26 19:29 ` Uwe Brauer
     [not found] ` <mailman.4600.1511724569.27995.help-gnu-emacs@gnu.org>
2017-11-26 20:27   ` Thorsten Bonow
2017-11-26 20:53     ` Uwe Brauer
2017-11-26 21:28     ` Hi-Angel [this message]
2017-11-26 23:21       ` Emanuel Berg
2017-11-27  4:56         ` Hi-Angel
2017-11-28 20:36           ` Emanuel Berg
2017-11-26 22:06 ` Emanuel Berg
     [not found] <mailman.4578.1511709783.27995.help-gnu-emacs@gnu.org>
2017-11-26 18:53 ` Thorsten Bonow
2017-11-26 20:57   ` Uwe Brauer

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=CAHGDjgAadi-1GPAwWxQh+pJLXB1zYYipQ2bqDb3CbHs27hOsPA@mail.gmail.com \
    --to=hiangel999@gmail.com \
    --cc=help-gnu-emacs@gnu.org \
    --cc=thorsten.bonow@withouthat.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.
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).