Henrik Lissner
80cd7557e1
fix(lib): doom-files-in's :map causing type errors
...
This regression was introduced in 10d00b7cc4
, causing
"wrong-type-argument: stringp (X . Y)" errors. It is triggered when
doom-files-in is used with a non-nil :map on a nested directory
tree (like our module tree).
Fix : #6370
Amend: 10d00b7cc4
2022-05-05 20:32:54 +02:00
Henrik Lissner
10d00b7cc4
fix(lib): unused :map property in doom-files-in
2022-05-05 15:20:07 +02:00
Henrik Lissner
281ee1d27b
feat(lib): add doom/remove-recent-file
...
To interactively remove a file from your recentf list. (Perhaps similar
could be added to embark for consult-recent-files?)
2021-10-10 18:36:46 +02:00
NightMachinary
a6f365bb3f
fix: doom/move-this-file when directory is the target
...
* doom/move-this-file now supports moving directly into a directory
* applied requested changes
Close #4861
2021-08-01 15:13:52 -04:00
Henrik Lissner
a8e57438dc
Refactor doom-{path,file,dir,glob}
...
Breaking change: doom-glob would formerly return a string (if only one
match) or a list. Now it always returns a list.
2021-05-23 21:49:02 -04:00
Henrik Lissner
b49c40bbb3
Minor refactors & comment revision
2020-11-29 14:37:32 -05:00
Henrik Lissner
b6fe731153
Fix #4103 : respect delete-by-moving-to-trash
...
When calling doom/delete-this-file
2020-10-15 23:12:21 -04:00
Henrik Lissner
b3006ecabb
ui/modeline: update buffer id when renaming files
...
And revert 247ce145b
, since I wasn't aware
after-set-visited-file-name-hook existed.
2020-08-26 19:54:05 -04:00
Henrik Lissner
247ce145b4
Revert buffer after renaming file
2020-08-26 19:52:06 -04:00
Henrik Lissner
e00560caf8
Fix #3827 (part 2): inverted file cookies
...
Turns out some autodefs weren't being noop'ed when their file's cookie
returns nil. This was the secondary cause of #3827 .
2020-08-26 19:51:46 -04:00
Henrik Lissner
e632871a11
core-cli: backport more refactors from rewrite
...
Still a long way to go, but this introduces a few niceties for
debugging CLI failures:
+ The (extended) output of the last bin/doom command is now logged to
~/.emacs.d/.local/doom.log
+ If an error occurs, short backtraces are displayed whether or not you
have debug mode on. The full backtrace is written to
~/.emacs.d/.local/doom.error.log.
+ bin/doom now aborts with a warning if:
- The script itself or its parent directory is a symlink. It's fine if
~/.emacs.d is symlinked though.
- Running bin/doom as root when your DOOMDIR isn't in /root/.
- If you're sporting Emacs 26.1 (now handled in the elisp side rather
than the /bin/sh shebang preamble).
+ If a 'doom sync' was aborted prematurely, you'll be warned that Doom
was left in an inconsistent state and that you must run `doom sync`
again.
May address #3746
2020-08-24 23:00:32 -04:00
Henrik Lissner
cf39d7ed59
Fix #3532 : file API wouldn't work with TRAMP
2020-07-13 17:14:12 -04:00
Henrik Lissner
8bf902d5f4
General refactors & reformatting across the board
2020-06-04 20:13:28 -04:00
Henrik Lissner
c1127a5bde
Rewrite move/copy/delete file commands
...
To use rename-file, copy-file and delete-file, so these commands can
enjoy the benefits of any plugins that have advised these, like org-roam
does for rename-file.
2020-04-27 01:51:18 -04:00
Henrik Lissner
93ff95c06e
Refactor sudo commands
2020-04-14 19:13:56 -04:00
Henrik Lissner
61b3cd8818
Fix doom/sudo-save-buffer not writing changes
2020-04-14 19:12:52 -04:00
Henrik Lissner
14fc65a9fb
Remove nconcq! macro
...
Unused and unnecessary.
2020-01-24 18:14:17 -05:00
Henrik Lissner
1018dea7b7
Fix wrong-type-arg stringp t from doom/move-this-file
2020-01-12 02:20:12 -05:00
Ralf Beckmann
6d0e60a024
Make sudo-this-file usable in dired-buffers
2020-01-09 08:34:41 +01:00
Henrik Lissner
aad7961647
Fix #2258 : update for new and old repo, and only if they are repos
2020-01-06 23:39:46 -05:00
Henrik Lissner
13be4fa178
Fix doom/sudo-save-buffer
...
Trying to open a buffer named after the filename, rather than opening
the file and returning a buffer.
2020-01-04 04:57:58 -05:00
Henrik Lissner
f04af0b8a2
Bind 'SPC b u' to save current file as root
2019-12-24 14:25:08 -05:00
Henrik Lissner
26c8f5c6ef
Bytecompiler bytecompiler, won't you shut up
2019-11-23 01:21:25 -05:00
Henrik Lissner
3d4a51b4a9
Merge pull request #2006 from RBckmnn/FixSudoEdit
...
Fix doom/sudo-{find,this}-file on remote files
2019-11-15 01:34:00 -05:00
Ralf Beckmann
12fcd3857d
Avoid superfluous buffers when sudo-editing
...
When invoking 'doom/sudo-this-file', do not
keep the old buffer around, since it is most
likely no longer needed.
2019-11-14 20:48:21 +01:00
Henrik Lissner
dd1dd6901f
doom-directory-size: error if path doesn't exist
2019-11-10 04:29:53 -05:00
Henrik Lissner
17b874dedd
Refactor doom-file-size
...
Change it throw an error if the file doesn't exist.
2019-11-10 01:32:58 -05:00
Ralf Beckmann
7a810d53a0
Consider current buffer's file when sudo-editing
...
If doom/sudo-find-file is invoked with a file that is equal
to the current buffer's file, kill that buffer since it is probably
not needed anymore.
2019-11-03 14:25:10 +01:00
Ralf Beckmann
68e56025bc
Fixed sudo edit on remote files
...
The previous implementation failed, if the
remote user was given only implicitly.
2019-11-03 02:22:52 +01:00
Henrik Lissner
c8efb45746
Add doom-{file,directory}-size file functions
2019-10-19 14:38:56 -04:00
Henrik Lissner
30c091d3f5
Fix non-string args to file-exists-p! macro
2019-10-12 00:48:48 -04:00
Henrik Lissner
297728bf74
Generalize doom-file-cookie-p
...
And move it to doom-file-cookie-p for anyone to use.
2019-10-04 22:42:53 -04:00
Henrik Lissner
aff5cc5b28
Move file-exists-p! to core/autoload/files.el
2019-08-22 13:03:12 -04:00
Henrik Lissner
6200f5d876
Move file functions in core-lib to autoload/files
2019-07-22 23:22:55 +02:00
Henrik Lissner
060ede0e2e
General, minor reformatting across the board
...
And an offering of blood to our great lord Byte Compiler-sama.
2019-07-22 02:37:45 +02:00
Henrik Lissner
ee10b3b0d9
core-lib: add doom-{glob,path,dir}, replace {file,dir}!
...
- file! replaces FILE!
- dir! replaces DIR!
- doom-{glob,path,dir} have the power to construct paths out of the
segment pieces provided to it.
- Move doom-files-in to core-lib and refactor to use the above.
2019-07-22 02:30:39 +02:00
Henrik Lissner
9a02bd8ac8
Minor refactors across the board
...
- when-let* -> when-let
- Fix projectile-locate-dominating-file for connected remote files
2019-06-26 14:31:06 +02:00
Henrik Lissner
5e9c020c21
doom-files-in: replace NOSORT w/ SORT; change default MATCH
...
- SORT defaults to t
- MATCH's new default regexp excludes files that start with underscore.
2019-06-16 19:16:23 +02:00
Siddharth Shekar
aa64cf9426
Replace kill-this-buffer with kill-current-buffer
...
As per the documentation for kill-this-buffer, it should only be invoked
from the menu and behaves unpredictably when invoked programmatically.
2019-05-30 18:54:58 -07:00
Henrik Lissner
c5a3556510
Fix interactive codes for doom/{move,copy,sudo}-this-file
2019-05-14 20:53:51 -04:00
Henrik Lissner
66d23e39bb
Fix doom/move-this-file not opening renamed file
2019-03-03 02:17:42 -05:00
Henrik Lissner
53fe7a1f04
Refactor Project API to reflect changes upstream
...
projectile-project-root no longer returns `default-directory` if not in
a project (it returns nil). As such, doom-project-* functions (and their
uses) have been refactored.
+ doom-project-p & doom-project-root are aliases for
projectile-project-p & projectile-project-root.
+ doom-project-{p,root,name,expand} now has a DIR argument (for
consistency, since projectile-project-name and
projectile-project-expand do not).
+ The nocache parameter is no longer necessary, as projectile's caching
behavior is now more sane.
+ Removed some projectile advice/hacks that are no longer necessary.
+ Updated unit tests
2018-09-28 21:13:27 -04:00
Henrik Lissner
ac63596be8
Fix doom-project-root returning nil if no project
...
It should return default-directory. A change upstream broke this.
2018-09-22 13:15:12 -04:00
Henrik Lissner
be29623f0d
Reorganize doom core-lib & reformat autoload/ui.el
...
+ Move doom-files-in to autoload/files.el
+ Move doom*shut-up to autoload/ui.el
+ Reorganize autoload/ui.el
2018-09-09 09:58:19 -04:00
Henrik Lissner
7d3ffdff06
Remove third line in section headers
...
This is truly important stuff. We've saved many lives with this update.
2018-09-09 09:58:19 -04:00
Henrik Lissner
708ad138c8
doom/sudo-find-file: don't sudo writeable files
2018-09-01 00:02:39 +02:00
Henrik Lissner
a25eff0189
delete-this-file: don't propagate deletion to vcs
...
Doom shouldn't assume the user always wants to stage the current
deletion after every delete.
2018-06-11 01:33:56 +02:00
Henrik Lissner
6bf529ddf8
Add magit/vcs support to doom file commands
2018-06-10 23:23:09 +02:00
Henrik Lissner
99afb01315
equals -> file-equal-p refactor
...
Use more reliable file comparison function.
2018-06-08 13:08:37 +02:00
Henrik Lissner
f2c02e32c8
General minor refactor & comment updates
2018-05-21 01:38:17 +02:00