all messages for Emacs-related lists mirrored at yhetil.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; 119+ 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] 119+ messages in thread

* Re: Propose to add setup-wizard.el to ELPA
  2022-01-02  2:07 Propose to add setup-wizard.el to ELPA 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; 119+ 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] 119+ 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; 119+ 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] 119+ 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; 119+ 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] 119+ 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; 119+ 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] 119+ 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; 119+ 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] 119+ messages in thread

* Re: Propose to add setup-wizard.el to ELPA
  2022-01-02  2:07 Propose to add setup-wizard.el to ELPA 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; 119+ 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] 119+ 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; 119+ 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] 119+ 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; 119+ 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] 119+ 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; 119+ 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] 119+ 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; 119+ 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] 119+ 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; 119+ 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] 119+ 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
                                     ` (2 more replies)
  2022-01-02  9:41                 ` Po Lu
  1 sibling, 3 replies; 119+ 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] 119+ 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; 119+ 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] 119+ 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 18:47                   ` [External] : " Drew Adams
  2 siblings, 0 replies; 119+ 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] 119+ 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
  2022-01-02 18:47                   ` [External] : " Drew Adams
  2 siblings, 2 replies; 119+ 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] 119+ 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; 119+ 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] 119+ 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; 119+ 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] 119+ 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; 119+ 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] 119+ 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; 119+ 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] 119+ 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; 119+ 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] 119+ 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; 119+ 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] 119+ 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; 119+ 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] 119+ 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; 119+ 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] 119+ 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; 119+ 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] 119+ 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; 119+ 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] 119+ 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; 119+ 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] 119+ 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; 119+ 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] 119+ 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; 119+ 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] 119+ 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; 119+ 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] 119+ 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; 119+ 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] 119+ 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; 119+ 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] 119+ messages in thread

* Re: Propose to add setup-wizard.el to ELPA
  2022-01-02  2:07 Propose to add setup-wizard.el to ELPA 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; 119+ 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] 119+ 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; 119+ 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] 119+ 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; 119+ 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] 119+ 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; 119+ 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] 119+ 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; 119+ 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] 119+ 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; 119+ 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] 119+ 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.
  2022-01-02 18:47                                       ` [External] : " Drew Adams
  0 siblings, 2 replies; 119+ 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] 119+ 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; 119+ 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] 119+ messages in thread

* Re: Propose to add setup-wizard.el to ELPA
@ 2022-01-02 15:46 Simon Pugnet
  0 siblings, 0 replies; 119+ 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] 119+ 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
                                                           ` (2 more replies)
  2022-01-02 18:47                                       ` [External] : " Drew Adams
  1 sibling, 3 replies; 119+ 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] 119+ 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
  2022-01-02 18:47                     ` [External] : " Drew Adams
  0 siblings, 1 reply; 119+ 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] 119+ 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; 119+ 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] 119+ 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; 119+ 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] 119+ 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-02 18:51                                         ` FW: [External] : " Drew Adams
  2022-01-03  0:42                                         ` Po Lu
  2 siblings, 0 replies; 119+ 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] 119+ 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; 119+ 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] 119+ 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; 119+ 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] 119+ messages in thread

* RE: [External] : 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 18:47                   ` Drew Adams
  2 siblings, 0 replies; 119+ messages in thread
From: Drew Adams @ 2022-01-02 18:47 UTC (permalink / raw)
  To: xenodasein@tutanota.de; +Cc: emacs-devel@gnu.org

> Custom is an unfinished system,

Like everything in Emacs.  That's the nature of
user-developed free software.

And yes, Custom has a lot of room for improvement.
It's too bad that it's essentially had only one
developer who put energy into it, and that ended
years ago.  Volunteers are surely welcome.

It likely doesn't help if good Emacs developers
don't, themselves, use it.

> it's code is not easy to understand,

That much is true, unfortunately.  The customize
code needs more love - definitely.

> and it does not integrate with the rest of Emacs
> well,

Not clear what you mean by that.  I can guess a
few ways in which there might be room for better
"integration", for users, but dunno what you had
in mind by that term (aside from your next point).

> it especially does not play well with configuring
> things from init.el file.

This is 100% (or maybe 99%) the fault of Emacs
letting Customize read and write to user init
files, and doing that as the default behavior,
no less.

The default behavior (maybe the only allowed
behavior) should be for it to use `custom-file'.
Emacs should really discourage (or prevent)
letting Customize fiddle with user init files.
Code you write and code Customize writes should
be kept separate.

I, and I think some others, have suggested this
more than once, in vain.  Aiming for that would
be a start, even if no volunteers to implement
that goal were to come forward at first.
  
> Until it is more polished, I would be hesitant
> to recommended it to newcomers, over doing a
> couple of setq's.

You should instead be hesitant to recommend
setq for user options.

https://emacs.stackexchange.com/questions/102/advantages-of-setting-variables-with-setq-instead-of-custom-el/106#106

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

* RE: [External] : 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 18:47                                       ` Drew Adams
  1 sibling, 0 replies; 119+ messages in thread
From: Drew Adams @ 2022-01-02 18:47 UTC (permalink / raw)
  To: Eli Zaretskii, Stefan Kangas; +Cc: luangruo@yahoo.com, emacs-devel@gnu.org

> 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?

Very good to make that distinction.

My opinion: Customize could use more love in
both regards.  And they're related, in that if
the code were not so obtuse then maybe more
users would make improvements to the UI.  To
improve the UI - even to add additional :type
widgets - you need to dive into that code.

* The UI is basically sound, but its usability
  and appearance could be improved.

* The code is not so easy to fathom.  And a
  quick look into anything tends to quickly
  send you down a rabbit hole of oopish code
  that's not like that of most Emacs libraries.

> Customize was designed to be easy on the user from the UI POV,

That should certainly be the first aim.

> it wasn't designed to be easy from the
> implementation POV.

Too bad (IMHO).

> 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.

If that includes an assumption that Elisp
programmers won't use the Customize UI then
that may well be part of the problem.

Not that everyone needs to master the code
used for it.  But it should at least be a
little more straightforward how to define
new :types etc.

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

* RE: [External] : Re: Propose to add setup-wizard.el to ELPA
  2022-01-02 17:18                   ` Yuan Fu
@ 2022-01-02 18:47                     ` Drew Adams
  0 siblings, 0 replies; 119+ messages in thread
From: Drew Adams @ 2022-01-02 18:47 UTC (permalink / raw)
  To: Yuan Fu, Po Lu; +Cc: Emacs developers

> 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.

Yes, the Customize UI could use some improvement
wrt key bindings.
___

Personally, I use this.  I'm sure there are other
widget definitions out there for key bindings.

(I'm not proposing this - just saying I use it.
E.g., this definition assumes a single keymap.)


(define-widget 'icicle-key-definition 'lazy
  "Key definition type for Icicle mode keys.
A list of three components: KEY, COMMAND, CONDITION, that represents
an `icicle-mode-map' binding of COMMAND according to KEY, if CONDITION
evaluates to non-nil.

KEY is either a key sequence (string or vector) or a command.
COMMAND is a command.
CONDITION is a sexp.

If KEY is a command, then the binding represented is its remapping to
COMMAND."
  :indent 1 :offset 0
  :type
  '(list
    (choice
     (key-sequence :tag "Key" :value [ignore])
     ;; Use `symbolp' instead of `commandp', in case the library
     ;; defining the command is not loaded.
     (restricted-sexp :tag "Command to remap"
                      :match-alternatives (symbolp)
                      :value ignore))
     ;; Use `symbolp' instead of `commandp'...
    (restricted-sexp :tag "Command"
                     :match-alternatives (symbolp)
                     :value ignore)
    (sexp :tag "Condition")))

^ permalink raw reply	[flat|nested] 119+ 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, 0 replies; 119+ 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] 119+ 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; 119+ 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] 119+ messages in thread

* FW: [External] : 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-02 18:51                                         ` Drew Adams
  2022-01-02 19:07                                           ` xenodasein--- via Emacs development discussions.
  2022-01-03  0:42                                         ` Po Lu
  2 siblings, 1 reply; 119+ messages in thread
From: Drew Adams @ 2022-01-02 18:51 UTC (permalink / raw)
  To: xenodasein@tutanota.de, eliz@gnu.org, stefankangas@gmail.com
  Cc: Emacs developers

> 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.

What you say there isn't too clear, to me.
`customize-set-variable' doesn't save...

Just what is the problem of saving option
and face settings to a particular place?

Code written by code (when you say "save")
should be kept in its own place - separate
from code that users twiddle manually.
That's the purpose of variable `custom-file'.

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

* Re: FW: [External] : Re: Propose to add setup-wizard.el to ELPA
  2022-01-02 18:51                                         ` FW: [External] : " Drew Adams
@ 2022-01-02 19:07                                           ` xenodasein--- via Emacs development discussions.
  2022-01-02 21:29                                             ` Drew Adams
  0 siblings, 1 reply; 119+ messages in thread
From: xenodasein--- via Emacs development discussions. @ 2022-01-02 19:07 UTC (permalink / raw)
  To: drew.adams; +Cc: emacs-devel

Jan 2, 2022, 21:51 by drew.adams@oracle.com:

>> 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.
>>
>
> What you say there isn't too clear, to me.
> `customize-set-variable' doesn't save...
> Just what is the problem of saving option
> and face settings to a particular place?
>
> Code written by code (when you say "save")
> should be kept in its own place - separate
> from code that users twiddle manually.
> That's the purpose of variable `custom-file'.
>

When I used customize-set-variable to set some options,
inside init.el, instead of setq, then used the interface to set
some other options, and used the button saying "save for future
sessions," not only options I set in the interface, but also the
ones set before from init.el got written into the
(custom-set-variables) form, effectively causing them to get
duplicated and evaluated twice on the next start of Emacs.




^ permalink raw reply	[flat|nested] 119+ 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; 119+ 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] 119+ messages in thread

* RE: FW: [External] : Re: Propose to add setup-wizard.el to ELPA
  2022-01-02 19:07                                           ` xenodasein--- via Emacs development discussions.
@ 2022-01-02 21:29                                             ` Drew Adams
  2022-01-02 22:14                                               ` Stefan Kangas
  0 siblings, 1 reply; 119+ messages in thread
From: Drew Adams @ 2022-01-02 21:29 UTC (permalink / raw)
  To: xenodasein@tutanota.de; +Cc: emacs-devel@gnu.org

> >> 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.
> >
> > What you say there isn't too clear, to me.
> > `customize-set-variable' doesn't save...
> > Just what is the problem of saving option
> > and face settings to a particular place?
> >
> > Code written by code (when you say "save")
> > should be kept in its own place - separate
> > from code that users twiddle manually.
> > That's the purpose of variable `custom-file'.
> 
> When I used customize-set-variable to set some options,
> inside init.el, instead of setq, then used the interface to set
> some other options, and used the button saying "save for future
> sessions," not only options I set in the interface, but also the
> ones set before from init.el got written into the
> (custom-set-variables) form, effectively causing them to get
> duplicated and evaluated twice on the next start of Emacs.

