Commit Graph

205 Commits

Author SHA1 Message Date
syl20bnr 86b4e6f76b core: move point before [ S P A C E M A C S ] at startup
Avoid having multiple "Open quick help..." in the minibuffer at startup.
2018-06-10 03:05:35 -04:00
syl20bnr ac247396f3 core: avoid unecessary output in message buffer at startup
Unless in debug mode.
2018-06-10 02:49:51 -04:00
syl20bnr a0a3ff0c20 core: refactor the progress bar
Spacemacs is slow to startup so better give it a not buggy progress bar :-)

* Move progress bar code to core-progress-bar.el file
* Remove the counters at the end of the progress bar
* Fix update of the progress bar value
* Fix progress bar size when staring Emacs maximized
2018-06-10 02:32:29 -04:00
Miciah Dashiel Butler Masters 78297be625 Fix various typos
* Fix various isolated typos

"apppend" -> "append"

"availabe" -> "available"

"Descripti using ternon" -> "Description"

"you have not them" -> "you don't have them"

"new on" -> "new one"

"plained" -> "curved"

"repel" -> "REPL"

"vairable" -> "variable"

* Fix a few errors in the CoffeeScript layer readme

Add a missing "the".

Correct a reference to the layer as "javascript" to "coffeescript".

Fix the syntax on the link to CoffeeLint.

* Fix typos: "dofile" -> "dotfile"

* Fix typos: "formated" and "formating"

"formated" -> "formatted"

"formating" -> "formatting"

* hy: Fix docstrings in funcs.el

Fix copy-and-pasted docstring text for
spacemacs/hy-shell-eval-current-form-and-go and
spacemacs/hy-shell-eval-region-and-go.

* Fix typos: "indendation" -> "indentation"

* Fix typos: "the the", "a a"

Fix duplicated (or misplaced) articles.

* Fix typos: "wether" -> "whether"

* Fix typos: "intialize" -> "initialize"
2018-05-23 22:12:30 -04:00
Bet4 1499c4fae6 core: Revert "Inhibit recentf when inserting startupify lists"
This reverts commit 0d5fb6da28.
2018-01-28 23:05:41 -05:00
syl20bnr 46c5dfa4a7 cl-loop instead of loop 2018-01-06 21:38:13 -05:00
syl20bnr 326965d4ce Happy New Year 2018! 2018-01-04 02:00:25 -05:00
syl20bnr 41dcccc22b core: add spacemacs-buffer/error like spacemacs-buffer/warning
New function spacemacs-buffer/error that gather all the errors and then display
them in the startup buffer under a new list entry `Errors:`.
Add shortcut `e` to go to errors list entry.
New private function configuration-layer//error to wrap spacemacs-buffer/error
and increment the startup error count that is displayed in a red mode-line when
startup process finishes.
2017-10-29 22:01:39 -04:00
syl20bnr e63febeafd core: add optional parameter to spacemacs/set-mode-line
redisplay: it non nil then force refresh of the display
2017-10-29 21:43:43 -04:00
syl20bnr 65d5e42b8e core: add support for stable ELPA repository hosted on GitHub
Use the official spacelpa ELPA repository.
address: https://github.com/syl20bnr/spacelpa

ELPA repository configuration is now in a file called .lock at the root of the
git repository. Its goal is to setup the ELPA repositories for a given branch
and it should not be modified! The philosophy of Spacemacs is to never fork the
git repository and this lock file has been put in the repo on purpose.

Only the master branch will have a .lock file that points to spacelpa, the
develop branch won't use the stable ELPA repository and will continue to behave
like it always did.

BUT for testing purpose and until the first major version of Spacemacs that uses
the stable ELPA repo is released I push a .lock file to develop branch that
points to spacelpa.

I understand that some people can be annoyed by this so the variable
configuration-layer--elpa-archives can be overriden by putting a setq in your
dotfile in the user-init function like this:

  (setq configuration-layer--elpa-archives
        '(("melpa"    . "melpa.org/packages/")
          ("org"      . "orgmode.org/elpa/")
          ("gnu"      . "elpa.gnu.org/packages/")))
