commit cc62c6250b3d146d0cf452cb3be55ed58fb959d4
parent 5424c666278844ff049a66310a045743a4402b87
Author: Yuval Langer <yuvallangerontheroad@gmail.com>
Date: Tue, 3 Oct 2023 20:58:27 +0300
Add more info to the readme file.
Diffstat:
M | README.org | | | 56 | ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
1 file changed, 56 insertions(+), 0 deletions(-)
diff --git a/README.org b/README.org
@@ -1,5 +1,55 @@
Replace yes-or-no with super-duper-yes-or-no.
+* About:
+
+Copying from [[https://lists.gnu.org/archive/html/help-gnu-emacs/2023-09/msg00129.html][the mailing list post for now]] (random case toggle prompt now works):
+
+People often alias yes-or-no with y-or-n, which is a less demanding
+confirmation function.
+
+I thought, hey, what about aliasing yes-or-no with something even more
+demanding to avoid confirming stuff accidentally?
+
+I had a few ideas which I plan on implementing:
+
+One idea (Google's Gmail's Drunk Mode) is to ask the user to solve a
+small arithmetic problem, which I haven't yet implemented.
+
+Another idea given by a friend was to prompt something like this with
+randomly capitalised letters:
+
+#+begin_src elisp
+"If yOU undERstanD what you'rE doing, enter the capitalized letters here:"
+#+end_src
+
+What I did do is write a function which asks the user to write a
+sequence of randomly selected words from a wordlist in order to
+confirm, and another to decline. [1] Right now it only uses a dummy
+wordlist, but I have also written another package which provides a
+selection of publicly known wordlists, which the first package would
+be dependent on.
+
+The wordlist package [2] bundles publicly known worslists such as the
+Diceware wordlists and the EFF wordlists. I took the original files
+as they are from those projects, and produce vectors of strings, each
+vector is a wordlist.
+
+It might just be my horrid code, but it takes a noticeable amount of
+time to produce the vectors. How should I cache the results of the
+wordlist producing functions?
+
+Another concern is that this solution takes a lot of memory? Could I
+make this dependency optional in the super-duper-yes-or-no package?
+
+This is partly an exercise in learning Emacs Lisp, but maybe someone
+would find it useful?
+
+p.s. I haven't yet created their https://sr.ht/ homes, so they are
+still only up on https://codeberg.org/
+
+[1]: <https://codeberg.org/yuvallangerontheroad/super-duper-yes-or-no>
+[2]: <https://codeberg.org/yuvallangerontheroad/emacs-wordlists>
+
* Usage:
To replace yes or no with super-duper-yes-or-no:
@@ -8,5 +58,11 @@ To replace yes or no with super-duper-yes-or-no:
(defalias 'yes-or-no 'super-duper-yes-or-no)
#+end_src
+To use the randomly case toggling prompt instead of yes-or-no:
+
+#+begin_src elisp
+(defalias 'yes-or-no 'super-duper-yes-or-no-yes-or-no-toggle-case-p)
+#+end_src
+
* Todo:
** Add proper wordlists, like Diceware's or EFF's.