From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Michal Nazarewicz <mina86@mina86.com>
Cc: Milan Zamazal <pdm@zamazal.org>, 18730@debbugs.gnu.org
Subject: bug#18730: [PATCH] tildify.el: Add `auto-tildify' and `auto-tildify-mode'.
Date: Wed, 15 Oct 2014 10:35:34 -0400 [thread overview]
Message-ID: <jwvlhoh1kfa.fsf-monnier+emacsbugs@gnu.org> (raw)
In-Reply-To: <xa1tegu9n4mh.fsf@mina86.com> (Michal Nazarewicz's message of "Wed, 15 Oct 2014 10:01:26 +0200")
Hi Michal,
Thanks for your patch. It looks like a good feature. See some
comments below.
Stefan
> It is configured via two new customize variables:
> `auto-tildify-pattern-alist' and `auto-tildify-check-envs'.
Could it use the existing tildify-pattern-alist?
> +Breaking line after a single-character words are forbidden
> +by Czech and Polish typography (and may be discouraged in other
> +languages), so `auto-tildify-mode' makes it easier to create
> +a typographically-correct documents.
Indeed, that's why we have fill-single-char-nobreak-p. You might like
to write the above text is such a way to make it clear what's the
difference between the two.
> + "Alist specifying whether to insert hard space at point.
IIUC this isn't quite right: "insert hard space" would imply adding
a space without changing anything else, whereas what you code does is to
replace a soft space by a hard space. So instead of "insert hard", I'd
say maybe "harden".
> +;;;###autoload
> +(defun auto-tildify ()
[...]
> +This function is meant to be used as a `post-self-insert-hook'."
Why is it autoloaded? Are users expected to add it to
post-self-insert-hook by hand?
> + (interactive)
Why is it interactive? Would it make sense to bind it to a key sequence
or to run it via M-x ?
> +;;;###autoload
> +(define-minor-mode auto-tildify-mode
I recommend you name it just `tildify-mode' (and generally just use
a "tildify-" prefix rather than "auto-tildify-").
For that, it would most likely make sense to rename tildify-mode-alist
(e.g. to tildify--mode-alist, tho another name could be even better
since this name doesn't actually say what it does).
> + (message "Hard space for %s is a single space character, auto-tildify won't have any effect." major-mode)
Please try to stay within the limits of 80 columns.
next prev parent reply other threads:[~2014-10-15 14:35 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-15 8:01 bug#18730: [PATCH] tildify.el: Add `auto-tildify' and `auto-tildify-mode' Michal Nazarewicz
2014-10-15 14:35 ` Stefan Monnier [this message]
2014-10-16 9:34 ` Michal Nazarewicz
2014-10-16 14:03 ` Stefan Monnier
2014-10-16 14:57 ` Stefan Monnier
2014-10-16 16:07 ` Michal Nazarewicz
2014-10-16 19:39 ` Stefan Monnier
2014-10-17 8:44 ` Michal Nazarewicz
2014-10-17 13:06 ` Stefan Monnier
2014-10-22 23:19 ` Michal Nazarewicz
2014-10-24 22:51 ` Stefan Monnier
2014-10-28 22:01 ` bug#18730: [PATCH] tildify.el: introduce a `tildify-space-string' variable Michal Nazarewicz
2014-10-30 16:27 ` Stefan Monnier
2014-11-03 15:59 ` Michal Nazarewicz
2014-11-03 17:00 ` Stefan Monnier
2014-11-17 15:41 ` bug#18730: [PATCH 1/3] " Michal Nazarewicz
2014-11-17 15:41 ` bug#18730: [PATCH 2/3] tildify.el: introduce a `tildify-pattern' variable Michal Nazarewicz
2014-11-17 15:41 ` bug#18730: [PATCH 3/3] tildify.el: introduce a `tildify-foreach-region-function' variable Michal Nazarewicz
2014-11-17 17:38 ` bug#18730: [PATCH 1/3] tildify.el: introduce a `tildify-space-string' variable Stefan Monnier
2014-10-16 13:17 ` bug#18730: [PATCH] tildify.el: Add `auto-tildify' and `auto-tildify-mode' Ted Zlatanov
2014-10-16 14:16 ` Michal Nazarewicz
2014-10-16 14:55 ` Stefan Monnier
2014-10-16 17:17 ` Ted Zlatanov
2014-10-16 13:19 ` Ted Zlatanov
2014-10-16 15:34 ` bug#18730: [PATCHv2 1/2] tildify.el (tildify--pick-alist-entry): rename from tildify-mode-alist Michal Nazarewicz
2014-10-16 15:34 ` bug#18730: [PATCHv2 2/2] tildify.el: Add `auto-tildify' and `auto-tildify-mode' Michal Nazarewicz
2014-10-16 19:30 ` bug#18730: [PATCHv2 1/2] tildify.el (tildify--pick-alist-entry): rename from tildify-mode-alist Stefan Monnier
2014-11-24 14:20 ` bug#18730: [PATCH 1/2] tildify.el: Add `tildify-space' and `tildify-mode' Michal Nazarewicz
2014-11-24 14:20 ` bug#18730: [PATCH 2/2] tildify.el: Add `tildify-double-space-undos' Michal Nazarewicz
2014-12-10 17:44 ` bug#18730: [PATCH 1/2] tildify.el: Add `tildify-space' and `tildify-mode' Michal Nazarewicz
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=jwvlhoh1kfa.fsf-monnier+emacsbugs@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=18730@debbugs.gnu.org \
--cc=mina86@mina86.com \
--cc=pdm@zamazal.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.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.