Skip to content

Commit

Permalink
Merge remote-tracking branch 'bbatsov/master'
Browse files Browse the repository at this point in the history
* bbatsov/master: (149 commits)
  Add my Liberapay profile
  Add a module for F# programming (bbatsov#1334)
  Replace yank-pop key binding with counsel-yank-pop (bbatsov#1331)
  Change link to stackoveflow tag to emacs-prelude
  Fix diminishing company-mode
  Auto-install racket-mode if needed
  Update the changelog
  Tweak a bit the new modules
  [Fix bbatsov#1320] Remove company-lsp
  Add Racket module (bbatsov#1321)
  Lua module documentation
  Add Lua programming support
  Fix a couple of typos (bbatsov#1319)
  Bind all essential avy commands
  Release Prelude 1.1
  Use display-line-numbers for Emacs 26.1 and later
  [Fix bbatsov#1308] Remove ivy-prescient
  Ignore lsp-generated files
  Add var/ to gitignore
  [Docs] Add a note
  ...
  • Loading branch information
Bklyn committed Sep 5, 2021
2 parents 281599a + b42f067 commit 714050a
Show file tree
Hide file tree
Showing 90 changed files with 1,588 additions and 455 deletions.
7 changes: 7 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# These are supported funding model platforms

github: bbatsov
ko_fi: bbatsov
patreon: bbatsov
liberapay: bbatsov
custom: https://www.paypal.me/bbatsov
29 changes: 29 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
name: Bug Report
about: Report an issue with Emacs Prelude you've discovered.
---

*Use the template below when reporting bugs. Please, make sure that
you're running the latest Emacs Prelude and that the problem you're reporting
hasn't been reported (and potentially fixed) already.*

**Remove all of the placeholder text in your final report!**

## Expected behavior

## Actual behavior

## Steps to reproduce the problem

*This is extremely important! Providing us with a reliable way to reproduce
a problem will expedite its solution.*

## Environment & Version information

### Emacs version

*E.g. 24.5* (use <kbd>M-x emacs-version</kbd> to check it if unsure)

### Operating system

*E.g. Fedora 23, OS X 10.11 "El Capitan", Windows 10, etc*
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Feature Request
about: Suggest new Emacs Prelude features or improvements to existing features.
---

**Is your feature request related to a problem? Please describe.**

A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**

A clear and concise description of what you want to happen.

**Describe alternatives you've considered**

A clear and concise description of any alternative solutions or features you've considered.

**Additional context**

Add any other context or screenshots about the feature request here.
13 changes: 13 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
**Replace this placeholder text with a summary of the changes in your PR.
The more detailed you are, the better.**

-----------------

Before submitting the PR make sure the following things have been done (and denote this
by checking the relevant checkboxes):

- [ ] The commits are consistent with our [contribution guidelines](../blob/master/CONTRIBUTING.md)
- [ ] You've updated the [changelog](../blob/master/CHANGELOG.md) (if adding/changing user-visible functionality)
- [ ] You've updated the [user manual](../blob/master/doc) (if adding/changing user-visible functionality like modules, commands, configuration options, etc)

Thanks!
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,7 @@ network-security.data
prelude-cheatsheet.el
prelude-cheatsheet.aux
prelude-cheatsheet.log
transient/
var/
.cache/
.lsp-session*
57 changes: 57 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# Change log

## master (unreleased)

### New features

* Add a Racket module.
* Add a Lua module.
* Auto-install `racket-mode` if needed.
* Add a F# module.

### Changes

* Bind all essential `avy` commands to their recommended keybindings.
* Remove `company-lsp`.
* Replace `yank-pop` key-binding to `counse-yank-pop` for `ivy-mode`.

### Bugs fixed

* Fix `company` still being visible in the mode line.

## 1.1.0 (2021-02-14)

### New features

* Enable `nlinum-mode` or `display-line-numbers-mode` by default. Can be disabled by setting `prelude-minimalistic-ui` to `t`.
* Enable site-wide installation for Prelude.
* Auto-installs `julia-mode` if needed.
* Auto-install `adoc-mode` for AsciiDoc files.
* Add the `ag` package. It provides a nice alternative to `grep` and has nice Projectile integration.
* Added additional configuration modules for WSL (`prelude-wsl`) and Windows (`prelude-windows`).
* Add `prelude-selectrum` module. Selectrum a simpler alternative to `ivy-mode`.

### Changes

* [#1292](https://github.com/bbatsov/prelude/issues/1292): Add `prelude-python-mode-set-encoding-automatically` defcustom inn `prelude-python.el` module with nil default value.
* [#1278](https://github.com/bbatsov/prelude/issues/1278): Don't disable `menu-bar-mode` unless `prelude-minimalistic-ui` is enabled.
* [#1277](https://github.com/bbatsov/prelude/issues/1277): Make it possible to disable the creation of `Super`-based keybindings via `prelude-super-keybindings`.
* Removed deprecated alias `prelude-ensure-module-deps`.
* Remove `prelude-fullscreen`, as these days people can use `toggle-frame-fullscreen` instead. (it was introduced in Emacs 24.4)
* Removed `beacon-mode`.
* Added `transient/` to `.gitignore`.
* Fallback to `sample/prelude-modules.el` in the absence of a `prelude-modules.el` in one's personal folder.
* [Ruby] Don't auto-insert coding comments.
* Hide (via `diminish`) `editorconfig-mode`, `super-save`, `company`, `abbrev` and `ivy` in the modeline.
* Use `lsp-workspace-restart` function instead of deprecated `lsp-restart-workspace`.
* Bind all online search commands under `C-c C-/` to avoid a conflict with `counsel-git` or `magit-file-dispatch`.
* Bound `magit-file-mode` to `C-c g` (it's also bound to `C-c M-g` if you decide to utilize this keybinding for something else.
* Added `.cache/` and `lsp-session*` to `.gitignore`. These are generated by `lsp`.

### Bugs fixed

* [#1302](https://github.com/bbatsov/prelude/issues/1302): `C-a` should be bound to `org-beginning-of-line` in org-mode buffers.

## 1.0.0 (2020-09-15)

Initial "stable" release after 9 years of development.
17 changes: 10 additions & 7 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ try to follow these guidelines when you do so.

## Issue reporting

* Check that the issue has not already been reported.
* Check that the [issue has not already been reported][2].
* Check that the issue has not already been fixed in the latest code
(a.k.a. `master`).
* Be clear, concise and precise in your description of the problem.
Expand All @@ -17,15 +17,18 @@ try to follow these guidelines when you do so.

## Pull requests

* Read [how to properly contribute to open source projects on Github][2].
* Read [how to properly contribute to open source projects on GitHub][3].
* Use a topic branch to easily amend a pull request later, if necessary.
* Write [good commit messages][3].
* Write [good commit messages][4].
* Update the [changelog][5].
* Use the same coding conventions as the rest of the project.
* Verify your Emacs Lisp code with `checkdoc` (<kbd>C-c ? d</kbd>).
* Open a [pull request][4] that relates to *only* one subject with a clear title
* Open a [pull request][6] that relates to *only* one subject with a clear title
and description in grammatically correct, complete sentences.

[1]: https://github.com/bbatsov/prelude/issues
[2]: http://gun.io/blog/how-to-github-fork-branch-and-pull-request
[3]: http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html
[4]: https://help.github.com/articles/using-pull-requests
[2]: https://github.com/bbatsov/prelude/issues?q=is:issue
[3]: http://gun.io/blog/how-to-github-fork-branch-and-pull-request
[4]: http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html
[5]: https://github.com/bbatsov/prelude/blob/master/CHANGELOG.md
[6]: https://help.github.com/articles/using-pull-requests
90 changes: 75 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,54 +12,110 @@ configuration for Emacs newcomers and lots of additional power for
Emacs power users.

Prelude is compatible **ONLY with GNU Emacs 25.1+**. In general you're
advised to always run Prelude with the latest Emacs - currently
**26.1**.
advised to always run Prelude with the latest stable Emacs release.

You can support the development of Prelude via
[GitHub Sponsors](https://github.com/sponsors/bbatsov),
[ko-fi](https://ko-fi.com/bbatsov),
[PayPal](https://www.paypal.me/bbatsov) and
[Patreon](https://www.patreon.com/bbatsov).

## Features

* Improved UX, that's still in line with Emacs traditions
* Sane defaults of baseline Emacs functionality
* Automatic installation of many major programming modes on demand
* A curated set of 3rd party packages to enhance the base functionality
* Simple modular architecture
* Easy customization

Check out our [user manual](https://prelude.emacsredux.com) for more information.

## Fast Forward

Assuming you're using an Unix-like OS (`*BSD`, `GNU/Linux`, `macOS`, `Solaris`,
etc), you already have Emacs 24.4+ installed, as well as `git` & `curl` you
etc), you already have a recent version of Emacs installed, as well as `git` & `curl` you
can skip the whole manual and just type in your favorite shell the
following command:

```bash
curl -L https://git.io/epre | sh
```shellsession
$ curl -L https://git.io/epre | sh
```

You can now power up your Emacs, sit back and enjoy Prelude,
forgetting about the rest of this manual.
You can now power up your Emacs, sit back and enjoy Prelude.

There are two environment variables you can use to control the
source repository and the installation directory. To change the
installation directory:

```bash
export PRELUDE_INSTALL_DIR="$HOME/.emacs.d" && curl -L https://github.com/bbatsov/prelude/raw/master/utils/installer.sh | sh
```shellsession
$ export PRELUDE_INSTALL_DIR="$HOME/.emacs.d" && curl -L https://github.com/bbatsov/prelude/raw/master/utils/installer.sh | sh
```

To change the source repository:

```bash
export PRELUDE_URL="https://github.com/yourname/prelude.git" && curl -L https://github.com/bbatsov/prelude/raw/master/utils/installer.sh | sh
```shellsession
$ export PRELUDE_URL="https://github.com/yourname/prelude.git" && curl -L https://github.com/bbatsov/prelude/raw/master/utils/installer.sh | sh
```

Note that the installer will back up any existing `.emacs` file or
`.emacs.d` since it will unpack Prelude's code in `.emacs.d`. If
you're doing a manual install make sure you don't have a `.emacs` file
or back up your existing `.emacs.d` directory manually.

Don't forget to adjust your `prelude-modules.el` file in your personal directory
**Important:** Don't forget to adjust your `prelude-modules.el` file in your personal directory
once the installation is done. By default most of the modules
that ship with Prelude are not loaded.
that ship with Prelude are **not** loaded.

## Philosophy

Prelude's philosophy is quite simple:

* simple
* easy to understand and extend
* stable
* a foundation for you to build upon, as opposed to some end-user product

This means that it intentionally doesn't pack all the bells and whistles that it could.
Prelude aims to enhance the classic Emacs experience without deviating a lot from it - e.g.
it would never enable something like `evil-mode` (vim keybindings) by default and so on.

All the third-party packages that it bundles are carefully vetted and are known to be of
good quality and to have reliable maintainers. That generally means that Prelude's unlikely
to immediate adopt some shiny new package, that has established tried and true alternatives.

In practice this translates to the following:

* Prelude is less opinionated than distros like Spacemacs and Doom Emacs (meaning it's closer to the standard Emacs experience)
* Prelude installs relatively few additional packages by default
* Most modules in Prelude are opt-in instead of opt-out (you'll notice the default config enables only a handful of modules)
* Most modules (e.g. modules for programming languages) are pretty short and feature setup only for essential packages (in some cases that be just the major mode for the language in question)
* You don't really need to track Prelude's upstream - you're encouraged to just fork it and use it as the basis for your own configuration.

Remember that the ultimate goal of every Emacs user is to create an Emacs setup that reflects their own experience, needs, goals and ideas. Just like Lisp,
Emacs is nothing but a raw building material for the perfect editing experience.

More installation options are discussed [here](https://prelude.emacsredux.com/en/latest/installation/).

## User Manual

While Emacs Prelude is pretty simple at its core, it does have some specifics that
are worth learning - e.g. configuration options, load order of modules and personal settings
and so on.

Check out our [user manual](https://prelude.emacsredux.com) for more information.

You can also find a lot of information about specific Prelude features and the rationale behind them on
my Emacs blog [Emacs Redux](https://emacsredux.com).

## crux and super-save

A lot of utility commands that used to be part of Prelude were eventually extracted to the [crux](https://github.com/bbatsov/crux) package,
so they'd be easily available to more people.
These days Prelude simply depends on that package.

The [super-save](https://github.com/bbatsov/super-save) package also used to be part of Prelude in the past.

## Known issues

Check out the project's
Expand All @@ -85,7 +141,11 @@ development of Emacs Prelude.
Bug reports and suggestions for improvements are always
welcome. GitHub pull requests are even better! :-)

Cheers,<br/>
[Bozhidar](https://twitter.com/bbatsov)
## License

Copyright © 2011-2021 Bozhidar Batsov and
[contributors](https://github.com/bbatsov/prelude/contributors).

Distributed under the GNU General Public License, version 3

[badge-license]: https://img.shields.io/badge/license-GPL_3-green.svg
40 changes: 15 additions & 25 deletions core/prelude-core.el
Original file line number Diff line number Diff line change
@@ -1,17 +1,21 @@
;;; prelude-core.el --- Emacs Prelude: Core Prelude functions.
;;
;; Copyright © 2011-2018 Bozhidar Batsov
;; Copyright © 2011-2021 Bozhidar Batsov
;;
;; Author: Bozhidar Batsov <bozhidar@batsov.com>
;; URL: https://github.com/bbatsov/prelude
;; Version: 1.0.0
;; Keywords: convenience

;; This file is not part of GNU Emacs.

;;; Commentary:

;; Here are the definitions of most of the functions added by Prelude.
;; Here are the definitions of most of the general-purpose functions and
;; commands added by Prelude. Some modules define additional module-specific
;; functions and commands.
;;
;; Note that many of the original core Prelude commands were extracted to the
;; crux package (Prelude installs it automatically). Prelude's auto-save
;; functionality was extracted to the super-save package.

;;; License:

Expand All @@ -32,7 +36,6 @@

;;; Code:

(require 'thingatpt)
(require 'cl-lib)

(defun prelude-buffer-mode (buffer-or-name)
Expand Down Expand Up @@ -69,15 +72,15 @@ PROMPT sets the `read-string prompt."

(defvar prelude-tips
'("Press <C-c o> to open a file with external program."
"Press <C-c p f> to navigate a project's files with ido."
"Press <C-c p f> to navigate a project's files."
"Press <s-r> to open a recently visited file."
"Press <C-c p s g> to run grep on a project."
"Press <C-c p p> to switch between projects."
"Press <C-=> to expand the selected region."
"Press <C-c g> to search in Google."
"Press <C-c G> to search in GitHub."
"Press <C-c y> to search in YouTube."
"Press <C-c U> to search in DuckDuckGo."
"Press <C-c C-/ g> to search in Google."
"Press <C-c C-/ h> to search in GitHub."
"Press <C-c C-/ y> to search in YouTube."
"Press <C-c C-/ d> to search in DuckDuckGo."
"Press <C-c r> to rename the current buffer and the file it's visiting if any."
"Press <C-c t> to open a terminal in Emacs."
"Press <C-c k> to kill all the buffers, but the active one."
Expand All @@ -90,10 +93,9 @@ PROMPT sets the `read-string prompt."
"Press <C-Backspace> to kill a line backwards."
"Press <C-S-Backspace> or <s-k> to kill the whole line."
"Press <s-j> or <C-^> to join lines."
"Press <s-.> or <C-c j> to jump to the start of a word in any visible window."
"Press <f11> to toggle fullscreen mode."
"Press <s-.> or <C-c v> to jump to the start of a word in any visible window."
"Press <f12> to toggle the menu bar."
"Explore the Tools->Prelude menu to find out about some of Prelude extensions to Emacs."
"Explore the Prelude menu to find out about some of Prelude extensions to Emacs."
"Access the official Emacs manual by pressing <C-h r>."))

(defun prelude-tip-of-the-day ()
Expand Down Expand Up @@ -141,18 +143,6 @@ With a prefix ARG updates all installed packages."
(epl-installed-packages))))
(message "Update finished. Restart Emacs to complete the process.")))

;;; Emacs in macOS already has fullscreen support
;;; Emacs has a similar built-in command in 24.4
(defun prelude-fullscreen ()
"Make Emacs window fullscreen.
This follows freedesktop standards, should work in X servers."
(interactive)
(if (eq window-system 'x)
(x-send-client-message nil 0 nil "_NET_WM_STATE" 32
'(2 "_NET_WM_STATE_FULLSCREEN" 0))
(error "Only X server is supported")))

(defun prelude-wrap-with (s)
"Create a wrapper function for smartparens using S."
`(lambda (&optional arg)
Expand Down
Loading

0 comments on commit 714050a

Please sign in to comment.