2017-10-29 01:20:25 -04:00
duianto e2a45e0c39 Fix switch to home buffer moves prev buffers cursor
Switching to the Spacemacs home buffer `SPC b h`, moves the previous buffers
cursor to the top.
2017-10-21 16:32:00 +03:00
syl20bnr e2e532bb49 core: change <function>p to <function>-p suffixes for consistency
Also defined aliases for backward compatibility with `usedp` functions.
2017-07-02 10:09:39 -04:00
Eivind Fonn 0d5fb6da28 Inhibit recentf when inserting startupify lists 2017-05-25 13:35:36 +02:00
syl20bnr 2d8d3046c6 Bump version to 0.200.9 and add release note 2017-04-06 23:10:42 -04:00
syl20bnr f79a1693ec Update release info 2017-04-02 01:57:30 -04:00
deb0ch a23761c383 minor elisp convention fix 2017-01-31 17:54:19 +01:00
syl20bnr 05c8ac8ba7 core: don't reset mode-line when displaying text in spacemacs home buffer 2017-01-25 23:37:57 -05:00
syl20bnr dcfa00488e Minor comment change 2017-01-25 00:28:15 -05:00
syl20bnr 333f762b36 core: name startup-hook function and move spacemacs-buffer//startup-hook 2017-01-22 00:31:30 -05:00
syl20bnr fb27ede558 Bump year in copyright headers
Happy New Year 2017!
2017-01-05 23:08:17 -05:00
deb0ch f8cb17eaf4
home-buffer: fix error on footer insertion when window is narrow 2016-12-22 16:31:13 +02:00
deb0ch e952eef1a6 home buffer: center buffer on fixed width 80 when not responsive 2016-11-07 09:15:56 -05:00
deb0ch bb5fdd8eaa home buffer: framed notes: allow for numbered and dotted lists
enumeration lists of the form:

 - lorem ipsum
 * lorem ipsum
 + lorem ipsum
 1. lorem ipsum
 2) lorem ipsum

will be treated as separate paragraphes and not be squished by
fill-region anymore.
2016-11-07 09:14:18 -05:00
deb0ch 67c5b2cb01 home-buffer: adapt home buffer notes toggling to responsiveness 2016-11-07 09:14:13 -05:00
deb0ch 3fa8b40057 home buffer: better framed notes display <3
More flexible framed text generation:

- adjust frame width to content width
- define minimum and maximum width
- allow for inserting a caption at the bottom of the frame

Unless dotspacemacs-startup-buffer-respinsive is nil:

- framed notes are centered
- max width is adapted to the window width

Also add a note inviting the user to update his packages and dotfile on
every new release (fixes #7357).
2016-11-07 09:13:46 -05:00
syl20bnr 48c3ecd1f8 core: register warning message only when messages are not inhibited 2016-10-20 09:32:03 -04:00
Eivind Fonn ae66a4cea1 Show warnings in home buffer 2016-10-18 10:13:17 +02:00
syl20bnr 574b2ffe5d core: allow links surrounded with [[]] in release notes 2016-10-10 00:50:29 -04:00
syl20bnr 703f78c2b8 Cleanup pass on file spacemacs-base/funcs.el
- Apply `/` and `//` rules (double / is for private functions)
- Add missing `spacemacs/` prefixes
- Move functions used outside of spacemacs-base layer to
  core/core-funcs.el
- Remove unused functions

Commit originally intented to only rename linum-update-window-scale-fix
to spacemacs/linum-update-window-scale-fix :-)
2016-10-09 13:14:41 -04:00
syl20bnr 7ff631a1d9 Change j/k to J/K to navigate home buffer
Update the quick help and sort the key bindings a bit.
2016-10-09 13:14:41 -04:00
Tobias Gläßer 65b076e4d9 Use j/k in spacemacs buffer for widget motions
Currently j/k were only navigating between lines, but hitting RET
wouldn't work on a recent file and the like, when the cursor wasn't
directly over the filename. Changing j/k to widget navigation, ensures
that the cursor is always on something clickable. This change should
make the home buffer feel more at home for evil mode users.
2016-10-08 19:42:27 +02:00
syl20bnr e6357a5ea3 Add missing 0.200 release notes for home buffer 2016-10-03 02:16:42 -04:00
deb0ch 7860804fff adjust or center startup lists in home buffer 2016-09-22 10:19:39 +02:00
Eivind Fonn e02c012ba1 Additional home buffer fixes 2016-09-14 20:53:30 +02:00
Steven Allen 7e903da247 Never use negative widths when formatting the spacemacs buffer caption.
Fixes: #7114
2016-09-14 19:44:01 +02:00
deb0ch fd9ac4afce refactor spacemacs-buffer/goto-buffer: fix logic flaw, center in terminal
fix buffer not re-created when buffer does not exist and last-width did
not change.

