unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Yuan Fu <casouri@gmail.com>
To: Philip Kaludercic <philipk@posteo.net>
Cc: "Colin Baxter" <m43cap@yandex.com>,
	help-gnu-emacs <help-gnu-emacs@gnu.org>,
	"Kévin Le Gouguec" <kevin.legouguec@gmail.com>
Subject: Re: Someone start maintaining luddites.el
Date: Fri, 31 Dec 2021 13:49:35 -0800	[thread overview]
Message-ID: <2D585CA7-FE93-4A4F-9ABA-DD1D37E007ED@gmail.com> (raw)
In-Reply-To: <874k6rhc3p.fsf@posteo.net>

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



> On Dec 29, 2021, at 3:41 AM, Philip Kaludercic <philipk@posteo.net> wrote:
> 
> Fu Yuan <casouri@gmail.com> writes:
> 
>>> 在 2021年12月28日,上午11:37,Teemu Likonen <tlikonen@iki.fi> 写道:
>>> 
>>> * 2021-12-28 07:32:14+0000, Colin Baxter wrote:
>>> 
>>>> I agree. I personally don't like having to alter my ~/.emacs just to
>>>> stay the same. I think it should be the other way round - but what do
>>>> I know?
>>> 
>>> Maybe don't ask other people (Emacs developers) to do things for you.
>>> Create and maintain an Emacs package which keeps current and future
>>> Emacses just like "in the old days." The package wouldn't do much, just
>>> gradually add configuration options which disable everything new. I
>>> wouldn't use it myself but I think some/many people would be grateful.
>>> Name it luddites.el, or something.
>>> 
>> I think similar thing has been brought up when we were discussing
>> changing defaults in new Emacs, but I don’t remember the
>> conclusion. Were there any problems with it, is anyoneworking on that?
> 
> I started working on something like this a few months back, and it
> should be possible.  The had part it tracking down all the changes.

I think one only needs to go over the NEWS before each release and add changed defaults. Emacs doesn’t change default values very often, most of the change in NEWS are additions.

It’s good to hear you are working on this! Maybe my version could provide a different angle or some news ideas to you:


[-- Attachment #2: old-defaults.el --]
[-- Type: application/octet-stream, Size: 2864 bytes --]

;;; old-defaults.el --- Get off my lawn!!  -*- lexical-binding: t; -*-

;; Author: Yuan Fu <casouri@gmail.com>

;;; This file is NOT part of GNU Emacs

;;; Commentary:
;;
;; We use custom themes to implement this because 1) this way we don’t
;; reinvent the wheels and 2) we don’t need advanced features like
;; choosing what variables to not revert or only revert variables or
;; faces.

;;; Code:


(defvar old-defaults--changelog
  '((emacs-28
     :variable
     ((kill-ring-max 60 t)
      (gnus-treat-fold-headers nil))
     :face
     ((mode-line-inactive (:inherit mode-line) t "In Emacs 29.1, mode-line defaults to proportion font, this setting sets it back to monospace")
      (mode-line-active (:inherit mode-line) t "In Emacs 29.1, mode-line defaults to proportion font, this setting sets it back to monospace")
      (gnus-header (:inherit 'unspecified) t "In Emacs 29.1, gnus-header-* defaults to proportion font, this setting sets them back to monospace"))))
  "Stores old default values.
An alist of (EMACS-VERSION . SETTINGS) where EMACS-VERSION is a
symbol representing a particular version and SETTINGS is a plist
(:variable VARIABLES :face FACES). VARIABLES is a list of custom
variable forms suitable for ‘custom-theme-set-variables’ and
FACES is a list of face forms suitable for
‘custom-theme-set-faces’.

The alist should be ordered in ascending release time, i.e., the
oldest release at the front.")

(defmacro old-defaults-deftheme (version)
  "Define the theme that restores defaults to VERSION.
VERSION is a version symbol that appears in
‘old-defaults--changelog’."
  (when-let* ((theme-name (intern (format "old-defaults-%s" version)))
              (changes-needed
               (cl-loop for change in old-defaults--changelog
                        for idx = 0 then (1+ idx)
                        if (eq (car change) version)
                        return (cl-subseq old-defaults--changelog
                                          0 (1+ idx))))
              ;; CHANGES-NEEDED looks like ((emacs-28 . SETTINGS)
              ;; (emacs-29 . SETTINGS) ...).
              (var-changes-needed
               (cl-loop for change in changes-needed
                        append (plist-get (cdr change) :variable)))
              (face-changes-needed
               (cl-loop for change in changes-needed
                        append (plist-get (cdr change) :face))))
    `(progn
       (deftheme ,theme-name
         ,(format "Restore variable and face defaults to %s" version))
       (custom-theme-set-variables
        ',theme-name
        ,@var-changes-needed)
       (custom-theme-set-faces
        ',theme-name
        ,@face-changes-needed)
       (provide-theme ',theme-name))))

(provide 'old-defaults)

;;; old-defaults.el ends here

[-- Attachment #3: Type: text/plain, Size: 6 bytes --]



Yuan

  reply	other threads:[~2021-12-31 21:49 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-27 18:19 Kill all proportional fonts! Colin Baxter 😺
2021-12-27 18:34 ` Eli Zaretskii
2021-12-28  6:21   ` Colin Baxter 😺
2021-12-27 19:59 ` Kévin Le Gouguec
2021-12-28  6:25   ` Colin Baxter 😺
2021-12-28  7:32   ` Colin Baxter 😺
2021-12-28  7:51     ` tomas
2021-12-28  8:00       ` Po Lu
2021-12-28  8:31         ` tomas
2021-12-28  9:38           ` Po Lu
2021-12-28 10:13             ` tomas
2021-12-28 19:02             ` Stefan Monnier via Users list for the GNU Emacs text editor
2021-12-28 19:35     ` Someone start maintaining luddites.el Teemu Likonen
2021-12-28 19:45       ` Colin Baxter 😺
2021-12-28 22:44       ` Fu Yuan
2021-12-28 23:40         ` Stefan Monnier via Users list for the GNU Emacs text editor
2021-12-29  0:58           ` Fu Yuan
2021-12-29  4:48             ` Stefan Monnier via Users list for the GNU Emacs text editor
2021-12-29  6:13             ` Po Lu
2021-12-29  6:51               ` Yuan Fu
2021-12-29  7:05                 ` Po Lu
2021-12-29  8:06                   ` Yuan Fu
2021-12-29  9:19                     ` Po Lu
2021-12-31 22:00                       ` Yuan Fu
2022-01-01  0:05                         ` Po Lu
2021-12-29 11:41         ` Philip Kaludercic
2021-12-31 21:49           ` Yuan Fu [this message]
2021-12-31 15:03     ` Kill all proportional fonts! Ken Goldman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2D585CA7-FE93-4A4F-9ABA-DD1D37E007ED@gmail.com \
    --to=casouri@gmail.com \
    --cc=help-gnu-emacs@gnu.org \
    --cc=kevin.legouguec@gmail.com \
    --cc=m43cap@yandex.com \
    --cc=philipk@posteo.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).