The only consequence I'm seeing, is the ability to recognize periods from abbreviations.
As stated by gnu.org:
If you want to use just one space between sentences, you can set the
variable sentence-end-double-space to nil to make the sentence
commands stop for single spaces. However, this has a drawback: there
is no way to distinguish between ...
How the function works will depend on your configuration. As a default, Emacs expects two spaces after a sentence. You can change this to one space by setting the variable sentence-end-double-space to nil. Once you've done that, it'll work as you expect.
In my comment I suggested to use highlight-regexp. But meanwhile I discovered that that method does not keep the highlighting correctly updated (it actually should).
So I wrote up a minor mode hlds-mode that does the job.
I assume that with this minor mode the variable sentence-end-double-space becomes obsolete.
You just only hook the minor mode into those ...
Know that you can move forward and backward over sentences using M-e and M-a. And there are other sentence operations. See the Emacs manual, node Sentences.
You can write a command that inserts increasing numbers before sentences. Iterate over the text using function backward-sentence, starting at the end of the buffer. For example:
(defun foo-backward (...
Don't forget the vanilla sentence commands. The main ones out of the box that might be relevant here are transpose-sentences, mark-end-of-sentence, kill-sentence (M-k), and backward-kill-sentence (C-x <backspace>).
Others include: backward-sentence (M-a), forward-sentence (M-e, repunctuate-sentences.
You didn't specify exactly what you want to do. My understanding is:
search for one of ., ! or ? that is followed by a space;
if it is followed by at least two spaces, do nothing;
if it is preceded with "mrs", "mr", etc. or a word of length 1, do nothing;
otherwise, add a single space.
The following should do what you need:
This is not really an answer to the question as stated ("what do I lose if I set sentence-end-double-space to nil"), but rather something like the third way;-). (Also, it is a (partial) copy from a post I've just written on my blog; if this is inappropriate, someone please delete this, but I hope this might be helpful.)
So, basically, why do you want to ...
There is a function for repunctuating sentences, and it's called repunctuate-sentences. It allows you to step through each occurrence of a punctuation character or to change all at once.
If you don't like to use this function for some reason, you could temporarily disable sentence-end-double-space and then use forward-sentence to move by sentences and ...
Here's an attempt at defining a custom kill-sentence-dwim command that will either kill the entire sentence or kill up to the sentence-ending punctuation.
(defun my/forward-to-sentence-end ()
"Move point to just before the end of the current sentence."
(unless (looking-back "[[:alnum:]]")
Command mark-end-of-sentence does what you request. It's not bound to a key by default, but you can bind it to one. C-h f mark-end-of-sentence tells you:
mark-end-of-sentence is an interactive compiled Lisp function in
Put mark at end of sentence. Arg works as in forward-sentence.
If this command ...
Since you don't need actual abbreviations, just call completing-read with your list of sentences. This will let you define the list of sentences however you want. Here's the simplest possible implementation:
(defun db48x/insert-canned-response ()
(let ((lines (with-temp-buffer
The actual problem is that org-mode uses org-forward-paragraph as replacement for forward-paragraph but forward-paragraph is still used in elisp functions.
For an instance forward-sentence directly uses forward-paragraph and org-forward-sentence directly uses forward-sentence.
A hacky solution is to override forward-paragraph with org-forward-paragraph in ...
Flycheck uses checkdoc-current-buffer to implement the emacs-lisp-checkdoc checker which (in general) takes sentence-end-double-space into account. However, the checker itself is implemented by calling an emacs subprocess and only passing along the variables whitelisted in flycheck-emacs-lisp-checkdoc-variables, which doesn't include sentence-end-double-...
A quick-and-dirty (i.e., too simplistic) answer is this:
(defun at-sentence-beginning-p ()
"Return non-nil if at the beginning of a sentence."
It really tests whether point is after a sentence end. There are plenty of cases where it does not do the right thing, including, for example, a sentence enclosed in parens. But ...