allow for home buffer centering in terminals.
2016-09-14 11:41:40 +02:00
Aaron Jensen bc5eb62e53 core: Add resize hook later in startup
Fixes hang while resizing on startup with initial-frame-alist.

Fixes #6986
2016-09-03 12:07:07 +02:00
Eivind Fonn e207038208 Add dsm variable for responsive home buffer 2016-09-03 12:07:03 +02:00
Eivind Fonn 2ef8c00e6b Add global bound on startup list lengths 2016-09-03 12:06:57 +02:00
Eivind Fonn a90414cc1b Add additional linebreak in home buffer 2016-08-31 18:48:27 +02:00
deb0ch 7dfa038107 redisplay startup info summary when re-centering and refreshing spacemacs buffer 2016-08-31 18:42:19 +02:00
Eivind Fonn df255da69a Fix: only choose random banner once 2016-08-31 18:33:48 +02:00
ralesi a7d4674202 Auto center spacemacs-buffer on window resize. 2016-08-31 18:29:12 +02:00
syl20bnr 1c4f685b13 core: refactor layer system
TL;DR Should get 20~25% speed improvement on startup, should get a big
improvement when using ivy or helm SPC h SPC. Users with layers.el files
in their layers must use `configuration-layer/declare-used-layer`
instead of `configuration-layer/declare-layer`

The implementation of the layer system made heavy use of `object-assoc`
and `object-assoc-list` functions which are not efficient. This PR
mainly replaces those object lists with hash maps in order to index the
objects by their name and achieve an O(1) access time.

The old object lists `configuration-layer--layers` and
`configuration-layer--packages` have been each by two variables each:
- `configuration-layer--indexed-layers` which is a hash-map of all the
layer objects and `configuration-layer--used-layers` which is a list of
all _used_ layers symbols,
- symmetrically `configuration-layer--indexed-packages` which is a
hash-map of all the package objects and
`configuration-layer--used-packages` which is a list of all _used_
packages symbols.

The hash map `configuration-layer--layer-paths` is gone, now we create
directly layer objects when discovering the layers and set the :dir
property. Note that previously the layer paths were the parent directory
of the layer, now :dir is the layer path.

The function `configuration-layer//make-layer` is now similar to its
counterpart `configuration-layer//make-package` in the sense that it
takes an optional `obj` to be able to override its properties.

The functions `configuration-layer/declare-layer` and
`configuration-layer/declare-layers` now takes an optional parameter
`usedp` in order to declare used or not used layers. For convenience
new functions have been added: `configuration-layer/declare-used-layer`
and `configuration-layer/declare-used-layers`, users _must_ update all
occurrences of `configuration-layer/declare-layer` by
`configuration-layer/declare-used-layers` in their `layers.el` files.

`helm-spacemacs-help` and `ivy-spacemacs-help` are updated to match the
changes in `core-configuration-layer.el`.

Rename some variables to make them more explicit:
`configuration-layer-no-layer` -> `configuration-layer-exclude-all-layers`
`configuration-layer-distribution` -> `configuration-layer-force-distribution`
2016-07-28 23:26:54 -04:00
deb0ch e097600279 center ascii banners in home buffers
also remove now unneeded leading whitespaces in ascii banners
2016-07-05 19:50:57 +02:00
deb0ch 862eb68f7c fix home buffer random banner choice
Random banner choice was broken by the presence of the `img` directory.
Even if `random` was set instead of `random*` in .spacemacs file the
cate banner would still show.

This commit fixes this bug while simplifying the existing code by adding
a regexp filter to only choose "*.txt" files.
2016-07-05 00:23:16 -04:00
syl20bnr a713189685 core: fix footer display 2016-06-24 18:52:08 -04:00
ralesi 052142ab33 Add list length designstion to startup-list.
* Allow dotspacemacs-startup-list to contain cons cells, specifying list
  length for items.