Of course.  That's one reason I say that Customize
should not write to your init file.  That's the
problem behind your problem.  That's a bad Emacs
design choice, IMO.  It especially should not be
the default behavior.

Customize (whether UI or from any code) doesn't
interfere with any settings you yourself code
using its functions, provided either (1) you
don't code those in your init file or (2) you
use `custom-file', which prevents Customize
from writing to your init file.

While waiting (a few more decades perhaps?) for
Emacs to stop letting Customize write to your
init file, you can at least prevent the problem
you note by simply doing #1 or #2.  For #1, you
can just have your init file load some file
where you put such hand-crafted customize code.
For #2 you need just set variable `custom-file'
and load that file from your init file.

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

* RE: FW: [External] : Re: Propose to add setup-wizard.el to ELPA
  2022-01-02 21:29                                             ` Drew Adams
@ 2022-01-02 22:14                                               ` Stefan Kangas
  2022-01-03  6:42                                                 ` Sean Whitton
  0 siblings, 1 reply; 119+ messages in thread
From: Stefan Kangas @ 2022-01-02 22:14 UTC (permalink / raw)
  To: Drew Adams, xenodasein@tutanota.de; +Cc: emacs-devel@gnu.org

Drew Adams <drew.adams@oracle.com> writes:

> Customize should not write to your init file ...  That's a bad Emacs
> design choice, IMO.  It especially should not be the default behavior.

+1, FWIW.



^ permalink raw reply	[flat|nested] 119+ 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-02 18:51                                         ` FW: [External] : " Drew Adams
@ 2022-01-03  0:42                                         ` Po Lu
  2 siblings, 0 replies; 119+ 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] 119+ 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; 119+ 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] 119+ 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; 119+ 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] 119+ 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; 119+ 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] 119+ messages in thread

* RE: FW: [External] : Re: Propose to add setup-wizard.el to ELPA
  2022-01-02 22:14                                               ` Stefan Kangas
@ 2022-01-03  6:42                                                 ` Sean Whitton
  2022-01-03  7:02                                                   ` Stefan Kangas
                                                                     ` (2 more replies)
  0 siblings, 3 replies; 119+ messages in thread
From: Sean Whitton @ 2022-01-03  6:42 UTC (permalink / raw)
  To: Stefan Kangas, Drew Adams, xenodasein@tutanota.de; +Cc: emacs-devel@gnu.org

On Sun 02 Jan 2022 at 05:14pm -05, Stefan Kangas wrote:

> Drew Adams <drew.adams@oracle.com> writes:
>
>> Customize should not write to your init file ...  That's a bad Emacs
>> design choice, IMO.  It especially should not be the default behavior.
>
> +1, FWIW.

Hmm, then where should it write to?

-- 
Sean Whitton



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

* RE: FW: [External] : Re: Propose to add setup-wizard.el to ELPA
  2022-01-03  6:42                                                 ` Sean Whitton
@ 2022-01-03  7:02                                                   ` Stefan Kangas
  2022-01-03  8:19                                                     ` xenodasein--- via Emacs development discussions.
                                                                       ` (2 more replies)
  2022-01-03 16:03                                                   ` Drew Adams
  2022-01-03 16:05                                                   ` Stefan Monnier
  2 siblings, 3 replies; 119+ messages in thread
From: Stefan Kangas @ 2022-01-03  7:02 UTC (permalink / raw)
  To: Sean Whitton, Drew Adams, xenodasein@tutanota.de; +Cc: emacs-devel@gnu.org

Sean Whitton <spwhitton@spwhitton.name> writes:

> On Sun 02 Jan 2022 at 05:14pm -05, Stefan Kangas wrote:
>
>> Drew Adams <drew.adams@oracle.com> writes:
>>
>>> Customize should not write to your init file ...  That's a bad Emacs
>>> design choice, IMO.  It especially should not be the default behavior.
>>
>> +1, FWIW.
>
> Hmm, then where should it write to?

IMO, something like

(setq custom-file (locate-user-emacs-file "custom-file.el"))



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

* RE: FW: [External] : Re: Propose to add setup-wizard.el to ELPA
  2022-01-03  7:02                                                   ` Stefan Kangas
@ 2022-01-03  8:19                                                     ` xenodasein--- via Emacs development discussions.
  2022-01-03  9:27                                                       ` Po Lu
  2022-01-03 16:04                                                       ` Drew Adams
  2022-01-04 21:19                                                     ` Sean Whitton
  2022-01-07 10:34                                                     ` Jean Louis
  2 siblings, 2 replies; 119+ messages in thread
From: xenodasein--- via Emacs development discussions. @ 2022-01-03  8:19 UTC (permalink / raw)
  To: Stefan Kangas; +Cc: Sean Whitton, Drew Adams, emacs-devel@gnu.org

Jan 3, 2022, 10:02 by stefankangas@gmail.com:

> Sean Whitton <spwhitton@spwhitton.name> writes:
>
>> On Sun 02 Jan 2022 at 05:14pm -05, Stefan Kangas wrote:
>>
>>> Drew Adams <drew.adams@oracle.com> writes:
>>>
>>>> Customize should not write to your init file ...  That's a bad Emacs
>>>> design choice, IMO.  It especially should not be the default behavior.
>>>>
>>>
>>> +1, FWIW.
>>>
>>
>> Hmm, then where should it write to?
>>
>
> IMO, something like
>
> (setq custom-file (locate-user-emacs-file "custom-file.el"))
>

I'd prefer the current behavior TBH, because the real issue is not where it is
written, it is when it's read. Currently it is easy to place custom-set-variables
where you want either inside init file or to place it into another file.  Timing is
important, because Customize also has problems with autoloads, and who
knows what else.




^ permalink raw reply	[flat|nested] 119+ 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; 119+ 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] 119+ 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; 119+ 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] 119+ messages in thread

* Re: FW: [External] : Re: Propose to add setup-wizard.el to ELPA
  2022-01-03  8:19                                                     ` xenodasein--- via Emacs development discussions.
@ 2022-01-03  9:27                                                       ` Po Lu
  2022-01-03  9:55                                                         ` xenodasein--- via Emacs development discussions.
  2022-01-03 16:04                                                       ` Drew Adams
  1 sibling, 1 reply; 119+ messages in thread
From: Po Lu @ 2022-01-03  9:27 UTC (permalink / raw)
  To: xenodasein--- via Emacs development discussions.
  Cc: Stefan Kangas, xenodasein, Sean Whitton, Drew Adams

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

> Timing is important, because Customize also has problems with
> autoloads, and who knows what else.

If the autoloads are part of Emacs, those problems should be reported as
a bug.  `setq' will also have as many problems with autoloads as custom
will.



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

* Re: FW: [External] : Re: Propose to add setup-wizard.el to ELPA
  2022-01-03  9:27                                                       ` Po Lu
@ 2022-01-03  9:55                                                         ` xenodasein--- via Emacs development discussions.
  2022-01-03 10:10                                                           ` Po Lu
  0 siblings, 1 reply; 119+ messages in thread
From: xenodasein--- via Emacs development discussions. @ 2022-01-03  9:55 UTC (permalink / raw)
  To: luangruo; +Cc: emacs-devel

Jan 3, 2022, 12:27 by luangruo@yahoo.com:

> xenodasein--- via "Emacs development discussions." <emacs-devel@gnu.org>
> writes:
>
>> Timing is important, because Customize also has problems with
>> autoloads, and who knows what else.
>>
>
> If the autoloads are part of Emacs, those problems should be reported as
> a bug.  `setq' will also have as many problems with autoloads as custom
> will.
>

Not one more?  Not one less?  Exactly as many as?  Please top gaslighting attempts.




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

* Re: FW: [External] : Re: Propose to add setup-wizard.el to ELPA
  2022-01-03  9:55                                                         ` xenodasein--- via Emacs development discussions.
@ 2022-01-03 10:10                                                           ` Po Lu
  2022-01-03 10:21                                                             ` xenodasein--- via Emacs development discussions.
  0 siblings, 1 reply; 119+ messages in thread
From: Po Lu @ 2022-01-03 10:10 UTC (permalink / raw)
  To: xenodasein--- via Emacs development discussions.; +Cc: xenodasein

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

>> If the autoloads are part of Emacs, those problems should be reported as
>> a bug.  `setq' will also have as many problems with autoloads as custom
>> will.

> Not one more? Not one less? Exactly as many as? Please stop
> gaslighting attempts.

First of all, no, I was not trying to gaslight you.

In the future, please try to choose better words when interacting with
other people (such as me).  I don't make comments on your person, so you
should reciprocate.

Secondly, `setq' will have the exact same problems with autoloads that
custom-set-variables will have, and both have very little real problems
with autoloads.

It is difficult to tell exactly which problems you are referring to,
since you haven't presented a concrete instance of them, but from a
general point of view both methods of setting variables will have the
same (rare) problems with autoloads.

report-emacs-bug is also your friend, as always.  If custom really has a
bug with autoloads, then we will want to fix it.

Thanks.



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

* Re: FW: [External] : Re: Propose to add setup-wizard.el to ELPA
  2022-01-03 10:10                                                           ` Po Lu
@ 2022-01-03 10:21                                                             ` xenodasein--- via Emacs development discussions.
  2022-01-03 10:53                                                               ` Po Lu
  0 siblings, 1 reply; 119+ messages in thread
From: xenodasein--- via Emacs development discussions. @ 2022-01-03 10:21 UTC (permalink / raw)
  To: luangruo; +Cc: emacs-devel

Jan 3, 2022, 13:10 by luangruo@yahoo.com:

