> (... comments about the bash script 'b')
The purpose of this quick launcher bash script "b" is to allow
non-Emacs users a quick way to launch Brief mode even if one never use
Emacs before, in order to elicit potential new Emacs & Brief users.
This script also tries to mimic the "look and feel" of the original
Brief editor and hence those default setting changes. The wrapper file
'b.el' serves for the same purpose to show new users what Emacs setting
changes required to make scrolling not jumpy. 'b.el' was originally
used by 'b' but later I move those things into 'b' to make things more
obvious. With 'b', a new user can just install and launch Emacs with a
different default keystroke configuration.
Once they become a little bit more experienced with Emacs, this
launcher is no longer needed. Users can change .emacs to achieve the
same thing. 'b' is not intended to be used for experienced users or
for long; therefore I have to assume users don't know how to install
Emacs packages in the first place.
>> + BRIEFVERSION ELPA brief version, default "5.86"
>I'd recommend not to default to any specific version, ...
The launcher could actually become more complicated to perform more
extensive search and get rid of this version, but the launch time
will be increased accordingly and give new users a bad impression
that Emacs is slow, compare to vi, vim or nano, just like the rumors
say. As 'b' might be the first impression for new users I would like
to prevent this kind of possibility. It's also simple enough so
any Linux user with some basic shell script capability can modify
the script by themselves.
>Do you actually make use of bash-isms? If so, can we avoid them
>without too much extra work? If not, we should say "/bin/sh".
Yes, quite a few bash specific things. Linux systems must have bash
installed so even tcsh/csh/zsh users still able to run it.
>> + (setq scroll-step 1 \
>> + scroll-conservatively 101) \
>Why are these (h)scroll settings here instead of adding them to
It's basically telling new users what Emacs global settings are
affecting those (jumpy scrolling) behavior, without a need to look
> diff --git a/packages/brief/b.el b/packages/brief/b.el
The purpose of this file is the same, sample code showing users
> ;; Emacs 23.3.1, 18.104.22.168, 25.2.2, 26.0.50, 26.1 and 27.0.50.
> has 5.86 still been tested with all those Emacs versions?
Yes, but only some basic tests.
>> (defcustom brief-fake-region-face 'region ; 'secondary-selection
>You probably want `:type 'face` here.
I found I need to change that to defface otherwise in Emacs GUI
it won't show up as "face" even if I changed to :type 'face.
>The `:group 'brief` is redundant (it defaults to the last group defined
I was following how the builtin "cua" package defines them, it
keeps all the ":group 'cua" too. This should be more convenient
if someday I move it to another file.
>> +(defcustom brief-search-replace-using-regexp t
>> +(defvar-local brief-search-overlay nil
>> (defvar brief-latest-killed-buffer-info nil
>> +(defmacro brief-meta-l-key (updown key)
>> + (let* (c1
> Why not (defalias 'brief-beginning-of-file #'beginning-of-buffer) ?
> Why not (defalias 'brief-end-of-file #'end-of-buffer) ?
Nice, all of the above are followed, thanks!
>> +(defun brief-toggle-auto-backup ()
>> + "Toggle auto-backup on or off."
>> + (interactive)
>> + (message "Turn Emacs auto-backup %s"
>> + (if (setq auto-save-default (not auto-save-default))
>> + "ON" "OFF")))
> You could use a minor mode, here:
> (define-minor-mode brief-auto-backup-mode
> "Whether auto-backup is done"
> :global t
> :variable auto-save-default)
Wouldn't that become more complicated as I still need to define
a function `brief-toggle-auto-backup' to toggle it?
> Why not (defalias 'brief-open-new-line-next #'open-line) ?
They're different, `brief-open-new-line-next' shouldn't split
current line or it will be no different than the <Enter> key.
I added a comment there.