* Deprecates dotspacemacs-startup-recent-list-size
2016-06-24 18:52:08 -04:00
ksjogo 4d4e89641e fix spacemacs buffer for -nw and --batch 2016-06-23 00:42:57 -04:00
Exaos-memes 904f7ea665 Define new variable: spacemacs-start-directory.
With this new variable, user can load spacemacs anywhere, e.g.
"~/.emacs.d/spacemacs/". Only user's cache directory is still hard-coded
as "~/.emacs.d/.cache/". If user want to use spacemacs this way, drop
one line as the below in "~/.emacs.d/init.el":

    (setq spacemacs-start-directory "~/.emacs.d/spacemacs/")
    (load-file (concat spacemacs-start-directory "init.el"))
2016-06-23 00:19:34 -04:00
Eivind Fonn dfad604faa core: fix possibly negative string length 2016-06-13 10:59:29 +02:00
syl20bnr 8368be3c89 core: display a numerical progression in mode-line
Represents the number of packages to configure.
2016-06-13 00:56:25 -04:00
syl20bnr 627e934453 core: condensed versions into one string in left-hand side
spacemacs-version@emacs-version (distribution)
2016-06-05 00:19:18 -04:00
syl20bnr f3e50195d7 core: add footer in home buffer 2016-06-05 00:19:18 -04:00
syl20bnr 881b1f1e7f Rename special banner cate to cat 2016-05-29 23:27:31 -04:00
syl20bnr a2de9a63af Use :toggle keyword instead of when forms 2016-05-29 22:39:21 -04:00
syl20bnr 7945d39208 Move cate to 998 index and add support for `cate' value
Also removes some empty lines in the banner.
2016-05-27 00:32:05 -04:00
syl20bnr 1f993bddf6 Rename spacemacs-helm and spacemacs-ivy layers to helm and ivy
For ivy users: be sure to update your dotfile by replacing spacemacs-ivy
by ivy
2016-05-15 22:24:27 -04:00
ralesi f305bd01f9 Center spacemacs banner in window at startup.
Provide facility to refresh spacemacs-buffer.
2016-05-14 14:23:40 -04:00
Richard Kim 4ce4d6de77 allow emacs to be launched with -q option
If emacs is launched with -q option and spacemacs files are loaded via
--eval option, then spacemacs fails due to depending `after-init-time'
variable being set properly which is done only when emacs is launched
without -q. This patch is to remove this dependence so that spacemacs
launched with -q can still work. This is done by introducing
`spacemacs-initialized' variable which is set properly regardless of
which command line options are present or absent.
2016-04-08 18:04:11 -04:00
syl20bnr 09ff77fbd4 Make it possible to use spacemacs-bootstrap layer as a distribution 2016-04-06 13:12:13 -04:00
syl20bnr 50515a826a core: new function spacemacs-buffer/display-info-box
Extract and rewrite the code to display the startup info box.
2016-04-03 02:51:44 -04:00
syl20bnr 6770969b6f core: add variables for core-spacemacs-buffer
- spacemacs-buffer-version-info
- spacemacs-buffer-logo-title
2016-04-01 00:26:19 -04:00
syl20bnr 82fdd9a511 Use evil in holy-mode
Motivation

While disabling Evil in holy-mode makes its implementation shorter and
sounds elegant on the paper, in practice it puts a big burden on the
configuration parts which need to know if Evil is enable or not. This is
a bad separation of concerns and the bunch of fixes that we were forced
to do in the past weeks shows this issue. Those fixes were about
removing the knowledge of the activation of Evil by implementing new
dispatching functions to be used by layers, this is cumbersome and makes
Spacemacs layer configuration more subtle which is not good. There was
additional bad consequences of the removal of Evil state like the
impossibility to use Evil lisp state or iedit states, or we would have
been forced to implement a temporary activation of Evil which is
awkward.

Instead I reintroduce Evil as the central piece of Spacemacs design thus
Evil is now re-enabled in holy-mode. It provides the abstraction we need
to isolate editing styles and be able to grow the Spacemacs
configuration coverage sanely. Layers don't need to check whether the
holy mode is active or not and they don't need to know if Evil is
available (it is always available). We also don't need to write
additional dispatching functions, this is the job of Evil, and I think
it provides everything for this. Ideally configuration layer should be
implemented with only Evil in mind and the holy-mode (and hybrid-mode)
should magically make it work for Emacs style users, for instance we can
freely use `evil-insert-state` anywhere in the code without any guard.

Evil is now even more part of Spacemacs, we can really say that
Spacemacs is Emacs+Evil which is now an indivisible pair. Spacemacs
needed this stable API to continue on the right track.

While these changes should be rather transparent to the user, I'm sorry
for this experimental period, I failed to see all the implications of
such a change, I was just excited about the possibility to make Evil
optional. The reality is that Spacemacs has to embrace it and keep its
strong position on being Emacs+Evil at the core.

Implementation

- insert, motion and normal states are forced to emacs state using an
advice on `evil-insert-state`, `evil-motion-state` and
`evil-normal-state` respectively. These functions can be used freely in
the layer configuration.
- A new general hook `spacemacs-editing-style-hook` allow to hook any
code that need to be configured based on the editing style. Functions
hooked to this hook takes the current style as parameter, this
basically generalize the hook used to setup hjkl navigation bindings.
- ESC has been removed from the emacs state map.
- Revert unneeded changes
  - Revert "evil: enter insert-state only from normal-state"
    commit bdd702dfbe.
  - Revert "avoid being evil in deft with emacs editing style"
    commit f3a16f49ed.

Additional changes

All editing style packages have been moved to a layer called
`spacemacs-editing-styles`

Notes

I did not have time to attack hybrid mode, I should be able to do it
later.
2016-03-13 21:16:55 -04:00
Igor Avdeev 0e416290c4 Fix display of recent bookmarks without filename 2016-02-14 20:57:46 -05:00
syl20bnr fd4c2fb546 core-spacemacs-buffer: respect 80 characters per line 2016-01-31 20:31:09 -05:00
tonyday567 36e7e4ef73 Add support for todos and agenda in home buffer 2016-01-31 20:31:09 -05:00
Xue Fuqiao 4958f7fc10 Fix "the point" problems
Point is a proper name when it refers to the current editing location.
Moreover, point designates a place *between* two characters (or before the first
character, or after the last character), rather than a particular character.

References:

* http://lists.gnu.org/archive/html/emacs-devel/2008-10/msg00414.html
* https://www.gnu.org/software/emacs/manual/html_node/elisp/Point.html#index-point
2016-01-31 21:48:52 +01:00
syl20bnr 3d63dd4392 core: fix red mode-line when an error occurred
Rename function configuration-layer//set-error to
configuration-layer//increment-error-count
2016-01-12 00:08:36 -05:00
syl20bnr 046d86800c Clean copyrights and update for year 2016 2016-01-11 21:42:17 -05:00
justbur f3ef9cd206 spacemacs-buffer: Add back q binding
It seems to have been lost with the switch to fundamental-mode
2016-01-11 01:13:09 -05:00
justbur bf40dc3b70 ivy: Guard helm-mode call in spacemacs-buffer 2016-01-09 13:36:03 -05:00
justbur 1f01c5dc7b spacemacs-buffer: Use ivy-spacemacs-help when avail. 2016-01-09 13:36:03 -05:00
syl20bnr 6fc995e196 core: derive spacemacs-mode from fundamental-mode
special-mode does nothing ... special but bring unwanted mapped keys.
2016-01-08 23:34:34 -05:00
justbur f52eb86b69 spacemacs-buffer: Make map overriding for evil
Prevents keys in this map from being shadowed by evil-motion-state-map

Fix #4471
2016-01-08 23:11:44 -05:00
syl20bnr 723a7921d7 core: update home buffer links to point to spacemacs.org 2016-01-06 01:21:06 -05:00
syl20bnr b426098f2e Use `b` instead of `a` in home buffer for bookmarks
Even if it shadows `b` in motion state, I never used it and I doubt
that it is really useful, and there is still `B` available.
2016-01-03 23:00:50 -05:00
Kechao CAI 0ff8c2df48 Change shortcut of bookmarks in *spacemacs* buffer
In *spacemacs* buffer, the quick help in `[?]` shows that `m` jumps to
the menu. However, if one customizes the startup lists by setting
`dotspacemacs-startup-lists '(recents bookmarks projects)`, the shortcut
`m` of jumping to the menu would be shadowed and `m` jumps to Bookmarks.