> xenodasein--- via "Emacs development discussions." <emacs-devel@gnu.org>
> writes:
>
>>> If the autoloads are part of Emacs, those problems should be reported as
>>> a bug.  `setq' will also have as many problems with autoloads as custom
>>> will.
>>>
>> Not one more? Not one less? Exactly as many as? Please stop
>> gaslighting attempts.
>>
>
> First of all, no, I was not trying to gaslight you.
>
> In the future, please try to choose better words when interacting with
> other people (such as me).  I don't make comments on your person, so you
> should reciprocate.
>

I can't know someone's intentions only what is written here, so please
you too try to choose not only better words, but a purpose to argument.


> Secondly, `setq' will have the exact same problems with autoloads that
> custom-set-variables will have, and both have very little real problems
> with autoloads.
>
> It is difficult to tell exactly which problems you are referring to,
> since you haven't presented a concrete instance of them, but from a
> general point of view both methods of setting variables will have the
> same (rare) problems with autoloads.
>
> report-emacs-bug is also your friend, as always.  If custom really has a
> bug with autoloads, then we will want to fix it.
>
> Thanks.
>

I don't think I need to get into exact details for the previous discussion at
hand, because they are not relevant.  I can take the time to be more specific
if there is a purpose.  For there, you should assume that I am not lying or
my experiences are not surreal, which is what your replies are doing, unlike
 anyone else here.  I am sure emacs-devel is already aware of the problem,
so why should I do a bug report when it likely already exists?  For example
Stefan Monnier gives a detailed explanation of autoload/custom problem
interaction on Elisp stackexchange.




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

* Re: FW: [External] : Re: Propose to add setup-wizard.el to ELPA
  2022-01-03 10:21                                                             ` xenodasein--- via Emacs development discussions.
@ 2022-01-03 10:53                                                               ` Po Lu
  2022-01-03 11:07                                                                 ` xenodasein--- via Emacs development discussions.
  0 siblings, 1 reply; 119+ messages in thread
From: Po Lu @ 2022-01-03 10:53 UTC (permalink / raw)
  To: xenodasein--- via Emacs development discussions.; +Cc: xenodasein

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

> I can't know someone's intentions only what is written here, so please
> you too try to choose not only better words, but a purpose to argument.

I try to the best of my ability to use optimal wording, but I'm hardly a
native speaker (nor are most of us on emacs-devel.)

So when you think a person is being hostile, it is better to give him
the benefit of the doubt.  I assure you that I will _never_ be
deliberately hostile to someone on this list.

> I don't think I need to get into exact details for the previous
> discussion at hand, because they are not relevant.  I can take the
> time to be more specific if there is a purpose.  For there, you should
> assume that I am not lying or my experiences are not surreal, which is
> what your replies are doing, unlike anyone else here.  I am sure
> emacs-devel is already aware of the problem, so why should I do a bug
> report when it likely already exists?

emacs-devel is not the bug tracker, bug-gnu-emacs is.  So if there is a
bug, it should be there.

And please do be specific.

Thanks.



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

* Re: FW: [External] : Re: Propose to add setup-wizard.el to ELPA
  2022-01-03 10:53                                                               ` Po Lu
@ 2022-01-03 11:07                                                                 ` xenodasein--- via Emacs development discussions.
  2022-01-03 11:25                                                                   ` Po Lu
  0 siblings, 1 reply; 119+ messages in thread
From: xenodasein--- via Emacs development discussions. @ 2022-01-03 11:07 UTC (permalink / raw)
  To: luangruo; +Cc: emacs-devel

Jan 3, 2022, 13:53 by luangruo@yahoo.com:

> xenodasein--- via "Emacs development discussions." <emacs-devel@gnu.org>
> writes:
>
>> I can't know someone's intentions only what is written here, so please
>> you too try to choose not only better words, but a purpose to argument.
>>
>
> I try to the best of my ability to use optimal wording, but I'm hardly a
> native speaker (nor are most of us on emacs-devel.)
>
> So when you think a person is being hostile, it is better to give him
> the benefit of the doubt.  I assure you that I will _never_ be
> deliberately hostile to someone on this list.
>

There is a line.  When you act in some ways, it is beyond assumption.
Maybe you do it by mistake, as a second language thing, then you should
work on it and fix it, because it is not normal.  I think you are getting some
leeway because of your contributions, considering someone was banned
for less.


> And please do be specific.
>

I do, when asked for, or when I deem necessary.  Please do read before
writing back, or ask what you need to to know without the gaslighting.


Jan 3, 2022, 13:10 by luangruo@yahoo.com:

> xenodasein--- via "Emacs development discussions." <> emacs-devel@gnu.org> > writes:
> First of all, no, I was not trying to gaslight you.
> ...
> Secondly, `setq' will have the exact same problems with autoloads that
> custom-set-variables will have, and both have very little real problems
> with autoloads.
> ...
>

For example here, again see you are belittling other people 's experiences
by saying "have very little real problems," without anything to measure the
degree of a problem.  According to what?  We are not trying to land on the
moon.  You do this to any non-regular mailer here, and it is very discouraging
and harmful for new members.




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

* Re: FW: [External] : Re: Propose to add setup-wizard.el to ELPA
  2022-01-03 11:07                                                                 ` xenodasein--- via Emacs development discussions.
@ 2022-01-03 11:25                                                                   ` Po Lu
  2022-01-03 11:32                                                                     ` xenodasein--- via Emacs development discussions.
  0 siblings, 1 reply; 119+ messages in thread
From: Po Lu @ 2022-01-03 11:25 UTC (permalink / raw)
  To: xenodasein--- via Emacs development discussions.; +Cc: xenodasein

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

> There is a line.  When you act in some ways, it is beyond assumption.
> Maybe you do it by mistake, as a second language thing, then you
> should work on it and fix it, because it is not normal.  I think you
> are getting some leeway because of your contributions, considering
> someone was banned for less.

There is no line that I've crossed here, and I'm not getting any leeway
compared to anyone else.

To the best of my knowledge, only one person has ever been banned from
this list, and it was certainly not "for less".

> I do, when asked for, or when I deem necessary.  Please do read before
> writing back, or ask what you need to to know without the gaslighting.

It's neccessary for your complaints to receive any real attention: how
is anyone supposed to take your word for "there is a problem", if nobody
even knows where exactly the problem is?

> For example here, again see you are belittling other people 's
> experiences by saying "have very little real problems," without
> anything to measure the degree of a problem.  According to what?

No, I want to fix the problem (if one indeed exists), and I also want to
form a good opinion on whether or not a "setup wizard" should use
custom, so I naturally want to know exactly what the problem you cite
against using custom is.

> We are not trying to land on the moon.  You do this to any non-regular
> mailer here, and it is very discouraging and harmful for new members.

That is simply untrue.



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

* Re: FW: [External] : Re: Propose to add setup-wizard.el to ELPA
  2022-01-03 11:25                                                                   ` Po Lu
@ 2022-01-03 11:32                                                                     ` xenodasein--- via Emacs development discussions.
  2022-01-03 12:13                                                                       ` Po Lu
  0 siblings, 1 reply; 119+ messages in thread
From: xenodasein--- via Emacs development discussions. @ 2022-01-03 11:32 UTC (permalink / raw)
  To: luangruo; +Cc: emacs-devel

Jan 3, 2022, 14:25 by luangruo@yahoo.com:

> xenodasein--- via "Emacs development discussions." <emacs-devel@gnu.org>
> writes:
>
>> I do, when asked for, or when I deem necessary.  Please do read before
>> writing back, or ask what you need to to know without the gaslighting.
>>
>
> It's neccessary for your complaints to receive any real attention: how
> is anyone supposed to take your word for "there is a problem", if nobody
> even knows where exactly the problem is?
>

I do, when asked for, or when I deem necessary.  Please do read before
writing back, or ask what you need to to know without the gaslighting.


>> We are not trying to land on the moon.  You do this to any non-regular
>> mailer here, and it is very discouraging and harmful for new members.
>>
>
> That is simply untrue.
>

I'm done.




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

* Re: FW: [External] : Re: Propose to add setup-wizard.el to ELPA
  2022-01-03 11:32                                                                     ` xenodasein--- via Emacs development discussions.
@ 2022-01-03 12:13                                                                       ` Po Lu
  2022-01-03 12:20                                                                         ` xenodasein--- via Emacs development discussions.
  0 siblings, 1 reply; 119+ messages in thread
From: Po Lu @ 2022-01-03 12:13 UTC (permalink / raw)
  To: xenodasein--- via Emacs development discussions.; +Cc: xenodasein

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

> I do, when asked for, or when I deem necessary.  Please do read before
        ^^^^^^^^^^^^^^
> writing back, or ask what you need to to know without the gaslighting.

I did read, the whole point is that I have been asking you for details,
but you haven't provided any at all, and if you don't "deem necessary"
the provision of details, then we aren't obliged to take your complaints
seriously either.

Thanks.



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

* Re: FW: [External] : Re: Propose to add setup-wizard.el to ELPA
  2022-01-03 12:13                                                                       ` Po Lu
@ 2022-01-03 12:20                                                                         ` xenodasein--- via Emacs development discussions.
  2022-01-03 12:32                                                                           ` Po Lu
  0 siblings, 1 reply; 119+ messages in thread
From: xenodasein--- via Emacs development discussions. @ 2022-01-03 12:20 UTC (permalink / raw)
  To: luangruo; +Cc: emacs-devel

Jan 3, 2022, 15:13 by luangruo@yahoo.com:

> xenodasein--- via "Emacs development discussions." <emacs-devel@gnu.org>
> writes:
>
>> I do, when asked for, or when I deem necessary.  Please do read before
>>
> ^^^^^^^^^^^^^^
>
>> writing back, or ask what you need to to know without the gaslighting.
>>
>
> I did read, the whole point is that I have been asking you for details,
> but you haven't provided any at all, and if you don't "deem necessary"
> the provision of details, then we aren't obliged to take your complaints
> seriously either.
>
> Thanks.
>

I did give you one pointer for a detailed explanation of the problem, which
you ignore, and declare me delusional instead, who's seen that coming.  :)

I deem unnecessary to give *YOU* a more detailed explanation, because
you are clearly not trying to improve Customize, and instead harassing me
and a potential contributor instead.




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

* Re: FW: [External] : Re: Propose to add setup-wizard.el to ELPA
  2022-01-03 12:20                                                                         ` xenodasein--- via Emacs development discussions.
@ 2022-01-03 12:32                                                                           ` Po Lu
  2022-01-03 12:44                                                                             ` xenodasein--- via Emacs development discussions.
  0 siblings, 1 reply; 119+ messages in thread
From: Po Lu @ 2022-01-03 12:32 UTC (permalink / raw)
  To: xenodasein--- via Emacs development discussions.; +Cc: xenodasein

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

> I did give you one pointer for a detailed explanation of the problem, which
> you ignore, and declare me delusional instead, who's seen that coming.

