unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Propose to add setup-wizard.el to ELPA
@ 2022-01-02  2:07 Yuan Fu
  2022-01-02  2:37 ` Po Lu
                   ` (3 more replies)
  0 siblings, 4 replies; 72+ messages in thread
From: Yuan Fu @ 2022-01-02  2:07 UTC (permalink / raw)
  To: Emacs developers

[-- Attachment #1: Type: text/plain, Size: 794 bytes --]

A while ago I wrote a package that helps a new user to configure Emacs: it takes a user through some interactive pages, where changes takes effect immediately; and in the end it generates some code that can be copied to init.el. 

Demo for the original package: https://youtu.be/0qMskTAR2aw

I made some improvements to that package and renamed it setup-wizard. Do you think we could add it to ELPA? Maybe the name is too “official”, in that case I can rename it to yuan’s-setup-wizard or something.

I don’t know how useful could it be, since nowadays every body (understandably) starts with some community distribution rather than vanilla Emacs, but surely it is better than not having a wizard.

You can try it out with emacs -q -l setup-wizard.el -f setup-wizard

Yuan


[-- Attachment #2: setup-wizard.el --]
[-- Type: application/octet-stream, Size: 23716 bytes --]

;;; setup-wizard.el --- Setup wizard  -*- lexical-binding: t; -*-

;; Copyright (C) 2019-2020 Free Software Foundation, Inc.

;; Author: Yuan Fu <casouri@gmail.com>
;; Maintainer: Yuan Fu <casouri@gmail.com>
;; URL: https://github.com/casouri/setup-wizard
;; Version: 1.0.0
;; Keywords: convenience
;; Package-Requires: ((emacs "26.0"))

;; This file is part of GNU Emacs.

;; GNU Emacs is free software: you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation, either version 3 of the License, or
;; (at your option) any later version.

;; GNU Emacs is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
;; GNU General Public License for more details.

;; You should have received a copy of the GNU General Public License
;; along with GNU Emacs.  If not, see <https://www.gnu.org/licenses/>.

;;; Commentary:
;;
;; This package provides a setup wizard that takes a user through an
;; interactive interface, in which he or she can configure key
;; bindings schemes, UI elements, Fonts, packages, etc.

;;; Code:

(require 'widget)
(require 'wid-edit)
(require 'pcase)
(require 'seq)
(require 'cl-lib)

;;; Configs

(defvar setup-wizard--config nil
  "An alist (OPTION . (FORM COMMENT)) of configurations.
We use FORM and COMMENT to produce the final config.")

(defun setup-wizard--save-option-and-eval
    (option form comment &optional additional)
  "Save OPTION FORM and COMMENT, and evaluate FORM.
If ADDITIONAL is non-nil, eval that too."
  (when form
    (setf (alist-get option setup-wizard--config)
          (list form comment))
    (eval form))
  (when additional (eval additional)))

;;; Pages

(defun setup-wizard--insert (&rest args)
  "Insert ARGS and replace emojis if they can’t be displayed."
  (widget-insert
   (mapconcat (lambda (text)
                (if (and (char-displayable-p ?🧙)
                         (char-displayable-p ?🧚))
                    text
                  (string-replace
                   "🧚" "Fairy"
                   (string-replace
                    "🧙" "Wizard" text))))
              args)))

;;;; Themes

(defvar setup-wizard--c-demo
  "    #include <stdlib.h>

    struct point
    {
      x: int;
      y: int;
    };

    int main(int arg, int* argv)
    {
      int x = -1;
      int y = 2;
      void *buf = malloc(sizeof(uin32_t));
      return add(x, y) - 3;
    }
"
  "Demo C code.")

(defun setup-wizard--theme-page ()
  "Theme configuration page."
  (setup-wizard--insert
   "🧚: Heya! You are here for help setting up your Emacs, right?
Wizard will be here when you read to the next line.

🧙: Emacs comes with a couple of themes built-in, which are shown
below. You can browse for more themes online or in the package
manager.

🧚: Here are the built-in themes!

Theme preview:\n\n")
  ;; Insert a C demo.
  (widget-insert
   (with-temp-buffer
     (insert setup-wizard--c-demo)
     (c-mode)
     (font-lock-fontify-region (point-min) (point-max))
     (buffer-string)))
  (widget-insert "\n")
  ;; Insert theme selection menu.
  (apply #'widget-create 'radio-button-choice
         :follow-link t
         :value "default"
         ;; Enable the theme when the user selects it.
         :notify (lambda (widget &rest _)
                   (mapc #'disable-theme custom-enabled-themes)
                   (let* ((theme (intern (widget-value widget)))
                          (form (if (eq theme 'default)
                                    nil
                                  `(load-theme ',theme))))
                     (setup-wizard--save-option-and-eval
                      'theme form (format "Load %s theme" theme))))
         (cons '(item "default")
               (cl-loop for theme in (custom-available-themes)
                        collect `(item ,(symbol-name theme)))))
  (setup-wizard--insert "\n🧚: Want to ")
  (widget-create
   'push-button
   :notify (lambda (&rest _)
             (package-refresh-contents)
             (list-packages t)
             (goto-char (point-min))
             (let ((inhibit-read-only t))
               (keep-lines "-theme")))
   :value "browse the package manager for themes")
  (widget-insert "?\n"))

;;;; Keybinding

(defun setup-wizard--keybinding-page ()
  "Keybinding page."
  (setup-wizard--insert "🧙: This is the notation for modifiers in Emacs:

    C (control)   Ctrl
    M (meta)      Alt/Option
    s (super)     Windows/Command
    S (shift)     Shift

🧚: Which binding scheme do you like?\n\n")
  (widget-create 'radio-button-choice
                 :follow-link t
                 :value "default"
                 :notify
                 (lambda (widget &rest _)
                   (setup-wizard--save-option-and-eval
                    'keybinding
                    (cond
                     ((equal (widget-value widget)
                             "Alternative")
                      '(cua-mode))
                     ((equal (widget-value widget)
                             "Wizard’s choice")
                      `(progn
                         (global-set-key (kbd "s-c") #'kill-ring-save)
                         (global-set-key (kbd "s-x") #'kill-region)
                         (global-set-key (kbd "s-v") #'yank))))
                    "Set bindings for copy/cut/paste."))
                 '(item :value "Default"
                        :format "%v\n\n%d\n"
                        :doc "    M-w           Copy
    C-w           Cut
    C-y           Paste")
                 '(item :value "Alternative"
                        :format "%v\n\n%d\n"
                        :doc "    C-c           Copy
    C-x           Cut
    C-v           Paste")
                 '(item :value "Wizard’s choice"
                        :format "%v\n\n%d\n"
                        :doc "    s-c           Copy
    s-x           Cut
    s-v           Paste"))
  (setup-wizard--insert
   "\n🧙: In the alternative binding scheme, the binding for copy
and cut only take effect when some text is selected. So when
nothing is selected, they are still normal prefix keys.\n"))

;;;; UI features

(defun setup-wizard--ui-features-page ()
  "UI features page."
  (setup-wizard--insert "🧚: What UI elements do you like?\n\n")
  ;; Line numbers.
  (widget-create 'checkbox
                 :notify
                 (lambda (widget &rest _)
                   (let ((val (widget-value widget)))
                     (setup-wizard--save-option-and-eval
                      'line-number
                      `(global-display-line-numbers-mode
                        ,(if val 1 -1))
                      (format "%s line number."
                              (if val "Display" "Don’t display")))))
                 :value nil)
  (widget-insert " Line numbers.\n")
  ;; Thin cursor.
  (widget-create 'checkbox
                 :notify
                 (lambda (widget &rest _)
                   (let ((val (widget-value widget)))
                     (setup-wizard--save-option-and-eval
                      'thin-cursor
                      `(setq-default cursor-type
                                     ',(if val 'bar t))
                      (format "Use %s cursor"
                              (if val "thin" "default")))))
                 :value nil)
  (widget-insert " Thin cursor bar.\n")
  ;; Blink cursor.
  (widget-create 'checkbox
                 :notify
                 (lambda (widget &rest _)
                   (let ((val (widget-value widget)))
                     (setup-wizard--save-option-and-eval
                      'blink-cursor
                      `(blink-cursor-mode ,(if val 1 -1))
                      (format "%s cursor"
                              (if val "Blink" "Do not blink")))))
                 :value blink-cursor-mode)
  (widget-insert " Blink cursor.\n")
  ;; Tool bar.
  (widget-create 'checkbox
                 :notify
                 (lambda (widget &rest _)
                   (let ((val (widget-value widget)))
                     (setup-wizard--save-option-and-eval
                      'tool-bar
                      `(tool-bar-mode ,(if val 1 -1))
                      (format "%s tool bar."
                              (if val "Enable" "Disable")))))
                 :value tool-bar-mode)
  (widget-insert " Tool bar.\n")
  ;; Menu bar.
  (widget-create 'checkbox
                 :notify
                 (lambda (widget &rest _)
                   (let ((val (widget-value widget)))
                     (setup-wizard--save-option-and-eval
                      'menu-bar
                      `(menu-bar-mode ,(if val 1 -1))
                      (format "%s menu bar."
                              (if val "Enable" "Disable")))))
                 :value menu-bar-mode)
  (widget-insert " Menu bar.\n")
  ;; Scroll bar.
  (widget-create 'checkbox
                 :notify
                 (lambda (widget &rest _)
                   (let ((val (widget-value widget)))
                     (setup-wizard--save-option-and-eval
                      'scroll-bar
                      `(scroll-bar-mode ,(if val 1 -1))
                      (format "%s scroll bar"
                              (if val "Enable" "Disable")))))
                 :value scroll-bar-mode)
  (widget-insert " Scroll bar.\n")
  ;; Font.
  (widget-insert "\n")
  (let* (default-font-field
         variable-font-field
         cjk-font-field
         size-field
         action
         (phrase "The quick brown fox jumps over the lazy dog.\n"))
    (widget-insert "Font preview:\n\n")
    (widget-insert "    " phrase)
    (widget-insert "    " (propertize phrase 'face 'variable-pitch))
    (widget-insert "    大漠孤烟直,长河落日圆。\n")
    (widget-insert "    射は仁の道なり。射は正しきを己に求む。\n\n")
    (setq default-font-field
          (widget-create 'editable-field
                         :size 20
                         :value ""
                         :format "Default font: %v \n"))
    (setq variable-font-field
          (widget-create 'editable-field
                         :size 20
                         :value ""
                         :format "Variable-pitch font: %v \n"))
    (setq cjk-font-field
          (widget-create 'editable-field
                         :size 20
                         :value ""
                         :format "CJK font: %v \n"))
    (setq size-field
          (widget-create 'editable-field
                         :size 2
                         :value ""
                         :format "Font size: %v \n\n"))
    (setq action
          (lambda (&rest _)
            (let* ((default-font
                    (string-trim (widget-value default-font-field)))
                   (variable-font
                    (string-trim (widget-value variable-font-field)))
                   (cjk-font
                    (string-trim (widget-value cjk-font-field)))
                   (size (string-to-number
                          (string-trim
                           (widget-value size-field)))))
              (unless (equal default-font "")
                (setup-wizard--save-option-and-eval
                 'font `(set-face-attribute
                         'default nil :family ,default-font)
                 "Set default font."))
              (unless (equal variable-font "")
                (setup-wizard--save-option-and-eval
                 'variable-font
                 `(set-face-attribute
                   'variable-pitch nil :family ,variable-font)
                 "Set variable-pitch font."))
              (unless (equal cjk-font "")
                (setup-wizard--save-option-and-eval
                 'cjk-font
                 `(dolist (charset '(kana han cjk-misc))
                    (set-fontset-font
                     t charset (font-spec :family ,cjk-font)))
                 "Set CJK font."))
              (unless (eq size 0)
                (setup-wizard--save-option-and-eval
                 'font-size
                 `(set-face-attribute 'default nil :height ,(* size 10))
                 "Set font size.")))))
    (widget-create 'push-button
                   :value "Apply font settings"
                   :notify action)
    (widget-insert "\n")))

(defun setup-wizard--undo-page ()
  "Undo page."
  (setup-wizard--insert
   "🧙: Emacs has a powerful (but probably unintuitive) undo system,
where undo operations themselves are recorded in the undo
history, and redo is done by undoing an previous undo operation.

🧚: Which undo system do you like?\n\n")
  (widget-create 'radio-button-choice
                 :value "default"
                 :follow-lint t
                 :notify (lambda (widget &rest _)
                           (when (equal (widget-value widget)
                                        "Linear")
                             (setup-wizard--save-option-and-eval
                              'undo
                              `(global-set-key [remap undo] #'undo-only)
                              "Use linear undo style.")))
                 '(item :value "Default"
                        :format "%v\n\n%d\n"
                        :doc "    One undo rules them all")
                 '(item :value "Linear"
                        :format "%v\n\n%d\n"
                        :doc "    Undo and redo"))
  (let (undo-key redo-key)
    (widget-insert "\n")
    (setq undo-key
          (widget-create 'editable-field
                         :size 5
                         :value "C-/"
                         :format "Bind undo to: %v "))
    (widget-create 'push-button
                   :value "Apply"
                   :notify
                   (lambda (&rest _)
                     (let ((key (string-trim (widget-value undo-key))))
                       (setup-wizard--save-option-and-eval
                        'undo-key
                        `(global-set-key (kbd ,key) #'undo)
                        "Set binding for ‘undo’."))))
    (widget-insert "\n")
    (setq redo-key
          (widget-create 'editable-field
                         :size 5
                         :value "C-?"
                         :format "Bind redo to: %v "))
    (widget-create 'push-button
                   :value "Apply"
                   :notify
                   (lambda (&rest _)
                     (let ((key (string-trim (widget-value redo-key))))
                       (setup-wizard--save-option-and-eval
                        'undo-key
                        `(global-set-key (kbd ,key) #'undo-redo)
                        "Set binding for ‘undo-redo’."))))
    (setup-wizard--insert "\n\n🧙: I bind redo to C-.\n")))

;;;; Extra package

(defun setup-wizard--package-activate (package mode)
  "Return a form that activates PACKAGE and enable MODE."
  `(progn
     (require 'package)
     (unless (package-installed-p ',package)
       (package-install ',package))
     (package-activate 'ivy)
     (require ',package)
     (,mode)))

(defun setup-wizard--package-page ()
  "Extra package page."
  (setup-wizard--insert
   "🧙: Here are some packages that I always install:\n\n")
  ;; Ivy.
  (widget-create 'checkbox
                 :notify
                 (lambda (widget &rest _)
                   (let ((val (widget-value widget)))
                     (setup-wizard--save-option-and-eval
                      'ivy
                      (when val
                        `(progn
                           ,(setup-wizard--package-activate
                             'ivy 'ivy-mode)
                           (setq enable-recursive-minibuffers t
                                 ivy-use-selectable-prompt t
                                 ivy-use-virtual-buffers t)
                           ,(setup-wizard--package-activate
                             'counsel 'counsel-mode)))
                      "Install and enable ‘ivy-mode’ and ‘counsel-mode’."
                      `(progn
                         (ivy-mode ,(if val 1 -1))
                         (counsel-mode ,(if val 1 -1))))))
                 :value nil)
  (widget-insert
   " Ivy: A completion package that makes typing file names, buffer
names, commands, etc so much easier.\n")
  ;; Company
  (widget-create 'checkbox
                 :notify
                 (lambda (widget &rest _)
                   (let ((val (widget-value widget)))
                     (setup-wizard--save-option-and-eval
                      'company
                      (setup-wizard--package-activate
                       'company 'company-mode)
                      "Install and enable ‘company-mode’."
                      `(company-mode ,(if val 1 -1)))))
                 :value nil)
  (widget-insert
   " Company: Popup completion menu when writing programs.\n")
  (widget-create 'checkbox
                 :notify
                 (lambda (widget &rest _)
                   (let ((val (widget-value widget)))
                     (setup-wizard--save-option-and-eval
                      'electric-pair-mode
                      (when val
                        `(electric-pair-mode))
                      "Enable ‘electric-pair-mode’."
                      `(electric-pair-mode ,(if val 1 -1)))))
                 :value nil)
  (widget-insert
   " Electric-pair-mode (built-in): Automatically closes parenthesis\n")
  (setup-wizard--insert "\n🧙: ...\n\n")
  (setup-wizard--insert "🧙: I don’t use many packages.\n"))

;;; Guide

(defun setup-wizard--with-boilerplate
    (setup-fn &optional page-list finish-fn)
  "Call page setup function SETUP-FN with widget boilerplate.
PAGE-LIST is a list of setup function for pages to show in a
series. FINISH-FN is called when user clicks the finish button.
If PAGE-LIST or FINISH-FN are nil, don’t insert navigation
buttons."
  (kill-all-local-variables)
  (let ((inhibit-read-only t))
    (erase-buffer))
  (remove-overlays)
  (funcall setup-fn)
  (widget-insert "\n")
  (when (and page-list finish-fn)
    (setup-wizard--insert-step-buttons setup-fn page-list finish-fn))
  (use-local-map widget-keymap)
  (widget-setup)
  (goto-char (point-min))
  (local-set-key (kbd "q") #'setup-wizard--quit))

(defun setup-wizard--quit (&rest _)
  "Quite the wizard."
  (interactive)
  (kill-buffer)
  (message (with-temp-buffer
             (setup-wizard--insert "🧚: See ya!")
             (buffer-string))))

(defun setup-wizard--insert-step-buttons (page page-list finish-fn)
  "Insert buttons that go to previous and next page of PAGE.
PAGE-LIST is a list of setup function for pages to show in a series.
Insert a Button that calls FINISH-FN at the last page."
  (let* ((idx (seq-position page-list page))
         (previous-page (if (eq idx 0) nil
                          (nth (1- idx) page-list)))
         (next-page (nth (1+ idx) page-list)))
    (setup-wizard--insert
     (format "🧚: We are at step %s/%s, what’s next? "
             (1+ idx) (length page-list)))
    (when previous-page
      (widget-create
       'push-button
       :notify (lambda (&rest _)
                 (setup-wizard--with-boilerplate
                  previous-page page-list finish-fn))
       :value "Back"))
    (widget-insert " ")
    (if next-page
        (widget-create
         'push-button
         :notify (lambda (&rest _)
                   (setup-wizard--with-boilerplate
                    next-page page-list finish-fn))
         :value "Next")
      (widget-create
       'push-button
       :notify (lambda (&rest _) (funcall finish-fn))
       :value "Finish"))
    (widget-insert " ")
    (widget-create
     'push-button
     :value "Quit"
     :notify #'setup-wizard--quit)
    (widget-insert "\n")))

(defun setup-wizard--insert-config ()
  "Insert configuration in ‘setup-wizard--config’ line-by-line."
  (dolist (config (reverse setup-wizard--config))
    (insert ";; " (nth 2 config) "\n")
    (dolist (conf (if (eq (car (nth 1 config)) 'progn)
                      (cdr (nth 1 config))
                    (list (nth 1 config))))
      (insert (prin1-to-string conf) "\n"))))

(defun setup-wizard--finish ()
  "The default finish function.
Constructs the config and display them."
  (setup-wizard--with-boilerplate
   (lambda ()
     (setup-wizard--insert
      "🧚: Here is your configuration! Do you want me to append it to
init.el for you? ")
     (widget-create 'push-button
                    :notify
                    (lambda (&rest _)
                      (let ((init-file (locate-user-emacs-file
                                        "init.el" ".emacs")))
                        (find-file init-file)
                        (goto-char (point-max))
                        (insert "\n")
                        (setup-wizard--insert-config)))
                    :value "Append to init.el")
     (widget-insert "\n\n")
     (widget-insert
      (with-temp-buffer
        (setup-wizard--insert-config)
        (emacs-lisp-mode)
        (font-lock-fontify-region (point-min) (point-max))
        (buffer-string))))))

(defun setup-wizard ()
  "Run the setup wizard."
  (interactive)
  (switch-to-buffer (get-buffer-create "*mage tower*"))
  (setq setup-wizard--config nil)
  (let ((page-list '(setup-wizard--theme-page
                     setup-wizard--keybinding-page
                     setup-wizard--ui-features-page
                     setup-wizard--undo-page
                     setup-wizard--package-page)))
    (setup-wizard--with-boilerplate
     (car page-list) page-list
     #'setup-wizard--finish)))

;;; Backport

(unless (fboundp 'undo--last-change-was-undo-p)
  (defun undo--last-change-was-undo-p (undo-list)
    (while (and (consp undo-list) (eq (car undo-list) nil))
      (setq undo-list (cdr undo-list)))
    (gethash undo-list undo-equiv-table)))

(unless (fboundp 'undo-redo)
  (defun undo-redo (&optional arg)
    "Undo the last ARG undos."
    (interactive "*p")
    (cond
     ((not (undo--last-change-was-undo-p buffer-undo-list))
      (user-error "No undo to undo"))
     (t
      (let* ((ul buffer-undo-list)
             (new-ul
              (let ((undo-in-progress t))
                (while (and (consp ul) (eq (car ul) nil))
                  (setq ul (cdr ul)))
                (primitive-undo arg ul)))
             (new-pul (undo--last-change-was-undo-p new-ul)))
        (message "Redo%s" (if undo-in-region " in region" ""))
        (setq this-command 'undo)
        (setq pending-undo-list new-pul)
        (setq buffer-undo-list new-ul))))))

(unless (fboundp 'undo-only)
  (defun undo-only (&optional arg)
    "Undo some previous changes.
Repeat this command to undo more changes.
A numeric ARG serves as a repeat count.
Contrary to `undo', this will not redo a previous undo."
    (interactive "*p")
    (let ((undo-no-redo t)) (undo arg))))

(provide 'setup-wizard)

;;; setup-wizard.el ends here

^ permalink raw reply	[flat|nested] 72+ messages in thread

* Re: Propose to add setup-wizard.el to ELPA
  2022-01-02  2:07 Yuan Fu
@ 2022-01-02  2:37 ` Po Lu
  2022-01-02  3:02   ` Yuan Fu
  2022-01-02  7:55 ` Eli Zaretskii
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 72+ messages in thread
From: Po Lu @ 2022-01-02  2:37 UTC (permalink / raw)
  To: Yuan Fu; +Cc: Emacs developers

Yuan Fu <casouri@gmail.com> writes:

> A while ago I wrote a package that helps a new user to configure
> Emacs: it takes a user through some interactive pages, where changes
> takes effect immediately; and in the end it generates some code that
> can be copied to init.el.
>
> Demo for the original package: https://youtu.be/0qMskTAR2aw
>
> I made some improvements to that package and renamed it
> setup-wizard. Do you think we could add it to ELPA? Maybe the name is
> too “official”, in that case I can rename it to yuan’s-setup-wizard or
> something.

I like the concept in general, but I have a few questions:

 - Whatever is appended to init.el should IMO utilize custom.

 - Does it, out of the blue, ask people to download software from the
   internet?  If so, it should say something to that effect.

> I don’t know how useful could it be, since nowadays every body
> (understandably) starts with some community distribution rather than
> vanilla Emacs, but surely it is better than not having a wizard.

That's untrue.

>    "🧙: Here are some packages that I always install:\n\n")
>   ;; Ivy.

Is it really okay to encourage all users to install a set of packages?
If they are really so useful, they should be part of Emacs itself.

Also, I don't think the Emoji are necessary (or desirable): some users
do not have fonts installed, or terminals available that capable of
displaying them.

Thanks.



^ permalink raw reply	[flat|nested] 72+ messages in thread

* Re: Propose to add setup-wizard.el to ELPA
  2022-01-02  2:37 ` Po Lu
@ 2022-01-02  3:02   ` Yuan Fu
  2022-01-02  3:22     ` Po Lu
  0 siblings, 1 reply; 72+ messages in thread
From: Yuan Fu @ 2022-01-02  3:02 UTC (permalink / raw)
  To: Po Lu; +Cc: Emacs developers



> On Jan 1, 2022, at 6:37 PM, Po Lu <luangruo@yahoo.com> wrote:
> 
> Yuan Fu <casouri@gmail.com> writes:
> 
>> A while ago I wrote a package that helps a new user to configure
>> Emacs: it takes a user through some interactive pages, where changes
>> takes effect immediately; and in the end it generates some code that
>> can be copied to init.el.
>> 
>> Demo for the original package: https://youtu.be/0qMskTAR2aw
>> 
>> I made some improvements to that package and renamed it
>> setup-wizard. Do you think we could add it to ELPA? Maybe the name is
>> too “official”, in that case I can rename it to yuan’s-setup-wizard or
>> something.
> 
> I like the concept in general, but I have a few questions:
> 
> - Whatever is appended to init.el should IMO utilize custom.

I think copy and pasting code would be more straightforward. Using custom, whether by defining a custom theme or directly using customize are more complicated. Plus I don’t know how to use custom for key bindings.

> 
> - Does it, out of the blue, ask people to download software from the
>   internet?  If so, it should say something to that effect.

Yes. I can add that.

> 
>> I don’t know how useful could it be, since nowadays every body
>> (understandably) starts with some community distribution rather than
>> vanilla Emacs, but surely it is better than not having a wizard.
> 
> That's untrue.

Not sure which part do you mean, but I won’t argue :-)

> 
>>   "🧙: Here are some packages that I always install:\n\n")
>>  ;; Ivy.
> 
> Is it really okay to encourage all users to install a set of packages?
> If they are really so useful, they should be part of Emacs itself.

As I said, if the package seems to be “official”, I can name it yuan’s-setup-wizard instead. And I have no intention to come up with an official setup wizard and make everyone agree on the provided options. Those are my recommendation, not Emacs’. (Maybe I can add some text that make it clear that the recommendations are personal.)

I really want to add ivy because personally I can’t use Emacs comfortably without a “modern” completion package, be it ivy, helm, selectrum, or whatever.

> Also, I don't think the Emoji are necessary (or desirable): some users
> do not have fonts installed, or terminals available that capable of
> displaying them.

They are automatically replaced by text if Emacs can’t display them.

Yuan


^ permalink raw reply	[flat|nested] 72+ messages in thread

* Re: Propose to add setup-wizard.el to ELPA
  2022-01-02  3:02   ` Yuan Fu
@ 2022-01-02  3:22     ` Po Lu
  2022-01-02  5:51       ` Yuan Fu
  0 siblings, 1 reply; 72+ messages in thread
From: Po Lu @ 2022-01-02  3:22 UTC (permalink / raw)
  To: Yuan Fu; +Cc: Emacs developers

Yuan Fu <casouri@gmail.com> writes:

> I think copy and pasting code would be more straightforward. Using
> custom, whether by defining a custom theme or directly using customize
> are more complicated. Plus I don’t know how to use custom for key
> bindings.

I didn't mean keys, just normal options.

Not using custom means the user will be asked mysterious questions when
he tries to customize the option later, and the customization might not
work.

> Yes. I can add that.

Thanks.

> As I said, if the package seems to be “official”, I can name it
> yuan’s-setup-wizard instead. And I have no intention to come up with
> an official setup wizard and make everyone agree on the provided
> options. Those are my recommendation, not Emacs’. (Maybe I can add
> some text that make it clear that the recommendations are personal.)
>
> I really want to add ivy because personally I can’t use Emacs
> comfortably without a “modern” completion package, be it ivy, helm,
> selectrum, or whatever.

BTW, does anyone know if is there a particular reason Ivy isn't part of
Emacs yet?  It seems a worthwhile choice for inclusion.

> They are automatically replaced by text if Emacs can’t display them.

Not if my font (Symbola) exists but doesn't really display them well.

Thanks.



^ permalink raw reply	[flat|nested] 72+ messages in thread

* Re: Propose to add setup-wizard.el to ELPA
  2022-01-02  3:22     ` Po Lu
@ 2022-01-02  5:51       ` Yuan Fu
  2022-01-02  6:30         ` Po Lu
  0 siblings, 1 reply; 72+ messages in thread
From: Yuan Fu @ 2022-01-02  5:51 UTC (permalink / raw)
  To: Po Lu; +Cc: Emacs developers


> On Jan 1, 2022, at 7:22 PM, Po Lu <luangruo@yahoo.com> wrote:
> 
> Yuan Fu <casouri@gmail.com> writes:
> 
>> I think copy and pasting code would be more straightforward. Using
>> custom, whether by defining a custom theme or directly using customize
>> are more complicated. Plus I don’t know how to use custom for key
>> bindings.
> 
> I didn't mean keys, just normal options.
> 
> Not using custom means the user will be asked mysterious questions when
> he tries to customize the option later, and the customization might not
> work.

I think splitting them into different parts would be confusing. On the other hand, “variable modified outside Customize” isn’t that mysterious IMO. Customize’s settings should always override other code, I think they are appended at the end of init.el every time they are saved. Speaking of that, we are not supposed to use custom-save-variables in init.el, which makes using custom more undesirable.

> 
>> They are automatically replaced by text if Emacs can’t display them.
> 
> Not if my font (Symbola) exists but doesn't really display them well.

I think I can fix that.

Yuan


^ permalink raw reply	[flat|nested] 72+ messages in thread

* Re: Propose to add setup-wizard.el to ELPA
  2022-01-02  5:51       ` Yuan Fu
@ 2022-01-02  6:30         ` Po Lu
  2022-01-02  7:58           ` Yuan Fu
  0 siblings, 1 reply; 72+ messages in thread
From: Po Lu @ 2022-01-02  6:30 UTC (permalink / raw)
  To: Yuan Fu; +Cc: Emacs developers

Yuan Fu <casouri@gmail.com> writes:

> I think splitting them into different parts would be confusing.

What would have to be split into different parts?

> On the other hand, “variable modified outside Customize” isn’t that
> mysterious IMO.

It is, and it'll be inconsistent as well.

> Customize’s settings should always override other code, I think they
> are appended at the end of init.el every time they are saved.

Not true.

> Speaking of that, we are not supposed to use custom-save-variables in
> init.el, which makes using custom more undesirable.

The changes should be made to the custom file if set, and if not,
init.el.

That's how custom behaves, and that's how this "setup wizard" should
behave as well.



^ permalink raw reply	[flat|nested] 72+ messages in thread

* Re: Propose to add setup-wizard.el to ELPA
  2022-01-02  2:07 Yuan Fu
  2022-01-02  2:37 ` Po Lu
@ 2022-01-02  7:55 ` Eli Zaretskii
  2022-01-02  8:07   ` Yuan Fu
  2022-01-02  8:07   ` Po Lu
  2022-01-02 12:02 ` Philip Kaludercic
  2022-01-07  9:58 ` Jean Louis
  3 siblings, 2 replies; 72+ messages in thread
From: Eli Zaretskii @ 2022-01-02  7:55 UTC (permalink / raw)
  To: Yuan Fu; +Cc: emacs-devel

> From: Yuan Fu <casouri@gmail.com>
> Date: Sat, 1 Jan 2022 18:07:53 -0800
> 
> A while ago I wrote a package that helps a new user to configure Emacs: it takes a user through some interactive pages, where changes takes effect immediately; and in the end it generates some code that can be copied to init.el. 
> 
> Demo for the original package: https://youtu.be/0qMskTAR2aw
> 
> I made some improvements to that package and renamed it setup-wizard. Do you think we could add it to ELPA? Maybe the name is too “official”, in that case I can rename it to yuan’s-setup-wizard or something.
> 
> I don’t know how useful could it be, since nowadays every body (understandably) starts with some community distribution rather than vanilla Emacs, but surely it is better than not having a wizard.
> 
> You can try it out with emacs -q -l setup-wizard.el -f setup-wizard

I didn't yet try the package, but IMNSHO it makes the most sense in
core, and in that case it should also be started automatically for new
users, or at least suggested to them upon first invocation.

Thanks.



^ permalink raw reply	[flat|nested] 72+ messages in thread

* Re: Propose to add setup-wizard.el to ELPA
  2022-01-02  6:30         ` Po Lu
@ 2022-01-02  7:58           ` Yuan Fu
  2022-01-02  8:07             ` Po Lu
  0 siblings, 1 reply; 72+ messages in thread
From: Yuan Fu @ 2022-01-02  7:58 UTC (permalink / raw)
  To: Po Lu; +Cc: Emacs developers



> On Jan 1, 2022, at 10:30 PM, Po Lu <luangruo@yahoo.com> wrote:
> 
> Yuan Fu <casouri@gmail.com> writes:
> 
>> I think splitting them into different parts would be confusing.
> 
> What would have to be split into different parts?

Keybinding settings and the rest.

> 
>> On the other hand, “variable modified outside Customize” isn’t that
>> mysterious IMO.
> 
> It is, and it'll be inconsistent as well.
> 
>> Customize’s settings should always override other code, I think they
>> are appended at the end of init.el every time they are saved.
> 
> Not true.
> 
>> Speaking of that, we are not supposed to use custom-save-variables in
>> init.el, which makes using custom more undesirable.
> 
> The changes should be made to the custom file if set, and if not,
> init.el.
> 
> That's how custom behaves, and that's how this "setup wizard" should
> behave as well.

Setup wizard produces some code, the user can modify them and put them in init.el. They can later modify or even delete them as then see fit. It’s flexible, straightforward, simple. Why do we have to involve custom and all its machinery?

If we use custom, the key binding part is in somewhere in init.el, the rest are blended together with other random configurations in either custom file or the custom-save-varaible form in init.el. The custom part has to be changed through Customize (the comment says users shouldn’t modify the form by hand, and if they do, custom restores the change anyway).

Yuan




^ permalink raw reply	[flat|nested] 72+ messages in thread

* Re: Propose to add setup-wizard.el to ELPA
  2022-01-02  7:55 ` Eli Zaretskii
@ 2022-01-02  8:07   ` Yuan Fu
  2022-01-02 15:42     ` Stefan Kangas
  2022-01-02  8:07   ` Po Lu
  1 sibling, 1 reply; 72+ messages in thread
From: Yuan Fu @ 2022-01-02  8:07 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: emacs-devel

> 
> I didn't yet try the package, but IMNSHO it makes the most sense in
> core, and in that case it should also be started automatically for new
> users, or at least suggested to them upon first invocation.

I’m afraid it would be very hard for everyone to agree on the options provided, the phrasing, etc, etc, if it is to be made official and included in core. I don’t have the energy to fight for it. If someone is feeling courageous, go for it; in the meantime, having it on ELPA is better than having nothing in core.

Yuan


^ permalink raw reply	[flat|nested] 72+ messages in thread

* Re: Propose to add setup-wizard.el to ELPA
  2022-01-02  7:58           ` Yuan Fu
@ 2022-01-02  8:07             ` Po Lu
  2022-01-02  9:07               ` Yuan Fu
  2022-01-07 10:02               ` Jean Louis
  0 siblings, 2 replies; 72+ messages in thread
From: Po Lu @ 2022-01-02  8:07 UTC (permalink / raw)
  To: Yuan Fu; +Cc: Emacs developers

Yuan Fu <casouri@gmail.com> writes:

> Keybinding settings and the rest.

You can't use `setq' to customize key definitions either, right?

> Setup wizard produces some code, the user can modify them and put them
> in init.el. They can later modify or even delete them as then see
> fit. It’s flexible, straightforward, simple. Why do we have to involve
> custom and all its machinery?

Because new users tend to not understand Emacs Lisp, so any future
customization they do will necessarily be through custom.

And please don't say they "should" learn Emacs Lisp -- some people may
find that enjoyable but lack the time, and some others may simply not
want to at all.  Asking people to learn Emacs Lisp to make future
customizations is simply unacceptable as part of a setup guide for _new_
users.

> If we use custom, the key binding part is in somewhere in init.el, the
> rest are blended together with other random configurations in either
> custom file or the custom-save-varaible form in init.el. The custom
> part has to be changed through Customize (the comment says users
> shouldn’t modify the form by hand, and if they do, custom restores the
> change anyway).

Customize will find the form, no matter where it actually is in init.el.
Alternatively, you could set up a custom file.



^ permalink raw reply	[flat|nested] 72+ messages in thread

* Re: Propose to add setup-wizard.el to ELPA
  2022-01-02  7:55 ` Eli Zaretskii
  2022-01-02  8:07   ` Yuan Fu
@ 2022-01-02  8:07   ` Po Lu
  2022-01-02 15:23     ` nanjunjie
  1 sibling, 1 reply; 72+ messages in thread
From: Po Lu @ 2022-01-02  8:07 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: Yuan Fu, emacs-devel

Eli Zaretskii <eliz@gnu.org> writes:

> I didn't yet try the package, but IMNSHO it makes the most sense in
> core, and in that case it should also be started automatically for new
> users, or at least suggested to them upon first invocation.

Starting it automatically is too much, but having it on the splash
screen would be great.

Thanks.



^ permalink raw reply	[flat|nested] 72+ messages in thread

* Re: Propose to add setup-wizard.el to ELPA
  2022-01-02  8:07             ` Po Lu
@ 2022-01-02  9:07               ` Yuan Fu
  2022-01-02  9:22                 ` xenodasein--- via Emacs development discussions.
  2022-01-02  9:41                 ` Po Lu
  2022-01-07 10:02               ` Jean Louis
  1 sibling, 2 replies; 72+ messages in thread
From: Yuan Fu @ 2022-01-02  9:07 UTC (permalink / raw)
  To: Po Lu; +Cc: Emacs developers



> On Jan 2, 2022, at 12:07 AM, Po Lu <luangruo@yahoo.com> wrote:
> 
> Yuan Fu <casouri@gmail.com> writes:
> 
>> Keybinding settings and the rest.
> 
> You can't use `setq' to customize key definitions either, right?

My point is that all configurations would be in one commented block of code, instead of separated into different places.

> 
>> Setup wizard produces some code, the user can modify them and put them
>> in init.el. They can later modify or even delete them as then see
>> fit. It’s flexible, straightforward, simple. Why do we have to involve
>> custom and all its machinery?
> 
> Because new users tend to not understand Emacs Lisp, so any future
> customization they do will necessarily be through custom.
> 
> And please don't say they "should" learn Emacs Lisp -- some people may
> find that enjoyable but lack the time, and some others may simply not
> want to at all.  Asking people to learn Emacs Lisp to make future
> customizations is simply unacceptable as part of a setup guide for _new_
> users.

Maybe that’s true for some users. I had my fair share of struggle and confusion with custom when I started using Emacs. IME a few lines of setq, global-set-key and xxx-mode are simpler and more predicable than custom. Neither of us has surveyed enough number of new Emacs users, so I don’t think we can make definitive claims. For example, I don’t think it is unacceptable to expect a user to understand what does setq, global-set-key or xxx-mode means.

> 
>> If we use custom, the key binding part is in somewhere in init.el, the
>> rest are blended together with other random configurations in either
>> custom file or the custom-save-varaible form in init.el. The custom
>> part has to be changed through Customize (the comment says users
>> shouldn’t modify the form by hand, and if they do, custom restores the
>> change anyway).
> 
> Customize will find the form, no matter where it actually is in init.el.
> Alternatively, you could set up a custom file.

It is hard for the user to find them. Plus other problems with custom and Customize described above that you don’t seem to mind. Aren’t they confusing for even a not-so-new user? They surely confused and annoyed me for a long time back then.

Yuan




^ permalink raw reply	[flat|nested] 72+ messages in thread

* Re: Propose to add setup-wizard.el to ELPA
  2022-01-02  9:07               ` Yuan Fu
@ 2022-01-02  9:22                 ` xenodasein--- via Emacs development discussions.
  2022-01-02  9:45                   ` Eduardo Ochs
  2022-01-02  9:45                   ` Po Lu
  2022-01-02  9:41                 ` Po Lu
  1 sibling, 2 replies; 72+ messages in thread
From: xenodasein--- via Emacs development discussions. @ 2022-01-02  9:22 UTC (permalink / raw)
  To: emacs-devel

Jan 2, 2022, 12:07 by casouri@gmail.com:

> Maybe that’s true for some users. I had my fair share of struggle and confusion with custom when I started using Emacs. IME a few lines of setq, global-set-key and xxx-mode are simpler and more predicable than custom. Neither of us has surveyed enough number of new Emacs users, so I don’t think we can make definitive claims. For example, I don’t think it is unacceptable to expect a user to understand what does setq, global-set-key or xxx-mode means.
> ...
> It is hard for the user to find them. Plus other problems with custom and Customize described above that you don’t seem to mind. Aren’t they confusing for even a not-so-new user? They surely confused and annoyed me for a long time back then.
>
> Yuan
>

1+

This has also been my experience when starting out and for some others I know. 
In theory Custom system should have made things easier, but it didn't.
Later on when I understood Elisp better, I had some ideas as to why.  Basically
Custom is an unfinished system, it's code is not easy to understand, and it
does not integrate with the rest of Emacs well, it especially does not play well
with configuring things from init.el file.  Until it is more polished, I would be
hesitant to recommended it to newcomers, over doing a couple of setq's.




^ permalink raw reply	[flat|nested] 72+ messages in thread

* Re: Propose to add setup-wizard.el to ELPA
  2022-01-02  9:07               ` Yuan Fu
  2022-01-02  9:22                 ` xenodasein--- via Emacs development discussions.
@ 2022-01-02  9:41                 ` Po Lu
  2022-01-02 17:18                   ` Yuan Fu
  1 sibling, 1 reply; 72+ messages in thread
From: Po Lu @ 2022-01-02  9:41 UTC (permalink / raw)
  To: Yuan Fu; +Cc: Emacs developers

Yuan Fu <casouri@gmail.com> writes:

> My point is that all configurations would be in one commented block of
> code, instead of separated into different places.

So you can place `global-set-key' and `setq' in a single form, and also
have it come out meaningfully?

Otherwise, I don't understand what you mean by "block".

> Maybe that’s true for some users. I had my fair share of struggle and
> confusion with custom when I started using Emacs. IME a few lines of
> setq, global-set-key and xxx-mode are simpler and more predicable than
> custom.

I think the problem with people finding custom confusing is that they
tend to blindly paste code from other people's configurations, and that
code tends to not work well with custom.  There is no reason to worsen
that problem by providing a setup wizard which doesn't work with custom.

> Neither of us has surveyed enough number of new Emacs users, so I
> don’t think we can make definitive claims.  For example, I don’t think
> it is unacceptable to expect a user to understand what does setq,
> global-set-key or xxx-mode means.

You don't need to survey anyone to come to such a conclusion.  Just ask
yourself this: do users of CLion have to know Java?  If not, then users
of Emacs shouldn't have to learn Emacs Lisp either.

Especially people who have zero hours of previous experience working
with Emacs.

> It is hard for the user to find them. Plus other problems with custom
> and Customize described above that you don’t seem to mind. Aren’t they
> confusing for even a not-so-new user? They surely confused and annoyed
> me for a long time back then.

Easy Customization is documented in the manual, it is in the menu bar,
and there is a link in the splash screen.

If it's confusing to new users, I think it should be fixed.

Thanks.



^ permalink raw reply	[flat|nested] 72+ messages in thread

* Re: Propose to add setup-wizard.el to ELPA
  2022-01-02  9:22                 ` xenodasein--- via Emacs development discussions.
@ 2022-01-02  9:45                   ` Eduardo Ochs
  2022-01-02  9:45                   ` Po Lu
  1 sibling, 0 replies; 72+ messages in thread
From: Eduardo Ochs @ 2022-01-02  9:45 UTC (permalink / raw)
  To: xenodasein; +Cc: Emacs developers

[-- Attachment #1: Type: text/plain, Size: 2229 bytes --]

On Sun, 2 Jan 2022 at 06:23, xenodasein--- via Emacs development
discussions. <emacs-devel@gnu.org> wrote:

> Jan 2, 2022, 12:07 by casouri@gmail.com:
>
> > Maybe that’s true for some users. I had my fair share of struggle and
> confusion with custom when I started using Emacs. IME a few lines of setq,
> global-set-key and xxx-mode are simpler and more predicable than custom.
> Neither of us has surveyed enough number of new Emacs users, so I don’t
> think we can make definitive claims. For example, I don’t think it is
> unacceptable to expect a user to understand what does setq, global-set-key
> or xxx-mode means.
> > ...
> > It is hard for the user to find them. Plus other problems with custom
> and Customize described above that you don’t seem to mind. Aren’t they
> confusing for even a not-so-new user? They surely confused and annoyed me
> for a long time back then.
> >
> > Yuan
> >
>
> 1+
>
> This has also been my experience when starting out and for some others I
> know.
> In theory Custom system should have made things easier, but it didn't.
> Later on when I understood Elisp better, I had some ideas as to why.
> Basically
> Custom is an unfinished system, it's code is not easy to understand, and it
> does not integrate with the rest of Emacs well, it especially does not
> play well
> with configuring things from init.el file.  Until it is more polished, I
> would be
> hesitant to recommended it to newcomers, over doing a couple of setq's.
>
>
+1 here too.

What about including in the description of the package a screenshot an
example of the generated init block as text, and explaining that your
package is for the people who don't mind looking at the internal
representation of the configurations, that looks like that?...

Btw, one thing that works well for me is explaining to new users that
_reading_ is very different from _writing_, and that they will need to
to be able to read the configuration block in Lisp and understand
_vaguely_ the meaning of _some parts_ of it... they do not need to
understand it fully, and they don't need to learn to write Lisp
themselves.

  Cheers,
    Eduardo Ochs
    http://angg.twu.net/#eev

[-- Attachment #2: Type: text/html, Size: 2712 bytes --]

^ permalink raw reply	[flat|nested] 72+ messages in thread

* Re: Propose to add setup-wizard.el to ELPA
  2022-01-02  9:22                 ` xenodasein--- via Emacs development discussions.
  2022-01-02  9:45                   ` Eduardo Ochs
@ 2022-01-02  9:45                   ` Po Lu
  2022-01-02 10:09                     ` Eduardo Ochs
  2022-01-07 10:09                     ` Jean Louis
  1 sibling, 2 replies; 72+ messages in thread
From: Po Lu @ 2022-01-02  9:45 UTC (permalink / raw)
  To: xenodasein--- via Emacs development discussions.; +Cc: xenodasein

xenodasein--- via "Emacs development discussions." <emacs-devel@gnu.org>
writes:

> Basically Custom is an unfinished system, it's code is not easy to
> understand, and it does not integrate with the rest of Emacs well, it
> especially does not play well with configuring things from init.el
> file.

Custom is basically a finished system, and the whole point of it is to
make things work so that users will not have to understand it.

And contrary to your statements, it integrates with the rest of Emacs
quite well.  For example, this doesn't work:

  (setq pixel-scroll-precision-mode t)

But this does:

  (custom-set-variables '(pixel-scroll-precision-mode t))

Same goes for `scroll-bar-mode', and so on.



^ permalink raw reply	[flat|nested] 72+ messages in thread

* Re: Propose to add setup-wizard.el to ELPA
  2022-01-02  9:45                   ` Po Lu
@ 2022-01-02 10:09                     ` Eduardo Ochs
  2022-01-02 10:15                       ` Po Lu
  2022-01-07 10:09                     ` Jean Louis
  1 sibling, 1 reply; 72+ messages in thread
From: Eduardo Ochs @ 2022-01-02 10:09 UTC (permalink / raw)
  To: Po Lu; +Cc: xenodasein--- via Emacs development discussions.

[-- Attachment #1: Type: text/plain, Size: 1440 bytes --]

On Sun, 2 Jan 2022 at 06:49, Po Lu <luangruo@yahoo.com> wrote:

> xenodasein--- via "Emacs development discussions." <emacs-devel@gnu.org>
> writes:
>
> > Basically Custom is an unfinished system, it's code is not easy to
> > understand, and it does not integrate with the rest of Emacs well, it
> > especially does not play well with configuring things from init.el
> > file.
>
> Custom is basically a finished system, and the whole point of it is to
> make things work so that users will not have to understand it.
>
> And contrary to your statements, it integrates with the rest of Emacs
> quite well.  For example, this doesn't work:
>
>   (setq pixel-scroll-precision-mode t)
>
> But this does:
>
>   (custom-set-variables '(pixel-scroll-precision-mode t))
>
> Same goes for `scroll-bar-mode', and so on.
>
>
 Where is that documented?

I don't understand customize and I know a few other people from the
#emacs IRC channel who are also long time Emacs users and who also say
that they don't understand customize well enough...

A few weeks ago I made a video - called "Org for non users" - about
why I find some parts of Emacs that are "for users" very hard to
understand, and showing how I am trying to make them more
understandable by "non users" like me... and I would really like to do
something similar for customize in the next few years.

The video is here:
  http://angg.twu.net/2021-org-for-non-users.html

Cheers,
  Eduardo

[-- Attachment #2: Type: text/html, Size: 2082 bytes --]

^ permalink raw reply	[flat|nested] 72+ messages in thread

* Re: Propose to add setup-wizard.el to ELPA
  2022-01-02 10:09                     ` Eduardo Ochs
@ 2022-01-02 10:15                       ` Po Lu
  2022-01-02 10:25                         ` Eduardo Ochs
  0 siblings, 1 reply; 72+ messages in thread
From: Po Lu @ 2022-01-02 10:15 UTC (permalink / raw)
  To: Eduardo Ochs; +Cc: xenodasein--- via Emacs development discussions.

Eduardo Ochs <eduardoochs@gmail.com> writes:

> Where is that documented?

It's documented in the doc string of each variable that behaves this
way.  (And there are many of them.)

> A few weeks ago I made a video - called "Org for non users" - about
> why I find some parts of Emacs that are "for users" very hard to
> understand, and showing how I am trying to make them more
> understandable by "non users" like me... and I would really like to do
> something similar for customize in the next few years.

Custom should be understandable for everyone, and I don't see why it
isn't.  It works reasonably similarly to, for example, the Mozilla
Firefox about:preferences page.



^ permalink raw reply	[flat|nested] 72+ messages in thread

* Re: Propose to add setup-wizard.el to ELPA
  2022-01-02 10:15                       ` Po Lu
@ 2022-01-02 10:25                         ` Eduardo Ochs
  2022-01-02 10:34                           ` xenodasein--- via Emacs development discussions.
  0 siblings, 1 reply; 72+ messages in thread
From: Eduardo Ochs @ 2022-01-02 10:25 UTC (permalink / raw)
  To: Po Lu; +Cc: xenodasein--- via Emacs development discussions.

[-- Attachment #1: Type: text/plain, Size: 517 bytes --]

On Sun, 2 Jan 2022 at 07:15, Po Lu <luangruo@yahoo.com> wrote:

>  Custom should be understandable for everyone, and I don't see why it
> isn't.  It works reasonably similarly to, for example, the Mozilla
> Firefox about:preferences page.
>

 Some people only feel that they understand a program when they are
able to make a good mental model of how it works. And to me customize
is a big black box with several smaller black boxes inside, and with
no visible tools to let me inspect its data structures.

  [[]], E.

[-- Attachment #2: Type: text/html, Size: 865 bytes --]

^ permalink raw reply	[flat|nested] 72+ messages in thread

* Re: Propose to add setup-wizard.el to ELPA
  2022-01-02 10:25                         ` Eduardo Ochs
@ 2022-01-02 10:34                           ` xenodasein--- via Emacs development discussions.
  2022-01-02 10:52                             ` Eli Zaretskii
                                               ` (3 more replies)
  0 siblings, 4 replies; 72+ messages in thread
From: xenodasein--- via Emacs development discussions. @ 2022-01-02 10:34 UTC (permalink / raw)
  To: luangruo; +Cc: emacs-devel

Jan 2, 2022, 12:45 by luangruo@yahoo.com:

> xenodasein--- via "Emacs development discussions." <> emacs-devel@gnu.org> >
> writes:
>
>> Basically Custom is an unfinished system, it's code is not easy to
>> understand, and it does not integrate with the rest of Emacs well, it
>> especially does not play well with configuring things from init.el
>> file.
>>
>
> Custom is basically a finished system, and the whole point of it is to
> make things work so that users will not have to understand it.
> ...
> Custom should be understandable for everyone, and I don't see why it
> isn't.
>

If you think it a perfect, finished and polished system, I am fearful of the
damage you will do to both Emacs' code and community.


> And contrary to your statements, it integrates with the rest of Emacs
> quite well.  For example, this doesn't work:
>
> (setq pixel-scroll-precision-mode t)
>
> But this does:
>
> (custom-set-variables '(pixel-scroll-precision-mode t))
>
> Same goes for `scroll-bar-mode', and so on.
>

I invite you to compare code of custom-set-variables and setq, for
setting a single variable, and to see how ridiculous this defense is.

There isn't even a function for setting a custom variable and you will
find a csetq macro popping up in many users init files, if you care to
look within your community.  And no, custom-set-variable isn't it.





^ permalink raw reply	[flat|nested] 72+ messages in thread

* Re: Propose to add setup-wizard.el to ELPA
  2022-01-02 10:34                           ` xenodasein--- via Emacs development discussions.
@ 2022-01-02 10:52                             ` Eli Zaretskii
  2022-01-02 10:57                               ` xenodasein--- via Emacs development discussions.
       [not found]                             ` <CADs++6jtFBah1hhsuN6T_-kFyjc_pNmmVKA+16vOWa8OctOZLw@mail.gmail.com>
                                               ` (2 subsequent siblings)
  3 siblings, 1 reply; 72+ messages in thread
From: Eli Zaretskii @ 2022-01-02 10:52 UTC (permalink / raw)
  To: xenodasein; +Cc: luangruo, emacs-devel

> Date: Sun, 2 Jan 2022 11:34:34 +0100 (CET)
> Cc: emacs-devel@gnu.org
> From: xenodasein--- via "Emacs development discussions." <emacs-devel@gnu.org>
> > Custom should be understandable for everyone, and I don't see why it
> > isn't.
> 
> If you think it a perfect, finished and polished system, I am fearful of the
> damage you will do to both Emacs' code and community.

Not a kind response by any measure.

> > Same goes for `scroll-bar-mode', and so on.
> 
> I invite you to compare code of custom-set-variables and setq, for
> setting a single variable, and to see how ridiculous this defense is.

Neither is this.

Please in the future try to choose your words better.



^ permalink raw reply	[flat|nested] 72+ messages in thread

* Re: Propose to add setup-wizard.el to ELPA
  2022-01-02 10:52                             ` Eli Zaretskii
@ 2022-01-02 10:57                               ` xenodasein--- via Emacs development discussions.
  2022-01-02 11:14                                 ` Eli Zaretskii
  0 siblings, 1 reply; 72+ messages in thread
From: xenodasein--- via Emacs development discussions. @ 2022-01-02 10:57 UTC (permalink / raw)
  To: eliz; +Cc: emacs-devel

Jan 2, 2022, 13:52 by eliz@gnu.org:

>> Date: Sun, 2 Jan 2022 11:34:34 +0100 (CET)
>> Cc: emacs-devel@gnu.org
>> From: xenodasein--- via "Emacs development discussions." <emacs-devel@gnu.org>
>> > Custom should be understandable for everyone, and I don't see why it
>> > isn't.
>>
>> If you think it a perfect, finished and polished system, I am fearful of the
>> damage you will do to both Emacs' code and community.
>>
>
> Not a kind response by any measure.
>



It is an unkind response to an even more unkind response before it,
yet you are only reprimanding me.  Is this good community management?




>> > Same goes for `scroll-bar-mode', and so on.
>>
>> I invite you to compare code of custom-set-variables and setq, for
>> setting a single variable, and to see how ridiculous this defense is.
>>
>
> Neither is this.
>
> Please in the future try to choose your words better.
>



^ permalink raw reply	[flat|nested] 72+ messages in thread

* Re: Propose to add setup-wizard.el to ELPA
       [not found]                             ` <CADs++6jtFBah1hhsuN6T_-kFyjc_pNmmVKA+16vOWa8OctOZLw@mail.gmail.com>
@ 2022-01-02 11:02                               ` xenodasein--- via Emacs development discussions.
  0 siblings, 0 replies; 72+ messages in thread
From: xenodasein--- via Emacs development discussions. @ 2022-01-02 11:02 UTC (permalink / raw)
  To: eduardoochs; +Cc: emacs-devel

Jan 2, 2022, 13:51 by eduardoochs@gmail.com:

> Hi!
> Thanks for your last two paragraphs!
> I knew that we were talking about two different notions of simplicity on the list, but I didn't have examples that were better than, for example, comparing a button to a setq... and you gave an example that was very precise! =)
>   E.
>
 
Hi, thank you.  I meant to say "customize-set-variable" on that mail.  Which is
what is suggested for singular custom variables but it is a very heavy function
that goes over themes, and slows down initialization noticeably when used
instead of setq.

And this is what people use as a workaround:

`(funcall (or (get ',variable 'custom-set) 'set-default) ',variable ,value))




^ permalink raw reply	[flat|nested] 72+ messages in thread

* Re: Propose to add setup-wizard.el to ELPA
  2022-01-02 10:57                               ` xenodasein--- via Emacs development discussions.
@ 2022-01-02 11:14                                 ` Eli Zaretskii
  2022-01-02 11:30                                   ` xenodasein--- via Emacs development discussions.
  2022-01-02 11:31                                   ` xenodasein--- via Emacs development discussions.
  0 siblings, 2 replies; 72+ messages in thread
From: Eli Zaretskii @ 2022-01-02 11:14 UTC (permalink / raw)
  To: xenodasein; +Cc: emacs-devel

> Date: Sun, 2 Jan 2022 11:57:53 +0100 (CET)
> From: xenodasein@tutanota.de
> Cc: emacs-devel@gnu.org
> 
> >> > Custom should be understandable for everyone, and I don't see why it
> >> > isn't.
> >>
> >> If you think it a perfect, finished and polished system, I am fearful of the
> >> damage you will do to both Emacs' code and community.
> >>
> >
> > Not a kind response by any measure.
> 
> It is an unkind response to an even more unkind response before it,
> yet you are only reprimanding me.  Is this good community management?

The original message to which you replied expressed an opinion about
an Emacs feature.  That opinion was not aimed at you, nor was it
unkind in any way.

You, OTOH, expressed an unkind opinion about the _person_ to whom you
were responding.  Thus my comment.

I hope we can discuss technical opinions about Emacs development and
features, not about the persons who are involved in that development.



^ permalink raw reply	[flat|nested] 72+ messages in thread

* Re: Propose to add setup-wizard.el to ELPA
  2022-01-02 10:34                           ` xenodasein--- via Emacs development discussions.
  2022-01-02 10:52                             ` Eli Zaretskii
       [not found]                             ` <CADs++6jtFBah1hhsuN6T_-kFyjc_pNmmVKA+16vOWa8OctOZLw@mail.gmail.com>
@ 2022-01-02 11:17                             ` Po Lu
  2022-01-02 11:36                               ` xenodasein--- via Emacs development discussions.
       [not found]                               ` <MsPZqa9--3-2@tutanota.de-MsP_1xO----2>
  2022-01-02 11:58                             ` Philip Kaludercic
  3 siblings, 2 replies; 72+ messages in thread
From: Po Lu @ 2022-01-02 11:17 UTC (permalink / raw)
  To: xenodasein--- via Emacs development discussions.; +Cc: xenodasein

xenodasein--- via "Emacs development discussions." <emacs-devel@gnu.org>
writes:

> I invite you to compare code of custom-set-variables and setq, for
> setting a single variable, and to see how ridiculous this defense is.

Judging functions by code size in general will not yield a useful
result, and preferring setq to custom-theme-set-variables because the
latter has more code is simply ludicrous: setq doesn't try to respect
the `custom-set' symbol property, or do anything meaningful with custom
themes.  (Which is why it is also unsuitable for many options, where the
`custom-set' function has to be called in order to work correctly, or
when you want it inside a custom theme.)

> There isn't even a function for setting a custom variable and you will
> find a csetq macro popping up in many users init files, if you care to
> look within your community.  And no, custom-set-variable isn't it.

Why not?



^ permalink raw reply	[flat|nested] 72+ messages in thread

* Re: Propose to add setup-wizard.el to ELPA
  2022-01-02 11:14                                 ` Eli Zaretskii
@ 2022-01-02 11:30                                   ` xenodasein--- via Emacs development discussions.
  2022-01-02 11:38                                     ` Eli Zaretskii
  2022-01-02 12:01                                     ` Po Lu
  2022-01-02 11:31                                   ` xenodasein--- via Emacs development discussions.
  1 sibling, 2 replies; 72+ messages in thread
From: xenodasein--- via Emacs development discussions. @ 2022-01-02 11:30 UTC (permalink / raw)
  To: eliz; +Cc: emacs-devel

https://lists.gnu.org/archive/html/emacs-devel/2022-01/msg00092.html
From: Po Lu

>> Basically Custom is an unfinished system, it's code is not easy to
>> understand, and it does not integrate with the rest of Emacs well, it
>> especially does not play well with configuring things from init.el
>> file.

> Custom is basically a finished system, and the whole point of it is to
> make things work so that users will not have to understand it.

> And contrary to your statements, it integrates with the rest of Emacs
> quite well.  For example, this doesn't work:
> ...



Here, this person is "basically" saying that I am a ... and what I said
is psychotic and unreal.

Then, proceeds to "refute" what I said with implying that I don't know
what "custom-set" is, which is untrue, apparent from my previous mails.



Jan 2, 2022, 14:14 by eliz@gnu.org:
> The original message to which you replied expressed an opinion about
> an Emacs feature. That opinion was not aimed at you, nor was it
> unkind in any way.

> You, OTOH, expressed an unkind opinion about the _person_ to whom you
> were responding. Thus my comment.

> I hope we can discuss technical opinions about Emacs development and
> features, not about the persons who are involved in that development.




^ permalink raw reply	[flat|nested] 72+ messages in thread

* Re: Propose to add setup-wizard.el to ELPA
  2022-01-02 11:14                                 ` Eli Zaretskii
  2022-01-02 11:30                                   ` xenodasein--- via Emacs development discussions.
@ 2022-01-02 11:31                                   ` xenodasein--- via Emacs development discussions.
  1 sibling, 0 replies; 72+ messages in thread
From: xenodasein--- via Emacs development discussions. @ 2022-01-02 11:31 UTC (permalink / raw)
  To: eliz; +Cc: emacs-devel

https://lists.gnu.org/archive/html/emacs-devel/2022-01/msg00092.html
From: Po Lu

>> Basically Custom is an unfinished system, it's code is not easy to
>> understand, and it does not integrate with the rest of Emacs well, it
>> especially does not play well with configuring things from init.el
>> file.

> Custom is basically a finished system, and the whole point of it is to
> make things work so that users will not have to understand it.

> And contrary to your statements, it integrates with the rest of Emacs
> quite well.  For example, this doesn't work:
> ...



Here, this person is "basically" saying that I am a ... and what I said
is psychotic and unreal.

Then, proceeds to "refute" what I said with implying that I don't know
what "custom-set" is, which is untrue, apparent from my previous mails.



Jan 2, 2022, 14:14 by eliz@gnu.org:
> The original message to which you replied expressed an opinion about
> an Emacs feature. That opinion was not aimed at you, nor was it
> unkind in any way.

> You, OTOH, expressed an unkind opinion about the _person_ to whom you
> were responding. Thus my comment.

> I hope we can discuss technical opinions about Emacs development and
> features, not about the persons who are involved in that development.




^ permalink raw reply	[flat|nested] 72+ messages in thread

* Re: Propose to add setup-wizard.el to ELPA
  2022-01-02 11:17                             ` Po Lu
@ 2022-01-02 11:36                               ` xenodasein--- via Emacs development discussions.
  2022-01-02 12:03                                 ` Po Lu
  2022-01-02 15:27                                 ` Stefan Kangas
       [not found]                               ` <MsPZqa9--3-2@tutanota.de-MsP_1xO----2>
  1 sibling, 2 replies; 72+ messages in thread
From: xenodasein--- via Emacs development discussions. @ 2022-01-02 11:36 UTC (permalink / raw)
  To: luangruo; +Cc: emacs-devel

Jan 2, 2022, 14:17 by luangruo@yahoo.com:

> xenodasein--- via "Emacs development discussions." <emacs-devel@gnu.org>
> writes:
>
>> I invite you to compare code of custom-set-variables and setq, for
>> setting a single variable, and to see how ridiculous this defense is.
>>
>
> Judging functions by code size in general will not yield a useful
> result, and preferring setq to custom-theme-set-variables because the
> latter has more code is simply ludicrous:
>

If it is ludicrous, then why almost every Emacs users configuration out
there care about speeding up initialization?  Speed isn't the only
concern, also.


>  setq doesn't try to respect
> the `custom-set' symbol property, or do anything meaningful with custom
> themes.  (Which is why it is also unsuitable for many options, where the
> `custom-set' function has to be called in order to work correctly, or
> when you want it inside a custom theme.)
>
>> There isn't even a function for setting a custom variable and you will
>> find a csetq macro popping up in many users init files, if you care to
>> look within your community.  And no, custom-set-variable isn't it.
>>
>
> Why not?
>

You are proving what I argued, which is custom system doesn't play
well with doing things from init file.  And even newcomers will have to
use the init file, for many things cannot be done by using custom interface
only.

Please see: https://www.emacswiki.org/emacs/CustomizingAndSaving#h5o-3




^ permalink raw reply	[flat|nested] 72+ messages in thread

* Re: Propose to add setup-wizard.el to ELPA
  2022-01-02 11:30                                   ` xenodasein--- via Emacs development discussions.
@ 2022-01-02 11:38                                     ` Eli Zaretskii
  2022-01-02 12:01                                     ` Po Lu
  1 sibling, 0 replies; 72+ messages in thread
From: Eli Zaretskii @ 2022-01-02 11:38 UTC (permalink / raw)
  To: xenodasein; +Cc: emacs-devel

> Date: Sun, 2 Jan 2022 12:30:50 +0100 (CET)
> From: xenodasein@tutanota.de
> Cc: emacs-devel@gnu.org
> 
> https://lists.gnu.org/archive/html/emacs-devel/2022-01/msg00092.html
> From: Po Lu
> 
> >> Basically Custom is an unfinished system, it's code is not easy to
> >> understand, and it does not integrate with the rest of Emacs well, it
> >> especially does not play well with configuring things from init.el
> >> file.
> 
> > Custom is basically a finished system, and the whole point of it is to
> > make things work so that users will not have to understand it.
> 
> > And contrary to your statements, it integrates with the rest of Emacs
> > quite well.  For example, this doesn't work:
> > ...
> 
> Here, this person is "basically" saying that I am a ... and what I said
> is psychotic and unreal.

He disagreed with your assessment of the situation.  You are reading
too much into what he said, and basically see there something he
didn't write at all, only how you interpreted what he wrote.

When you think your opponent meant something, it is better to give him
the benefit of the doubt, rather than interpret that in the worst
possible sense.  We are most of us here non-native English speakers
talking to one another in a language that isn't our first one, so
misunderstandings and suboptimal selection of words is abundant.

> Then, proceeds to "refute" what I said with implying that I don't know
> what "custom-set" is, which is untrue, apparent from my previous mails.

"Imply that you don't know" is your interpretation.  The words didn't
say that.  "Untrue" is your opinion, and that's the essence of your
disagreement.

That's why I suggested that you choose your words better in the
future.



^ permalink raw reply	[flat|nested] 72+ messages in thread

* Re: Propose to add setup-wizard.el to ELPA
       [not found]                               ` <MsPZqa9--3-2@tutanota.de-MsP_1xO----2>
@ 2022-01-02 11:57                                 ` xenodasein--- via Emacs development discussions.
  2022-01-02 12:05                                   ` Po Lu
  2022-01-02 15:27                                   ` Stefan Kangas
  0 siblings, 2 replies; 72+ messages in thread
From: xenodasein--- via Emacs development discussions. @ 2022-01-02 11:57 UTC (permalink / raw)
  To: luangruo; +Cc: emacs-devel

by luangruo@yahoo.com:

>> You don't need to survey anyone to come to such a conclusion.  Just ask
>> yourself this: do users of CLion have to know Java?  If not, then users
>> of Emacs shouldn't have to learn Emacs Lisp either.
>>

FWIW I completely agree with this.  Custom system is a good idea,
and it should exist; however it has a very long way yet to achieve
it's purpose.  It is nowhere near JetBrains software's isolation
of Java from user.  It needs a lot more work.  It is an unfinished system.
If you keep insisting on Custom's perfection, you need to explain
the whole Emacs community why JetBrains makes more money
than donations to Emacs.  (Rhetorical)




^ permalink raw reply	[flat|nested] 72+ messages in thread

* Re: Propose to add setup-wizard.el to ELPA
  2022-01-02 10:34                           ` xenodasein--- via Emacs development discussions.
                                               ` (2 preceding siblings ...)
  2022-01-02 11:17                             ` Po Lu
@ 2022-01-02 11:58                             ` Philip Kaludercic
  3 siblings, 0 replies; 72+ messages in thread
From: Philip Kaludercic @ 2022-01-02 11:58 UTC (permalink / raw)
  To: xenodasein--- via Emacs development discussions.; +Cc: luangruo

xenodasein--- via "Emacs development discussions." <emacs-devel@gnu.org>
writes:

> Jan 2, 2022, 12:45 by luangruo@yahoo.com:
>
>> xenodasein--- via "Emacs development discussions." <> emacs-devel@gnu.org> >
>> writes:
>>
>>> Basically Custom is an unfinished system, it's code is not easy to
>>> understand, and it does not integrate with the rest of Emacs well, it
>>> especially does not play well with configuring things from init.el
>>> file.
>>>
>>
>> Custom is basically a finished system, and the whole point of it is to
>> make things work so that users will not have to understand it.
>> ...
>> Custom should be understandable for everyone, and I don't see why it
>> isn't.
>>
>
> If you think it a perfect, finished and polished system, I am fearful of the
> damage you will do to both Emacs' code and community.
>
>
>> And contrary to your statements, it integrates with the rest of Emacs
>> quite well.  For example, this doesn't work:
>>
>> (setq pixel-scroll-precision-mode t)
>>
>> But this does:
>>
>> (custom-set-variables '(pixel-scroll-precision-mode t))
>>
>> Same goes for `scroll-bar-mode', and so on.
>>
>
> I invite you to compare code of custom-set-variables and setq, for
> setting a single variable, and to see how ridiculous this defense is.

A simple macro like

--8<---------------cut here---------------start------------->8---
(defmacro setc (&rest args)
  "Handle ARGS like `setq' using `customize-set-variable'."
  (let (body)
    (while args
      (let* ((var (pop args)) (val (pop args)))
        (push `(customize-set-variable ',var ,val) body)))
    (macroexp-progn (nreverse body))))
--8<---------------cut here---------------end--------------->8---

could fix that (perhaps expanded to not add itself to the "user" theme
as it would usually be used within a persistent init.el), if added to
the core.

Then all you need to do is replace a setq with a setc.

> There isn't even a function for setting a custom variable and you will
> find a csetq macro popping up in many users init files, if you care to
> look within your community.  And no, custom-set-variable isn't it.

-- 
	Philip Kaludercic



^ permalink raw reply	[flat|nested] 72+ messages in thread

* Re: Propose to add setup-wizard.el to ELPA
  2022-01-02 11:30                                   ` xenodasein--- via Emacs development discussions.
  2022-01-02 11:38                                     ` Eli Zaretskii
@ 2022-01-02 12:01                                     ` Po Lu
  1 sibling, 0 replies; 72+ messages in thread
From: Po Lu @ 2022-01-02 12:01 UTC (permalink / raw)
  To: xenodasein--- via Emacs development discussions.; +Cc: eliz, xenodasein

xenodasein--- via "Emacs development discussions." <emacs-devel@gnu.org>
writes:

> Here, this person is "basically" saying that I am a ... and what I said
> is psychotic and unreal.

That's not what I said, so I suggest to stop overinterpreting my words.

> Then, proceeds to "refute" what I said with implying that I don't know
> what "custom-set" is, which is untrue, apparent from my previous mails.

I did not imply whether or not you knew something.  I only mentioned
it as one example of Custom being well-integrated with Emacs.



^ permalink raw reply	[flat|nested] 72+ messages in thread

* Re: Propose to add setup-wizard.el to ELPA
  2022-01-02  2:07 Yuan Fu
  2022-01-02  2:37 ` Po Lu
  2022-01-02  7:55 ` Eli Zaretskii
@ 2022-01-02 12:02 ` Philip Kaludercic
  2022-01-07  9:58 ` Jean Louis
  3 siblings, 0 replies; 72+ messages in thread
From: Philip Kaludercic @ 2022-01-02 12:02 UTC (permalink / raw)
  To: Yuan Fu; +Cc: Emacs developers


I am not sure if I brought this up last time, but how difficult do you
think it would be to generalise this into a "wizard.el" package, that
could be used by any package to define an interactive configuration
wizard?

Yuan Fu <casouri@gmail.com> writes:

> A while ago I wrote a package that helps a new user to configure
> Emacs: it takes a user through some interactive pages, where changes
> takes effect immediately; and in the end it generates some code that
> can be copied to init.el.
>
> Demo for the original package: https://youtu.be/0qMskTAR2aw
>
> I made some improvements to that package and renamed it
> setup-wizard. Do you think we could add it to ELPA? Maybe the name is
> too “official”, in that case I can rename it to yuan’s-setup-wizard or
> something.
>
> I don’t know how useful could it be, since nowadays every body
> (understandably) starts with some community distribution rather than
> vanilla Emacs, but surely it is better than not having a wizard.
>
> You can try it out with emacs -q -l setup-wizard.el -f setup-wizard
>
> Yuan
>
> ;;; setup-wizard.el --- Setup wizard  -*- lexical-binding: t; -*-
>
> ;; Copyright (C) 2019-2020 Free Software Foundation, Inc.
>
> ;; Author: Yuan Fu <casouri@gmail.com>
> ;; Maintainer: Yuan Fu <casouri@gmail.com>
> ;; URL: https://github.com/casouri/setup-wizard
> ;; Version: 1.0.0
> ;; Keywords: convenience
> ;; Package-Requires: ((emacs "26.0"))
>
> ;; This file is part of GNU Emacs.
>
> ;; GNU Emacs is free software: you can redistribute it and/or modify
> ;; it under the terms of the GNU General Public License as published by
> ;; the Free Software Foundation, either version 3 of the License, or
> ;; (at your option) any later version.
>
> ;; GNU Emacs is distributed in the hope that it will be useful,
> ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
> ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> ;; GNU General Public License for more details.
>
> ;; You should have received a copy of the GNU General Public License
> ;; along with GNU Emacs.  If not, see <https://www.gnu.org/licenses/>.
>
> ;;; Commentary:
> ;;
> ;; This package provides a setup wizard that takes a user through an
> ;; interactive interface, in which he or she can configure key
> ;; bindings schemes, UI elements, Fonts, packages, etc.
>
> ;;; Code:
>
> (require 'widget)
> (require 'wid-edit)
> (require 'pcase)
> (require 'seq)
> (require 'cl-lib)
>
> ;;; Configs
>
> (defvar setup-wizard--config nil
>   "An alist (OPTION . (FORM COMMENT)) of configurations.
> We use FORM and COMMENT to produce the final config.")
>
> (defun setup-wizard--save-option-and-eval
>     (option form comment &optional additional)
>   "Save OPTION FORM and COMMENT, and evaluate FORM.
> If ADDITIONAL is non-nil, eval that too."
>   (when form
>     (setf (alist-get option setup-wizard--config)
>           (list form comment))
>     (eval form))
>   (when additional (eval additional)))
>
> ;;; Pages
>
> (defun setup-wizard--insert (&rest args)
>   "Insert ARGS and replace emojis if they can’t be displayed."
>   (widget-insert
>    (mapconcat (lambda (text)
>                 (if (and (char-displayable-p ?🧙)
>                          (char-displayable-p ?🧚))
>                     text
>                   (string-replace
>                    "🧚" "Fairy"
>                    (string-replace
>                     "🧙" "Wizard" text))))
>               args)))
>
> ;;;; Themes
>
> (defvar setup-wizard--c-demo
>   "    #include <stdlib.h>
>
>     struct point
>     {
>       x: int;
>       y: int;
>     };
>
>     int main(int arg, int* argv)
>     {
>       int x = -1;
>       int y = 2;
>       void *buf = malloc(sizeof(uin32_t));
>       return add(x, y) - 3;
>     }
> "
>   "Demo C code.")
>
> (defun setup-wizard--theme-page ()
>   "Theme configuration page."
>   (setup-wizard--insert
>    "🧚: Heya! You are here for help setting up your Emacs, right?
> Wizard will be here when you read to the next line.
>
> 🧙: Emacs comes with a couple of themes built-in, which are shown
> below. You can browse for more themes online or in the package
> manager.
>
> 🧚: Here are the built-in themes!
>
> Theme preview:\n\n")
>   ;; Insert a C demo.
>   (widget-insert
>    (with-temp-buffer
>      (insert setup-wizard--c-demo)
>      (c-mode)
>      (font-lock-fontify-region (point-min) (point-max))
>      (buffer-string)))
>   (widget-insert "\n")
>   ;; Insert theme selection menu.
>   (apply #'widget-create 'radio-button-choice
>          :follow-link t
>          :value "default"
>          ;; Enable the theme when the user selects it.
>          :notify (lambda (widget &rest _)
>                    (mapc #'disable-theme custom-enabled-themes)
>                    (let* ((theme (intern (widget-value widget)))
>                           (form (if (eq theme 'default)
>                                     nil
>                                   `(load-theme ',theme))))
>                      (setup-wizard--save-option-and-eval
>                       'theme form (format "Load %s theme" theme))))
>          (cons '(item "default")
>                (cl-loop for theme in (custom-available-themes)
>                         collect `(item ,(symbol-name theme)))))
>   (setup-wizard--insert "\n🧚: Want to ")
>   (widget-create
>    'push-button
>    :notify (lambda (&rest _)
>              (package-refresh-contents)
>              (list-packages t)
>              (goto-char (point-min))
>              (let ((inhibit-read-only t))
>                (keep-lines "-theme")))
>    :value "browse the package manager for themes")
>   (widget-insert "?\n"))
>
> ;;;; Keybinding
>
> (defun setup-wizard--keybinding-page ()
>   "Keybinding page."
>   (setup-wizard--insert "🧙: This is the notation for modifiers in Emacs:
>
>     C (control)   Ctrl
>     M (meta)      Alt/Option
>     s (super)     Windows/Command
>     S (shift)     Shift
>
> 🧚: Which binding scheme do you like?\n\n")
>   (widget-create 'radio-button-choice
>                  :follow-link t
>                  :value "default"
>                  :notify
>                  (lambda (widget &rest _)
>                    (setup-wizard--save-option-and-eval
>                     'keybinding
>                     (cond
>                      ((equal (widget-value widget)
>                              "Alternative")
>                       '(cua-mode))
>                      ((equal (widget-value widget)
>                              "Wizard’s choice")
>                       `(progn
>                          (global-set-key (kbd "s-c") #'kill-ring-save)
>                          (global-set-key (kbd "s-x") #'kill-region)
>                          (global-set-key (kbd "s-v") #'yank))))
>                     "Set bindings for copy/cut/paste."))
>                  '(item :value "Default"
>                         :format "%v\n\n%d\n"
>                         :doc "    M-w           Copy
>     C-w           Cut
>     C-y           Paste")
>                  '(item :value "Alternative"
>                         :format "%v\n\n%d\n"
>                         :doc "    C-c           Copy
>     C-x           Cut
>     C-v           Paste")
>                  '(item :value "Wizard’s choice"
>                         :format "%v\n\n%d\n"
>                         :doc "    s-c           Copy
>     s-x           Cut
>     s-v           Paste"))
>   (setup-wizard--insert
>    "\n🧙: In the alternative binding scheme, the binding for copy
> and cut only take effect when some text is selected. So when
> nothing is selected, they are still normal prefix keys.\n"))
>
> ;;;; UI features
>
> (defun setup-wizard--ui-features-page ()
>   "UI features page."
>   (setup-wizard--insert "🧚: What UI elements do you like?\n\n")
>   ;; Line numbers.
>   (widget-create 'checkbox
>                  :notify
>                  (lambda (widget &rest _)
>                    (let ((val (widget-value widget)))
>                      (setup-wizard--save-option-and-eval
>                       'line-number
>                       `(global-display-line-numbers-mode
>                         ,(if val 1 -1))
>                       (format "%s line number."
>                               (if val "Display" "Don’t display")))))
>                  :value nil)
>   (widget-insert " Line numbers.\n")
>   ;; Thin cursor.
>   (widget-create 'checkbox
>                  :notify
>                  (lambda (widget &rest _)
>                    (let ((val (widget-value widget)))
>                      (setup-wizard--save-option-and-eval
>                       'thin-cursor
>                       `(setq-default cursor-type
>                                      ',(if val 'bar t))
>                       (format "Use %s cursor"
>                               (if val "thin" "default")))))
>                  :value nil)
>   (widget-insert " Thin cursor bar.\n")
>   ;; Blink cursor.
>   (widget-create 'checkbox
>                  :notify
>                  (lambda (widget &rest _)
>                    (let ((val (widget-value widget)))
>                      (setup-wizard--save-option-and-eval
>                       'blink-cursor
>                       `(blink-cursor-mode ,(if val 1 -1))
>                       (format "%s cursor"
>                               (if val "Blink" "Do not blink")))))
>                  :value blink-cursor-mode)
>   (widget-insert " Blink cursor.\n")
>   ;; Tool bar.
>   (widget-create 'checkbox
>                  :notify
>                  (lambda (widget &rest _)
>                    (let ((val (widget-value widget)))
>                      (setup-wizard--save-option-and-eval
>                       'tool-bar
>                       `(tool-bar-mode ,(if val 1 -1))
>                       (format "%s tool bar."
>                               (if val "Enable" "Disable")))))
>                  :value tool-bar-mode)
>   (widget-insert " Tool bar.\n")
>   ;; Menu bar.
>   (widget-create 'checkbox
>                  :notify
>                  (lambda (widget &rest _)
>                    (let ((val (widget-value widget)))
>                      (setup-wizard--save-option-and-eval
>                       'menu-bar
>                       `(menu-bar-mode ,(if val 1 -1))
>                       (format "%s menu bar."
>                               (if val "Enable" "Disable")))))
>                  :value menu-bar-mode)
>   (widget-insert " Menu bar.\n")
>   ;; Scroll bar.
>   (widget-create 'checkbox
>                  :notify
>                  (lambda (widget &rest _)
>                    (let ((val (widget-value widget)))
>                      (setup-wizard--save-option-and-eval
>                       'scroll-bar
>                       `(scroll-bar-mode ,(if val 1 -1))
>                       (format "%s scroll bar"
>                               (if val "Enable" "Disable")))))
>                  :value scroll-bar-mode)
>   (widget-insert " Scroll bar.\n")
>   ;; Font.
>   (widget-insert "\n")
>   (let* (default-font-field
>          variable-font-field
>          cjk-font-field
>          size-field
>          action
>          (phrase "The quick brown fox jumps over the lazy dog.\n"))
>     (widget-insert "Font preview:\n\n")
>     (widget-insert "    " phrase)
>     (widget-insert "    " (propertize phrase 'face 'variable-pitch))
>     (widget-insert "    大漠孤烟直,长河落日圆。\n")
>     (widget-insert "    射は仁の道なり。射は正しきを己に求む。\n\n")
>     (setq default-font-field
>           (widget-create 'editable-field
>                          :size 20
>                          :value ""
>                          :format "Default font: %v \n"))
>     (setq variable-font-field
>           (widget-create 'editable-field
>                          :size 20
>                          :value ""
>                          :format "Variable-pitch font: %v \n"))
>     (setq cjk-font-field
>           (widget-create 'editable-field
>                          :size 20
>                          :value ""
>                          :format "CJK font: %v \n"))
>     (setq size-field
>           (widget-create 'editable-field
>                          :size 2
>                          :value ""
>                          :format "Font size: %v \n\n"))
>     (setq action
>           (lambda (&rest _)
>             (let* ((default-font
>                     (string-trim (widget-value default-font-field)))
>                    (variable-font
>                     (string-trim (widget-value variable-font-field)))
>                    (cjk-font
>                     (string-trim (widget-value cjk-font-field)))
>                    (size (string-to-number
>                           (string-trim
>                            (widget-value size-field)))))
>               (unless (equal default-font "")
>                 (setup-wizard--save-option-and-eval
>                  'font `(set-face-attribute
>                          'default nil :family ,default-font)
>                  "Set default font."))
>               (unless (equal variable-font "")
>                 (setup-wizard--save-option-and-eval
>                  'variable-font
>                  `(set-face-attribute
>                    'variable-pitch nil :family ,variable-font)
>                  "Set variable-pitch font."))
>               (unless (equal cjk-font "")
>                 (setup-wizard--save-option-and-eval
>                  'cjk-font
>                  `(dolist (charset '(kana han cjk-misc))
>                     (set-fontset-font
>                      t charset (font-spec :family ,cjk-font)))
>                  "Set CJK font."))
>               (unless (eq size 0)
>                 (setup-wizard--save-option-and-eval
>                  'font-size
>                  `(set-face-attribute 'default nil :height ,(* size 10))
>                  "Set font size.")))))
>     (widget-create 'push-button
>                    :value "Apply font settings"
>                    :notify action)
>     (widget-insert "\n")))
>
> (defun setup-wizard--undo-page ()
>   "Undo page."
>   (setup-wizard--insert
>    "🧙: Emacs has a powerful (but probably unintuitive) undo system,
> where undo operations themselves are recorded in the undo
> history, and redo is done by undoing an previous undo operation.
>
> 🧚: Which undo system do you like?\n\n")
>   (widget-create 'radio-button-choice
>                  :value "default"
>                  :follow-lint t
>                  :notify (lambda (widget &rest _)
>                            (when (equal (widget-value widget)
>                                         "Linear")
>                              (setup-wizard--save-option-and-eval
>                               'undo
>                               `(global-set-key [remap undo] #'undo-only)
>                               "Use linear undo style.")))
>                  '(item :value "Default"
>                         :format "%v\n\n%d\n"
>                         :doc "    One undo rules them all")
>                  '(item :value "Linear"
>                         :format "%v\n\n%d\n"
>                         :doc "    Undo and redo"))
>   (let (undo-key redo-key)
>     (widget-insert "\n")
>     (setq undo-key
>           (widget-create 'editable-field
>                          :size 5
>                          :value "C-/"
>                          :format "Bind undo to: %v "))
>     (widget-create 'push-button
>                    :value "Apply"
>                    :notify
>                    (lambda (&rest _)
>                      (let ((key (string-trim (widget-value undo-key))))
>                        (setup-wizard--save-option-and-eval
>                         'undo-key
>                         `(global-set-key (kbd ,key) #'undo)
>                         "Set binding for ‘undo’."))))
>     (widget-insert "\n")
>     (setq redo-key
>           (widget-create 'editable-field
>                          :size 5
>                          :value "C-?"
>                          :format "Bind redo to: %v "))
>     (widget-create 'push-button
>                    :value "Apply"
>                    :notify
>                    (lambda (&rest _)
>                      (let ((key (string-trim (widget-value redo-key))))
>                        (setup-wizard--save-option-and-eval
>                         'undo-key
>                         `(global-set-key (kbd ,key) #'undo-redo)
>                         "Set binding for ‘undo-redo’."))))
>     (setup-wizard--insert "\n\n🧙: I bind redo to C-.\n")))
>
> ;;;; Extra package
>
> (defun setup-wizard--package-activate (package mode)
>   "Return a form that activates PACKAGE and enable MODE."
>   `(progn
>      (require 'package)
>      (unless (package-installed-p ',package)
>        (package-install ',package))
>      (package-activate 'ivy)
>      (require ',package)
>      (,mode)))
>
> (defun setup-wizard--package-page ()
>   "Extra package page."
>   (setup-wizard--insert
>    "🧙: Here are some packages that I always install:\n\n")
>   ;; Ivy.
>   (widget-create 'checkbox
>                  :notify
>                  (lambda (widget &rest _)
>                    (let ((val (widget-value widget)))
>                      (setup-wizard--save-option-and-eval
>                       'ivy
>                       (when val
>                         `(progn
>                            ,(setup-wizard--package-activate
>                              'ivy 'ivy-mode)
>                            (setq enable-recursive-minibuffers t
>                                  ivy-use-selectable-prompt t
>                                  ivy-use-virtual-buffers t)
>                            ,(setup-wizard--package-activate
>                              'counsel 'counsel-mode)))
>                       "Install and enable ‘ivy-mode’ and ‘counsel-mode’."
>                       `(progn
>                          (ivy-mode ,(if val 1 -1))
>                          (counsel-mode ,(if val 1 -1))))))
>                  :value nil)
>   (widget-insert
>    " Ivy: A completion package that makes typing file names, buffer
> names, commands, etc so much easier.\n")
>   ;; Company
>   (widget-create 'checkbox
>                  :notify
>                  (lambda (widget &rest _)
>                    (let ((val (widget-value widget)))
>                      (setup-wizard--save-option-and-eval
>                       'company
>                       (setup-wizard--package-activate
>                        'company 'company-mode)
>                       "Install and enable ‘company-mode’."
>                       `(company-mode ,(if val 1 -1)))))
>                  :value nil)
>   (widget-insert
>    " Company: Popup completion menu when writing programs.\n")
>   (widget-create 'checkbox
>                  :notify
>                  (lambda (widget &rest _)
>                    (let ((val (widget-value widget)))
>                      (setup-wizard--save-option-and-eval
>                       'electric-pair-mode
>                       (when val
>                         `(electric-pair-mode))
>                       "Enable ‘electric-pair-mode’."
>                       `(electric-pair-mode ,(if val 1 -1)))))
>                  :value nil)
>   (widget-insert
>    " Electric-pair-mode (built-in): Automatically closes parenthesis\n")
>   (setup-wizard--insert "\n🧙: ...\n\n")
>   (setup-wizard--insert "🧙: I don’t use many packages.\n"))
>
> ;;; Guide
>
> (defun setup-wizard--with-boilerplate
>     (setup-fn &optional page-list finish-fn)
>   "Call page setup function SETUP-FN with widget boilerplate.
> PAGE-LIST is a list of setup function for pages to show in a
> series. FINISH-FN is called when user clicks the finish button.
> If PAGE-LIST or FINISH-FN are nil, don’t insert navigation
> buttons."
>   (kill-all-local-variables)
>   (let ((inhibit-read-only t))
>     (erase-buffer))
>   (remove-overlays)
>   (funcall setup-fn)
>   (widget-insert "\n")
>   (when (and page-list finish-fn)
>     (setup-wizard--insert-step-buttons setup-fn page-list finish-fn))
>   (use-local-map widget-keymap)
>   (widget-setup)
>   (goto-char (point-min))
>   (local-set-key (kbd "q") #'setup-wizard--quit))
>
> (defun setup-wizard--quit (&rest _)
>   "Quite the wizard."
>   (interactive)
>   (kill-buffer)
>   (message (with-temp-buffer
>              (setup-wizard--insert "🧚: See ya!")
>              (buffer-string))))
>
> (defun setup-wizard--insert-step-buttons (page page-list finish-fn)
>   "Insert buttons that go to previous and next page of PAGE.
> PAGE-LIST is a list of setup function for pages to show in a series.
> Insert a Button that calls FINISH-FN at the last page."
>   (let* ((idx (seq-position page-list page))
>          (previous-page (if (eq idx 0) nil
>                           (nth (1- idx) page-list)))
>          (next-page (nth (1+ idx) page-list)))
>     (setup-wizard--insert
>      (format "🧚: We are at step %s/%s, what’s next? "
>              (1+ idx) (length page-list)))
>     (when previous-page
>       (widget-create
>        'push-button
>        :notify (lambda (&rest _)
>                  (setup-wizard--with-boilerplate
>                   previous-page page-list finish-fn))
>        :value "Back"))
>     (widget-insert " ")
>     (if next-page
>         (widget-create
>          'push-button
>          :notify (lambda (&rest _)
>                    (setup-wizard--with-boilerplate
>                     next-page page-list finish-fn))
>          :value "Next")
>       (widget-create
>        'push-button
>        :notify (lambda (&rest _) (funcall finish-fn))
>        :value "Finish"))
>     (widget-insert " ")
>     (widget-create
>      'push-button
>      :value "Quit"
>      :notify #'setup-wizard--quit)
>     (widget-insert "\n")))
>
> (defun setup-wizard--insert-config ()
>   "Insert configuration in ‘setup-wizard--config’ line-by-line."
>   (dolist (config (reverse setup-wizard--config))
>     (insert ";; " (nth 2 config) "\n")
>     (dolist (conf (if (eq (car (nth 1 config)) 'progn)
>                       (cdr (nth 1 config))
>                     (list (nth 1 config))))
>       (insert (prin1-to-string conf) "\n"))))
>
> (defun setup-wizard--finish ()
>   "The default finish function.
> Constructs the config and display them."
>   (setup-wizard--with-boilerplate
>    (lambda ()
>      (setup-wizard--insert
>       "🧚: Here is your configuration! Do you want me to append it to
> init.el for you? ")
>      (widget-create 'push-button
>                     :notify
>                     (lambda (&rest _)
>                       (let ((init-file (locate-user-emacs-file
>                                         "init.el" ".emacs")))
>                         (find-file init-file)
>                         (goto-char (point-max))
>                         (insert "\n")
>                         (setup-wizard--insert-config)))
>                     :value "Append to init.el")
>      (widget-insert "\n\n")
>      (widget-insert
>       (with-temp-buffer
>         (setup-wizard--insert-config)
>         (emacs-lisp-mode)
>         (font-lock-fontify-region (point-min) (point-max))
>         (buffer-string))))))
>
> (defun setup-wizard ()
>   "Run the setup wizard."
>   (interactive)
>   (switch-to-buffer (get-buffer-create "*mage tower*"))
>   (setq setup-wizard--config nil)
>   (let ((page-list '(setup-wizard--theme-page
>                      setup-wizard--keybinding-page
>                      setup-wizard--ui-features-page
>                      setup-wizard--undo-page
>                      setup-wizard--package-page)))
>     (setup-wizard--with-boilerplate
>      (car page-list) page-list
>      #'setup-wizard--finish)))
>
> ;;; Backport
>
> (unless (fboundp 'undo--last-change-was-undo-p)
>   (defun undo--last-change-was-undo-p (undo-list)
>     (while (and (consp undo-list) (eq (car undo-list) nil))
>       (setq undo-list (cdr undo-list)))
>     (gethash undo-list undo-equiv-table)))
>
> (unless (fboundp 'undo-redo)
>   (defun undo-redo (&optional arg)
>     "Undo the last ARG undos."
>     (interactive "*p")
>     (cond
>      ((not (undo--last-change-was-undo-p buffer-undo-list))
>       (user-error "No undo to undo"))
>      (t
>       (let* ((ul buffer-undo-list)
>              (new-ul
>               (let ((undo-in-progress t))
>                 (while (and (consp ul) (eq (car ul) nil))
>                   (setq ul (cdr ul)))
>                 (primitive-undo arg ul)))
>              (new-pul (undo--last-change-was-undo-p new-ul)))
>         (message "Redo%s" (if undo-in-region " in region" ""))
>         (setq this-command 'undo)
>         (setq pending-undo-list new-pul)
>         (setq buffer-undo-list new-ul))))))
>
> (unless (fboundp 'undo-only)
>   (defun undo-only (&optional arg)
>     "Undo some previous changes.
> Repeat this command to undo more changes.
> A numeric ARG serves as a repeat count.
> Contrary to `undo', this will not redo a previous undo."
>     (interactive "*p")
>     (let ((undo-no-redo t)) (undo arg))))
>
> (provide 'setup-wizard)
>
> ;;; setup-wizard.el ends here
>

-- 
	Philip Kaludercic



^ permalink raw reply	[flat|nested] 72+ messages in thread

* Re: Propose to add setup-wizard.el to ELPA
  2022-01-02 11:36                               ` xenodasein--- via Emacs development discussions.
@ 2022-01-02 12:03                                 ` Po Lu
  2022-01-02 15:27                                 ` Stefan Kangas
  1 sibling, 0 replies; 72+ messages in thread
From: Po Lu @ 2022-01-02 12:03 UTC (permalink / raw)
  To: xenodasein--- via Emacs development discussions.; +Cc: xenodasein

xenodasein--- via "Emacs development discussions." <emacs-devel@gnu.org>
writes:

> If it is ludicrous, then why almost every Emacs users configuration out
> there care about speeding up initialization?

How is that relevant to custom-set-variables at all?

> You are proving what I argued, which is custom system doesn't play
> well with doing things from init file.  And even newcomers will have
> to use the init file, for many things cannot be done by using custom
> interface only.

The custom file by default _is_ the init file, so I don't understand
what you're trying to say at all.



^ permalink raw reply	[flat|nested] 72+ messages in thread

* Re: Propose to add setup-wizard.el to ELPA
  2022-01-02 11:57                                 ` xenodasein--- via Emacs development discussions.
@ 2022-01-02 12:05                                   ` Po Lu
  2022-01-02 15:27                                   ` Stefan Kangas
  1 sibling, 0 replies; 72+ messages in thread
From: Po Lu @ 2022-01-02 12:05 UTC (permalink / raw)
  To: xenodasein--- via Emacs development discussions.; +Cc: xenodasein

xenodasein--- via "Emacs development discussions." <emacs-devel@gnu.org>
writes:

> FWIW I completely agree with this.  Custom system is a good idea,
> and it should exist; however it has a very long way yet to achieve
> it's purpose.  It is nowhere near JetBrains software's isolation
> of Java from user.  It needs a lot more work.  It is an unfinished system.
> If you keep insisting on Custom's perfection, you need to explain

No, I don't insist on the perfection of Custom.  No system is perfect,
but it being imperfect is not an excuse for having code generated by
Emacs for new users to not use custom.  It will simply make the problem
worse, by confusing them when they try to use custom.

> the whole Emacs community why JetBrains makes more money
> than donations to Emacs.  (Rhetorical)

I don't think Emacs accepts donations, and it's not a company either, so
that comparison makes no sense.



^ permalink raw reply	[flat|nested] 72+ messages in thread

* Re: Propose to add setup-wizard.el to ELPA
  2022-01-02  8:07   ` Po Lu
@ 2022-01-02 15:23     ` nanjunjie
  2022-01-03  8:28       ` Philip Kaludercic
  0 siblings, 1 reply; 72+ messages in thread
From: nanjunjie @ 2022-01-02 15:23 UTC (permalink / raw)
  To: emacs-devel


For me an emacs user, `customize` itself is a setup wizard, it does not
need another setup wizard to customize the customization. Or once the setup
wizard came out, we need to figure out how to customize the setup
wizard, and we would enter an endless loop.

Po Lu <luangruo@yahoo.com> writes:

> Eli Zaretskii <eliz@gnu.org> writes:
>
>> I didn't yet try the package, but IMNSHO it makes the most sense in
>> core, and in that case it should also be started automatically for new
>> users, or at least suggested to them upon first invocation.
>
> Starting it automatically is too much, but having it on the splash
> screen would be great.
>
> Thanks.




^ permalink raw reply	[flat|nested] 72+ messages in thread

* Re: Propose to add setup-wizard.el to ELPA
  2022-01-02 11:57                                 ` xenodasein--- via Emacs development discussions.
  2022-01-02 12:05                                   ` Po Lu
@ 2022-01-02 15:27                                   ` Stefan Kangas
  2022-01-02 15:37                                     ` Eli Zaretskii
  1 sibling, 1 reply; 72+ messages in thread
From: Stefan Kangas @ 2022-01-02 15:27 UTC (permalink / raw)
  To: xenodasein, luangruo; +Cc: emacs-devel

xenodasein--- via "Emacs development discussions." <emacs-devel@gnu.org>
writes:

> FWIW I completely agree with this.  Custom system is a good idea,
> and it should exist; however it has a very long way yet to achieve
> it's purpose.  It is nowhere near JetBrains software's isolation
> of Java from user.  It needs a lot more work.  It is an unfinished system.

Agreed, but I'd invite you to be more concrete.  If you are proposing a
redesign, fine, but we'd need volunteers to do that.  If you have
specific proposals for how to improve customize, they are also welcome.



^ permalink raw reply	[flat|nested] 72+ messages in thread

* Re: Propose to add setup-wizard.el to ELPA
  2022-01-02 11:36                               ` xenodasein--- via Emacs development discussions.
  2022-01-02 12:03                                 ` Po Lu
@ 2022-01-02 15:27                                 ` Stefan Kangas
  1 sibling, 0 replies; 72+ messages in thread
From: Stefan Kangas @ 2022-01-02 15:27 UTC (permalink / raw)
  To: xenodasein, luangruo; +Cc: emacs-devel

xenodasein--- via "Emacs development discussions." <emacs-devel@gnu.org>
writes:

> If it is ludicrous, then why almost every Emacs users configuration out
> there care about speeding up initialization?  Speed isn't the only
> concern, also.

I don't think you will get a measurable speedup from running `setq'
instead of `customize-set-variable' if the relevant defcustom does not
have an :initialize function.

The reason I use `setq' in my init is just that it's less typing.

FWIW, I'd appreciate if we had a

    (defalias 'setopt #'customize-set-variable)



^ permalink raw reply	[flat|nested] 72+ messages in thread

* Re: Propose to add setup-wizard.el to ELPA
  2022-01-02 15:27                                   ` Stefan Kangas
@ 2022-01-02 15:37                                     ` Eli Zaretskii
  2022-01-02 16:43                                       ` xenodasein--- via Emacs development discussions.
  0 siblings, 1 reply; 72+ messages in thread
From: Eli Zaretskii @ 2022-01-02 15:37 UTC (permalink / raw)
  To: Stefan Kangas; +Cc: luangruo, emacs-devel

> From: Stefan Kangas <stefankangas@gmail.com>
> Date: Sun, 2 Jan 2022 10:27:28 -0500
> Cc: emacs-devel@gnu.org
> 
> xenodasein--- via "Emacs development discussions." <emacs-devel@gnu.org>
> writes:
> 
> > FWIW I completely agree with this.  Custom system is a good idea,
> > and it should exist; however it has a very long way yet to achieve
> > it's purpose.  It is nowhere near JetBrains software's isolation
> > of Java from user.  It needs a lot more work.  It is an unfinished system.
> 
> Agreed, but I'd invite you to be more concrete.  If you are proposing a
> redesign, fine, but we'd need volunteers to do that.  If you have
> specific proposals for how to improve customize, they are also welcome.

Improving Customize (or any other major Emacs infrastructure) is
always welcome, of course.  But I'd like to point out a potential
confusion or misunderstanding between the participants in this thread:
I think people might mix Customize's user-facing interface -- the
forms, the buttons, the menus in Custom buffers, etc. -- with calling
Customize functions from Lisp and with its implementation code.  When
people say here they think Custom has a long way to achieve its
purpose, which of those two they allude to?

Customize was designed to be easy on the user from the UI POV, it
wasn't designed to be easy from the implementation POV.  Nor was it
designed to be easy to understand its Lisp forms, because the
assumption was that people who'd use Customize will rarely if ever
look at the forms it produces when you save customizations.



^ permalink raw reply	[flat|nested] 72+ messages in thread

* Re: Propose to add setup-wizard.el to ELPA
  2022-01-02  8:07   ` Yuan Fu
@ 2022-01-02 15:42     ` Stefan Kangas
  2022-01-02 17:26       ` Yuan Fu
  0 siblings, 1 reply; 72+ messages in thread
From: Stefan Kangas @ 2022-01-02 15:42 UTC (permalink / raw)
  To: Yuan Fu, Eli Zaretskii; +Cc: emacs-devel

Yuan Fu <casouri@gmail.com> writes:

>> I didn't yet try the package, but IMNSHO it makes the most sense in
>> core, and in that case it should also be started automatically for new
>> users, or at least suggested to them upon first invocation.

+1

> I’m afraid it would be very hard for everyone to agree on the options
> provided, the phrasing, etc, etc, if it is to be made official and
> included in core. I don’t have the energy to fight for it. If someone
> is feeling courageous, go for it; in the meantime, having it on ELPA
> is better than having nothing in core.

IMHO, if we can get your code in shape for core, we can discuss such
details after it has been merged.  For example, we could start out with
a very minimal set, and comment out anything that is not trivially
agreed upon.

Putting it on GNU ELPA does not move us closer to where we need to be,
IMHO, because it adds another set of complexities on top of the already
existing ones with adding it to core.



^ permalink raw reply	[flat|nested] 72+ messages in thread

* Re: Propose to add setup-wizard.el to ELPA
@ 2022-01-02 15:46 Simon Pugnet
  0 siblings, 0 replies; 72+ messages in thread
From: Simon Pugnet @ 2022-01-02 15:46 UTC (permalink / raw)
  To: Philip Kaludercic; +Cc: Yuan Fu, Emacs developers

Philip Kaludercic <philipk@posteo.net> writes:

> I am not sure if I brought this up last time, but how difficult do you
> think it would be to generalise this into a "wizard.el" package, that
> could be used by any package to define an interactive configuration
> wizard?

I really like this idea!

If the wizard could provide a common interface (e.g. a "wizard-builder")
that's easy to use and is presented using the same interface as the main
wizard then I think that could be a very nice way of helping newcomers
to certain packages.

For example, as well as giving configuration instructions in the
package's README, the package author could include their own wizard and
say something like "For interactive configuration, just evaluate
(invoke-wizard 'some-package) after loading the package."

One could argue that this is pretty close to just launching
customize-group for the package and limiting the options to only the
most important. However Yuan's wizard provides a more newcomer-friendly
and interactive interface (e.g. changing the theme immediately once it
is selected) so I think it is worthwhile keeping the wizard UI and
customize UI separate in this case.

P.S., I also have an interest in the idea of an Emacs set-up wizard, and
I've written about this before:
https://blog.polaris64.net/post/could-emacs-have-a-set-up-wizard/





^ permalink raw reply	[flat|nested] 72+ messages in thread

* Re: Propose to add setup-wizard.el to ELPA
  2022-01-02 15:37                                     ` Eli Zaretskii
@ 2022-01-02 16:43                                       ` xenodasein--- via Emacs development discussions.
  2022-01-02 17:32                                         ` Stefan Kangas
  2022-01-03  0:42                                         ` Po Lu
  0 siblings, 2 replies; 72+ messages in thread
From: xenodasein--- via Emacs development discussions. @ 2022-01-02 16:43 UTC (permalink / raw)
  To: eliz, stefankangas; +Cc: emacs-devel

https://lists.gnu.org/archive/html/emacs-devel/2022-01/msg00136.html
From: Stefan Kangas
> I don't think you will get a measurable speedup from running `setq'
> instead of `customize-set-variable' if the relevant defcustom does not
> have an :initialize function.
>
> The reason I use `setq' in my init is just that it's less typing.
>
> FWIW, I'd appreciate if we had a
> (defalias 'setopt #'customize-set-variable)

Using customize-set-variable from Elisp is simply a hack, IIRC
it has weird unwanted effects like when saving customizations
from interface, it writes everything back into managed
custom-set-variables.  It also uses 'user theme, my workaround
was just creating a theme for customizations that need computed
results.  It is also really slow in comparison to setq, using it
continuously seem to make difference, but of course it depends on
what user considers slow/bad.

https://lists.gnu.org/archive/html/emacs-devel/2022-01/msg00135.html
From: Stefan Kangas
> xenodasein--- via "Emacs development discussions." <emacs-devel@gnu.org>
> writes:
>
> > FWIW I completely agree with this.  Custom system is a good idea,
> > and it should exist; however it has a very long way yet to achieve
> > it's purpose.  It is nowhere near JetBrains software's isolation
> > of Java from user.  It needs a lot more work.  It is an unfinished system.
>
> Agreed, but I'd invite you to be more concrete.  If you are proposing a
> redesign, fine, but we'd need volunteers to do that.  If you have
> specific proposals for how to improve customize, they are also welcome.

I didn't read a majority part of the code, but a complete redesign doesn't
seem necessary.  It simply needs a bit more love.  A simple addition
example:

(defmacro xdn-csetq (variable value)
  `(funcall (or (get ',variable 'custom-set)
                'set-default)
            ',variable ,value))

I agree my takes on Customize so far has been low-effort.  I'd be happy to
invest in more time into looking up more concrete examples for improvement
if:
- Someone is already working on it or planning to and need feedback
- An entry of TODO/task/plan is looked into being written
- A maintainer is looking for specific feedback

https://lists.gnu.org/archive/html/emacs-devel/2022-01/msg00138.html
From: Eli Zaretskii
> Improving Customize (or any other major Emacs infrastructure) is
> always welcome, of course.  But I'd like to point out a potential
> confusion or misunderstanding between the participants in this thread:
> I think people might mix Customize's user-facing interface -- the
> forms, the buttons, the menus in Custom buffers, etc. -- with calling
> Customize functions from Lisp and with its implementation code.  When
> people say here they think Custom has a long way to achieve its
> purpose, which of those two they allude to?

IMHO both aspects.  Interface is in better shape than trying to use
customize from Elisp though.  Interface could use aesthetic improvements,
but the more significant issue is it's coverage of how many kinds of
customizations a user can do from it, without touching Elisp.  This
is related to package management also, especially for packages outside
ELPA.

> Customize was designed to be easy on the user from the UI POV, it
> wasn't designed to be easy from the implementation POV.  Nor was it
> designed to be easy to understand its Lisp forms, because the
> assumption was that people who'd use Customize will rarely if ever
> look at the forms it produces when you save customizations.

Being easier to understand would help with smaller contributions.
What I should have said instead is that it is hard to modify, being
also tangled with theming system, in comparison to most other packages.

A more concrete improvement would be to make it somehow more
plesant to work with, when using Elisp only, or to completely isolate it
from needing to interact with Elisp.  defcustom could be in C level?

Basically people shouldn't have reasons to write these types of
complaints:
https://www.emacswiki.org/emacs/CustomizingAndSaving#h5o-3

This is a lot less significant problem than making it more comprehensive
for non-programmers.

Thanks.




^ permalink raw reply	[flat|nested] 72+ messages in thread

* Re: Propose to add setup-wizard.el to ELPA
  2022-01-02  9:41                 ` Po Lu
@ 2022-01-02 17:18                   ` Yuan Fu
  0 siblings, 0 replies; 72+ messages in thread
From: Yuan Fu @ 2022-01-02 17:18 UTC (permalink / raw)
  To: Po Lu; +Cc: Emacs developers



> On Jan 2, 2022, at 1:41 AM, Po Lu <luangruo@yahoo.com> wrote:
> 
> Yuan Fu <casouri@gmail.com> writes:
> 
>> My point is that all configurations would be in one commented block of
>> code, instead of separated into different places.
> 
> So you can place `global-set-key' and `setq' in a single form, and also
> have it come out meaningfully?
> 
> Otherwise, I don't understand what you mean by "block".

As in

;; xxx
(Setq xxx xxx)
;; xxx
(Global-set-key xxx xxx)
...

> 
>> Maybe that’s true for some users. I had my fair share of struggle and
>> confusion with custom when I started using Emacs. IME a few lines of
>> setq, global-set-key and xxx-mode are simpler and more predicable than
>> custom.
> 
> I think the problem with people finding custom confusing is that they
> tend to blindly paste code from other people's configurations, and that
> code tends to not work well with custom.  There is no reason to worsen
> that problem by providing a setup wizard which doesn't work with custom.
> 
>> Neither of us has surveyed enough number of new Emacs users, so I
>> don’t think we can make definitive claims.  For example, I don’t think
>> it is unacceptable to expect a user to understand what does setq,
>> global-set-key or xxx-mode means.
> 
> You don't need to survey anyone to come to such a conclusion.  Just ask
> yourself this: do users of CLion have to know Java?  If not, then users
> of Emacs shouldn't have to learn Emacs Lisp either.
> 
> Especially people who have zero hours of previous experience working
> with Emacs.
> 
>> It is hard for the user to find them. Plus other problems with custom
>> and Customize described above that you don’t seem to mind. Aren’t they
>> confusing for even a not-so-new user? They surely confused and annoyed
>> me for a long time back then.
> 
> Easy Customization is documented in the manual, it is in the menu bar,
> and there is a link in the splash screen.
> 
> If it's confusing to new users, I think it should be fixed.

Customize and custom are not very confusing if one only uses Customize and doesn’t care how it works. It is confusing if one starts to also write some code in init.el and see some unexpected results.

If setup-wizard does not generate some code to insert but rather silently changes and save settings behind, I would be very confusing (about how and why thing happen in the way they are). But that’s me, maybe a beginner is totally fine with magic. I won’t argue with that.

My objective complaint is that I would need to insert keybinding configurations as code into init.el and the rest into custom. And they are separate and confusing for a user to modify/remove. Also code is more straightforward and simple. I can just delete them and their effect is gone, but not so much with custom. You need to navigate the Customize interface.

Yuan


^ permalink raw reply	[flat|nested] 72+ messages in thread

* Re: Propose to add setup-wizard.el to ELPA
  2022-01-02 15:42     ` Stefan Kangas
@ 2022-01-02 17:26       ` Yuan Fu
  2022-01-02 17:36         ` xenodasein--- via Emacs development discussions.
                           ` (2 more replies)
  0 siblings, 3 replies; 72+ messages in thread
From: Yuan Fu @ 2022-01-02 17:26 UTC (permalink / raw)
  To: Stefan Kangas; +Cc: Eli Zaretskii, emacs-devel



> On Jan 2, 2022, at 7:42 AM, Stefan Kangas <stefankangas@gmail.com> wrote:
> 
> Yuan Fu <casouri@gmail.com> writes:
> 
>>> I didn't yet try the package, but IMNSHO it makes the most sense in
>>> core, and in that case it should also be started automatically for new
>>> users, or at least suggested to them upon first invocation.
> 
> +1
> 
>> I’m afraid it would be very hard for everyone to agree on the options
>> provided, the phrasing, etc, etc, if it is to be made official and
>> included in core. I don’t have the energy to fight for it. If someone
>> is feeling courageous, go for it; in the meantime, having it on ELPA
>> is better than having nothing in core.
> 
> IMHO, if we can get your code in shape for core, we can discuss such
> details after it has been merged.  For example, we could start out with
> a very minimal set, and comment out anything that is not trivially
> agreed upon.
> 
> Putting it on GNU ELPA does not move us closer to where we need to be,
> IMHO, because it adds another set of complexities on top of the already
> existing ones with adding it to core.

I don’t have any problem of adding it to core. I’m just pessimistic about how many people are incentivized to push for it and agree on things.

Putting it on ELPA doesn’t stop from working it into core, I think. I don’t want to get into another 1000-thread debate about what is the “minimal set”. Many of the stuff in setup-wizard.el are not easily agreed upon, but removing them IMO decreases the usefulness of setup-wizard. For example, the “wizards’ choice” binding scheme, the option to turn off menu-bar, the recommendation of ivy and company.

Yuan


^ permalink raw reply	[flat|nested] 72+ messages in thread

* Re: Propose to add setup-wizard.el to ELPA
@ 2022-01-02 17:26 Simon Pugnet
  2022-01-02 18:49 ` Stefan Kangas
  0 siblings, 1 reply; 72+ messages in thread
From: Simon Pugnet @ 2022-01-02 17:26 UTC (permalink / raw)
  To: Emacs developers

Philip Kaludercic <philipk@posteo.net> writes:

> I am not sure if I brought this up last time, but how difficult do you
> think it would be to generalise this into a "wizard.el" package, that
> could be used by any package to define an interactive configuration
> wizard?

I really like this idea!

If the wizard could provide a common interface (e.g. a "wizard-builder")
that's easy to use and is presented using the same interface as the main
wizard then I think that could be a very nice way of helping newcomers
to certain packages.

For example, as well as giving configuration instructions in the
package's README, the package author could include their own wizard and
say something like "For interactive configuration, just evaluate
(invoke-wizard 'some-package) after loading the package."

One could argue that this is pretty close to just launching
customize-group for the package and limiting the options to only the
most important. However Yuan's wizard provides a more newcomer-friendly
and interactive interface (e.g. changing the theme immediately once it
is selected) so I think it is worthwhile keeping the wizard UI and
customize UI separate in this case.

P.S., I also have an interest in the idea of an Emacs set-up wizard, and
I've written about this before:
https://blog.polaris64.net/post/could-emacs-have-a-set-up-wizard/




^ permalink raw reply	[flat|nested] 72+ messages in thread

* Re: Propose to add setup-wizard.el to ELPA
  2022-01-02 16:43                                       ` xenodasein--- via Emacs development discussions.
@ 2022-01-02 17:32                                         ` Stefan Kangas
  2022-01-03  0:42                                         ` Po Lu
  1 sibling, 0 replies; 72+ messages in thread
From: Stefan Kangas @ 2022-01-02 17:32 UTC (permalink / raw)
  To: xenodasein, eliz; +Cc: emacs-devel

xenodasein@tutanota.de writes:

> I agree my takes on Customize so far has been low-effort.  I'd be happy to
> invest in more time into looking up more concrete examples for improvement
> if:
> - Someone is already working on it or planning to and need feedback
> - An entry of TODO/task/plan is looked into being written
> - A maintainer is looking for specific feedback

The best way is to just `M-x report-emacs-bug' or email
bug-gnu-emacs@gnu.org with your feature requests or proposals, and
eventually someone will look into it.  We just had a bunch of
improvements to customize in August (or so) based on such feature
requests.



^ permalink raw reply	[flat|nested] 72+ messages in thread

* Re: Propose to add setup-wizard.el to ELPA
  2022-01-02 17:26       ` Yuan Fu
@ 2022-01-02 17:36         ` xenodasein--- via Emacs development discussions.
       [not found]         ` <MsQrOAf--J-2@tutanota.de-MsQrQR2----2>
  2022-01-02 18:50         ` Stefan Kangas
  2 siblings, 0 replies; 72+ messages in thread
From: xenodasein--- via Emacs development discussions. @ 2022-01-02 17:36 UTC (permalink / raw)
  To: casouri; +Cc: emacs-devel

Jan 2, 2022, 20:26 by casouri@gmail.com:

>  I don’t have any problem of adding it to core. I’m just pessimistic about how many people are incentivized to push for it and agree on things.
>
> Putting it on ELPA doesn’t stop from working it into core, I think. I don’t want to get into another 1000-thread debate about what is the “minimal set”. Many of the stuff in setup-wizard.el are not easily agreed upon, but removing them IMO decreases the usefulness of setup-wizard. For example, the “wizards’ choice” binding scheme, the option to turn off menu-bar, the recommendation of ivy and company.
>
> Yuan
>

Nah, I don't believe it will be too hard for this kind of improvement
to make it in, don't worry, unless you are trying to change default
key bindings.  :)

As for this package I think it is a step in the right direction.  What we
should strive for eventually is a customization interface that does things
like modifying key bindings, for minor and major modes, (in addition to
other stuff) + wizard + interactive tutorial, integrated.




^ permalink raw reply	[flat|nested] 72+ messages in thread

* Re: Propose to add setup-wizard.el to ELPA
       [not found]         ` <MsQrOAf--J-2@tutanota.de-MsQrQR2----2>
@ 2022-01-02 17:55           ` xenodasein--- via Emacs development discussions.
  0 siblings, 0 replies; 72+ messages in thread
From: xenodasein--- via Emacs development discussions. @ 2022-01-02 17:55 UTC (permalink / raw)
  To: emacs-devel

Jan 2, 2022, 20:36 by xenodasein:

> Jan 2, 2022, 20:26 by casouri@gmail.com:
>
>> I don’t have any problem of adding it to core. I’m just pessimistic about how many people are incentivized to push for it and agree on things.
>>
>> Putting it on ELPA doesn’t stop from working it into core, I think. I don’t want to get into another 1000-thread debate about what is the “minimal set”. Many of the stuff in setup-wizard.el are not easily agreed upon, but removing them IMO decreases the usefulness of setup-wizard. For example, the “wizards’ choice” binding scheme, the option to turn off menu-bar, the recommendation of ivy and company.
>>
>> Yuan
>>
>
> Nah, I don't believe it will be too hard for this kind of improvement
> to make it in, don't worry, unless you are trying to change default
> key bindings.  :)
>
> As for this package I think it is a step in the right direction.  What we
> should strive for eventually is a customization interface that does things
> like modifying key bindings, for minor and major modes, (in addition to
> other stuff) + wizard + interactive tutorial, integrated.
>

To comment on details of the wizard, best option would be to keep it
initially as versatile as possible, to test it.  I for one can't be sure of my
choices, by not being a member of the target audience.  Can't know for
sure unless a number of people who has never used Emacs before try
and comment on it.  (There was a witty name for them using reference
to Catholicism, but I guess even that came to be considered harmful.  Sigh.)




^ permalink raw reply	[flat|nested] 72+ messages in thread

* Re: Propose to add setup-wizard.el to ELPA
  2022-01-02 17:26 Propose to add setup-wizard.el to ELPA Simon Pugnet
@ 2022-01-02 18:49 ` Stefan Kangas
  0 siblings, 0 replies; 72+ messages in thread
From: Stefan Kangas @ 2022-01-02 18:49 UTC (permalink / raw)
  To: Simon Pugnet, Emacs developers

Simon Pugnet <simon@polaris64.net> writes:

> If the wizard could provide a common interface (e.g. a "wizard-builder")
> that's easy to use and is presented using the same interface as the main
> wizard then I think that could be a very nice way of helping newcomers
> to certain packages.

We have discussed this in the past, and I can only very much agree.

> For example, as well as giving configuration instructions in the
> package's README, the package author could include their own wizard and
> say something like "For interactive configuration, just evaluate
> (invoke-wizard 'some-package) after loading the package."

Or you could run the wizard if you detect that the package has not
already been configured.  I guess this would be up to the package
developer to decide what will work best for their package.

> One could argue that this is pretty close to just launching
> customize-group for the package and limiting the options to only the
> most important. However Yuan's wizard provides a more newcomer-friendly
> and interactive interface (e.g. changing the theme immediately once it
> is selected) so I think it is worthwhile keeping the wizard UI and
> customize UI separate in this case.

Right.  The problem with customize-group is that it can easily be
overwhelming, as it shows all options with their full documentation,
instead of just asking a small set of highly specific questions like
"what's the address of your mail server".



^ permalink raw reply	[flat|nested] 72+ messages in thread

* Re: Propose to add setup-wizard.el to ELPA
  2022-01-02 17:26       ` Yuan Fu
  2022-01-02 17:36         ` xenodasein--- via Emacs development discussions.
       [not found]         ` <MsQrOAf--J-2@tutanota.de-MsQrQR2----2>
@ 2022-01-02 18:50         ` Stefan Kangas
  2022-01-02 21:14           ` Yuan Fu
  2 siblings, 1 reply; 72+ messages in thread
From: Stefan Kangas @ 2022-01-02 18:50 UTC (permalink / raw)
  To: Yuan Fu; +Cc: Eli Zaretskii, emacs-devel

Yuan Fu <casouri@gmail.com> writes:

> I don’t have any problem of adding it to core. I’m just pessimistic
> about how many people are incentivized to push for it and agree on
> things.

I am incentivized to both push for and agree on things.  ;-)

More seriously, you already had Eli agree that this does belong in core,
so I think the process should be rather smooth sailing, especially if we
try to make the first step as uncontroversial as possible.

> Putting it on ELPA doesn’t stop from working it into core, I think. I
> don’t want to get into another 1000-thread debate about what is the
> “minimal set”. Many of the stuff in setup-wizard.el are not easily
> agreed upon, but removing them IMO decreases the usefulness of
> setup-wizard.

How about putting the uncontroversial part in core, and creating a more
opinionated/useful add-on to put in GNU ELPA?  Then you can do basically
whatever you think is best in your add-on, while all new users still
benefit from the less opinionated/useful part that we put in core.

I am also not eager to get into a 1000-thread debate, but here are my
observations on the points you bring up:

> For example, the “wizards’ choice” binding scheme,

Could you expand on what this means?

> the option to turn off menu-bar,

I have no opinion on whether or not this should be part of an initial
setup wizard.

> the recommendation of ivy and company.

These sound good to me.  Does the wizard also help install the packages,
and say clearly that this is about to happen?



^ permalink raw reply	[flat|nested] 72+ messages in thread

* Re: Propose to add setup-wizard.el to ELPA
  2022-01-02 18:50         ` Stefan Kangas
@ 2022-01-02 21:14           ` Yuan Fu
  2022-01-03  0:45             ` Po Lu
                               ` (2 more replies)
  0 siblings, 3 replies; 72+ messages in thread
From: Yuan Fu @ 2022-01-02 21:14 UTC (permalink / raw)
  To: Stefan Kangas; +Cc: Eli Zaretskii, emacs-devel



> On Jan 2, 2022, at 10:50 AM, Stefan Kangas <stefankangas@gmail.com> wrote:
> 
> Yuan Fu <casouri@gmail.com> writes:
> 
>> I don’t have any problem of adding it to core. I’m just pessimistic
>> about how many people are incentivized to push for it and agree on
>> things.
> 
> I am incentivized to both push for and agree on things.  ;-)
> 
> More seriously, you already had Eli agree that this does belong in core,
> so I think the process should be rather smooth sailing, especially if we
> try to make the first step as uncontroversial as possible.

Thanks. I’m happy to work on that.

>> Putting it on ELPA doesn’t stop from working it into core, I think. I
>> don’t want to get into another 1000-thread debate about what is the
>> “minimal set”. Many of the stuff in setup-wizard.el are not easily
>> agreed upon, but removing them IMO decreases the usefulness of
>> setup-wizard.
> 
> How about putting the uncontroversial part in core, and creating a more
> opinionated/useful add-on to put in GNU ELPA?  Then you can do basically
> whatever you think is best in your add-on, while all new users still
> benefit from the less opinionated/useful part that we put in core.
> 
> I am also not eager to get into a 1000-thread debate, but here are my
> observations on the points you bring up:
> 
>> For example, the “wizards’ choice” binding scheme,
> 
> Could you expand on what this means?

Binding copy, cut and paste to s-c, s-x, s-v, respectively. It might not always work since some window managers intercept the super modifier bindings, but otherwise I think they could be useful. I use them myself from time to time. 

> 
>> the option to turn off menu-bar,
> 
> I have no opinion on whether or not this should be part of an initial
> setup wizard.
> 
>> the recommendation of ivy and company.
> 
> These sound good to me.  Does the wizard also help install the packages,
> and say clearly that this is about to happen?

Yes and yes, Po suggested stating clearly that packages are downloaded automatically from the Internet. I added some words that say that.

Yuan




^ permalink raw reply	[flat|nested] 72+ messages in thread

* Re: Propose to add setup-wizard.el to ELPA
  2022-01-02 16:43                                       ` xenodasein--- via Emacs development discussions.
  2022-01-02 17:32                                         ` Stefan Kangas
@ 2022-01-03  0:42                                         ` Po Lu
  1 sibling, 0 replies; 72+ messages in thread
From: Po Lu @ 2022-01-03  0:42 UTC (permalink / raw)
  To: xenodasein--- via Emacs development discussions.
  Cc: eliz, stefankangas, xenodasein

xenodasein--- via "Emacs development discussions." <emacs-devel@gnu.org>
writes:

> Using customize-set-variable from Elisp is simply a hack, IIRC
> it has weird unwanted effects like when saving customizations
> from interface, it writes everything back into managed
> custom-set-variables.

The idea is to have the setup wizard generate the custom-set-variables
block that is placed in the custom (or init) file.

It will not be overwritten by custom when saving options in the future
as well.

> It also uses 'user theme

How is that an issue?



^ permalink raw reply	[flat|nested] 72+ messages in thread

* Re: Propose to add setup-wizard.el to ELPA
  2022-01-02 21:14           ` Yuan Fu
@ 2022-01-03  0:45             ` Po Lu
  2022-01-03  0:59               ` Yuan Fu
  2022-01-03  1:02             ` Stefan Kangas
  2022-01-03  9:12             ` Joost Kremers
  2 siblings, 1 reply; 72+ messages in thread
From: Po Lu @ 2022-01-03  0:45 UTC (permalink / raw)
  To: Yuan Fu; +Cc: Stefan Kangas, Eli Zaretskii, emacs-devel

Yuan Fu <casouri@gmail.com> writes:

> Binding copy, cut and paste to s-c, s-x, s-v, respectively. It might
> not always work since some window managers intercept the super
> modifier bindings, but otherwise I think they could be useful. I use
> them myself from time to time.

Isn't that done by default on NS?



^ permalink raw reply	[flat|nested] 72+ messages in thread

* Re: Propose to add setup-wizard.el to ELPA
  2022-01-03  0:45             ` Po Lu
@ 2022-01-03  0:59               ` Yuan Fu
  0 siblings, 0 replies; 72+ messages in thread
From: Yuan Fu @ 2022-01-03  0:59 UTC (permalink / raw)
  To: Po Lu; +Cc: Eli Zaretskii, Stefan Kangas, emacs-devel



> On Jan 2, 2022, at 4:45 PM, Po Lu <luangruo@yahoo.com> wrote:
> 
> Yuan Fu <casouri@gmail.com> writes:
> 
>> Binding copy, cut and paste to s-c, s-x, s-v, respectively. It might
>> not always work since some window managers intercept the super
>> modifier bindings, but otherwise I think they could be useful. I use
>> them myself from time to time.
> 
> Isn't that done by default on NS?

Which is why I use it from time to time. It could be useful on other systems, too.

Yuan


^ permalink raw reply	[flat|nested] 72+ messages in thread

* Re: Propose to add setup-wizard.el to ELPA
  2022-01-02 21:14           ` Yuan Fu
  2022-01-03  0:45             ` Po Lu
@ 2022-01-03  1:02             ` Stefan Kangas
  2022-01-03  9:12             ` Joost Kremers
  2 siblings, 0 replies; 72+ messages in thread
From: Stefan Kangas @ 2022-01-03  1:02 UTC (permalink / raw)
  To: Yuan Fu; +Cc: Eli Zaretskii, emacs-devel

Yuan Fu <casouri@gmail.com> writes:

> Thanks. I’m happy to work on that.

Excellent.

> Binding copy, cut and paste to s-c, s-x, s-v, respectively. It might
> not always work since some window managers intercept the super
> modifier bindings, but otherwise I think they could be useful. I use
> them myself from time to time.

OK, well, I have no opinion about that either.  :-)

>> These sound good to me.  Does the wizard also help install the packages,
>> and say clearly that this is about to happen?
>
> Yes and yes, Po suggested stating clearly that packages are downloaded
> automatically from the Internet. I added some words that say that.

Sounds good.



^ permalink raw reply	[flat|nested] 72+ messages in thread

* Re: Propose to add setup-wizard.el to ELPA
  2022-01-02 15:23     ` nanjunjie
@ 2022-01-03  8:28       ` Philip Kaludercic
  2022-01-04 16:09         ` Nan JunJie
  0 siblings, 1 reply; 72+ messages in thread
From: Philip Kaludercic @ 2022-01-03  8:28 UTC (permalink / raw)
  To: nanjunjie; +Cc: emacs-devel


nanjunjie@139.com writes:

> For me an emacs user, `customize` itself is a setup wizard, it does not
> need another setup wizard to customize the customization. Or once the setup
> wizard came out, we need to figure out how to customize the setup
> wizard, and we would enter an endless loop.

I disagree, the setup wizard could be seen as a "tour" of customizable
options, consciously designed to guide the user into the relevant
options that are worth paying attention to.

> Po Lu <luangruo@yahoo.com> writes:
>
>> Eli Zaretskii <eliz@gnu.org> writes:
>>
>>> I didn't yet try the package, but IMNSHO it makes the most sense in
>>> core, and in that case it should also be started automatically for new
>>> users, or at least suggested to them upon first invocation.
>>
>> Starting it automatically is too much, but having it on the splash
>> screen would be great.
>>
>> Thanks.
>
>
>

-- 
	Philip Kaludercic



^ permalink raw reply	[flat|nested] 72+ messages in thread

* Re: Propose to add setup-wizard.el to ELPA
  2022-01-02 21:14           ` Yuan Fu
  2022-01-03  0:45             ` Po Lu
  2022-01-03  1:02             ` Stefan Kangas
@ 2022-01-03  9:12             ` Joost Kremers
  2022-01-03 12:49               ` Eli Zaretskii
  2 siblings, 1 reply; 72+ messages in thread
From: Joost Kremers @ 2022-01-03  9:12 UTC (permalink / raw)
  To: Yuan Fu; +Cc: emacs-devel


On Sun, Jan 02 2022, Yuan Fu wrote:
> Binding copy, cut and paste to s-c, s-x, s-v, respectively. It might not always
> work since some window managers intercept the super modifier bindings,

It also won't work on Windows, BTW. And while some window managers may allow you
to unbind super bindings so that they are passed on to the application, Windows
won't allow you to do that easily, so this option probably shouldn't be offered
on Windows.

-- 
Joost Kremers
Life has its moments



^ permalink raw reply	[flat|nested] 72+ messages in thread

* Re: Propose to add setup-wizard.el to ELPA
  2022-01-03  9:12             ` Joost Kremers
@ 2022-01-03 12:49               ` Eli Zaretskii
  2022-01-03 13:00                 ` Po Lu
  2022-01-03 19:30                 ` Joost Kremers
  0 siblings, 2 replies; 72+ messages in thread
From: Eli Zaretskii @ 2022-01-03 12:49 UTC (permalink / raw)
  To: Joost Kremers; +Cc: casouri, emacs-devel

> From: Joost Kremers <joostkremers@fastmail.fm>
> Date: Mon, 03 Jan 2022 10:12:31 +0100
> Cc: emacs-devel@gnu.org
> 
> > Binding copy, cut and paste to s-c, s-x, s-v, respectively. It might not always
> > work since some window managers intercept the super modifier bindings,
> 
> It also won't work on Windows, BTW.

It won't?  What did you try?

AFAIK, the MS-Windows appendix to the Emacs manuals describes how to
set up the Super key on Windows.

> And while some window managers may allow you
> to unbind super bindings so that they are passed on to the application, Windows
> won't allow you to do that easily, so this option probably shouldn't be offered
> on Windows.

AFAIK, we solved that problem in Emacs 25 or 26.



^ permalink raw reply	[flat|nested] 72+ messages in thread

* Re: Propose to add setup-wizard.el to ELPA
  2022-01-03 12:49               ` Eli Zaretskii
@ 2022-01-03 13:00                 ` Po Lu
  2022-01-03 19:30                 ` Joost Kremers
  1 sibling, 0 replies; 72+ messages in thread
From: Po Lu @ 2022-01-03 13:00 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: Joost Kremers, casouri, emacs-devel

Eli Zaretskii <eliz@gnu.org> writes:

>> And while some window managers may allow you to unbind super bindings
>> so that they are passed on to the application, Windows won't allow
>> you to do that easily, so this option probably shouldn't be offered
>> on Windows.

> AFAIK, we solved that problem in Emacs 25 or 26.

Also, I checked in some code on master that switches to using the XKB
extension for finding the real modifiers of various virtual modifiers
such as Alt, Super and Meta, instead of looking in the legacy modifier
map.  (Could people please also give that a decent amount of testing and
open bug reports for any bugs that they come across?)

That should fix the problems with Super being confused with the Hyper
key on some window managers on X.



^ permalink raw reply	[flat|nested] 72+ messages in thread

* Re: Propose to add setup-wizard.el to ELPA
  2022-01-03 12:49               ` Eli Zaretskii
  2022-01-03 13:00                 ` Po Lu
@ 2022-01-03 19:30                 ` Joost Kremers
  1 sibling, 0 replies; 72+ messages in thread
From: Joost Kremers @ 2022-01-03 19:30 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: emacs-devel


On Mon, Jan 03 2022, Eli Zaretskii wrote:
>> It also won't work on Windows, BTW.
>
> It won't?  What did you try?

Nothing. I made the assumption that the OS captures the Win key and there would
be no way for an application to capture it. That assumption seemed so obviously
true that it didn't even occur to me to actually check.

So thank you for setting me straight.

-- 
Joost Kremers
Life has its moments



^ permalink raw reply	[flat|nested] 72+ messages in thread

* Re: Propose to add setup-wizard.el to ELPA
  2022-01-03  8:28       ` Philip Kaludercic
@ 2022-01-04 16:09         ` Nan JunJie
  2022-01-04 19:45           ` Philip Kaludercic
  0 siblings, 1 reply; 72+ messages in thread
From: Nan JunJie @ 2022-01-04 16:09 UTC (permalink / raw)
  To: Philip Kaludercic; +Cc: emacs-devel

Philip Kaludercic <philipk@posteo.net> writes:

> nanjunjie@139.com writes:
>
>> For me an emacs user, `customize` itself is a setup wizard, it does not
>> need another setup wizard to customize the customization. Or once the setup
>> wizard came out, we need to figure out how to customize the setup
>> wizard, and we would enter an endless loop.
>
> I disagree, the setup wizard could be seen as a "tour" of customizable
> options, consciously designed to guide the user into the relevant
> options that are worth paying attention to.
>

Customization may not need a `tour` like this. Usually customization
actions occur at the very beginning. So early that `setup wizard` has no
chance to guide the beginners anything. Once the beginners gained enough
abilities to accept the guidence and start the "tour" for customizable
options, they already knew what the customization is, even how it works,
so do not need the `tour`:) Maybe I am wrong. Too long time, I can't
remember exactly when and how I got the key point of customizations as
an emacs beginner.




^ permalink raw reply	[flat|nested] 72+ messages in thread

* Re: Propose to add setup-wizard.el to ELPA
  2022-01-04 16:09         ` Nan JunJie
@ 2022-01-04 19:45           ` Philip Kaludercic
  0 siblings, 0 replies; 72+ messages in thread
From: Philip Kaludercic @ 2022-01-04 19:45 UTC (permalink / raw)
  To: Nan JunJie; +Cc: emacs-devel

Nan JunJie <nanjunjie@139.com> writes:

> Philip Kaludercic <philipk@posteo.net> writes:
>
>> nanjunjie@139.com writes:
>>
>>> For me an emacs user, `customize` itself is a setup wizard, it does not
>>> need another setup wizard to customize the customization. Or once the setup
>>> wizard came out, we need to figure out how to customize the setup
>>> wizard, and we would enter an endless loop.
>>
>> I disagree, the setup wizard could be seen as a "tour" of customizable
>> options, consciously designed to guide the user into the relevant
>> options that are worth paying attention to.
>>
>
> Customization may not need a `tour` like this. Usually customization
> actions occur at the very beginning. 

What do you mean by "the very beginning"?  My point was just to say that
if a setup wizard would be generalised, the infrastructure could be
generalised to other package, but also Emacs releases (you download a
new version of Emacs and want an interactive guide of what you might be
interested in changing).

>                                      So early that `setup wizard` has no
> chance to guide the beginners anything. Once the beginners gained enough
> abilities to accept the guidence and start the "tour" for customizable
> options, they already knew what the customization is, even how it works,
> so do not need the `tour`:) Maybe I am wrong. Too long time, I can't
> remember exactly when and how I got the key point of customizations as
> an emacs beginner.

I agree that if you are a total beginner, just listing user options that
exist 1:1 wouldn't be that productive.  A wizard must be able to
abstract and bundle multiple options, not just skip from one
customize-option buffer to the next.

-- 
	Philip Kaludercic



^ permalink raw reply	[flat|nested] 72+ messages in thread

* Re: Propose to add setup-wizard.el to ELPA
  2022-01-02  2:07 Yuan Fu
                   ` (2 preceding siblings ...)
  2022-01-02 12:02 ` Philip Kaludercic
@ 2022-01-07  9:58 ` Jean Louis
  3 siblings, 0 replies; 72+ messages in thread
From: Jean Louis @ 2022-01-07  9:58 UTC (permalink / raw)
  To: Yuan Fu; +Cc: Emacs developers

It would be good if that setup wizard does not have strictly built-in
questions. In its form how it is now it is very poor, it asks few
questions that were decided by programer. I don't think it can fit
all.

Instead, I am proposing that setup wizard provides data definition, so
that people can create their setup wizards themselves and that setup
wizard can easily be expanded by data definition templates.

-- 
Jean

Take action in Free Software Foundation campaigns:
https://www.fsf.org/campaigns

In support of Richard M. Stallman
https://stallmansupport.org/



^ permalink raw reply	[flat|nested] 72+ messages in thread

* Re: Propose to add setup-wizard.el to ELPA
  2022-01-02  8:07             ` Po Lu
  2022-01-02  9:07               ` Yuan Fu
@ 2022-01-07 10:02               ` Jean Louis
  2022-01-07 10:50                 ` Po Lu
  2022-01-07 12:11                 ` Eli Zaretskii
  1 sibling, 2 replies; 72+ messages in thread
From: Jean Louis @ 2022-01-07 10:02 UTC (permalink / raw)
  To: Po Lu; +Cc: Yuan Fu, Emacs developers

* Po Lu <luangruo@yahoo.com> [2022-01-03 22:09]:
> And please don't say they "should" learn Emacs Lisp -- some people may
> find that enjoyable but lack the time, and some others may simply not
> want to at all.  Asking people to learn Emacs Lisp to make future
> customizations is simply unacceptable as part of a setup guide for _new_
> users.

Nobody must or is forced.

However, customizations were suggested for decades and people do learn
Lisp by doing customizations.

Contrary to your opinion, I found it welcome and acceptable.

The Emacs manual talks about Emacs variables and customizations
through variables. That is successful over time.

Who does not want, may use customize options.

Emacs is Emacs. It is not a Notepad.

Vim is Vim, it is not a notepad. 

Customizations of Emacs and many other editors are part of the
program.

What you really want is plain Emacs without customizations for new
users. New users will not customize it anyway. I do not see any
problem.

-- 
Jean

Take action in Free Software Foundation campaigns:
https://www.fsf.org/campaigns

In support of Richard M. Stallman
https://stallmansupport.org/



^ permalink raw reply	[flat|nested] 72+ messages in thread

* Re: Propose to add setup-wizard.el to ELPA
  2022-01-02  9:45                   ` Po Lu
  2022-01-02 10:09                     ` Eduardo Ochs
@ 2022-01-07 10:09                     ` Jean Louis
  1 sibling, 0 replies; 72+ messages in thread
From: Jean Louis @ 2022-01-07 10:09 UTC (permalink / raw)
  To: Po Lu; +Cc: xenodasein--- via "Emacs development discussions.

* Po Lu <luangruo@yahoo.com> [2022-01-03 21:59]:
> xenodasein--- via "Emacs development discussions." <emacs-devel@gnu.org>
> writes:
> 
> > Basically Custom is an unfinished system, it's code is not easy to
> > understand, and it does not integrate with the rest of Emacs well, it
> > especially does not play well with configuring things from init.el
> > file.
> 
> Custom is basically a finished system, and the whole point of it is to
> make things work so that users will not have to understand it.

Regarding Customize:

There are many ways how to reach to Customize. One way as explained in
the Emacs Manual is by examining variables. Other way may be M-x
customize. In general it helps users to understand better the
functioning of Emacs and customizations. It provides an easy browsable
way to more understanding, it is inevitable.

-- 
Jean

Take action in Free Software Foundation campaigns:
https://www.fsf.org/campaigns

In support of Richard M. Stallman
https://stallmansupport.org/



^ permalink raw reply	[flat|nested] 72+ messages in thread

* Re: Propose to add setup-wizard.el to ELPA
  2022-01-07 10:02               ` Jean Louis
@ 2022-01-07 10:50                 ` Po Lu
  2022-01-07 12:11                 ` Eli Zaretskii
  1 sibling, 0 replies; 72+ messages in thread
From: Po Lu @ 2022-01-07 10:50 UTC (permalink / raw)
  To: Yuan Fu; +Cc: Emacs developers

Jean Louis <bugs@gnu.support> writes:

>> And please don't say they "should" learn Emacs Lisp -- some people may
>> find that enjoyable but lack the time, and some others may simply not
>> want to at all.  Asking people to learn Emacs Lisp to make future
>> customizations is simply unacceptable as part of a setup guide for _new_
>> users.

> Nobody must or is forced.

Indeed, and a setup guide should not force people to learn Lisp either.



^ permalink raw reply	[flat|nested] 72+ messages in thread

* Re: Propose to add setup-wizard.el to ELPA
  2022-01-07 10:02               ` Jean Louis
  2022-01-07 10:50                 ` Po Lu
@ 2022-01-07 12:11                 ` Eli Zaretskii
  2022-01-09 22:54                   ` Yuan Fu
  2022-01-10  4:15                   ` Jean Louis
  1 sibling, 2 replies; 72+ messages in thread
From: Eli Zaretskii @ 2022-01-07 12:11 UTC (permalink / raw)
  To: Jean Louis; +Cc: luangruo, casouri, emacs-devel

> Date: Fri, 7 Jan 2022 13:02:42 +0300
> From: Jean Louis <bugs@gnu.support>
> Cc: Yuan Fu <casouri@gmail.com>, Emacs developers <emacs-devel@gnu.org>
> 
> However, customizations were suggested for decades and people do learn
> Lisp by doing customizations.

Not if by "customizations" you mean those via "M-x customize-*"
commands.  Those were explicitly meant to be used by people who don't
want or didn't yet learn Lisp.

> What you really want is plain Emacs without customizations for new
> users. New users will not customize it anyway.

??? Why wouldn't new users customize Emacs?  Customization is
generally one of the first things I do in any new program I start
using.



^ permalink raw reply	[flat|nested] 72+ messages in thread

* Re: Propose to add setup-wizard.el to ELPA
  2022-01-07 12:11                 ` Eli Zaretskii
@ 2022-01-09 22:54                   ` Yuan Fu
  2022-01-10  4:15                   ` Jean Louis
  1 sibling, 0 replies; 72+ messages in thread
From: Yuan Fu @ 2022-01-09 22:54 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: Po Lu, Jean Louis, emacs-devel

[-- Attachment #1: Type: text/plain, Size: 145 bytes --]

Ok, I retro-fitted setup-wizard.el to use custom. It works, but more black-boxy and IMO not very pretty. I don’t know if I like it.

Yuan


[-- Attachment #2: setup-wizard.el --]
[-- Type: application/octet-stream, Size: 24358 bytes --]

;;; setup-wizard.el --- Setup wizard  -*- lexical-binding: t; -*-

;; Copyright (C) 2019-2020 Free Software Foundation, Inc.

;; Author: Yuan Fu <casouri@gmail.com>
;; Maintainer: Yuan Fu <casouri@gmail.com>
;; URL: https://github.com/casouri/setup-wizard
;; Version: 1.0.0
;; Keywords: convenience
;; Package-Requires: ((emacs "26.0"))

;; This file is part of GNU Emacs.

;; GNU Emacs is free software: you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation, either version 3 of the License, or
;; (at your option) any later version.

;; GNU Emacs is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
;; GNU General Public License for more details.

;; You should have received a copy of the GNU General Public License
;; along with GNU Emacs.  If not, see <https://www.gnu.org/licenses/>.

;;; Commentary:
;;
;; This package provides a setup wizard that takes a user through an
;; interactive interface, in which he or she can configure key
;; bindings schemes, UI elements, Fonts, packages, etc.

;;; Code:

(require 'widget)
(require 'wid-edit)
(require 'pcase)
(require 'seq)
(require 'cl-lib)

;;; Widgets

(define-widget 'setup-wizard-number-field 'editable-field
  "Editable field but for numbers."
  :valid-regexp
  (rx (seq (? (or "-" "+"))
           (* digit) (? ".") (* digit)
           (? (seq "e" (+ digit)))))
  :value-to-internal
  (lambda (widget val)
    (number-to-string val))
  :value-get
  (lambda (widget)
    (string-to-number (widget-field-value-get widget))))

;;; Custom

(defvar setup-wizard-super-copy-paste-mode-map
  (make-sparse-keymap)
  "Keymap for ‘setup-wizard-super-copy-paste-mode’.")

(define-minor-mode setup-wizard-super-copy-paste-mode
  "Use super as the modifier for cut, copy and paste."
  :global t
  :group 'setup-wizard
  (if setup-wizard-super-copy-paste-mode
      (progn
        (keymap-global-set "s-c" #'kill-ring-save)
        (keymap-global-set "s-x" #'kill-region)
        (keymap-global-set "s-v" #'yank))
    ;; Global map doesn’t have a parent, but using REMOVE is
    ;; semantically correct (see ‘keymap-unset’ for REMOVE).
    (keymap-global-unset "s-c" t)
    (keymap-global-unset "s-x" t)
    (keymap-global-unset "s-v" t)))

(define-minor-mode setup-wizard-linear-undo-mode
  "Use linear undo system."
  :global t
  :group 'setup-wizard
  (if setup-wizard-linear-undo-mode
      (global-set-key [remap undo] #'undo-only)
    (global-unset-key [remap undo])))

(defun setup-wizard--set-magic-variable (symbol value)
  "Magically make VALUE of the magic variable SYMBOL take effect.
If VALUE is nil, do nothing."
  (when value
    (pcase symbol
      ;; Theme.
      ('setup-wizard-theme-magic
       ;; Don’t disable other themes, just load the theme.
       (when (not (eq value 'default))
         (load-theme value)))
      ;; Font.
      ('setup-wizard-font-magic
       (set-face-attribute 'default nil :family value))
      ('setup-wizard-variable-font-magic
       (set-face-attribute 'variable-pitch nil :family value))
      ('setup-wizard-cjk-font
       (dolist (charset '(kana han cjk-misc))
         (set-fontset-font t charset (font-spec :family value))))
      ('setup-wizard-font-size-magic
       (when (> value 0)
         (set-face-attribute
          'variable-pitch nil :height (* 10 value)))))))

(defgroup setup-wizard nil
  "A wizard that helps you setup Emacs."
  :group 'convenience)

(defcustom setup-wizard-theme-magic nil
  "A magic variable that sets themes."
  :type 'string
  :set #'setup-wizard--set-magic-variable)

;; Why not use custom faces?  Custom faces requires you to define the
;; whole face, which isn’t what we want to do here.
(defcustom setup-wizard-font-magic nil
  "A magic variable that sets the default font."
  :type 'string
  :set #'setup-wizard--set-magic-variable)

(defcustom setup-wizard-variable-font-magic nil
  "A magic variable that sets the variable font."
  :type 'string
  :set #'setup-wizard--set-magic-variable)

(defcustom setup-wizard-cjk-font-magic nil
  "A magic variable that sets the CJK font."
  :type 'string
  :set #'setup-wizard--set-magic-variable)

(defcustom setup-wizard-font-size-magic nil
  "A magic variable that sets the font size."
  :type 'integer
  :set #'setup-wizard--set-magic-variable)

(defun setup-wizard--save-option
    (symbol exp &optional now request comment)
  "Save custom option SYMBOL to EXP with NOW, REQUEST and COMMENT.
If EXP is nil, this function is a no-op."
  (custom-set-variables `(,symbol ',exp ,now ,request ,comment))
  (setup-wizard--set-magic-variable symbol exp))

;;; Pages

(defun setup-wizard--char-displayable-p (char)
  "Return non-nil if we can display CHAR."
  ;; Per manual, ‘char-displayable-p’ may return non-nil even when
  ;; there is no font available, since it also checks whether the
  ;; coding system for the text terminal can encode the character.
  ;;
  ;;     ASCII characters are always displayable.
  (cond ((< char 128)
         t)
        ;; Maybe there's a font for it, but we can't put it in the
        ;; buffer.
        ((not enable-multibyte-characters)
         nil)
        (t (when-let ((font-glyph (internal-char-font nil char)))
             (if (consp font-glyph)
		         ;; On a window system, a character is displayable
		         ;; if a font for that character is in the default
		         ;; face of the currently selected frame.
		         (car font-glyph)
		       ;; On a text terminal supporting glyph codes, CHAR is
		       ;; displayable if its glyph code is nonnegative.
		       (<= 0 font-glyph))))))

(defun setup-wizard--insert (&rest args)
  "Insert ARGS and replace emojis if they can’t be displayed."
  (widget-insert
   (mapconcat (lambda (text)
                (if (and (setup-wizard--char-displayable-p ?🧙)
                         (setup-wizard--char-displayable-p ?🧚))
                    text
                  (string-replace
                   "🧚" "Fairy"
                   (string-replace
                    "🧙" "Wizard" text))))
              args)))

;;;; Themes

(defvar setup-wizard--c-demo
  "    #include <stdlib.h>

    struct point
    {
      x: int;
      y: int;
    };

    int main(int arg, int* argv)
    {
      int x = -1;
      int y = 2;
      void *buf = malloc(sizeof(uin32_t));
      return add(x, y) - 3;
    }
"
  "Demo C code.")

(defun setup-wizard--theme-page ()
  "Theme configuration page."
  (setup-wizard--insert
   "🧚: Heya! You are here for help setting up your Emacs, right?
Wizard will be here when you read to the next line.

🧙: Emacs comes with a couple of themes built-in, which are shown
below. You can browse for more themes online or in the package
manager.

🧚: Here are the built-in themes!

Theme preview:\n\n")
  ;; Insert a C demo.
  (widget-insert
   (with-temp-buffer
     (insert setup-wizard--c-demo)
     (c-mode)
     (font-lock-fontify-region (point-min) (point-max))
     (buffer-string)))
  (widget-insert "\n")
  ;; Insert theme selection menu.
  (apply #'widget-create 'radio-button-choice
         :follow-link t
         :value "default"
         ;; Enable the theme when the user selects it.
         :notify (lambda (widget &rest _)
                   ;; First disable other themes.
                   (dolist (theme custom-enabled-themes)
                     (disable-theme theme))
                   ;; Enable the theme.
                   (let* ((theme (intern (widget-value widget))))
                     (setup-wizard--save-option
                      'setup-wizard-theme-magic theme)))
         (cons '(item "default")
               (cl-loop for theme in (custom-available-themes)
                        collect `(item ,(symbol-name theme)))))
  (setup-wizard--insert "\n🧚: Want to ")
  (widget-create
   'push-button
   :notify (lambda (&rest _)
             (package-refresh-contents)
             (list-packages t)
             (goto-char (point-min))
             (let ((inhibit-read-only t))
               (keep-lines "-theme")))
   :value "browse the package manager for themes")
  (widget-insert "?\n"))

;;;; Key binding

(defun setup-wizard--keybinding-page ()
  "Keybinding page."
  (setup-wizard--insert "🧙: This is the notation for modifiers in Emacs:

    C (control)   Ctrl
    M (meta)      Alt/Option
    s (super)     Windows/Command
    S (shift)     Shift

🧚: Which binding scheme do you like?\n\n")
  (widget-create 'radio-button-choice
                 :follow-link t
                 :value "Default"
                 :notify
                 (lambda (widget &rest _)
                   (cua-mode -1)
                   (setup-wizard-super-copy-paste-mode -1)
                   (pcase (widget-value widget)
                     ("Alternative"
                      (setup-wizard--save-option
                       'cua-mode t nil nil
                       "This enables the Alternative binding scheme"))
                     ("Utilize the super key"
                      (setup-wizard--save-option
                       'setup-wizard-super-copy-paste-mode t))))
                 '(item :value "Default"
                        :format "%v\n\n%d\n"
                        :doc "    M-w           Copy
    C-w           Cut
    C-y           Paste")
                 '(item :value "Alternative"
                        :format "%v\n\n%d\n"
                        :doc "    C-c           Copy
    C-x           Cut
    C-v           Paste")
                 '(item :value "Utilize the super key"
                        :format "%v\n\n%d\n"
                        :doc "    s-c           Copy
    s-x           Cut
    s-v           Paste"))
  (setup-wizard--insert
   "\n🧙: In the alternative binding scheme, the binding for copy
and cut only take effect when some text is selected. So when
nothing is selected, they are still normal prefix keys.\n"))

;;;; UI features

(defun setup-wizard--ui-features-page ()
  "UI features page."
  (setup-wizard--insert "🧚: What UI elements do you like?\n\n")
  ;; Line numbers.
  (widget-create 'checkbox
                 :notify
                 (lambda (widget &rest _)
                   (let ((val (widget-value widget)))
                     (setup-wizard--save-option
                      'global-display-line-numbers-mode val)))
                 :value global-display-line-numbers-mode)
  (widget-insert " Line numbers.\n")
  ;; Thin cursor.
  (widget-create 'checkbox
                 :notify
                 (lambda (widget &rest _)
                   (let ((val (widget-value widget)))
                     (setup-wizard--save-option
                      'cursor-type (if val 'bar t))))
                 :value (eq cursor-type 'bar))
  (widget-insert " Thin cursor bar.\n")
  ;; Blink cursor.
  (widget-create 'checkbox
                 :notify
                 (lambda (widget &rest _)
                   (let ((val (widget-value widget)))
                     (setup-wizard--save-option
                      'blink-cursor-mode val)))
                 :value blink-cursor-mode)
  (widget-insert " Blink cursor.\n")
  ;; ‘hl-line’.
  (widget-create 'checkbox
                 :notify
                 (lambda (widget &rest _)
                   (let ((val (widget-value widget)))
                     (setup-wizard--save-option
                      'global-hl-line-mode val)))
                 :value global-hl-line-mode)
  (widget-insert " Highlight current line.\n")
  ;; Tool bar.
  (widget-create 'checkbox
                 :notify
                 (lambda (widget &rest _)
                   (let ((val (widget-value widget)))
                     (setup-wizard--save-option
                      'tool-bar-mode val)))
                 :value tool-bar-mode)
  (widget-insert " Tool bar.\n")
  ;; Menu bar.
  (widget-create 'checkbox
                 :notify
                 (lambda (widget &rest _)
                   (let ((val (widget-value widget)))
                     (setup-wizard--save-option
                      'menu-bar-mode val)))
                 :value menu-bar-mode)
  (widget-insert " Menu bar.\n")
  ;; Scroll bar.
  (widget-create 'checkbox
                 :notify
                 (lambda (widget &rest _)
                   (let ((val (widget-value widget)))
                     (setup-wizard--save-option
                      'scroll-bar-mode val)))
                 :value scroll-bar-mode)
  (widget-insert " Scroll bar.\n")
  ;; Tab width
  (let ((width (widget-create 'setup-wizard-number-field
                              :size 2
                              :value tab-width
                              :format "%v Tab width ")))
    (widget-create 'push-button
                   :value "Apply"
                   :notify (lambda (&rest _)
                             (let ((val (widget-value width)))
                               (unless (eq val 0)
                                 (setup-wizard--save-option
                                  'tab-width val)))))
    (widget-insert "\n"))

  ;; Font.
  (widget-insert "\n")
  (let* (default-font
         variable-font
         cjk-font
         font-size
         action
         (phrase "The quick brown fox jumps over the lazy dog.\n"))
    (widget-insert "Font preview:\n\n")
    (widget-insert "    " phrase)
    (widget-insert "    " (propertize phrase 'face 'variable-pitch))
    (widget-insert "    大漠孤烟直,长河落日圆。射は正しきを己に求む。\n\n")
    (setq default-font
          (widget-create 'editable-field
                         :size 20
                         :value ""
                         :format "Default font: %v \n"))
    (setq variable-font
          (widget-create 'editable-field
                         :size 20
                         :value ""
                         :format "Variable-pitch font: %v \n"))
    (setq cjk-font
          (widget-create 'editable-field
                         :size 20
                         :value ""
                         :format "CJK font: %v \n"))
    (setq font-size
          (widget-create 'setup-wizard-number-field
                         :size 2
                         :value 0
                         :format "Font size: %v \n\n"))
    (setq action
          (lambda (&rest _)
            (let* ((default-font (widget-value default-font))
                   (variable-font (widget-value variable-font))
                   (cjk-font (widget-value cjk-font))
                   (font-size (widget-value font-size)))
              (unless (equal default-font "")
                (setup-wizard--save-option
                 'setup-wizard-font-magic default-font))
              (unless (equal variable-font "")
                (setup-wizard--save-option
                 'setup-wizard-variable-font-magic variable-font))
              (unless (equal cjk-font "")
                (setup-wizard--save-option
                 'setup-wizard-cjk-font-magic cjk-font))
              (unless (<= font-size 0)
                (setup-wizard--save-option
                 'setup-wizard-font-size-magic font-size)))))
    (widget-create 'push-button
                   :value "Apply font settings"
                   :notify action)
    (widget-insert "\n")))

;;;; Undo

(defun setup-wizard--undo-page ()
  "Undo page."
  (setup-wizard--insert
   "🧙: Emacs has a powerful (but probably unintuitive) undo system,
where undo operations themselves are recorded in the undo
history, and redo is done by undoing an previous undo operation.

🧚: Which undo system do you like?\n\n")
  (widget-create 'radio-button-choice
                 :value "Default"
                 :follow-lint t
                 :notify (lambda (widget &rest _)
                           (let ((val (widget-value widget)))
                             (pcase val
                               ("Linear"
                                (setup-wizard--save-option
                                 'setup-wizard-linear-undo-mode t))
                               ("Default"
                                (setup-wizard--save-option
                                 'setup-wizard-linear-undo-mode nil)))))
                 '(item :value "Default"
                        :format "%v\n\n%d\n"
                        :doc "    One undo rules them all")
                 '(item :value "Linear"
                        :format "%v\n\n%d\n"
                        :doc "    Undo and redo")))

;;;; Extra package

(defun setup-wizard--package-activate (package)
  "Install and activate PACKAGE."
  (require 'package)
  (unless (package-installed-p package)
    (package-install package))
  (package-activate package)
  (require package))

(defun setup-wizard--package-page ()
  "Extra package page."
  (setup-wizard--insert
   "🧙: Here are some packages that I always install:

(🧚: They will be automatically installed from Internet. That
might take a while!)\n\n")
  ;; Ivy.
  (widget-create 'checkbox
                 :notify
                 (lambda (widget &rest _)
                   (let ((val (widget-value widget)))
                     (setup-wizard--package-activate 'ivy)
                     (setup-wizard--package-activate 'counsel)
                     (custom-set-variables
                      `(enable-recursive-minibuffers
                        ,val nil nil "Recommended by Wizard for ivy.")
                      `(ivy-use-selectable-prompt
                        ,val nil nil "Recommended by Wizard for ivy")
                      `(ivy-use-virtual-buffers
                        ,val nil nil "Recommended by Wizard for ivy"))
                     (setup-wizard--save-option 'ivy-mode val)
                     (setup-wizard--save-option
                      'counsel-mode val nil nil
                      "Recommended by Wizard for ivy")))
                 :value (bound-and-true-p ivy-mode))
  (widget-insert
   " Ivy: A completion package that makes typing file names, buffer
names, commands, etc so much easier.\n")
  ;; Company
  (widget-create 'checkbox
                 :notify
                 (lambda (widget &rest _)
                   (let ((val (widget-value widget)))
                     (setup-wizard--package-activate 'company)
                     (setup-wizard--save-option 'company-mode val)))
                 :value (bound-and-true-p company-mode))
  (widget-insert
   " Company: Popup completion menu when writing programs.\n")
  (setup-wizard--insert
   "🧙: Here are some built-in packages that I always enable:\n\n")
  ;; Electric-pair.
  (widget-create 'checkbox
                 :notify
                 (lambda (widget &rest _)
                   (let ((val (widget-value widget)))
                     (setup-wizard--save-option
                      'electric-pair-mode val)))
                 :value electric-pair-mode)
  (widget-insert
   " Electric-pair-mode: Automatically closes parenthesis\n")
  (setup-wizard--insert "\n🧙: ...\n\n")
  (setup-wizard--insert "🧙: I don’t use many packages.\n"))

;;; The wizard framework

(defun setup-wizard--with-boilerplate
    (setup-fn &optional page-list finish-fn)
  "Call page setup function SETUP-FN with widget boilerplate.
PAGE-LIST is a list of setup function for pages to show in a
series. FINISH-FN is called when user clicks the finish button.
If PAGE-LIST or FINISH-FN are nil, don’t insert navigation
buttons."
  (kill-all-local-variables)
  (let ((inhibit-read-only t))
    (erase-buffer))
  (remove-overlays)
  (funcall setup-fn)
  (widget-insert "\n")
  (when (and page-list finish-fn)
    (setup-wizard--insert-step-buttons setup-fn page-list finish-fn))
  (use-local-map widget-keymap)
  (widget-setup)
  (goto-char (point-min))
  (local-set-key (kbd "q") #'setup-wizard--quit))

(defun setup-wizard--quit (&rest _)
  "Quite the wizard."
  (interactive)
  (kill-buffer)
  (message (with-temp-buffer
             (setup-wizard--insert "🧚: See ya!")
             (buffer-string))))

(defun setup-wizard--insert-step-buttons (page page-list finish-fn)
  "Insert buttons that go to previous and next page of PAGE.
PAGE-LIST is a list of setup function for pages to show in a series.
Insert a Button that calls FINISH-FN at the last page."
  (let* ((idx (seq-position page-list page))
         (previous-page (if (eq idx 0) nil
                          (nth (1- idx) page-list)))
         (next-page (nth (1+ idx) page-list)))
    (setup-wizard--insert
     (format "🧚: We are at step %s/%s, what’s next? "
             (1+ idx) (length page-list)))
    (when previous-page
      (widget-create
       'push-button
       :notify (lambda (&rest _)
                 (setup-wizard--with-boilerplate
                  previous-page page-list finish-fn))
       :value "Back"))
    (widget-insert " ")
    (if next-page
        (widget-create
         'push-button
         :notify (lambda (&rest _)
                   (setup-wizard--with-boilerplate
                    next-page page-list finish-fn))
         :value "Next")
      (widget-create
       'push-button
       :notify (lambda (&rest _) (funcall finish-fn))
       :value "Finish"))
    (widget-insert " ")
    (widget-create
     'push-button
     :value "Quit"
     :notify #'setup-wizard--quit)
    (widget-insert "\n")))

(defun setup-wizard--finish ()
  "The default finish function.
Constructs the config and display them."
  (setup-wizard--with-boilerplate
   (lambda ()
     (custom-save-all)
     (setup-wizard--insert
      "🧚: All done! Enjoy Emacs!\n"))))

(defvar setup-wizard--pages '(setup-wizard--theme-page
                              setup-wizard--keybinding-page
                              setup-wizard--ui-features-page
                              setup-wizard--undo-page
                              setup-wizard--package-page)
  "A list of page functions.")

(defun setup-wizard ()
  "Run the setup wizard."
  (interactive)
  (switch-to-buffer (get-buffer-create "*mage tower*"))
  (let ((page-list setup-wizard--pages))
    (setup-wizard--with-boilerplate
     (car page-list) page-list
     #'setup-wizard--finish)))

;;; Backport

(unless (fboundp 'undo--last-change-was-undo-p)
  (defun undo--last-change-was-undo-p (undo-list)
    (while (and (consp undo-list) (eq (car undo-list) nil))
      (setq undo-list (cdr undo-list)))
    (gethash undo-list undo-equiv-table)))

(unless (fboundp 'undo-redo)
  (defun undo-redo (&optional arg)
    "Undo the last ARG undos."
    (interactive "*p")
    (cond
     ((not (undo--last-change-was-undo-p buffer-undo-list))
      (user-error "No undo to undo"))
     (t
      (let* ((ul buffer-undo-list)
             (new-ul
              (let ((undo-in-progress t))
                (while (and (consp ul) (eq (car ul) nil))
                  (setq ul (cdr ul)))
                (primitive-undo arg ul)))
             (new-pul (undo--last-change-was-undo-p new-ul)))
        (message "Redo%s" (if undo-in-region " in region" ""))
        (setq this-command 'undo)
        (setq pending-undo-list new-pul)
        (setq buffer-undo-list new-ul))))))

(unless (fboundp 'undo-only)
  (defun undo-only (&optional arg)
    "Undo some previous changes.
Repeat this command to undo more changes.
A numeric ARG serves as a repeat count.
Contrary to `undo', this will not redo a previous undo."
    (interactive "*p")
    (let ((undo-no-redo t)) (undo arg))))

(provide 'setup-wizard)

;;; setup-wizard.el ends here

;; Local Variables:
;; sentence-end-double-space: t
;; End:

^ permalink raw reply	[flat|nested] 72+ messages in thread

* Re: Propose to add setup-wizard.el to ELPA
  2022-01-07 12:11                 ` Eli Zaretskii
  2022-01-09 22:54                   ` Yuan Fu
@ 2022-01-10  4:15                   ` Jean Louis
  2022-01-10 17:24                     ` Eli Zaretskii
  2022-01-11  4:51                     ` Richard Stallman
  1 sibling, 2 replies; 72+ messages in thread
From: Jean Louis @ 2022-01-10  4:15 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: luangruo, casouri, emacs-devel

* Eli Zaretskii <eliz@gnu.org> [2022-01-07 15:12]:
> > What you really want is plain Emacs without customizations for new
> > users. New users will not customize it anyway.
> 
> ??? Why wouldn't new users customize Emacs?  Customization is
> generally one of the first things I do in any new program I start
> using.

You are advanced computer user.

New user will most probably not customize anything. At that point when
user start customizing software, user converts from "completely new
user" to "not any more so new user", at least.

Jean

Take action in Free Software Foundation campaigns:
https://www.fsf.org/campaigns

In support of Richard M. Stallman
https://stallmansupport.org/





^ permalink raw reply	[flat|nested] 72+ messages in thread

* Re: Propose to add setup-wizard.el to ELPA
  2022-01-10  4:15                   ` Jean Louis
@ 2022-01-10 17:24                     ` Eli Zaretskii
  2022-01-11  4:47                       ` Jean Louis
  2022-01-11  4:51                     ` Richard Stallman
  1 sibling, 1 reply; 72+ messages in thread
From: Eli Zaretskii @ 2022-01-10 17:24 UTC (permalink / raw)
  To: Jean Louis; +Cc: luangruo, casouri, emacs-devel

> Date: Mon, 10 Jan 2022 07:15:56 +0300
> From: Jean Louis <bugs@gnu.support>
> Cc: luangruo@yahoo.com, casouri@gmail.com, emacs-devel@gnu.org
> 
> * Eli Zaretskii <eliz@gnu.org> [2022-01-07 15:12]:
> > > What you really want is plain Emacs without customizations for new
> > > users. New users will not customize it anyway.
> > 
> > ??? Why wouldn't new users customize Emacs?  Customization is
> > generally one of the first things I do in any new program I start
> > using.
> 
> You are advanced computer user.

So is (almost) anyone who comes to Emacs.  They are Emacs newbies, but
they are not computer newbies.

Please don't consider our newbies to be too dumb.



^ permalink raw reply	[flat|nested] 72+ messages in thread

* Re: Propose to add setup-wizard.el to ELPA
  2022-01-10 17:24                     ` Eli Zaretskii
@ 2022-01-11  4:47                       ` Jean Louis
  0 siblings, 0 replies; 72+ messages in thread
From: Jean Louis @ 2022-01-11  4:47 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: luangruo, casouri, emacs-devel

* Eli Zaretskii <eliz@gnu.org> [2022-01-10 20:25]:
> > Date: Mon, 10 Jan 2022 07:15:56 +0300
> > From: Jean Louis <bugs@gnu.support>
> > Cc: luangruo@yahoo.com, casouri@gmail.com, emacs-devel@gnu.org
> > 
> > * Eli Zaretskii <eliz@gnu.org> [2022-01-07 15:12]:
> > > > What you really want is plain Emacs without customizations for new
> > > > users. New users will not customize it anyway.
> > > 
> > > ??? Why wouldn't new users customize Emacs?  Customization is
> > > generally one of the first things I do in any new program I start
> > > using.
> > 
> > You are advanced computer user.
> 
> So is (almost) anyone who comes to Emacs.  They are Emacs newbies, but
> they are not computer newbies.
> 
> Please don't consider our newbies to be too dumb.

Of course not, never mentioned it.

Speaking from real life observation and new people facing Emacs: 

I have here recruitment line, a process to recruit people. First step
for them was to learn the TUTORIAL and they went through tutorial and
used Emacs. About 4-5 people in Tanzania and about 5-7 people in
Uganda went through it. So in this process people are also not new to
computers and none of my staff members ever started, wanted or
attempted to improve Emacs by changing settings or optimizing it.

The small personal experience with about 10+ people does not and
cannot tell about general first time encounter with Emacs.

Customization experience is rather coming when user standards reading
the Emacs Manual.


Jean

Take action in Free Software Foundation campaigns:
https://www.fsf.org/campaigns

In support of Richard M. Stallman
https://stallmansupport.org/



^ permalink raw reply	[flat|nested] 72+ messages in thread

* Re: Propose to add setup-wizard.el to ELPA
  2022-01-10  4:15                   ` Jean Louis
  2022-01-10 17:24                     ` Eli Zaretskii
@ 2022-01-11  4:51                     ` Richard Stallman
  1 sibling, 0 replies; 72+ messages in thread
From: Richard Stallman @ 2022-01-11  4:51 UTC (permalink / raw)
  To: Jean Louis; +Cc: luangruo, eliz, casouri, emacs-devel

[[[ To any NSA and FBI agents reading my email: please consider    ]]]
[[[ whether defending the US Constitution against all enemies,     ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]

  > New user will most probably not customize anything. At that point when
  > user start customizing software, user converts from "completely new
  > user" to "not any more so new user", at least.

One of the main obstacles to becoming an Emacs user is the amount
that people need to learn in order to get there.

I see no chance we can reduce that obstacle to the point where it
isn't an obstacle any more.  But reducing it somewhat is a good thing
to do, when we can.

-- 
Dr Richard Stallman (https://stallman.org)
Chief GNUisance of the GNU Project (https://gnu.org)
Founder, Free Software Foundation (https://fsf.org)
Internet Hall-of-Famer (https://internethalloffame.org)





^ permalink raw reply	[flat|nested] 72+ messages in thread

end of thread, other threads:[~2022-01-11  4:51 UTC | newest]

Thread overview: 72+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-02 17:26 Propose to add setup-wizard.el to ELPA Simon Pugnet
2022-01-02 18:49 ` Stefan Kangas
  -- strict thread matches above, loose matches on Subject: below --
2022-01-02 15:46 Simon Pugnet
2022-01-02  2:07 Yuan Fu
2022-01-02  2:37 ` Po Lu
2022-01-02  3:02   ` Yuan Fu
2022-01-02  3:22     ` Po Lu
2022-01-02  5:51       ` Yuan Fu
2022-01-02  6:30         ` Po Lu
2022-01-02  7:58           ` Yuan Fu
2022-01-02  8:07             ` Po Lu
2022-01-02  9:07               ` Yuan Fu
2022-01-02  9:22                 ` xenodasein--- via Emacs development discussions.
2022-01-02  9:45                   ` Eduardo Ochs
2022-01-02  9:45                   ` Po Lu
2022-01-02 10:09                     ` Eduardo Ochs
2022-01-02 10:15                       ` Po Lu
2022-01-02 10:25                         ` Eduardo Ochs
2022-01-02 10:34                           ` xenodasein--- via Emacs development discussions.
2022-01-02 10:52                             ` Eli Zaretskii
2022-01-02 10:57                               ` xenodasein--- via Emacs development discussions.
2022-01-02 11:14                                 ` Eli Zaretskii
2022-01-02 11:30                                   ` xenodasein--- via Emacs development discussions.
2022-01-02 11:38                                     ` Eli Zaretskii
2022-01-02 12:01                                     ` Po Lu
2022-01-02 11:31                                   ` xenodasein--- via Emacs development discussions.
     [not found]                             ` <CADs++6jtFBah1hhsuN6T_-kFyjc_pNmmVKA+16vOWa8OctOZLw@mail.gmail.com>
2022-01-02 11:02                               ` xenodasein--- via Emacs development discussions.
2022-01-02 11:17                             ` Po Lu
2022-01-02 11:36                               ` xenodasein--- via Emacs development discussions.
2022-01-02 12:03                                 ` Po Lu
2022-01-02 15:27                                 ` Stefan Kangas
     [not found]                               ` <MsPZqa9--3-2@tutanota.de-MsP_1xO----2>
2022-01-02 11:57                                 ` xenodasein--- via Emacs development discussions.
2022-01-02 12:05                                   ` Po Lu
2022-01-02 15:27                                   ` Stefan Kangas
2022-01-02 15:37                                     ` Eli Zaretskii
2022-01-02 16:43                                       ` xenodasein--- via Emacs development discussions.
2022-01-02 17:32                                         ` Stefan Kangas
2022-01-03  0:42                                         ` Po Lu
2022-01-02 11:58                             ` Philip Kaludercic
2022-01-07 10:09                     ` Jean Louis
2022-01-02  9:41                 ` Po Lu
2022-01-02 17:18                   ` Yuan Fu
2022-01-07 10:02               ` Jean Louis
2022-01-07 10:50                 ` Po Lu
2022-01-07 12:11                 ` Eli Zaretskii
2022-01-09 22:54                   ` Yuan Fu
2022-01-10  4:15                   ` Jean Louis
2022-01-10 17:24                     ` Eli Zaretskii
2022-01-11  4:47                       ` Jean Louis
2022-01-11  4:51                     ` Richard Stallman
2022-01-02  7:55 ` Eli Zaretskii
2022-01-02  8:07   ` Yuan Fu
2022-01-02 15:42     ` Stefan Kangas
2022-01-02 17:26       ` Yuan Fu
2022-01-02 17:36         ` xenodasein--- via Emacs development discussions.
     [not found]         ` <MsQrOAf--J-2@tutanota.de-MsQrQR2----2>
2022-01-02 17:55           ` xenodasein--- via Emacs development discussions.
2022-01-02 18:50         ` Stefan Kangas
2022-01-02 21:14           ` Yuan Fu
2022-01-03  0:45             ` Po Lu
2022-01-03  0:59               ` Yuan Fu
2022-01-03  1:02             ` Stefan Kangas
2022-01-03  9:12             ` Joost Kremers
2022-01-03 12:49               ` Eli Zaretskii
2022-01-03 13:00                 ` Po Lu
2022-01-03 19:30                 ` Joost Kremers
2022-01-02  8:07   ` Po Lu
2022-01-02 15:23     ` nanjunjie
2022-01-03  8:28       ` Philip Kaludercic
2022-01-04 16:09         ` Nan JunJie
2022-01-04 19:45           ` Philip Kaludercic
2022-01-02 12:02 ` Philip Kaludercic
2022-01-07  9:58 ` Jean Louis

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).