With the help of travisbhartwell and TheBB, I changed the shortcut of
jumping to the Bookmarks to `a` to avoid this shortcut conflict.
2016-01-03 14:59:18 +01:00
justbur 39760a1cfe core: Update to preferred versions of functions
1. Don't use beginning-of-buffer (or end):
   These are for interactive use only according to compiler

2. reduce => cl-reduce

3. next-line => forward-line
   next-line is only for interactive use

4. set-default-font => set-frame-font
   set-default-font is obsolete since 23.1

5. show-subtree => outline-show-subtree (alias)

6. show-all => outline-show-all (alias)
2015-12-21 00:25:41 -05:00
justbur 0b02475772 Use built-in evil functions to set default states
evil-set-initial-state is safer than manually adding and deleting from
the lists, because it knows about all available states and ensures that
the mode only shows up in one list. If it is in multiple list the
initial state depends on which is checked first, which we don't want.
2015-12-21 00:22:18 -05:00
syl20bnr 103b864f0e core: delay creation of spacemacs buffer
Create it after the installation of the theme.
Add a redisplay when the buffer is created.
2015-12-13 15:41:24 -05:00
justbur 6649b6ab1c Don't always start spacemacs buffer in motion state
When editing style is emacs.
Fix #4152
2015-12-12 23:00:55 -05:00
syl20bnr fc72c37aaf core: fix page-break on home buffer 2015-12-11 03:08:23 -05:00
justbur 052d95541d core: Improve spacemacs-buffer/goto-link-line 2015-12-11 02:25:22 -05:00
justbur 812ba329f2 core: move spacemacs-mode to core-spacemacs-buffer.el
The rationale is to keep the spacemacs buffer related code contained in
the core-spacemacs-buffer.el file.
2015-12-11 02:25:22 -05:00
justbur f2878d594a core: Factor out spacemacs-buffer creation
Factor out the code related to creating the spacemacs buffer, so that it
can be recreated easily if it gets deleted.
2015-12-11 02:25:19 -05:00
person808 e91002e0c3 Show quickhelp if no dotfile is found. 2015-12-09 01:16:20 -05:00
syl20bnr 539f066e9d core: remove debug message 2015-12-01 00:30:59 -05:00
Bar Magal 1a91e3ea14 Home buffer: make number of recent files configurable #2335
Fixes issue #2335
2015-11-15 12:33:23 +01:00
ralesi dcf0c2bbc2 Inject emacs version along with spacemacs version 2015-11-02 00:42:57 -05:00
Fabien Dubosson ecf35c25e6 Remove the code that reset the first line.
This part doesn't seem to be needed any longer. I tested it in terminal
and in GUI modes, both with spacemacs and spacemacs-base distributions,
both with and without a banner: No visual difference with and without
this code.
2015-10-22 21:46:34 -04:00
Fabien Dubosson b1590c9071 Prevent spacemacs to overwrite clipboard at startup
Close #3457
2015-10-22 18:46:45 -04:00
Eivind Fonn be06d945cd Fix Spacemacs buffer notes 2015-10-15 18:38:28 +02:00
justbur c96183f56a spacemacs-buffer: Distinguish types of updates
Add a spacemacs update button to the spacemacs buffer, and relabel the
package update button to read "Update Packages". This will hopefully
resolve some confusion about updating spacemacs vs. updating the
packages.

I also tweaked the switch-to-version function to make it a little more
verbose to use it for the spacemacs update button.
2015-10-14 00:42:00 -04:00
syl20bnr 3c7ad38e4d core: remove dotspacemacs-verbose-loading
verbose is activate with --init-debug
2015-10-07 15:51:40 -04:00
syl20bnr cd3fb97d3b Bump version to 0.105 2015-09-28 23:53:20 -04:00
syl20bnr cd50d9c069 core: defer distro insertion in home buffer 2015-09-11 23:14:16 -04:00
syl20bnr 77161bd591 core: restore default mode line in home buffer 2015-09-11 23:04:01 -04:00
d12frosted c43a8e958e respect setting startup banner to nil #2911 2015-09-07 14:26:33 -04:00
d12frosted 8440a380f2 fix setting custom banner path 2015-09-07 01:06:27 -04:00