I did not declare you delusional, please stop attributing words to me
that I did not say.  And no, "Stefan M said it on StackOverflow once" is
not a useful pointer in any way; it's about as useful as "it's on the
internet somewhere".

> I deem unnecessary to give *YOU* a more detailed explanation

You haven't given anyone such an explanation, so you shouldn't be using
it as an excuse to not use custom inside a setup wizard, because it
doesn't help anyone if none of us can reproduce your problems.

Also, either way, if custom has bugs that prevents its use in a setup
wizard, they should be fixed, instead of making the situation worse by
neglecting to use custom at all.

Thanks.



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

* Re: FW: [External] : Re: Propose to add setup-wizard.el to ELPA
  2022-01-03 12:32                                                                           ` Po Lu
@ 2022-01-03 12:44                                                                             ` xenodasein--- via Emacs development discussions.
  2022-01-03 12:55                                                                               ` Po Lu
  0 siblings, 1 reply; 119+ messages in thread
From: xenodasein--- via Emacs development discussions. @ 2022-01-03 12:44 UTC (permalink / raw)
  To: luangruo; +Cc: emacs-devel

Jan 3, 2022, 15:32 by luangruo@yahoo.com:

> xenodasein--- via "Emacs development discussions." <emacs-devel@gnu.org>
> writes:
>
>> I did give you one pointer for a detailed explanation of the problem, which
>> you ignore, and declare me delusional instead, who's seen that coming.
>>
>
> I did not declare you delusional, please stop attributing words to me
> that I did not say.  And no, "Stefan M said it on StackOverflow once" is
> not a useful pointer in any way; it's about as useful as "it's on the
> internet somewhere".
>

It means that I do have an explanation for the problem, and stop acting
as if I am lying or something.  If you are unable to find it and interested in
more details, what you should have done is to ask me for the full article
instead of continuing the harassment campaign.  Here's an example
of a normal answer you should have given:
"I am working on Customize, and would appreciate your time if you can
provide the whole article, not just a pointer to internet, and maybe
additional comments instead."


>> I deem unnecessary to give *YOU* a more detailed explanation
>>
>
> You haven't given anyone such an explanation, so you shouldn't be using
> it as an excuse to not use custom inside a setup wizard, because it
> doesn't help anyone if none of us can reproduce your problems.
>
> Also, either way, if custom has bugs that prevents its use in a setup
> wizard, they should be fixed, instead of making the situation worse by
> neglecting to use custom at all.
>
> Thanks.
>

Now you are expanding the issue, and asking for how autoload problem
directly affects the new wizard package, whereas my original mail was only
about defaults of custom-file, and your answer was about setq.  With
deflections like these, it is easy to doubt someone's intentions, so don't blame
me.




^ permalink raw reply	[flat|nested] 119+ 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; 119+ 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] 119+ messages in thread

* Re: FW: [External] : Re: Propose to add setup-wizard.el to ELPA
  2022-01-03 12:44                                                                             ` xenodasein--- via Emacs development discussions.
@ 2022-01-03 12:55                                                                               ` Po Lu
  2022-01-03 13:24                                                                                 ` xenodasein--- via Emacs development discussions.
  2022-01-03 15:15                                                                                 ` xenodasein--- via Emacs development discussions.
  0 siblings, 2 replies; 119+ messages in thread
From: Po Lu @ 2022-01-03 12:55 UTC (permalink / raw)
  To: xenodasein--- via Emacs development discussions.; +Cc: xenodasein

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

> It means that I do have an explanation for the problem, and stop acting
> as if I am lying or something.

I'm not acting as if you're lying.  I was stating that your very vague
explanations don't help, at all.

> If you are unable to find it and interested in more details, what you
> should have done is to ask me for the full article instead of
> continuing the harassment campaign.

Please choose your words carefully.  Contrary to your statement, there
is no "harassment campaign" against you or anyone else here.

> Here's an example of a normal answer you should have given: "I am
> working on Customize, and would appreciate your time if you can
> provide the whole article, not just a pointer to internet, and maybe
> additional comments instead."

And that, except split across a few more messages, is precisely what I
have been trying to say to you today (specifically, about autoloads and
custom.)  Your response however is typically a complaint that I'm
calling you delusional, or harassing you, or calling you a liar, or what
not, which is again blatantly false.

Anyway, unless you're willing to provide some actual information about
the problem, I will see myself out.  I still oppose the addition of a
setup wizard that does not generate a custom-set-variables block to
place in the custom file.

Thanks.

> Now you are expanding the issue, and asking for how autoload problem
> directly affects the new wizard package, whereas my original mail was
> only about defaults of custom-file, and your answer was about setq.
> With deflections like these, it is easy to doubt someone's intentions,
> so don't blame me.

I suggest you take a look at the title of your reply, if that is what
your argument is based on.

Further more, it was you who turned the discussion towards setq, and the
discussion about custom-file is an entirely separate discussion (which
was also suitably renamed) that involved Philip, Pedro and you, not me.

I was not paying attention to the "default custom file" discussion.



^ permalink raw reply	[flat|nested] 119+ 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; 119+ 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] 119+ messages in thread

* Re: FW: [External] : Re: Propose to add setup-wizard.el to ELPA
  2022-01-03 12:55                                                                               ` Po Lu
@ 2022-01-03 13:24                                                                                 ` xenodasein--- via Emacs development discussions.
  2022-01-03 15:15                                                                                 ` xenodasein--- via Emacs development discussions.
  1 sibling, 0 replies; 119+ messages in thread
From: xenodasein--- via Emacs development discussions. @ 2022-01-03 13:24 UTC (permalink / raw)
  To: luangruo; +Cc: emacs-devel

Jan 3, 2022, 15:55 by luangruo@yahoo.com:

> xenodasein--- via "Emacs development discussions." <emacs-devel@gnu.org>
> writes:
>
>> Here's an example of a normal answer you should have given: "I am
>> working on Customize, and would appreciate your time if you can
>> provide the whole article, not just a pointer to internet, and maybe
>> additional comments instead."
>>
>
> And that, except split across a few more messages, is precisely what I
> have been trying to say to you today (specifically, about autoloads and
> custom.)  Your response however is typically a complaint that I'm
> calling you delusional, or harassing you, or calling you a liar, or what
> not, which is again blatantly false.
>

Nope, see what you did was to say that you know what the problem is,
that it is the exact same one with setq, and said it was insignificant and
unrealistic.


> Anyway, unless you're willing to provide some actual information about
> the problem, I will see myself out.  I still oppose the addition of a
> setup wizard that does not generate a custom-set-variables block to
> place in the custom file.
>

I would consider helping If I saw you committing towards integrating
the wizard with custom, not opposing it before it is even born.



>> Now you are expanding the issue, and asking for how autoload problem
>> directly affects the new wizard package, whereas my original mail was
>> only about defaults of custom-file, and your answer was about setq.
>> With deflections like these, it is easy to doubt someone's intentions,
>> so don't blame me.
>>
>
> I suggest you take a look at the title of your reply, if that is what
> your argument is based on.
>
> Further more, it was you who turned the discussion towards setq, and the
> discussion about custom-file is an entirely separate discussion (which
> was also suitably renamed) that involved Philip, Pedro and you, not me.
>
> I was not paying attention to the "default custom file" discussion.
>

So everything written in this list strongly relate to the OP and title, and never
diverge.  OK, sorry, my mistake.




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

* Re: FW: [External] : Re: Propose to add setup-wizard.el to ELPA
  2022-01-03 12:55                                                                               ` Po Lu
  2022-01-03 13:24                                                                                 ` xenodasein--- via Emacs development discussions.
@ 2022-01-03 15:15                                                                                 ` xenodasein--- via Emacs development discussions.
  1 sibling, 0 replies; 119+ messages in thread
From: xenodasein--- via Emacs development discussions. @ 2022-01-03 15:15 UTC (permalink / raw)
  To: luangruo; +Cc: emacs-devel

Jan 3, 2022, 15:55 by luangruo@yahoo.com:

> xenodasein--- via "Emacs development discussions." <emacs-devel@gnu.org>
> writes:
>
>> It means that I do have an explanation for the problem, and stop acting
>> as if I am lying or something.
>>
>
> I'm not acting as if you're lying.  I was stating that your very vague
> explanations don't help, at all.
>
>> If you are unable to find it and interested in more details, what you
>> should have done is to ask me for the full article instead of
>> continuing the harassment campaign.
>>
>
> Please choose your words carefully.  Contrary to your statement, there
> is no "harassment campaign" against you or anyone else here.
>
>> Here's an example of a normal answer you should have given: "I am
>> working on Customize, and would appreciate your time if you can
>> provide the whole article, not just a pointer to internet, and maybe
>> additional comments instead."
>>
>
> And that, except split across a few more messages, is precisely what I
> have been trying to say to you today (specifically, about autoloads and
> custom.)  Your response however is typically a complaint that I'm
> calling you delusional, or harassing you, or calling you a liar, or what
> not, which is again blatantly false.
>

Please do introspection, and try to see why I am saying that you are
doing those things, and only to you.


> Anyway, unless you're willing to provide some actual information about
> the problem, I will see myself out.  I still oppose the addition of a
> setup wizard that does not generate a custom-set-variables block to
> place in the custom file.
>

You are not fixing Customize, you're trying to get the author of wizard
to fix Customize instead.  If author doesn't use and know Customize,
and wants to make a wizard for generating simple init.el configuration
forms as a starting point for people, more power to them.  I wish that
existed when I started out.  It can always be expanded for Customize
support later, and you are free to work on that when the time comes.
What you're doing here is unhelpful at best.




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

* RE: FW: [External] : Re: Propose to add setup-wizard.el to ELPA
  2022-01-03  6:42                                                 ` Sean Whitton
  2022-01-03  7:02                                                   ` Stefan Kangas
@ 2022-01-03 16:03                                                   ` Drew Adams
  2022-01-03 16:05                                                   ` Stefan Monnier
  2 siblings, 0 replies; 119+ messages in thread
From: Drew Adams @ 2022-01-03 16:03 UTC (permalink / raw)
  To: Sean Whitton, Stefan Kangas, xenodasein@tutanota.de; +Cc: emacs-devel@gnu.org

> >> Customize should not write to your init file...
> >> That's a bad Emacs design choice, IMO.
> >> It especially should not be the default behavior.
> 
> Hmm, then where should it write to?

The value of variable `custom-file'.

Similar to a bookmark file, that var could have
a default filename (location), different from
the default for the init file.

