From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Hi-Angel Newsgroups: gmane.emacs.help Subject: Re: package: iPhone behavior insert . After a word and twice space Date: Mon, 27 Nov 2017 00:28:53 +0300 Message-ID: References: <87indxf4je.fsf@mat.ucm.es> <87fu90aipc.fsf@withouthat.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" X-Trace: blaine.gmane.org 1511734685 21921 195.159.176.226 (26 Nov 2017 22:18:05 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 26 Nov 2017 22:18:05 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: Thorsten Bonow Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Nov 26 23:17:57 2017 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eJ5FN-0005Bf-5I for geh-help-gnu-emacs@m.gmane.org; Sun, 26 Nov 2017 23:17:57 +0100 Original-Received: from localhost ([::1]:58262 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eJ5FU-0005Vp-Gm for geh-help-gnu-emacs@m.gmane.org; Sun, 26 Nov 2017 17:18:04 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51353) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eJ4U0-0000iN-6u for help-gnu-emacs@gnu.org; Sun, 26 Nov 2017 16:29:05 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eJ4Tv-0007uI-8g for help-gnu-emacs@gnu.org; Sun, 26 Nov 2017 16:29:00 -0500 Original-Received: from mail-pf0-x22e.google.com ([2607:f8b0:400e:c00::22e]:44023) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eJ4Tv-0007tu-35 for help-gnu-emacs@gnu.org; Sun, 26 Nov 2017 16:28:55 -0500 Original-Received: by mail-pf0-x22e.google.com with SMTP id r68so10341916pfe.10 for ; Sun, 26 Nov 2017 13:28:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=3rkde2edIVGkQl8hhpIn01Ndsory3fTnwt6qS9PYmfI=; b=e98gdBQ30kGSivr8EY7eO1pSl6eyqqlutIP3osxrUgjJqgoGPhvQUgz8lfVPDtbKLD QVnvUXm2ov+ED8iVxjduMQ3GWmrc0nUA9WLHPcGpvEexowmY5szz4GEg+k5fwW9H/wla JTkFJX8eZw+ZOPALwUQZVB+r8wj/gk4wdR47FTyGnSENR9nSnNcbcM/PhB4C6i58rO7L VPtSAS2Z4aMujRX8NhJXcWiz0mzZqGAKjbwQT/XP8dwFO540Oyo0tq/F1zSxn9haWHX3 x5SaYchF3YZKoilNxgamZdzRoHe2F2C60IPhMQqETdjMar12PQ/m8bX1DRLbWkN3EDiL bsjQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=3rkde2edIVGkQl8hhpIn01Ndsory3fTnwt6qS9PYmfI=; b=PY3WbkEEm5KOpChKXGsGOZDAYHl4SxzrRcoOWkrU7QLqMNUXzmEegJ4RF18VsR4wnQ T+ImWHWAz4weXkJVYQ3dXYITx0AvqKx+29fcL69CuSNOuNTwJilxJmARBij5a+RHMgv9 RfspJ5qoqq9hXx/4rxTZP6AASOIenJdIADC3ra8QLz/pODq97uhPeTFhTZ4/rK664RM7 kZtq8N2ovMx3oh/CLjkMyxuanqOj2YXN/ctw6NYuyL8E0HW0Noy6Q91h1Z0AWfEMXI4m TT5CzfiLfOUqjjEGBhJxUqH0UggGGJZpXaP5f2wADjDEq/FDO+m+V2LRCH4IildO5tn9 ftjQ== X-Gm-Message-State: AJaThX4/NkhHCPxQVCi2K9oUqk6SRMUZ8fC54QtCFB5uxHhJppToj9Wy 02CJINYoEaWW+HjX/G5mazs4TnhKvE7sDa02Szs= X-Google-Smtp-Source: AGs4zMZtNyiK0dvIREgcalhTT/LgADqKSPYsqEGyHB0ZzlHiMr2ThxnWMs0/qvd8sFbsDz7/Vrzwev3D9adyJd3TXSk= X-Received: by 10.99.185.28 with SMTP id z28mr14486222pge.212.1511731733554; Sun, 26 Nov 2017 13:28:53 -0800 (PST) Original-Received: by 10.100.191.22 with HTTP; Sun, 26 Nov 2017 13:28:53 -0800 (PST) In-Reply-To: <87fu90aipc.fsf@withouthat.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400e:c00::22e X-Mailman-Approved-At: Sun, 26 Nov 2017 17:17:26 -0500 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:115112 Archived-At: On 26 November 2017 at 23:27, Thorsten Bonow wrote: >>>>>> Uwe Brauer writes: > >>>>> "Uwe" == Uwe Brauer 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.