Giter Site home page Giter Site logo

crafted-emacs's People

Contributors

anders-hig-jackson avatar bacchist avatar bryce-carson avatar cerebus avatar cfclavijo avatar daviwil avatar gan-ainm avatar gavinok avatar ingorichter avatar itoshkov avatar japhir avatar jeastman avatar jeffbowman avatar jf avatar johnhamelink avatar julientant avatar jvdydev avatar lucastavaresa avatar mattmc3 avatar mgmarlow avatar monora avatar petervlk avatar ptillemans avatar saccarosium avatar stask avatar sthesing avatar telenieko avatar thibautbenjamin avatar ulthuan avatar vaidyafamily avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

crafted-emacs's Issues

make doom-modeline optional

im playing around with powerline and similar packages and as far as i understand it is much closer to vanilla emacs modeline while allowing for lots of customization

im also thinking about playing around with telephone-line which seems to do ruffly the same

Define customization group

There needs to be a defgroup for the rational customize group somewhere to link the custom variables into.

I was thinking something along the lines of the following:

(defgroup 'rational
    "A sensible starting point for hacking your own Emacs configuration."
    :group 'emacs)

The problem is that we need some place to define this which is guaranteed to be loaded. A discussion of this common source is also discussed in #59.

add rational-speedbar.el, a good filetree that comes built-in to emacs

I have been working on a 'rational-speedbar.el' module for a while and it seems stable enough to merge into main
https://gitlab.com/Erik.Lundstedt/rational-speedbar/-/tree/main

about

speedbar is the filetree that comes builtin to emacs, it is easy to use,light-weight and has fair integreation with many parts of vanilla emacs

what I have done is that i have added some useful (evil only/evil-friendly)keybindings and added a lot of extensions to the list of supported extensions

I have also set it to NOT show the icons as they are really ugly(in my opinion)

I currently dont set it to start on emacs start as that should be up to the user in my opinion

in general, I have set up some sane/rational defaults that shouldnt interfear with the user

feel free to give ideas on how I can improve the module before I create a PR

Better support for long lines

The bidi settings since some people do need bidirectional support but that's pretty rare. Either way the global-so-long-mode is a must. Basically it turns off features that would have stopped Emacs in it's tracks whenever long lines are detected.

  (setq-default bidi-paragraph-direction 'left-to-right)
  (when (version<= "27.1" emacs-version)
    (setq bidi-inhibit-bpa t)
    (global-so-long-mode 1))

Wrong number of arguments error

I updated the repo today and i started getting these errors:

Warning (initialization): An error occurred while loading ‘/Users/shivashankar/.emacs.d/init.el’:

Wrong number of arguments: (3 . 4), 2

To ensure normal operation, you should investigate and remove the
cause of the error in your initialization file.  Start Emacs with
the ‘--debug-init’ option to view a complete error backtrace. Disable showing Disable logging

Emacs started with --debug-init

Debugger entered--Lisp error: (wrong-number-of-arguments (3 . 4) 2)
  #f(compiled-function (obsolete-name current-name when &optional docstring) "Set OBSOLETE-NAME's function definition to CURRENT-NAME and mark it obsolete.\n\n(define-obsolete-function-alias \\='old-fun \\='new-fun \"28.1\" \"old-fun's doc.\")\n\nis equivalent to the following two lines of code:\n\n(defalias \\='old-fun \\='new-fun \"old-fun's doc.\")\n(make-obsolete \\='old-fun \\='new-fun \"28.1\")\n\nWHEN should be a string indicating when the function was first\nmade obsolete, for example a date or a release number.\n\nSee the docstrings of `defalias' and `make-obsolete' for more details." #<bytecode 0x155f967e7527c3d7>)('evil-ex-shell-command-completion-at-point 'comint-completion-at-point)
  (define-obsolete-function-alias 'evil-ex-shell-command-completion-at-point 'comint-completion-at-point)
  load-with-code-conversion("/Users/shivashankar/.config/rational-emacs/elpa/ev..." "/Users/shivashankar/.config/rational-emacs/elpa/ev..." nil t)
  require(evil-ex)
  load-with-code-conversion("/Users/shivashankar/.config/rational-emacs/elpa/ev..." "/Users/shivashankar/.config/rational-emacs/elpa/ev..." nil t)
  require(evil-search)
  load-with-code-conversion("/Users/shivashankar/.config/rational-emacs/elpa/ev..." "/Users/shivashankar/.config/rational-emacs/elpa/ev..." nil t)
  require(evil)
  load-with-code-conversion("/Users/shivashankar/.config/rational-emacs/modules..." "/Users/shivashankar/.config/rational-emacs/modules..." nil t)
  require(rational-evil)
  load-with-code-conversion("/Users/shivashankar/.config/rational-emacs/rationa..." "/Users/shivashankar/.config/rational-emacs/rationa..." nil t)
  load("/Users/shivashankar/.config/rational-emacs/rationa..." nil nomessage)
  (progn (load rational-config-file nil 'nomessage))
  (if (file-exists-p rational-config-file) (progn (load rational-config-file nil 'nomessage)))
  load-with-code-conversion("/Users/shivashankar/.config/rational-emacs/init.el" "/Users/shivashankar/.config/rational-emacs/init.el" t t)
  load("/Users/shivashankar/.config/rational-emacs/init.el" t t)
  (let ((init-file (expand-file-name "init.el" user-emacs-directory))) (setq package-user-dir (expand-file-name "elpa" user-emacs-directory)) (load init-file t t) (let ((chemacs-custom-file (chemacs-profile-get 'custom-file init-file))) (if (not custom-file) (progn (setq custom-file chemacs-custom-file) (if (equal custom-file init-file) nil (if (file-exists-p custom-file) nil (let (...) (save-current-buffer ... ...))) (load custom-file))))))
  chemacs-load-user-init()
  load-with-code-conversion("/Users/shivashankar/.emacs.d/init.el" "/Users/shivashankar/.emacs.d/init.el" t t)
  load("/Users/shivashankar/.emacs.d/init" noerror nomessage)
  startup--load-user-init-file(#f(compiled-function () #<bytecode -0x14b3b660489bcc7>) #f(compiled-function () #<bytecode -0x1f3c686ddc0d6275>) t)
  command-line()
  normal-top-level()

I am using Emacs 28.1 with native compilation and chemacs2.

add move-text-internal and keybindings from the-efs-config(i think thats where i got it)

this is what i had in my config that was based on emacs-from-scratch

(defun move-text-internal (arg)
  (cond
   ((and mark-active transient-mark-mode)
    (if (> (point) (mark))
        (exchange-point-and-mark))
    (let ((column (current-column))
          (text (delete-and-extract-region (point) (mark))))
      (forward-line arg)
      (move-to-column column t)
      (set-mark (point))
      (insert text)
      (exchange-point-and-mark)
      (setq deactivate-mark nil)))
   (t
    (beginning-of-line)
    (when (or (> arg 0) (not (bobp)))
      (forward-line)
      (when (or (< arg 0) (not (eobp)))
        (transpose-lines arg))
      (forward-line -1)))))

(defun move-text-down (arg)
  "Move region (transient-mark-mode active) or current line
   arg lines down."
  (interactive "*p")
  (move-text-internal arg))

(defun move-text-up (arg)
  "Move region (transient-mark-mode active) or current line
   arg lines up."
  (interactive "*p")
  (move-text-internal (- arg)))

(global-set-key [\M-\S-down] 'move-text-down)
(global-set-key [\M-\S-up] 'move-text-up)

make relative linenumbers an easy option

at the moment, in rational-ui, it forcefully sets linenumbers to either on or off, I cant find any whay to make it display relative linenumbers other than manually running mx (menu-bar-something-display-linunumbers-relative) every time I start emacs

i might have missed something but it looks like the setting is currently a boolean while the place it is used takes one of 3 values where 'relative is included

maybe add a relative option here:

(defun rational-ui--enable-line-numbers-mode ()
  "Turn on line numbers mode.
Used as hook for modes which should display line numbers."
  (display-line-numbers-mode 1))

(defun rational-ui--disable-line-numbers-mode ()
  "Turn off line numbers mode.
Used as hook for modes which should not display line numebrs."
  (display-line-numbers-mode -1))

Add a usage disclaimer in README.org

This project is receiving a lot of excellent PRs! Since we're still in the early phases of figuring out the right way to structure everything, it'd probably be worthwhile to add a disclaimer to let potential users know that this config could break for them on their next pull due to things changing quickly.

We shouldn't discourage people from trying the configuration, though!

Where do writing modes like LaTeX, Markdown (others) belong

The discussion on #123 diverged from the intent of that PR, but there are some good thoughts for discussion. This issue is to capture those ideas and possibly come to a consensus on a rationa-??? module

Summary of concepts:

  • #123 configured LaTeX mode to use eglot to enable the use of the LSP available for that markup.
  • @bdarcus suggested it needed its own module
  • @jeffbowman suggested a rational-writing module to host the configuration for blog writing, olivetti, LaTeX, etc
  • @bdarcus reminded of markdown mode and suggested org mode is more widely used for writing.

Perhaps we can continue the discussion from there

Follow Emacs guidelines/best practices in documentation/modules

As per (info "(elisp) Tips for Documentation Strings"), the function documentations should use the imperative verb forms:

For consistency, phrase the verb in the first sentence of a function’s documentation string as an imperative—for instance, use “Return the cons of A and B.” in preference to “Returns the cons of A and B.”

For example, within rational-updates.el, the documentation for rational-updates-check-for-latest might be changed into:

 (defun rational-updates-check-for-latest ()
-   "Fetches the latest Rational Emacs commits from GitHub and
- notifies you if there are any updates."
+   "Fetch the latest Rational Emacs commits. Show changes if there are any."

There are also many more tips in the given info page. We might consider checkdoc and/or package-lint in the CI.

Better example content in README.org and example-config.el

Creating this issue to continue the discussion started in #53 so it is more visible and not lost.

Example configuration(s) should show use of each custom variable and proper use of the features in each module. We should take special care in looking at the order in which things are required in the examples. While the desire is to have each module independent, there are some dependencies (maybe need another issue to tackle that).

I would suggest example-config.el contain the most basic configuration and the README.org (or supplemental documentation) contain variations and more targeted configuration examples. This will give users a basic starting point and documentation from which they can pick and choose what to include in their own configuration. This would also help with the "Helps you learn Emacs Lisp" goal of the project by not simply providing a mostly-complete example configuration.

rational-ui-default-font handling is broken

The following code in rational-ui does not work as intended.

(defcustom rational-ui-default-font nil
  "The configuration of the `default' face.
Use a plist with the same key names as accepted by `set-face-attribute'.")

(when rational-ui-default-font
  (apply 'set-face-attribute 'default nil (cons :font rational-ui-default-font)))

The custom variable expects a plist with keys from the value expected by set-face-attribute, but the code uses 'cons' with that value and :font.

Evaluating it looks something like:

(custom-set-variables '(rational-ui-default-font '(:font "JetBrains Mono" :weight 'light :height 185)))
(cons :font rational-ui-default-font)
==> (:font :font "JetBrains Mono" :weight 'light :height 185)

Which is not what I think was intended.

Unclear if the intention was to only set the :font value or if the entire plist was to be applied.

Additionally, this value would need to be set before rational-ui.el is loaded, or it will never set the actual value. A :set should be added to the defcustom to ensure the default font is updated any time the rational-ui-default-font value is updated.

Strange theme, ui, font coloring

After PR #87 , the coloring and display changed a bit (not to my particular liking) and I'm wondering what would be the best approach (a "rational" way) to having the previous display. Is this a OS X thing? Should I be setting a particular bg color in early-config.el or something else?

Before it was looking like this:
image

It is currently looking like this (black strips on the sides and a deep blue color for the buffer's name):
image

Why have rational-use-package?

Just wondering why have the rational-use-package module? Given the decision to use straight.el rather than package.el, I don't understand why we also have rational-use-package.el, which will use package.el to install packages instead of just doing

(straight-use-package 'use-package)
(setq straight-use-package-by-default t)

which enables the use of use-package, but without the addition of a second package management framework. Is there something I'm missing here?

Skeleton autoinsert template is active on all `.el` files

Whenever I open a new .el file emacs offers to "Perform Rational Emacs Lisp Skeleton auto-insertion? (y or n)".

But as I understand the form for autoinsertion, it seems to be offering it only on files wich names starts with "rational-" and ends in ".el", not only the latter.

I still can choose to not accept the offering, but I wonder if it would interfer if some one wants his/hers own auto insertion forms.

Any way — Is this the intended behaviour for this skeleton, or is this a bug?

Avoid changing emacs default keybindings while making modules

We should not change the default keybindings of emacs while making rational modules.
e.g., C-u which default for using arguments in emacs commands is changed in this line
https://github.com/SystemCrafters/rational-emacs/blob/cd2a9bc31310fd502e51a52da0d499a1da86f712/modules/rational-evil.el#L30
I am also evil user but never changed this keybinding for evil usage.
Users can make these changes in keybindings in their rational emacs config file. It should be philosophy while making other modules also.

set eln-cache depending on emacs version

Right now the setting of eln-cache is

 ;; Set the right directory to store the native compilation cache
  (add-to-list 'native-comp-eln-load-path (expand-file-name "eln-cache/" user-emacs-directory)))

This is the default. But should the user decide to change the location it won't work properly on emacs 29. Instead you need to use the new function startup-redirect-eln-cache. You can see the report from this bug report and the related stack exchange discussion. So I recommend putting something like the following instead:

;; Put eln-cache dir in cache directory
;; NOTE the method for setting the eln-cache dir depends on the emacs version
(when (fboundp 'startup-redirect-eln-cache)
  (if (version< emacs-version "29")
      (add-to-list 'native-comp-eln-load-path (concat "path/to/etc/dir" "eln-cache/"))
    (startup-redirect-eln-cache (concat "path/to/etc/dir" "eln-cache/"))))

Have a way to check if a package is installed

In order to provide rational-emacs as much flexibility as possible, we need to find a way to test if a package is installed even if the package is not currently loaded.

Examples of use case:

  • create a generic key binding configuration that depends on the package being installed.
  • setting some extra configuration when two packages are installed and can work together with some configuraiton.

I tried using emacs's featurep but it does not detect installed packages that are not loaded (as in explicitly or require'd by a another package).

Keeping in mind that packages can be installed through straight or through the user's package manager (GNU Guix, nix, pacman/aur, apt...)

emacs might already have an existing function for this.

For context: #16

Provide rational windows feature error while emacs 27.2 lauch

entered--Lisp error: (error "Loading file /Users/sample/.config/emacs/rational-emacs/modules/rational-windows.el failed to provide feature ‘rational-windows’"

Faced this error in Emacs 27.2 on MacOSX

Fixed by adding the following line at the bottom of the rational-windows.el

(provide 'rational-windows)

theme and font settings don't work starting emacs as a daemon

I tried to set my theme (prot's one) and font (iosevka) as raccomended in the README file.
It works fine starting emacs normally, but if I start emacs as daemon (or with systemd) and than I create a new frame with emacsclient -c it has the blueish default theme and another font.

mention minimum version of emacs in readme

I tried the config with 26.3 in ubuntu 20.04 LTS but it had the following issues

Provide org-mode files as optional for the users

For example "rational-ui.org" for "rational-ui.el".

The process of generating the org-file from the emacs-lisp sources could be automated with a simlpe script. May be something like:

#!/bin/sh

title="$(basename $1 .el)"

printf "#+title: %s\n" "$title"
printf "#+property: header-args:emacs-lisp: :tangle (expand-file-name \"%s\" rational-config-path) :mkdirp yes :comments none :results output silent :noweb yes :shebang \";;; %s -*- lexical-bindings:t -*-\"" "$1" "$1"
printf "\n\n#+begin_src emacs-lisp\n;;; %s -*- lexical-binding:t -*-\n"
sed -e "s/^;;;\s*\(.*\)\s*$/\n;; * \1/" "$1"| sed -e "/^\s*$/d" | sed "s/^\s*;; \(.*\)\s*$/#+end_src\n\n\1\n\n#+begin_src emacs-lisp/"
printf "#+end_src\n"

This could be triggered on push to the gh repo (like with the site generation).

what do everyone here think about adding a leader-key i.e using general.el or similar

I have is in my own config and im thinking it might be nice to have a global way to define keys etc

i myself use "SPC" as i started out using doom-emacs but that could be configurable,right?

it would be great to be able to do something like

I guess we would want some whay to have module-specific first-keys(f in this example)

(when rational-leader-enabled
    (rational/general-keys 'relevant-mode-here
    ;;some keybind definitions here
    "f b b" (some-action-here :which-key "this is optional" )
    )
)

Should `rational-completion.el` be named `rational-minibuffer-selection.el` instead?

Completion may be confusing in the general sense. Corfu/Company/et. al. seem to be associated with the concept of completion, while Vertico/Orderless/et. al. seem to be associated with the concept of minibuffer selection or filtering. I think more people think of completion from the IDE perspective ala function/variable filtering, live templates, etc.

Thoughts? Maybe it's good enough as it is?

(rational-ui) All-the-icons in doom-modeline not rendering on Windows

I installed Emacs on the Windows computer at my workplace (just to play with it in case of downtime) and after loading rational-emacs noticed that the icons in doom-modeline were not rendering. Probably encoding...

Maybe setting all the variables might help, can't test this right now.

;; UTF-8
(setq locale-coding-system 'utf-8)
(set-terminal-coding-system 'utf-8)
(set-keyboard-coding-system 'utf-8)
(set-selection-coding-system 'utf-8)
(prefer-coding-system 'utf-8)

Request: Add Issue templates

Given the influx of issues lately, I believe that proper GitHub issue templates provide a more coherent experience for both the issue handlers as well as the issue writers.

rational ide module

I think the prime purpose of emacs is to use it as a modern IDE. It would greatly help the community if this project could provide a minimal module like a framework for different programming languages by integrating eglot (or lsp), yaspinnet, company mode, and flymake.

Doom Emacs and Spacemacs already try to do it using layering. However, it is still confusing, and snippets from these projects can't be integrated into user configs easily, which is the best part of the rational emacs project.

Customization variables in `custom.el` are overwritten

The work in #112 introduced a bug that overwrites the customization variables saved to custom.el by the Customizaiton UI. Further,

The rational-load-custom-file function documentation (quoted below),

Load the custom-file after saving customized values. Customized values set during the initialization process are saved, other values set through the Customization UI or via certain workflows are not lost in this process. The custom-file is loaded last.

implies that the variables customized by early-init.el and init.el are saved to custom.el, which does not appear to be the case. The function (customize-save-customized) eventually calls custom-save-delete before reinserting the form into custom.el. As the values are customized outside of custom, they are not saved and are in fact deleted, along with any values set and saved into custom.el by the Customization UI, as this deletion of the saved contents of custom.el occurs every initialization, exactly when we are trying to load previously customized variables.

I haven't understood why, but my incoming refactor does allow the customizations set outside of custom by early-init.el and init.el to persist in custom-file, along with customizations applied with the UI. As far am able to understand, the culprit is custom-save-customized calling custom-save-delete eventually.

I read most of the discussion around customization, and I'm in agreement with most things. One thing, however, is that I don't think we need a dedicated function to load the custom file. In my refactor I inlined the function into a lambda in the load call.

Using Rational has made me learn more about Emacs, mostly Customization UI ironically, even though the project isn't urging people to use it. I ended up using it a decent bit because it was a nice way to explore the Rational customization group without focusing on implementation; it was also how I learned to customize the fringe face, which I protected in code in my config.el until I wrote the refactor and fixed the regression.

🤷🏼 I'm not sure what Rational is going to do going forward, but I'm fairly sure I've fixed this.

use-short-answer vs. y-or-n-p

Emacs 28.1 has the variable use-short-answers which can be used. This could be used instead of resetting yes-or-no-p know this is a newer feature, but it may be a good idea to begin using the facilities provided by Emacs.

To be backward compatible, you will still need to test for the presence of the variable.

(if (boundp 'use-short-answers)
    (setq use-short-answers t)
  (fset 'yes-or-no-p 'y-or-n-p))

Don't use advice-add or defadvice

Although a very useful feature when no other option is available, the general advice from Emacs developers is to avoid advice-add or the older defadvice forms. In addition to contributing to some subtle bugs and obscuring the code, these forms also don't work well with lexical binding.

In the rational-defaults.el module, we have the following

(if (boundp 'use-short-answers)
    (setq use-short-answers t)
  (advice-add 'yes-or-no-p :override #'y-or-n-p))

The advice-add can easily be replaced with

(if (boundp 'use-short-answers)
    (setq use-short-answers t)
  (fset 'yes-or-no-p 'y-or-n-p))

Need for additional style guide - Use of free variables, unknown functions

I believe we are need of an additional style guide specific to Rational Emacs, which builds upon The Emacs Lisp Style Guide.

One item in particular is the use of dynamically bound variables (warned by the compiler as free-variable). Since we are forcing lexical binding (with the -*- lexical-binding: t; -*- directive), the use of dynamically bound variables would actually be considered an error as opposed to a warning. Since this is typically does not effect the end result (Emacs still works), I consider it more of a style issue than anything else.

The solution would be to use (defvar somevar) any place a dynamically bound variable (named somevar) is used.

An example from early-init.el would be:

(when (featurep 'native-compile)
  ;; Silence compiler warnings as they can be pretty disruptive
  (setq native-comp-async-report-warnings-errors nil)
  ...)

Where native-comp-async-report-warings-errors is dynamically bound.

I'm suggesting the adoption of a style where one would do the following:

(when (featurep 'native-compile)
  ;; Silence compiler warnings as they can be pretty disruptive
  (defvar native-comp-async-report-warnings-errors)
  (setq native-comp-async-report-warnings-errors nil)
  ...)

Another area where I think it would be proper to adopt a style is in the ensuring functions are declared in the context they are used. This could be handled by ensuring the appropriate module is required in the context, or providing a declare-function statement before the function is used if it could be assumed to compiler would know about it ahead of time.

An example here would be the use of straight-use-package. Assuming that we expect the Rational Emacs initialization to have occurred (which ensures the straight module is available), either a 'require' should be added:

(require 'straight)
...
(straight-use-package 'something)
....

Or the 'declare-function' could be used:

(declare-function straight-use-package "straight" (MELPA-STYLE-RECIPE &optional NO-CLONE NO-BUILD CAUSE INTERACTIVE))
...
(straight-use-package 'something)
...

I understand that Emacs is robust enough for this to "not matter", in the sense that "things will work" without this overhead. However there appears to be a mix of styles with regards to this and I think it would make sense for the project to define the style which should be used in order to provide some consistency.

Documentation for modules

I have created a docs/ folder with an org file and a generated info file for providing documentation.

Need help with documenting modules, see the docs/CONTRIBUTING.org. If you want to help, a PR is greatly appreciated!

craftedv2beta

Updated to the current focus (craftedv2beta)

  • crafted-completion (PR #331)
  • crafted-defaults (PR #345)
  • crafted-emacs-home (removed as of commit 5249c30)
  • crafted-evil (#344)
  • crafted-ide (PR #339)
  • crafted-lisp (PR #296)
  • crafted-org (PR #285)
  • crafted-osx (commit 9280530)
  • crafted-screencast (PR #303)
  • crafted-speedbar (PR #351)
  • crafted-startup (PR #341)
  • crafted-ui (PR #336)
  • crafted-updates (PR #340)
  • crafted-workspaces (PR #338)
  • crafted-writing (PR #329)

Note:

  • crafted-init and crafted-early-init omitted as they are covered by the getting-started-guide.org file.
  • crafted-package omitted as it's covered by the section on alternative package managers.

RC1

  • Transition Guide (PR #377)
  • Modules contributing guide (PR #384)

No command history in evil-mode from previous session

When typing : to start a command after starting emacs i get no command history to scroll through from the previous session.
Message Buffer says
previous-matching-history-element: No earlier matching history item

I do get a history of commands from the current session, but after a fresh emacs start it's empty.

Configuring Rational Emacs and what to use example code in `example-config.el` or `example-early-config.el` for.

A suggestion is that we should use customize variables with defcustom (perhaps in a group "Rational Emacs") where users can turn features on and off to their liking. Then beginners can use Options menu to control Rational Emacs behaviour.

It would also be good to have some example code in those example*-config.el files. There users then later can comment out or remove configurations to turn features on and off. And then code can be comment out for easy configuration.

Many things can be easy to turn off later, others are not that straight forward. Specially when there are no code to show how that can be done. Some features are also good to have on to show how Emacs can work, and users can easy turn them of later. It is also a way of "trick" beginners to tinker and code some Elisp. Especially if we are careful about how we code.

I think this will give flexibility and make it easy to configure for users. Both through Options and "Gui", and through set variables and write some elisp code. And make it easy for users adopt Rational Emacs to their own needs.

No HOME environment variable on Windows

The code that sets the rational-config-path in early-init.elassumes that there is a HOME-variable. But on Windows this is not true, there is no variable HOME by default.

Emacs looks for it's config in APPDATA and the user home is in USERPROFILE.
Now one can set the environment variable HOME to USERPROFILE, which is also recommended.

So on Windows the early-init should look for a HOME variable and use that. If it doesn't exist it should use APPDATA.

I'm not sure why rational-emacs has to be installed in specific locations and not just use the user-emacs-directory. But that may be by design.

Custom file

I was wondering what the rationale is for not loading the custom file if present. The Readme goes as far as claiming that “If you choose to follow this pattern [writing the config by hand], you will not need to load the custom.el file ever”. AFAICS this is not true, because some packages use custom-set-variables to store persistent information. This includes, to mention only built-ins:

  • Variables marked as safe to execute
  • Org agenda files
  • List of manually installed packages (as opposed to dependencies) with package.el
  • Suppressed warnings (warning-suppress-types).

I'm particularly curious about safe-local-variable-values. So one is just not able to permanently mark a dir-local variable as safe with this config?

Keycast in doom modeline - keycast-mode: Cannot turn on keycast-mode. mode-line-misc-info not found in mode-line-format. Try customizing keycast-mode-line-insert-after.

Problem

After trying out rational emacs and porting my config (which is from emacs from scratch series, very good for learning emacs elisp etc. ) I noticed that I was missing keycast pressed keys and actions in my new (doom) modeline.

Solution

After investigating I found out that I am using older version in my old config and my already present workaround for doom modeline is not working, but there is updated solution in the same issue where I found my previous answer.

Reference:

tarsius/keycast#7 (comment)

(with-eval-after-load 'keycast
  (define-minor-mode keycast-mode
    "Show current command and its key binding in the mode line."
    :global t
    (if keycast-mode
        (add-hook 'pre-command-hook 'keycast--update t)
      (remove-hook 'pre-command-hook 'keycast--update)))

  (add-to-list 'global-mode-string '("" keycast-mode-line)))
(keycast-mode)

I would suggest to add the solution from kecast github to rational-screencast.el, probably dependent on the value of rational-ui-use-doom-modeline from PR 45

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.