unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Uwe Brauer <oub@mat.ucm.es>
To: help-gnu-emacs@gnu.org
Subject: Re: package: iPhone behavior insert . After a word and twice space
Date: Sun, 26 Nov 2017 21:53:04 +0100	[thread overview]
Message-ID: <87lgisn4nj.fsf@mat.ucm.es> (raw)
In-Reply-To: 87fu90aipc.fsf@withouthat.org

>>> "Thorsten" == Thorsten Bonow <thorsten.bonow@withouthat.org> 
>>> writes: 
 
   >>>>>> 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. 

Well I just bound it globally and it worked, I wrote a trivial function
which toogle on and of this key setting and it works even in lisp mode.


   > But I guess the last problem can be solved by modifying the regexp.
   > 'paragraphs.el' (included in GNU Emacs) has `sentence-end', which returns the
   > regexp describing the end of a sentence.  Maybe start from there.

Right first I check your other solution
   > Toto




  reply	other threads:[~2017-11-26 20:53 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 [this message]
2017-11-26 21:28     ` Hi-Angel
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=87lgisn4nj.fsf@mat.ucm.es \
    --to=oub@mat.ucm.es \
    --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.
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).