It could have a default load time/position also.
E.g., by default, it could be loaded just after
the init file, but only _if not loaded_ already.

Users should be encouraged to load it explicitly,
however, from their init file (or from some file
loaded by the init file).

They could also be told about the possibility of
loading it before or after some other code they
load/evaluate, and of the possibility of loading
it more than once - e.g., examples of why you
might want/need to do that.

There are other possibilities, of course.  The
point is to give Customize a separate place to
ply its trade - somewhere other than in a user's
init file.  An init file should be for users,
not programs, to code.

We don't, by default, let bookmark.el write
bookmarks to your init file.  Customize should
act similarly wrt code it writes/edits.

The simple design of having a `custom-file is,
I think, sufficient.  But we need not be wedded
to it, if we find something better.  The point
is for automatic coding not to interfere with
user coding, and for users to be aware of any
automatic coding, and its relation to their own.



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

* RE: FW: [External] : Re: Propose to add setup-wizard.el to ELPA
  2022-01-03  8:19                                                     ` xenodasein--- via Emacs development discussions.
  2022-01-03  9:27                                                       ` Po Lu
@ 2022-01-03 16:04                                                       ` Drew Adams
  1 sibling, 0 replies; 119+ messages in thread
From: Drew Adams @ 2022-01-03 16:04 UTC (permalink / raw)
  To: xenodasein@tutanota.de, Stefan Kangas; +Cc: emacs-devel@gnu.org, Sean Whitton

> >>>> Customize should not write to your init file ...  That's a bad Emacs
> >>>> design choice, IMO.  It especially should not be the default behavior.
> >> Hmm, then where should it write to?
> > IMO, something like
> > (setq custom-file (locate-user-emacs-file "custom-file.el"))
> 
> I'd prefer the current behavior TBH, because the real
> issue is not where it is written, it is when it's read.

No.  The real issue is who is writing it, and where.

Users can control the location of `custom-file'
and when it's read.

And we can provide a default location and time
of reading.

> Currently it is easy to place custom-set-variables
> where you want either inside init file or to place it into another
> file.

That would of course still be the case.  Nothing
prevents you from doing anything in your init or
another file - including calling custom* functions.

> Timing is important,

It's absolutely important, and needs to remain
under user control.

> because Customize also has problems with
> autoloads, and who knows what else.

Dunno what problems you envision - please be
specific.

The only real change is to prevent Customize
from writing to your init file.  Nothing else.

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

* Re: FW: [External] : Re: Propose to add setup-wizard.el to ELPA
  2022-01-03  6:42                                                 ` Sean Whitton
  2022-01-03  7:02                                                   ` Stefan Kangas
  2022-01-03 16:03                                                   ` Drew Adams
@ 2022-01-03 16:05                                                   ` Stefan Monnier
  2022-01-04  1:50                                                     ` Yuan Fu
  2 siblings, 1 reply; 119+ messages in thread
From: Stefan Monnier @ 2022-01-03 16:05 UTC (permalink / raw)
  To: Sean Whitton
  Cc: Stefan Kangas, Drew Adams, xenodasein@tutanota.de,
	emacs-devel@gnu.org

Sean Whitton [2022-01-02 23:42:11] wrote:
> On Sun 02 Jan 2022 at 05:14pm -05, Stefan Kangas wrote:
>> Drew Adams <drew.adams@oracle.com> writes:
>>> Customize should not write to your init file ...  That's a bad Emacs
>>> design choice, IMO.  It especially should not be the default behavior.
>> +1, FWIW.
> Hmm, then where should it write to?

Please rename this thread which is orthogonal to `setup-wizard.el`.
(`setup-wizard.el` should simply set the variable via Custom and
then ask Custom to save the result, so `setup-wizard.el` shouldn't know
or care where or how the result is saved).


        Stefan




^ permalink raw reply	[flat|nested] 119+ 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; 119+ 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] 119+ messages in thread

* Re: [External] : Re: Propose to add setup-wizard.el to ELPA
  2022-01-03 16:05                                                   ` Stefan Monnier
@ 2022-01-04  1:50                                                     ` Yuan Fu
  2022-01-04  2:53                                                       ` Po Lu
                                                                         ` (2 more replies)
  0 siblings, 3 replies; 119+ messages in thread
From: Yuan Fu @ 2022-01-04  1:50 UTC (permalink / raw)
  To: Stefan Monnier
  Cc: emacs-devel@gnu.org, Stefan Kangas, Drew Adams, Sean Whitton



> On Jan 3, 2022, at 8:05 AM, Stefan Monnier <monnier@iro.umontreal.ca> wrote:
> 
> Sean Whitton [2022-01-02 23:42:11] wrote:
>> On Sun 02 Jan 2022 at 05:14pm -05, Stefan Kangas wrote:
>>> Drew Adams <drew.adams@oracle.com> writes:
>>>> Customize should not write to your init file ...  That's a bad Emacs
>>>> design choice, IMO.  It especially should not be the default behavior.
>>> +1, FWIW.
>> Hmm, then where should it write to?
> 
> Please rename this thread which is orthogonal to `setup-wizard.el`.
> (`setup-wizard.el` should simply set the variable via Custom and
> then ask Custom to save the result, so `setup-wizard.el` shouldn't know
> or care where or how the result is saved).

Custom cannot save some of the results produced by the wizard, for example, key bindings and Unicode fonts. And I don’t know if package-selected-packages is enough for packages. Here is an example for the generated configuration:

