Re: New package `typewriter.el'

Enrico Flor <[email protected]>
Newsgroups gmane.emacs.devel
Message-ID <[email protected]>
Hi Philip,

Thank you for the comments!

> Is it necessary to list all the options here, or can't you just refer to
> the customisation group?

You're right.  This is unnecessary.

> You don't have to specify the :group if a defgroup occurs in the same
> file.

I didn't know (or I forgot)!

> You can specialize this to natnum.

Ha, indeed.

> I am not sure how clever it is to override user preferences here, they
> could have disabled ring-bell-function for a good reason.  If I were
> you, I'd just use regular ding in the remainder of the file.

Yes, I think you're right.  I thought
that providing the typewriter-silent
option was gonna be enough, but it's
simpler to not override in the first
place.

> Do you have a reason why you disable message logging here?

Simply to prevent flooding the Messages
buffer with error messages that could
occur often and have little value in
being stored?  I think it's a good
default, but if you prefer it could be
another user option.

> I would use (substitute-command-keys "... \\[typewriter-quit]") here to
> present the user a binding if they have configured one, but also to
> highlight the keybinding.

Of course, this is the right way to go!  

> Can you explain why you do this?

You mean instead of simply

  (setq-local inhibit-read-only nil)
  
?  I actually don't remember but it
would do the same thing.  If it's
preferable, I have no issue.  

> I think it is better to use yes-or-no-p, in case the user prefers to
> give longer confirmations.  Everyone else can, and usually does,
> configure `use-short-answers'.

Right!  I didn't think of this.

> This is my main gripe, why is this a major mode and not a minor mode?
> And as a major mode, why does it inherit from fundamental-mode and not
> text-mode?

Hah, I pondered this too actually.  I
landed on the major mode for a few
reasons.  This mode imposes really
fundamental restrictions on things.  I
don't see why someone would use activate
this while working on an org-mode
buffer, or latex-mode, let along any of
the prog-modes.  It doesn't really
provide any supplementary feature, it's
more a radical zero-features state.  

And this is also, in part, why
fundamental mode.  The typewriter is so
"dumb" that it has no use for
text-specific syntax tables, awareness
about paragraphs, and stuff like that.
I just thought it was simpler to have no
default to "undo"?  But you'll note that
text-mode is where the user will be if
they want to quit the mode and do some
editing on the text they wrote, because
of course they will be treating the
buffer content as text.

Enrico
signature.asc (application/pgp-signature, 857 B)
-----BEGIN PGP SIGNATURE-----

iQJFBAEBCAAvFiEERVv7soLxAz8JCV7Vj/ouJc5xpgYFAmqHVWARHGVucmljb0Bl
Zmxvci5uZXQACgkQj/ouJc5xpgZXxw/8C8TOODLZxlXQbZ3hbfQNh7V7o0mFAlyk
BGHId7Rzb0UEj2RLmZT9jeoDF/HT0Y3o9BnY5cFU5YMiTfxeblUTlvfIS5WyyR+6
aAW37wM68CsK+CfnlU1NTHy2KM9Fuh1RoUhK2szkTWfAF/OM16wTrW4RPC+kvZ6X
aC5IfFgI5GzsZn4lhouWmUjnciJi/onQ2HQJ9Qvfh+jIAl7kSh6Ofht/GK0XX9rt
GIF9KEugt5Vje78BTIDR8Pb88n8TJJXz/Fxf9GUO+Dh/2qIO0P3kKVD9pp1KN0SY
VCkAq2yPPeAYVfZC+5lAVkFnWRwrOOZJjo4LtKiw9t9lJ80VOdpr5GGKnwffV+jr
7qa2UCgPh4eW3oP0VP4Bv40TOcayi9PSVIgCnSH7xszZXWYcBdgJYgxt3XiwHCKc
+DT5XYJAFvlvBIt2r2ggdsXcT26NK88aZG6JqV9SwQmnkhznLxPZ/dr5MxUsNEv0
J2RZZfbdg5hrXmZQNV1QaCRWgnyp69LFD82sImdAn/JoySYjE/egjTF3ItUuE1to
tnUe2MdZB47JGA6O+nLB6vrhQ3c/vQKi/EI7dRzeuFhA7cAT+OElqyUa+WEhF7ap
cZzsrjYB5h89xHNRZYXM7lIqHgp5ZnQs4a1F17mC9qibL48HDKU+AoiPW78vC8qt
EOBJccgfW/4=
=9e62
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.