;; Load modus-operandi theme
(load-theme 'modus-operandi)

;; Set bindings for copy/cut/paste.
(global-set-key
 (kbd "s-c")
 #'kill-ring-save)

(global-set-key
 (kbd "s-x")
 #'kill-region)

(global-set-key
 (kbd "s-v")
 #'yank)

;; Display line number.
(global-display-line-numbers-mode 1)

;; Set default font.
(set-face-attribute 'default nil :family "IBM Plex Mono")

;; Set variable-pitch font.
(set-face-attribute 'variable-pitch nil :family "Charter")

;; Set CJK font.
(dolist
    (charset
     '(kana han cjk-misc))
  (set-fontset-font t charset
                    (font-spec :family "Source Han Serif")))

;; Set font size.
(set-face-attribute 'default nil :height 130)

;; Use linear undo style.
(global-set-key
 [remap undo]
 #'undo-only)

;; Install and enable ‘ivy-mode’ and ‘counsel-mode’.
(progn
  (require 'package)
  (unless
      (package-installed-p 'ivy)
    (package-install 'ivy))
  (package-activate 'ivy)
  (require 'ivy)
  (ivy-mode))

(setq enable-recursive-minibuffers t ivy-use-selectable-prompt t ivy-use-virtual-buffers t)

(progn
  (require 'package)
  (unless
      (package-installed-p 'counsel)
    (package-install 'counsel))
  (package-activate 'ivy)
  (require 'counsel)
  (counsel-mode))

Yuan


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

* Re: [External] : Re: Propose to add setup-wizard.el to ELPA
  2022-01-04  1:50                                                     ` Yuan Fu
@ 2022-01-04  2:53                                                       ` Po Lu
  2022-01-04  4:13                                                       ` Stefan Monnier
  2022-01-04 15:04                                                       ` Lars Ingebrigtsen
  2 siblings, 0 replies; 119+ messages in thread
From: Po Lu @ 2022-01-04  2:53 UTC (permalink / raw)
  To: Yuan Fu
  Cc: Stefan Monnier, emacs-devel@gnu.org, Stefan Kangas, Drew Adams,
	Sean Whitton

Yuan Fu <casouri@gmail.com> writes:

> Custom cannot save some of the results produced by the wizard, for
> example, key bindings and Unicode fonts. And I don’t know if
> package-selected-packages is enough for packages.

Fontsets and key bindings are outside the scope of Custom, so they don't
have to be saved with it.

IMO package-selected-packages should be set by package.el, and not by
you manually.

Thanks.



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

* Re: [External] : Re: Propose to add setup-wizard.el to ELPA
  2022-01-04  1:50                                                     ` Yuan Fu
  2022-01-04  2:53                                                       ` Po Lu
@ 2022-01-04  4:13                                                       ` Stefan Monnier
  2022-01-04  4:30                                                         ` Yuan Fu
  2022-01-04 15:04                                                       ` Lars Ingebrigtsen
  2 siblings, 1 reply; 119+ messages in thread
From: Stefan Monnier @ 2022-01-04  4:13 UTC (permalink / raw)
  To: Yuan Fu
  Cc: Sean Whitton, Stefan Kangas, Drew Adams, xenodasein@tutanota.de,
	emacs-devel@gnu.org

> Custom cannot save some of the results produced by the wizard,

That's easy to fix.

> for example, key bindings and Unicode fonts.

Make (global) minor modes that make those changes and then Custom can
control them just fine.

If it's mainstream enough to be something that a setup-wizard should
recommend, then it *should* be easy to control via Custom.

> And I don’t know if package-selected-packages is enough for
> packages. Here is an example for the generated configuration:

If not, that's a good reason to address the limitations.


        Stefan




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

* Re: [External] : Re: Propose to add setup-wizard.el to ELPA
  2022-01-04  4:13                                                       ` Stefan Monnier
@ 2022-01-04  4:30                                                         ` Yuan Fu
  2022-01-04  6:10                                                           ` Stefan Monnier
  0 siblings, 1 reply; 119+ messages in thread
From: Yuan Fu @ 2022-01-04  4:30 UTC (permalink / raw)
  To: Stefan Monnier
  Cc: emacs-devel@gnu.org, Stefan Kangas, Drew Adams, Sean Whitton



> On Jan 3, 2022, at 8:13 PM, Stefan Monnier <monnier@iro.umontreal.ca> wrote:
> 
>> Custom cannot save some of the results produced by the wizard,
> 
> That's easy to fix.
> 
>> for example, key bindings and Unicode fonts.
> 
> Make (global) minor modes that make those changes and then Custom can
> control them just fine.
> 
> If it's mainstream enough to be something that a setup-wizard should
> recommend, then it *should* be easy to control via Custom.

That’s true. Ok. I’ll do that. I still think code has the virtue of simplicity and inviting a user to explore more of Emacs. But I know we are thinking about different target users (people who would like to understand how things works vs people who just want it work and forget about it).

Yuan


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

* Re: [External] : Re: Propose to add setup-wizard.el to ELPA
  2022-01-04  4:30                                                         ` Yuan Fu
@ 2022-01-04  6:10                                                           ` Stefan Monnier
  0 siblings, 0 replies; 119+ messages in thread
From: Stefan Monnier @ 2022-01-04  6:10 UTC (permalink / raw)
  To: Yuan Fu
  Cc: Sean Whitton, Stefan Kangas, Drew Adams, xenodasein@tutanota.de,
	emacs-devel@gnu.org

> That’s true. Ok. I’ll do that. I still think code has the virtue of
> simplicity and inviting a user to explore more of Emacs.

I so agree with you.  But we're talking about a wizard here, i.e. one of
those tools whose target users are exactly those users who don't want to
see code.

FWIW, I still use my custom hack which makes it generate (and
understand) "almost normal looking" ELisp code, like the one below.


        Stefan


(custom-autogenerated-user-settings
 ;; This custom-autogenerated-user-settings was added by Custom.
 ;; If you edit it by hand, you could mess it up, so be careful.
 ;; Your init file should contain only one such instance.
 ;; If there is more than one, they won't work right.
 (setq agda2-include-dirs '("." "/usr/share/agda-stdlib"))
 (setq browse-url-browser-function 'browse-url-firefox)
 (setq browse-url-mozilla-program "firefox")
 (customize-set-variable 'calendar-date-style 'iso)
 (electric-pair-mode -1)
 ...
 )




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

* Re: [External] : Re: Propose to add setup-wizard.el to ELPA
  2022-01-04  1:50                                                     ` Yuan Fu
  2022-01-04  2:53                                                       ` Po Lu
  2022-01-04  4:13                                                       ` Stefan Monnier
@ 2022-01-04 15:04                                                       ` Lars Ingebrigtsen
  2022-01-04 21:25                                                         ` Sean Whitton
  2 siblings, 1 reply; 119+ messages in thread
From: Lars Ingebrigtsen @ 2022-01-04 15:04 UTC (permalink / raw)
  To: Yuan Fu
  Cc: Sean Whitton, Stefan Kangas, Stefan Monnier, Drew Adams,
	emacs-devel@gnu.org

Yuan Fu <casouri@gmail.com> writes:

> Custom cannot save some of the results produced by the wizard, for
> example, key bindings and Unicode fonts. And I don’t know if
> package-selected-packages is enough for packages. Here is an example
> for the generated configuration:
>
> ;; Load modus-operandi theme
> (load-theme 'modus-operandi)
>
> ;; Set bindings for copy/cut/paste.
> (global-set-key
>  (kbd "s-c")
>  #'kill-ring-save)

By the way, if you're targeting Emacs 29 for this, you can use
`pp-emacs-lisp-code' to get more readable results, which would be a
priority if we want to move to a more code-based format for wizards and
customisations.

(And you can use `keymap-global-set'.)

>   (require 'package)

And that's not necessary, I think?

Anyway, I'm in favour of setup wizards...  but I don't think there
should be only one.  I think we should invite people to submit setup
wizards (like we do face themes), and then Emacs should list these (with
an explanation of what the use case for each wizard/configuration is).

I also think it's high time that we default to not having the Customize
stuff in the init file, but put it in a different file.  And if we do
that, I think we should discuss whether to change the format.  I think
it'd make sense to move to a more code-based format for the file.
Instead of

(custom-set-variables
 ;; custom-set-variables was added by Custom.
 ;; If you edit it by hand, you could mess it up, so be careful.
 ;; Your init file should contain only one such instance.
 ;; If there is more than one, they won't work right.
 '(foo-var 'bar)
 '(zot-thing '("/tmp")))

which is doesn't teach the user anything about anything, and is
unnecessarily hard to edit by hand, we could have:

;; `foo-var' controls ow fooification happens.
(setopt foo-var 'bar)

;; `zot-thing' is the directory where the Zot package stores stuff.
(setopt zoo-thing '("/tmp/"))

I.e., have the first line from the doc string in the file, and use
setopt (an alias for `customize-set-variable').  Users would be able to
read this file, and understand what it does, and edit it by hand if they
want to.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no



^ permalink raw reply	[flat|nested] 119+ 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; 119+ 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] 119+ 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; 119+ 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] 119+ messages in thread

* RE: FW: [External] : Re: Propose to add setup-wizard.el to ELPA
  2022-01-03  7:02                                                   ` Stefan Kangas
  2022-01-03  8:19                                                     ` xenodasein--- via Emacs development discussions.
@ 2022-01-04 21:19                                                     ` Sean Whitton
  2022-01-04 21:28                                                       ` Drew Adams
  2022-01-07 10:34                                                     ` Jean Louis
  2 siblings, 1 reply; 119+ messages in thread
From: Sean Whitton @ 2022-01-04 21:19 UTC (permalink / raw)
  To: Stefan Kangas, Drew Adams, xenodasein@tutanota.de; +Cc: emacs-devel@gnu.org

Hello Stefan,

On Mon 03 Jan 2022 at 02:02AM -05, Stefan Kangas wrote:

> Sean Whitton <spwhitton@spwhitton.name> writes:
>
>> On Sun 02 Jan 2022 at 05:14pm -05, Stefan Kangas wrote:
>>
>>> Drew Adams <drew.adams@oracle.com> writes:
>>>
>>>> Customize should not write to your init file ...  That's a bad Emacs
>>>> design choice, IMO.  It especially should not be the default behavior.
>>>
>>> +1, FWIW.
>>
>> Hmm, then where should it write to?
>
> IMO, something like
>
> (setq custom-file (locate-user-emacs-file "custom-file.el"))

Hmm.  I recently deleted something like that which had been in my init
for years, because I looked it and couldn't come up with a reason why
the code should be in a separate file.  It seemed like pointless
complexity.  Why do you think it's better that way?

-- 
Sean Whitton



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

* Re: [External] : Re: Propose to add setup-wizard.el to ELPA
  2022-01-04 15:04                                                       ` Lars Ingebrigtsen
@ 2022-01-04 21:25                                                         ` Sean Whitton
  2022-01-05  0:58                                                           ` Po Lu
  2022-01-05 15:35                                                           ` Lars Ingebrigtsen
  0 siblings, 2 replies; 119+ messages in thread
From: Sean Whitton @ 2022-01-04 21:25 UTC (permalink / raw)
  To: Lars Ingebrigtsen, Yuan Fu
  Cc: Stefan Kangas, Stefan Monnier, Drew Adams, emacs-devel@gnu.org

Hello Lars,

On Tue 04 Jan 2022 at 04:04PM +01, Lars Ingebrigtsen wrote:

> Anyway, I'm in favour of setup wizards...  but I don't think there
> should be only one.  I think we should invite people to submit setup
> wizards (like we do face themes), and then Emacs should list these (with
> an explanation of what the use case for each wizard/configuration is).

Nice, this sounds like it might alleviate Yuan's concerns about
setup-wizard.el being too opinionated.

> I also think it's high time that we default to not having the Customize
> stuff in the init file, but put it in a different file.

A few people have mentioned this but I don't understand why -- I
recently dropped a really old setq for custom-file because I couldn't
come up with any advantages to having it in a separate file.

> And if we do that, I think we should discuss whether to change the
> format.  I think it'd make sense to move to a more code-based format
> for the file.

... is it just that it would enable things like this?

-- 
Sean Whitton



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

* RE: FW: [External] : Re: Propose to add setup-wizard.el to ELPA
  2022-01-04 21:19                                                     ` Sean Whitton
@ 2022-01-04 21:28                                                       ` Drew Adams
  2022-01-04 22:38                                                         ` Sean Whitton
  2022-01-05  5:28                                                         ` tomas
  0 siblings, 2 replies; 119+ messages in thread
From: Drew Adams @ 2022-01-04 21:28 UTC (permalink / raw)
  To: Sean Whitton, Stefan Kangas, xenodasein@tutanota.de; +Cc: emacs-devel@gnu.org

@@>>>> Customize should not write to your init file ...
@@>>>> That's a bad Emacs design choice, IMO.
@@>>>> It especially should not be the default behavior.
> >>>
> >>> +1, FWIW.
> >> Hmm, then where should it write to?
> > IMO, something like
> > (setq custom-file (locate-user-emacs-file "custom-file.el"))
> 
> Hmm.  I recently deleted something like that which had been in my init
> for years, because I looked it and couldn't come up with a reason why
> the code should be in a separate file.  It seemed like pointless
> complexity.  Why do you think it's better that way?

Go to @@.

Mixing hand coding and automatic coding in the same
file is error-prone.  It's just asking for trouble.
And it's not needed.



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

* RE: FW: [External] : Re: Propose to add setup-wizard.el to ELPA
  2022-01-04 21:28                                                       ` Drew Adams
@ 2022-01-04 22:38                                                         ` Sean Whitton
  2022-01-04 22:51                                                           ` Drew Adams
  2022-01-05  5:28                                                         ` tomas
  1 sibling, 1 reply; 119+ messages in thread
From: Sean Whitton @ 2022-01-04 22:38 UTC (permalink / raw)
  To: Drew Adams, Stefan Kangas, xenodasein@tutanota.de; +Cc: emacs-devel@gnu.org

Hello,

On Tue 04 Jan 2022 at 09:28PM GMT, Drew Adams wrote:

> Mixing hand coding and automatic coding in the same
> file is error-prone.  It's just asking for trouble.
> And it's not needed.

But if you're just loading that file somewhere in your init.el anyway,
the problem remains?

-- 
Sean Whitton



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

* RE: FW: [External] : Re: Propose to add setup-wizard.el to ELPA
  2022-01-04 22:38                                                         ` Sean Whitton
@ 2022-01-04 22:51                                                           ` Drew Adams
  0 siblings, 0 replies; 119+ messages in thread
From: Drew Adams @ 2022-01-04 22:51 UTC (permalink / raw)
  To: Sean Whitton, Stefan Kangas, xenodasein@tutanota.de; +Cc: emacs-devel@gnu.org

> > Mixing hand coding and automatic coding in the same
> > file is error-prone.  It's just asking for trouble.
> > And it's not needed.
> 
> But if you're just loading that file somewhere in
> your init.el anyway, the problem remains?

Good question.

No, the potential problem of mixed editing/coding no
longer exists. You edit your init file.  Customize
edits your custom file.

1. Customize won't bother anything in your init file.
   It'll never meddle there.

2. Your editing of your init file will never meddle
   with what Customize does when it saves
   customizations - it never goes near the init file.

It's about avoiding the problem of too many cooks
spoiling the broth, the cooks in question being
Customize and you, and spoiling being by editing,
possibly with errors on your part at least (you're
human).



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

* Re: [External] : Re: Propose to add setup-wizard.el to ELPA
  2022-01-04 21:25                                                         ` Sean Whitton
@ 2022-01-05  0:58                                                           ` Po Lu
  2022-01-05 15:35                                                           ` Lars Ingebrigtsen
  1 sibling, 0 replies; 119+ messages in thread
From: Po Lu @ 2022-01-05  0:58 UTC (permalink / raw)
  To: Sean Whitton
  Cc: Lars Ingebrigtsen, Yuan Fu, Stefan Kangas, Stefan Monnier,
	Drew Adams, emacs-devel@gnu.org

Sean Whitton <spwhitton@spwhitton.name> writes:

> Nice, this sounds like it might alleviate Yuan's concerns about
> setup-wizard.el being too opinionated.

+1

> A few people have mentioned this but I don't understand why -- I
> recently dropped a really old setq for custom-file because I couldn't
> come up with any advantages to having it in a separate file.

I'm not for changing any old and established default, but from the
perspective of a new user it at least avoids placing this scary warning
in the init file:

   ;; custom-set-variables was added by Custom.
   ;; If you edit it by hand, you could mess it up, so be careful.
   ;; Your init file should contain only one such instance.
   ;; If there is more than one, they won't work right.

>> And if we do that, I think we should discuss whether to change the
>> format.  I think it'd make sense to move to a more code-based format
>> for the file.

The format is (once again) too established to be worth changing, I
think.



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

* Re: FW: [External] : Re: Propose to add setup-wizard.el to ELPA
  2022-01-04 21:28                                                       ` Drew Adams
  2022-01-04 22:38                                                         ` Sean Whitton
@ 2022-01-05  5:28                                                         ` tomas
  2022-01-05  7:43                                                           ` Drew Adams
  1 sibling, 1 reply; 119+ messages in thread
From: tomas @ 2022-01-05  5:28 UTC (permalink / raw)
  To: emacs-devel

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

On Tue, Jan 04, 2022 at 09:28:26PM +0000, Drew Adams wrote:
> @@>>>> Customize should not write to your init file ...
> @@>>>> That's a bad Emacs design choice, IMO.
> @@>>>> It especially should not be the default behavior.
> > >>>
> > >>> +1, FWIW.
> > >> Hmm, then where should it write to?
> > > IMO, something like
> > > (setq custom-file (locate-user-emacs-file "custom-file.el"))
> > 
> > Hmm.  I recently deleted something like that which had been in my init
> > for years, because I looked it and couldn't come up with a reason why
> > the code should be in a separate file.  It seemed like pointless
> > complexity.  Why do you think it's better that way?
> 
> Go to @@.

Where's @@?

(genuine question: I don't know what you want to convey with that
expression :)

> Mixing hand coding and automatic coding in the same
> file is error-prone.  It's just asking for trouble.
> And it's not needed.

And this is the point where your (respected, mind you) opinion enters
the scene. We're taking that risk all the time whenever several people
work on the same code. You might argue they understand the code they're
changing, but then, we are doing it mechanically too, whenever we do a
VC merge, and this relies generally on simple textual distance to
"declare" that two changes are independent. Courage :)

Having a comment marker

;; here be lions
...
;; end of lions

... as customize has been doing --uh-- customarily should suffice
perfectly (for some users, some contexts).

As for what should be the recommended way, I still agree with you 100%.
I still don't agree that there should be extra code to enforce that.

What would make me happy is to supply a minimal init.el file already
containing the "include" and a minimal (empty) custom.el for new
installations.

Cheers
-- 
t

> 

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]

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

* RE: FW: [External] : Re: Propose to add setup-wizard.el to ELPA
  2022-01-05  5:28                                                         ` tomas
@ 2022-01-05  7:43                                                           ` Drew Adams
  2022-01-05  8:13                                                             ` tomas
  0 siblings, 1 reply; 119+ messages in thread
From: Drew Adams @ 2022-01-05  7:43 UTC (permalink / raw)
  To: tomas@tuxteam.de, emacs-devel@gnu.org

> > @@>>>> Customize should not write to your init file ...
> > @@>>>> That's a bad Emacs design choice, IMO.
> > @@>>>> It especially should not be the default behavior.
> > > >>>
> > > >>> +1, FWIW.
> > > >> Hmm, then where should it write to?
> > > > IMO, something like
> > > > (setq custom-file (locate-user-emacs-file "custom-file.el"))
> > >
> > > Hmm.  I recently deleted something like that which had been in my init
> > > for years, because I looked it and couldn't come up with a reason why
> > > the code should be in a separate file.  It seemed like pointless
> > > complexity.  Why do you think it's better that way?
> >
> > Go to @@.
> 
> Where's @@? (genuine question: I don't know
> what you want to convey with that expression :)

Sorry, I just meant the first 3 lines of the
mail.  I then added this for the reason:

> > Mixing hand coding and automatic coding in the same
> > file is error-prone.  It's just asking for trouble.
> > And it's not needed.
> 
> And this is the point where your (respected,
> mind you) opinion enters the scene. 

Call it an opinion, if you like.  I don't see it
as very controversial to think it's a bad idea
to have (all kinds of) users editing generated
code, and have a file that includes user code
along with code edited automatically.

The there-be-dragons warning you refer to is,
to me, evidence of potential problems waiting
to happen.

Emacs should of course let users do that (mix
the two in the same file).  Emacs has a fine
tradition of giving users plenty of rope, of
all sizes, lengths, and colors, to hang
themselves with - and that's a good thing.

The point is just to not have Emacs do that
mixing by default.

The default behavior of Emacs now is to have
a single file that mixes user coding and
Custom coding.  Why is that a great idea?

Many (most?) users should never even need to
look at the code that Customize produces to
save their preferences.

> We're taking that risk all the time whenever several people
> work on the same code. You might argue they understand the code they're
> changing, but then, we are doing it mechanically too, whenever we do a
> VC merge, and this relies generally on simple textual distance to
> "declare" that two changes are independent. Courage :)

There are differences of degree/quantity, that
can lead to differences of quality.  Not everyone
putting some code into their init file is at the
same level of familiarity with Elisp (let alone
with Customize code).

Many users who put something in their init file
are not "working on code" in the way you describe.
Not every Emacs user is a programmer, and not
every programmer is familiar with Lisp.  But most
users will have an init file, however rudimentary,
and many will use Customize in one way or another.

You can edit bookmarks in your bookmark file too.
But you don't generally do that.  And yes, for
pretty much anyone doing stuff like that, it can
be error prone.  In Bookmark+ I give you an easy
way to do that, but I don't expect most users of
bookmarks to edit their code.  Likewise, desktop
files and other such.  There's a reason we put
such generated "configuration" code in its own
file.

> Having a comment marker
> 
> ;; here be lions
> ...
> ;; end of lions
> 
> ... as customize has been doing --uh-- customarily should suffice
> perfectly (for some users, some contexts).

Yes, it's fine "for some users, some contexts".
We've done it for all users, all contexts, by
default for 40 years, and the globe hasn't
stopped spinning.  That doesn't mean it's the
best approach.

And users would still be able to do everything
in their init file, and still have Customize
write to that file if they want, as I explained.

There's no limitation or obligation.  What would
change is the default behavior.  You might not
be someone who would benefit by this change.
You wouldn't be forced to suffer the separation.

> As for what should be the recommended way, I still agree with you 100%.
> I still don't agree that there should be extra code to enforce that.

It's not clear to me what you agree with me
about, or what extra code you mean.

That Customize should, by default, write to a
separate file, is what I'm arguing for.  If
you agree with that, great.

How best to realize that separation-by-default
is a secondary question.  The first hurdle is
the main one.  The first is the what, the
second is the how.  I care more about the what.

> What would make me happy is to supply a minimal init.el file already
> containing the "include" and a minimal (empty) custom.el for new
> installations.

Not sure I understand you.  Are you saying
that Emacs could or should provide a starting
init file, which defines `custom-file' in some
standard location and which loads that file at
the end?

That's one possibility (for separating where
Customize writes, by default).

A priori I don't favor such an approach (it
might itself be confusing & error prone), but
it's a design to consider.

We're far from deciding _how_ to support
separation of custom-file & init file.  The
first step is convincing the powers that be
that such separation is desirable, by default.

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

* Re: FW: [External] : Re: Propose to add setup-wizard.el to ELPA
  2022-01-05  7:43                                                           ` Drew Adams
@ 2022-01-05  8:13                                                             ` tomas
  0 siblings, 0 replies; 119+ messages in thread
From: tomas @ 2022-01-05  8:13 UTC (permalink / raw)
  To: Drew Adams; +Cc: emacs-devel@gnu.org

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

On Wed, Jan 05, 2022 at 07:43:55AM +0000, Drew Adams wrote:
> > > @@>>>> Customize should not write to your init file ...
> > > @@>>>> That's a bad Emacs design choice, IMO.
> > > @@>>>> It especially should not be the default behavior.
> > > > >>>
> > > > >>> +1, FWIW.
> > > > >> Hmm, then where should it write to?
> > > > > IMO, something like
> > > > > (setq custom-file (locate-user-emacs-file "custom-file.el"))
> > > >
> > > > Hmm.  I recently deleted something like that which had been in my init
> > > > for years, because I looked it and couldn't come up with a reason why
> > > > the code should be in a separate file.  It seemed like pointless
> > > > complexity.  Why do you think it's better that way?
> > >
> > > Go to @@.
> > 
> > Where's @@? (genuine question: I don't know
> > what you want to convey with that expression :)
> 
> Sorry, I just meant the first 3 lines of the
> mail.  I then added this for the reason:

Got it, it's up there. Thanks :)

> > > Mixing hand coding and automatic coding in the same
> > > file is error-prone.  It's just asking for trouble.
> > > And it's not needed.
> > 
> > And this is the point where your (respected,
> > mind you) opinion enters the scene. 
> 
> Call it an opinion, if you like.  I don't see it
> as very controversial to think it's a bad idea
> to have (all kinds of) users editing generated
> code, and have a file that includes user code
> along with code edited automatically.

[...]

Sorry, pressed for time right now, so short answer. I do respect your
position, and there's a lot for it -- I just happen to be at a (so
slightly) different place.

Cheers
-- 
t

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]

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

* Re: [External] : Re: Propose to add setup-wizard.el to ELPA
  2022-01-04 21:25                                                         ` Sean Whitton
  2022-01-05  0:58                                                           ` Po Lu
@ 2022-01-05 15:35                                                           ` Lars Ingebrigtsen
  2022-01-06  6:32                                                             ` Sean Whitton
  1 sibling, 1 reply; 119+ messages in thread
From: Lars Ingebrigtsen @ 2022-01-05 15:35 UTC (permalink / raw)
  To: Sean Whitton
  Cc: Yuan Fu, Stefan Kangas, Stefan Monnier, Drew Adams,
	emacs-devel@gnu.org

Sean Whitton <spwhitton@spwhitton.name> writes:

>> I also think it's high time that we default to not having the Customize
>> stuff in the init file, but put it in a different file.
>
> A few people have mentioned this but I don't understand why -- I
> recently dropped a really old setq for custom-file because I couldn't
> come up with any advantages to having it in a separate file.

It's disturbing to many to find that Emacs has made changes in a file
that you thought they were in control of.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no



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

* Re: [External] : Re: Propose to add setup-wizard.el to ELPA
  2022-01-05 15:35                                                           ` Lars Ingebrigtsen
@ 2022-01-06  6:32                                                             ` Sean Whitton
  0 siblings, 0 replies; 119+ messages in thread
From: Sean Whitton @ 2022-01-06  6:32 UTC (permalink / raw)
  To: Lars Ingebrigtsen
  Cc: Yuan Fu, Stefan Kangas, Stefan Monnier, Drew Adams,
	emacs-devel@gnu.org

On Wed 05 Jan 2022 at 04:35pm +01, Lars Ingebrigtsen wrote:

> Sean Whitton <spwhitton@spwhitton.name> writes:
>
>>> I also think it's high time that we default to not having the Customize
>>> stuff in the init file, but put it in a different file.
>>
>> A few people have mentioned this but I don't understand why -- I
>> recently dropped a really old setq for custom-file because I couldn't
>> come up with any advantages to having it in a separate file.
>
> It's disturbing to many to find that Emacs has made changes in a file
> that you thought they were in control of.

Okay, I think I can imagine a new user being disturbed by that, as I
guess other programs they have used probably don't do anything similar.
Especially if they haven't yet checked their init.el into VC.

-- 
Sean Whitton



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

* Re: Propose to add setup-wizard.el to ELPA
  2022-01-02  2:07 Propose to add setup-wizard.el to ELPA Yuan Fu
                   ` (2 preceding siblings ...)
  2022-01-02 12:02 ` Philip Kaludercic
@ 2022-01-07  9:58 ` Jean Louis
  3 siblings, 0 replies; 119+ 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] 119+ 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; 119+ 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] 119+ 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; 119+ 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] 119+ messages in thread

* Re: FW: [External] : Re: Propose to add setup-wizard.el to ELPA
  2022-01-03  7:02                                                   ` Stefan Kangas
  2022-01-03  8:19                                                     ` xenodasein--- via Emacs development discussions.
  2022-01-04 21:19                                                     ` Sean Whitton
@ 2022-01-07 10:34                                                     ` Jean Louis
  2 siblings, 0 replies; 119+ messages in thread
From: Jean Louis @ 2022-01-07 10:34 UTC (permalink / raw)
  To: Stefan Kangas; +Cc: emacs-devel@gnu.org, Drew Adams, Sean Whitton

* Stefan Kangas <stefankangas@gmail.com> [2022-01-03 22:24]:
> Sean Whitton <spwhitton@spwhitton.name> writes:
> 
> > On Sun 02 Jan 2022 at 05:14pm -05, Stefan Kangas wrote:
> >
> >> Drew Adams <drew.adams@oracle.com> writes:
> >>
> >>> Customize should not write to your init file ...  That's a bad Emacs
> >>> design choice, IMO.  It especially should not be the default behavior.
> >>
> >> +1, FWIW.
> >
> > Hmm, then where should it write to?
> 
> IMO, something like
> 
> (setq custom-file (locate-user-emacs-file "custom-file.el"))

I have in ~/.emacs.d/init.el:

(load "~/.emacs.d/custom.el")

and in ~/.emacs.d/custom.el I have:
 '(custom-file "~/.emacs.d/custom.el")

and that works well. Customized options are written in  '(custom-file "~/.emacs.d/custom.el")

-- 
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] 119+ 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; 119+ 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] 119+ 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; 119+ 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] 119+ 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; 119+ 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] 119+ 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 15:45                     ` [External] : " Drew Adams
                                       ` (2 more replies)
  1 sibling, 3 replies; 119+ 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] 119+ messages in thread

* RE: [External] : Re: Propose to add setup-wizard.el to ELPA
  2022-01-10  4:15                   ` Jean Louis
@ 2022-01-10 15:45                     ` Drew Adams
  2022-01-10 17:24                     ` Eli Zaretskii
  2022-01-11  4:51                     ` Richard Stallman
  2 siblings, 0 replies; 119+ messages in thread
From: Drew Adams @ 2022-01-10 15:45 UTC (permalink / raw)
  To: Jean Louis, Eli Zaretskii
  Cc: luangruo@yahoo.com, casouri@gmail.com, emacs-devel@gnu.org

> > > 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.

FWIW, I agree with Eli, here.  I don't think
a proclivity to customize is related to how
advanced a user is (with computers or in any
other way).

Different users are different, of course.
And maybe the very first time a user opens
an app s?he might not try to customize it.

But I think that many users do consider
customization immediately, or almost
immediately.  They open the app and think
to themselves "I wish this were lighter",
or "I'd prefer to have that on the left",
or "That's too small for me."

This could depend on what one is used to
(and thus might want to replicate), or on
personality, or on any number of other
things.  But I'd bet that many users do
want to customize some things at the outset.

Whether they actually try to do so is a
different question.  And that can depend on
things like (a) how much they're willing to
give the new app a chance on its own terms,
and (b) how easy they perceive customization
to be in the new app.

With GNU Emacs it's very easy to customize
some things that are not usually so easy
(and may not even be possible to customize)
in other apps.  Emacs can be both a dream
and a rabbit hole for a customize-hobbyist. ;-)

I'd also bet that many (most?) Emacs users
who eventually get more interested in using
Emacs Lisp started down that road by making
simple customization changes to their Emacs
experience.  Customizing can be a gateway
drug to an Elisp lifetime habit. ;-)

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

* Re: Propose to add setup-wizard.el to ELPA
  2022-01-10  4:15                   ` Jean Louis
  2022-01-10 15:45                     ` [External] : " Drew Adams
@ 2022-01-10 17:24                     ` Eli Zaretskii
  2022-01-11  4:47                       ` Jean Louis
  2022-01-11  4:51                     ` Richard Stallman
  2 siblings, 1 reply; 119+ 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] 119+ 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; 119+ 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] 119+ messages in thread

* Re: Propose to add setup-wizard.el to ELPA
  2022-01-10  4:15                   ` Jean Louis
  2022-01-10 15:45                     ` [External] : " Drew Adams
  2022-01-10 17:24                     ` Eli Zaretskii
@ 2022-01-11  4:51                     ` Richard Stallman
  2 siblings, 0 replies; 119+ 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] 119+ messages in thread

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

Thread overview: 119+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-01-02  2:07 Propose to add setup-wizard.el to ELPA 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-02 18:51                                         ` FW: [External] : " Drew Adams
2022-01-02 19:07                                           ` xenodasein--- via Emacs development discussions.
2022-01-02 21:29                                             ` Drew Adams
2022-01-02 22:14                                               ` Stefan Kangas
2022-01-03  6:42                                                 ` Sean Whitton
2022-01-03  7:02                                                   ` Stefan Kangas
2022-01-03  8:19                                                     ` xenodasein--- via Emacs development discussions.
2022-01-03  9:27                                                       ` Po Lu
2022-01-03  9:55                                                         ` xenodasein--- via Emacs development discussions.
2022-01-03 10:10                                                           ` Po Lu
2022-01-03 10:21                                                             ` xenodasein--- via Emacs development discussions.
2022-01-03 10:53                                                               ` Po Lu
2022-01-03 11:07                                                                 ` xenodasein--- via Emacs development discussions.
2022-01-03 11:25                                                                   ` Po Lu
2022-01-03 11:32                                                                     ` xenodasein--- via Emacs development discussions.
2022-01-03 12:13                                                                       ` Po Lu
2022-01-03 12:20                                                                         ` xenodasein--- via Emacs development discussions.
2022-01-03 12:32                                                                           ` Po Lu
2022-01-03 12:44                                                                             ` xenodasein--- via Emacs development discussions.
2022-01-03 12:55                                                                               ` Po Lu
2022-01-03 13:24                                                                                 ` xenodasein--- via Emacs development discussions.
2022-01-03 15:15                                                                                 ` xenodasein--- via Emacs development discussions.
2022-01-03 16:04                                                       ` Drew Adams
2022-01-04 21:19                                                     ` Sean Whitton
2022-01-04 21:28                                                       ` Drew Adams
2022-01-04 22:38                                                         ` Sean Whitton
2022-01-04 22:51                                                           ` Drew Adams
2022-01-05  5:28                                                         ` tomas
2022-01-05  7:43                                                           ` Drew Adams
2022-01-05  8:13                                                             ` tomas
2022-01-07 10:34                                                     ` Jean Louis
2022-01-03 16:03                                                   ` Drew Adams
2022-01-03 16:05                                                   ` Stefan Monnier
2022-01-04  1:50                                                     ` Yuan Fu
2022-01-04  2:53                                                       ` Po Lu
2022-01-04  4:13                                                       ` Stefan Monnier
2022-01-04  4:30                                                         ` Yuan Fu
2022-01-04  6:10                                                           ` Stefan Monnier
2022-01-04 15:04                                                       ` Lars Ingebrigtsen
2022-01-04 21:25                                                         ` Sean Whitton
2022-01-05  0:58                                                           ` Po Lu
2022-01-05 15:35                                                           ` Lars Ingebrigtsen
2022-01-06  6:32                                                             ` Sean Whitton
2022-01-03  0:42                                         ` Po Lu
2022-01-02 18:47                                       ` [External] : " Drew Adams
2022-01-02 11:58                             ` Philip Kaludercic
2022-01-07 10:09                     ` Jean Louis
2022-01-02 18:47                   ` [External] : " Drew Adams
2022-01-02  9:41                 ` Po Lu
2022-01-02 17:18                   ` Yuan Fu
2022-01-02 18:47                     ` [External] : " Drew Adams
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 15:45                     ` [External] : " Drew Adams
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
  -- strict thread matches above, loose matches on Subject: below --
2022-01-02 15:46 Simon Pugnet
2022-01-02 17:26 Simon Pugnet
2022-01-02 18:49 ` Stefan Kangas

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.