branch: elpa/casual
commit b207a1b14d6e5d128bdf03b539870071d9f22eb8
Merge: a62c1f8ad1 11edc46e2e
Author: Charles Choi <[email protected]>
Commit: GitHub <[email protected]>
Merge pull request #72 from kickingvegas/36-support-relative-symlinks
Redesign Dired link menu and cleanup Makefiles
---
docs/dired.org | 7 ++-
docs/images/casual-dired-link.png | Bin 0 -> 118128 bytes
docs/images/casual-dired-screenshot-unicode.png | Bin 375797 -> 357137 bytes
docs/images/casual-dired-screenshot.png | Bin 924166 -> 728609 bytes
docs/images/casual-dired-settings-screenshot.png | Bin 239246 -> 233223 bytes
lisp/Makefile--defines.make | 38 +++++++++++++
lisp/{Makefile-info.make => Makefile--rules.make} | 23 --------
lisp/Makefile-agenda.make | 60 +--------------------
lisp/Makefile-bookmarks.make | 61 +--------------------
lisp/Makefile-calc.make | 61 +--------------------
lisp/Makefile-dired.make | 61 +--------------------
lisp/Makefile-editkit.make | 62 +---------------------
lisp/Makefile-ibuffer.make | 61 +--------------------
lisp/Makefile-info.make | 61 +--------------------
lisp/Makefile-isearch.make | 16 +-----
lisp/Makefile-lib.make | 13 +----
lisp/Makefile-re-builder.make | 60 +--------------------
lisp/casual-dired-settings.el | 20 ++++++-
lisp/casual-dired-utils.el | 14 +++--
lisp/casual-dired.el | 2 +-
tests/test-casual-dired-settings.el | 1 +
tests/test-casual-dired-utils.el | 6 ++-
tests/test-casual-dired.el | 2 +-
23 files changed, 99 insertions(+), 530 deletions(-)
diff --git a/docs/dired.org b/docs/dired.org
index 2586ce2149..1951f6308c 100644
--- a/docs/dired.org
+++ b/docs/dired.org
@@ -48,7 +48,6 @@ Included is a standard keymap for Dired sorting commands
(~casual-dired-sort-men
#+end_src
-
** Configuration
As Dired has been around for a long time, the different ways of configuring it
are myriad. Described below is a configuration used by the author that is
consistent with the bindings used in Casual Dired.
@@ -137,6 +136,12 @@ Casual Dired organizes a number of Dired commands that
work on a set of marked f
[[file:images/casual-dired-utils-screenshot.png]]
+** Link
+Create symbolic and hard links via the *Link* menu. Both absolute and relative
symbolic links (symlinks) are supported.
+
+[[file:images/casual-dired-link.png]]
+
+
* Sponsorship
If you enjoy using Casual Dired, consider making a modest financial
contribution to help support its development and maintenance.
diff --git a/docs/images/casual-dired-link.png
b/docs/images/casual-dired-link.png
new file mode 100644
index 0000000000..17f1286caa
Binary files /dev/null and b/docs/images/casual-dired-link.png differ
diff --git a/docs/images/casual-dired-screenshot-unicode.png
b/docs/images/casual-dired-screenshot-unicode.png
index 3bab71e5ad..3b5a1a39d6 100644
Binary files a/docs/images/casual-dired-screenshot-unicode.png and
b/docs/images/casual-dired-screenshot-unicode.png differ
diff --git a/docs/images/casual-dired-screenshot.png
b/docs/images/casual-dired-screenshot.png
index bd50a2b036..30ef3d2d17 100644
Binary files a/docs/images/casual-dired-screenshot.png and
b/docs/images/casual-dired-screenshot.png differ
diff --git a/docs/images/casual-dired-settings-screenshot.png
b/docs/images/casual-dired-settings-screenshot.png
index 8f21b4e3ba..857df381c7 100644
Binary files a/docs/images/casual-dired-settings-screenshot.png and
b/docs/images/casual-dired-settings-screenshot.png differ
diff --git a/lisp/Makefile--defines.make b/lisp/Makefile--defines.make
new file mode 100644
index 0000000000..e29b86b516
--- /dev/null
+++ b/lisp/Makefile--defines.make
@@ -0,0 +1,38 @@
+##
+# Copyright 2024 Charles Y. Choi
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <https://www.gnu.org/licenses/>.
+
+TIMESTAMP := $(shell /bin/date "+%Y%m%d_%H%M%S")
+
+# If local Emacs install is not in typical PATH such as on macOS, define the
+# environment variable EMACS_APP_EXEC to point to the Emacs executable. The
+# following Elisp configuration needs to be set if running these Makefiles from
+# Emacs.
+
+# (setenv "EMACS_APP_EXEC"
+# "<path to Emacs executable>")
+
+
+ifdef EMACS_APP_EXEC
+ EXEC_NAME=$(EMACS_APP_EXEC)
+else
+ EXEC_NAME=emacs
+endif
+
+CASUAL_BASE_DIR=$(HOME)/Projects/elisp
+CASUAL_LIB_DIR=$(CASUAL_BASE_DIR)/casual
+CASUAL_LIB_LISP_DIR=$(CASUAL_LIB_DIR)/lisp
+CASUAL_LIB_TEST_INCLUDES=$(CASUAL_LIB_DIR)/tests/casual-lib-test-utils.el
+EMACS_ELPA_DIR=$(HOME)/.config/emacs/elpa
diff --git a/lisp/Makefile-info.make b/lisp/Makefile--rules.make
similarity index 72%
copy from lisp/Makefile-info.make
copy to lisp/Makefile--rules.make
index 4ca43576b1..41a188f493 100644
--- a/lisp/Makefile-info.make
+++ b/lisp/Makefile--rules.make
@@ -14,29 +14,6 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
-TIMESTAMP := $(shell /bin/date "+%Y%m%d_%H%M%S")
-
-EMACS_MAC_APP_HOME=/Applications/MacPorts/EmacsMac.app
-EMACS_MAC_APP_SH=$(EMACS_MAC_APP_HOME)/Contents/MacOS/Emacs.sh
-
-ifneq ("$(wildcard $(EMACS_MAC_APP_SH))","")
- EXEC_NAME=$(EMACS_MAC_APP_SH)
-else
- EXEC_NAME=emacs
-endif
-
-PACKAGE_NAME=casual-info
-ELISP_INCLUDES=casual-info-variables.el casual-info-utils.el
-ELISP_PACKAGES=casual-info-settings.el
-ELISP_TEST_INCLUDES=casual-info-test-utils.el
-CASUAL_BASE_DIR=$(HOME)/Projects/elisp
-CASUAL_LIB_DIR=$(CASUAL_BASE_DIR)/casual
-CASUAL_LIB_LISP_DIR=$(CASUAL_LIB_DIR)/lisp
-CASUAL_LIB_TEST_INCLUDES=$(CASUAL_LIB_DIR)/tests/casual-lib-test-utils.el
-EMACS_CONFIG_DIR=$(HOME)/.config/emacs
-PACKAGE_PATHS=-L $(CASUAL_LIB_LISP_DIR)
-
-
.PHONY: tests compile regression
.SUFFIXES: .el .elc .elt
diff --git a/lisp/Makefile-agenda.make b/lisp/Makefile-agenda.make
index d026754ed4..0611693120 100644
--- a/lisp/Makefile-agenda.make
+++ b/lisp/Makefile-agenda.make
@@ -14,73 +14,17 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
-TIMESTAMP := $(shell /bin/date "+%Y%m%d_%H%M%S")
-
-EMACS_MAC_APP_HOME=/Applications/MacPorts/EmacsMac.app
-EMACS_MAC_APP_SH=$(EMACS_MAC_APP_HOME)/Contents/MacOS/Emacs.sh
-
-ifneq ("$(wildcard $(EMACS_MAC_APP_SH))","")
- EXEC_NAME=$(EMACS_MAC_APP_SH)
-else
- EXEC_NAME=emacs
-endif
+include Makefile--defines.make
PACKAGE_NAME=casual-agenda
ELISP_INCLUDES=casual-agenda-utils.el \
casual-agenda-settings.el
ELISP_PACKAGES=
ELISP_TEST_INCLUDES=casual-agenda-test-utils.el
-CASUAL_BASE_DIR=$(HOME)/Projects/elisp
-CASUAL_LIB_DIR=$(CASUAL_BASE_DIR)/casual
-CASUAL_LIB_LISP_DIR=$(CASUAL_LIB_DIR)/lisp
-CASUAL_LIB_TEST_INCLUDES=$(CASUAL_LIB_DIR)/tests/casual-lib-test-utils.el
-EMACS_ELPA_DIR=$(HOME)/.config/emacs/elpa
PACKAGE_PATHS= \
-L $(EMACS_ELPA_DIR)/compat-30.0.0.0 \
-L $(EMACS_ELPA_DIR)/seq-2.24 \
-L $(EMACS_ELPA_DIR)/transient-current \
-L $(CASUAL_LIB_LISP_DIR)
-.PHONY: tests compile regression
-
-.SUFFIXES: .el .elc .elt
-
-.el.elc :
- $(EXEC_NAME) -Q --batch $(patsubst %, -l %, $(ELISP_INCLUDES)) \
--f batch-byte-compile $<
-
-.el.elt :
- $(EXEC_NAME) -Q --batch \
-$(PACKAGE_PATHS) \
-$(patsubst %, -l %, $(ELISP_INCLUDES)) \
--l $< \
--l $(CASUAL_LIB_TEST_INCLUDES) \
--l $(patsubst %, ../tests/%, $(ELISP_TEST_INCLUDES)) \
--l $(patsubst %, ../tests/test-%, $<) \
--f ert-run-tests-batch-and-exit
-
-tests: $(ELISP_PACKAGES:.el=.elt) $(ELISP_INCLUDES:.el=.elt)
$(PACKAGE_NAME).elt
-
-compile: $(ELISP_PACKAGES:.el=.elc) $(ELISP_INCLUDES:.el=.elc)
$(PACKAGE_NAME).elc
-
-$(PACKAGE_NAME).elc: $(PACKAGE_NAME).el
- $(EXEC_NAME) -Q --batch $(patsubst %, -l %, $(ELISP_INCLUDES)) \
-$(patsubst %, -l %, $(ELISP_PACKAGES)) \
-$(PACKAGE_PATHS) \
--f batch-byte-compile $<
-
-$(PACKAGE_NAME).elt: $(PACKAGE_NAME).el
- $(EXEC_NAME) -Q --batch \
-$(PACKAGE_PATHS) \
-$(patsubst %, -l %, $(ELISP_INCLUDES)) \
-$(patsubst %, -l %, $(ELISP_PACKAGES)) \
--l $< \
--l $(CASUAL_LIB_TEST_INCLUDES) \
--l ../tests/$(ELISP_TEST_INCLUDES) \
--l $(patsubst %, ../tests/test-%, $<) \
--f ert-run-tests-batch-and-exit
-
-regression: clean compile tests
-
-clean:
- rm -f *.elc
+include Makefile--rules.make
diff --git a/lisp/Makefile-bookmarks.make b/lisp/Makefile-bookmarks.make
index b3c07754f5..c50a194d2f 100644
--- a/lisp/Makefile-bookmarks.make
+++ b/lisp/Makefile-bookmarks.make
@@ -14,74 +14,17 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
-TIMESTAMP := $(shell /bin/date "+%Y%m%d_%H%M%S")
-
-EMACS_MAC_APP_HOME=/Applications/MacPorts/EmacsMac.app
-EMACS_MAC_APP_SH=$(EMACS_MAC_APP_HOME)/Contents/MacOS/Emacs.sh
-
-ifneq ("$(wildcard $(EMACS_MAC_APP_SH))","")
- EXEC_NAME=$(EMACS_MAC_APP_SH)
-else
- EXEC_NAME=emacs
-endif
+include Makefile--defines.make
PACKAGE_NAME=casual-bookmarks
ELISP_INCLUDES=casual-bookmarks-utils.el \
casual-bookmarks-settings.el
ELISP_PACKAGES=
ELISP_TEST_INCLUDES=casual-bookmarks-test-utils.el
-CASUAL_BASE_DIR=$(HOME)/Projects/elisp
-CASUAL_LIB_DIR=$(CASUAL_BASE_DIR)/casual
-CASUAL_LIB_LISP_DIR=$(CASUAL_LIB_DIR)/lisp
-CASUAL_LIB_TEST_INCLUDES=$(CASUAL_LIB_DIR)/tests/casual-lib-test-utils.el
-EMACS_ELPA_DIR=$(HOME)/.config/emacs/elpa
PACKAGE_PATHS= \
-L $(EMACS_ELPA_DIR)/compat-30.0.0.0 \
-L $(EMACS_ELPA_DIR)/seq-2.24 \
-L $(EMACS_ELPA_DIR)/transient-current \
-L $(CASUAL_LIB_LISP_DIR)
-.PHONY: tests compile regression
-
-.SUFFIXES: .el .elc .elt
-
-.el.elc :
- $(EXEC_NAME) -Q --batch $(patsubst %, -l %, $(ELISP_INCLUDES)) \
-$(PACKAGE_PATHS) \
--f batch-byte-compile $<
-
-.el.elt :
- $(EXEC_NAME) -Q --batch \
-$(PACKAGE_PATHS) \
-$(patsubst %, -l %, $(ELISP_INCLUDES)) \
--l $< \
--l $(CASUAL_LIB_TEST_INCLUDES) \
--l $(patsubst %, ../tests/%, $(ELISP_TEST_INCLUDES)) \
--l $(patsubst %, ../tests/test-%, $<) \
--f ert-run-tests-batch-and-exit
-
-tests: $(ELISP_PACKAGES:.el=.elt) $(ELISP_INCLUDES:.el=.elt)
$(PACKAGE_NAME).elt
-
-compile: $(ELISP_PACKAGES:.el=.elc) $(ELISP_INCLUDES:.el=.elc)
$(PACKAGE_NAME).elc
-
-$(PACKAGE_NAME).elc: $(PACKAGE_NAME).el
- $(EXEC_NAME) -Q --batch $(patsubst %, -l %, $(ELISP_INCLUDES)) \
-$(patsubst %, -l %, $(ELISP_PACKAGES)) \
-$(PACKAGE_PATHS) \
--f batch-byte-compile $<
-
-$(PACKAGE_NAME).elt: $(PACKAGE_NAME).el
- $(EXEC_NAME) -Q --batch \
-$(PACKAGE_PATHS) \
-$(patsubst %, -l %, $(ELISP_INCLUDES)) \
-$(patsubst %, -l %, $(ELISP_PACKAGES)) \
--l $< \
--l $(CASUAL_LIB_TEST_INCLUDES) \
--l ../tests/$(ELISP_TEST_INCLUDES) \
--l $(patsubst %, ../tests/test-%, $<) \
--f ert-run-tests-batch-and-exit
-
-regression: clean compile tests
-
-clean:
- rm -f *.elc
+include Makefile--rules.make
diff --git a/lisp/Makefile-calc.make b/lisp/Makefile-calc.make
index 1731acf6f0..1920d77cf3 100644
--- a/lisp/Makefile-calc.make
+++ b/lisp/Makefile-calc.make
@@ -13,17 +13,7 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
-
-TIMESTAMP := $(shell /bin/date "+%Y%m%d_%H%M%S")
-
-EMACS_MAC_APP_HOME=/Applications/MacPorts/EmacsMac.app
-EMACS_MAC_APP_SH=$(EMACS_MAC_APP_HOME)/Contents/MacOS/Emacs.sh
-
-ifneq ("$(wildcard $(EMACS_MAC_APP_SH))","")
- EXEC_NAME=$(EMACS_MAC_APP_SH)
-else
- EXEC_NAME=emacs
-endif
+include Makefile--defines.make
PACKAGE_NAME=casual-calc
@@ -58,53 +48,6 @@ casual-calc-symbolic.el
ELISP_TEST_INCLUDES=casual-calc-test-utils.el
-CASUAL_BASE_DIR=$(HOME)/Projects/elisp
-CASUAL_LIB_DIR=$(CASUAL_BASE_DIR)/casual
-CASUAL_LIB_LISP_DIR=$(CASUAL_LIB_DIR)/lisp
-CASUAL_LIB_TEST_INCLUDES=$(CASUAL_LIB_DIR)/tests/casual-lib-test-utils.el
-EMACS_CONFIG_DIR=$(HOME)/.config/emacs
PACKAGE_PATHS=-L $(CASUAL_LIB_LISP_DIR)
-.PHONY: tests compile regression
-
-.SUFFIXES: .el .elc .elt
-
-.el.elc :
- $(EXEC_NAME) -Q --batch $(patsubst %, -l %, $(ELISP_INCLUDES)) \
--f batch-byte-compile $<
-
-.el.elt :
- $(EXEC_NAME) -Q --batch \
-$(PACKAGE_PATHS) \
-$(patsubst %, -l %, $(ELISP_INCLUDES)) \
--l $< \
--l $(CASUAL_LIB_TEST_INCLUDES) \
--l $(patsubst %, ../tests/%, $(ELISP_TEST_INCLUDES)) \
--l $(patsubst %, ../tests/test-%, $<) \
--f ert-run-tests-batch-and-exit
-
-tests: $(ELISP_PACKAGES:.el=.elt) $(ELISP_INCLUDES:.el=.elt)
$(PACKAGE_NAME).elt
-
-compile: $(ELISP_PACKAGES:.el=.elc) $(ELISP_INCLUDES:.el=.elc)
$(PACKAGE_NAME).elc
-
-$(PACKAGE_NAME).elc: $(PACKAGE_NAME).el
- $(EXEC_NAME) -Q --batch $(patsubst %, -l %, $(ELISP_INCLUDES)) \
-$(patsubst %, -l %, $(ELISP_PACKAGES)) \
-$(PACKAGE_PATHS) \
--f batch-byte-compile $<
-
-$(PACKAGE_NAME).elt: $(PACKAGE_NAME).el
- $(EXEC_NAME) -Q --batch \
-$(PACKAGE_PATHS) \
-$(patsubst %, -l %, $(ELISP_INCLUDES)) \
-$(patsubst %, -l %, $(ELISP_PACKAGES)) \
--l $< \
--l $(CASUAL_LIB_TEST_INCLUDES) \
--l ../tests/$(ELISP_TEST_INCLUDES) \
--l $(patsubst %, ../tests/test-%, $<) \
--f ert-run-tests-batch-and-exit
-
-regression: clean compile tests
-
-clean:
- rm -f *.elc
+include Makefile--rules.make
diff --git a/lisp/Makefile-dired.make b/lisp/Makefile-dired.make
index 882a7b565e..bc13b28b8d 100644
--- a/lisp/Makefile-dired.make
+++ b/lisp/Makefile-dired.make
@@ -13,69 +13,12 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
-
-TIMESTAMP := $(shell /bin/date "+%Y%m%d_%H%M%S")
-
-EMACS_MAC_APP_HOME=/Applications/MacPorts/EmacsMac.app
-EMACS_MAC_APP_SH=$(EMACS_MAC_APP_HOME)/Contents/MacOS/Emacs.sh
-
-ifneq ("$(wildcard $(EMACS_MAC_APP_SH))","")
- EXEC_NAME=$(EMACS_MAC_APP_SH)
-else
- EXEC_NAME=emacs
-endif
+include Makefile--defines.make
PACKAGE_NAME=casual-dired
ELISP_INCLUDES=casual-dired-variables.el casual-dired-utils.el
ELISP_PACKAGES=casual-dired-settings.el casual-dired-sort-by.el
ELISP_TEST_INCLUDES=casual-dired-test-utils.el
-CASUAL_BASE_DIR=$(HOME)/Projects/elisp
-CASUAL_LIB_DIR=$(CASUAL_BASE_DIR)/casual
-CASUAL_LIB_LISP_DIR=$(CASUAL_LIB_DIR)/lisp
-CASUAL_LIB_TEST_INCLUDES=$(CASUAL_LIB_DIR)/tests/casual-lib-test-utils.el
-EMACS_CONFIG_DIR=$(HOME)/.config/emacs
PACKAGE_PATHS=-L $(CASUAL_LIB_LISP_DIR)
-.PHONY: tests compile regression
-
-.SUFFIXES: .el .elc .elt
-
-.el.elc :
- $(EXEC_NAME) -Q --batch $(patsubst %, -l %, $(ELISP_INCLUDES)) \
--f batch-byte-compile $<
-
-.el.elt :
- $(EXEC_NAME) -Q --batch \
-$(PACKAGE_PATHS) \
-$(patsubst %, -l %, $(ELISP_INCLUDES)) \
--l $< \
--l $(CASUAL_LIB_TEST_INCLUDES) \
--l $(patsubst %, ../tests/%, $(ELISP_TEST_INCLUDES)) \
--l $(patsubst %, ../tests/test-%, $<) \
--f ert-run-tests-batch-and-exit
-
-tests: $(ELISP_PACKAGES:.el=.elt) $(ELISP_INCLUDES:.el=.elt)
$(PACKAGE_NAME).elt
-
-compile: $(ELISP_PACKAGES:.el=.elc) $(ELISP_INCLUDES:.el=.elc)
$(PACKAGE_NAME).elc
-
-$(PACKAGE_NAME).elc: $(PACKAGE_NAME).el
- $(EXEC_NAME) -Q --batch $(patsubst %, -l %, $(ELISP_INCLUDES)) \
-$(patsubst %, -l %, $(ELISP_PACKAGES)) \
-$(PACKAGE_PATHS) \
--f batch-byte-compile $<
-
-$(PACKAGE_NAME).elt: $(PACKAGE_NAME).el
- $(EXEC_NAME) -Q --batch \
-$(PACKAGE_PATHS) \
-$(patsubst %, -l %, $(ELISP_INCLUDES)) \
-$(patsubst %, -l %, $(ELISP_PACKAGES)) \
--l $< \
--l $(CASUAL_LIB_TEST_INCLUDES) \
--l ../tests/$(ELISP_TEST_INCLUDES) \
--l $(patsubst %, ../tests/test-%, $<) \
--f ert-run-tests-batch-and-exit
-
-regression: clean compile tests
-
-clean:
- rm -f *.elc
+include Makefile--rules.make
diff --git a/lisp/Makefile-editkit.make b/lisp/Makefile-editkit.make
index 39bf592ae4..576e2f7510 100644
--- a/lisp/Makefile-editkit.make
+++ b/lisp/Makefile-editkit.make
@@ -13,17 +13,7 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
-
-TIMESTAMP := $(shell /bin/date "+%Y%m%d_%H%M%S")
-
-EMACS_MAC_APP_HOME=/Applications/MacPorts/EmacsMac.app
-EMACS_MAC_APP_SH=$(EMACS_MAC_APP_HOME)/Contents/MacOS/Emacs.sh
-
-ifneq ("$(wildcard $(EMACS_MAC_APP_SH))","")
- EXEC_NAME=$(EMACS_MAC_APP_SH)
-else
- EXEC_NAME=emacs
-endif
+include Makefile--defines.make
PACKAGE_NAME=casual-editkit
ELISP_INCLUDES=casual-editkit-constants.el \
@@ -31,11 +21,6 @@ casual-editkit-utils.el \
casual-editkit-settings.el
ELISP_PACKAGES=
ELISP_TEST_INCLUDES=casual-editkit-test-utils.el
-CASUAL_BASE_DIR=$(HOME)/Projects/elisp
-CASUAL_LIB_DIR=$(CASUAL_BASE_DIR)/casual
-CASUAL_LIB_LISP_DIR=$(CASUAL_LIB_DIR)/lisp
-CASUAL_LIB_TEST_INCLUDES=$(CASUAL_LIB_DIR)/tests/casual-lib-test-utils.el
-EMACS_ELPA_DIR=$(HOME)/.config/emacs/elpa
PACKAGE_PATHS= \
-L $(EMACS_ELPA_DIR)/compat-30.0.0.0 \
-L $(EMACS_ELPA_DIR)/seq-2.24 \
@@ -48,47 +33,4 @@ PACKAGE_PATHS= \
-L $(EMACS_ELPA_DIR)/symbol-overlay-current \
-L $(CASUAL_LIB_LISP_DIR)
-.PHONY: tests compile regression
-
-.SUFFIXES: .el .elc .elt
-
-.el.elc :
- $(EXEC_NAME) -Q --batch $(patsubst %, -l %, $(ELISP_INCLUDES)) \
-$(PACKAGE_PATHS) \
--f batch-byte-compile $<
-
-.el.elt :
- $(EXEC_NAME) -Q --batch \
-$(PACKAGE_PATHS) \
-$(patsubst %, -l %, $(ELISP_INCLUDES)) \
--l $< \
--l $(CASUAL_LIB_TEST_INCLUDES) \
--l $(patsubst %, ../tests/%, $(ELISP_TEST_INCLUDES)) \
--l $(patsubst %, ../tests/test-%, $<) \
--f ert-run-tests-batch-and-exit
-
-tests: $(ELISP_PACKAGES:.el=.elt) $(ELISP_INCLUDES:.el=.elt)
$(PACKAGE_NAME).elt
-
-compile: $(ELISP_PACKAGES:.el=.elc) $(ELISP_INCLUDES:.el=.elc)
$(PACKAGE_NAME).elc
-
-$(PACKAGE_NAME).elc: $(PACKAGE_NAME).el
- $(EXEC_NAME) -Q --batch $(patsubst %, -l %, $(ELISP_INCLUDES)) \
-$(patsubst %, -l %, $(ELISP_PACKAGES)) \
-$(PACKAGE_PATHS) \
--f batch-byte-compile $<
-
-$(PACKAGE_NAME).elt: $(PACKAGE_NAME).el
- $(EXEC_NAME) -Q --batch \
-$(PACKAGE_PATHS) \
-$(patsubst %, -l %, $(ELISP_INCLUDES)) \
-$(patsubst %, -l %, $(ELISP_PACKAGES)) \
--l $< \
--l $(CASUAL_LIB_TEST_INCLUDES) \
--l ../tests/$(ELISP_TEST_INCLUDES) \
--l $(patsubst %, ../tests/test-%, $<) \
--f ert-run-tests-batch-and-exit
-
-regression: clean compile tests
-
-clean:
- rm -f *.elc
+include Makefile--rules.make
diff --git a/lisp/Makefile-ibuffer.make b/lisp/Makefile-ibuffer.make
index 4f3315b31e..29d6c7868b 100644
--- a/lisp/Makefile-ibuffer.make
+++ b/lisp/Makefile-ibuffer.make
@@ -13,74 +13,17 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
-
-TIMESTAMP := $(shell /bin/date "+%Y%m%d_%H%M%S")
-
-EMACS_MAC_APP_HOME=/Applications/MacPorts/EmacsMac.app
-EMACS_MAC_APP_SH=$(EMACS_MAC_APP_HOME)/Contents/MacOS/Emacs.sh
-
-ifneq ("$(wildcard $(EMACS_MAC_APP_SH))","")
- EXEC_NAME=$(EMACS_MAC_APP_SH)
-else
- EXEC_NAME=emacs
-endif
+include Makefile--defines.make
PACKAGE_NAME=casual-ibuffer
ELISP_INCLUDES=casual-ibuffer-utils.el \
casual-ibuffer-settings.el
ELISP_PACKAGES=casual-ibuffer-filter.el
ELISP_TEST_INCLUDES=casual-ibuffer-test-utils.el
-CASUAL_BASE_DIR=$(HOME)/Projects/elisp
-CASUAL_LIB_DIR=$(CASUAL_BASE_DIR)/casual
-CASUAL_LIB_LISP_DIR=$(CASUAL_LIB_DIR)/lisp
-CASUAL_LIB_TEST_INCLUDES=$(CASUAL_LIB_DIR)/tests/casual-lib-test-utils.el
-EMACS_ELPA_DIR=$(HOME)/.config/emacs/elpa
PACKAGE_PATHS= \
-L $(EMACS_ELPA_DIR)/compat-30.0.0.0 \
-L $(EMACS_ELPA_DIR)/seq-2.24 \
-L $(EMACS_ELPA_DIR)/transient-current \
-L $(CASUAL_LIB_LISP_DIR)
-.PHONY: tests compile regression
-
-.SUFFIXES: .el .elc .elt
-
-.el.elc :
- $(EXEC_NAME) -Q --batch $(patsubst %, -l %, $(ELISP_INCLUDES)) \
--f batch-byte-compile $<
-
-.el.elt :
- $(EXEC_NAME) -Q --batch \
-$(PACKAGE_PATHS) \
-$(patsubst %, -l %, $(ELISP_INCLUDES)) \
--l $< \
--l $(CASUAL_LIB_TEST_INCLUDES) \
--l $(patsubst %, ../tests/%, $(ELISP_TEST_INCLUDES)) \
--l $(patsubst %, ../tests/test-%, $<) \
--f ert-run-tests-batch-and-exit
-
-tests: $(ELISP_PACKAGES:.el=.elt) $(ELISP_INCLUDES:.el=.elt)
$(PACKAGE_NAME).elt
-
-compile: $(ELISP_PACKAGES:.el=.elc) $(ELISP_INCLUDES:.el=.elc)
$(PACKAGE_NAME).elc
-
-$(PACKAGE_NAME).elc: $(PACKAGE_NAME).el
- $(EXEC_NAME) -Q --batch $(patsubst %, -l %, $(ELISP_INCLUDES)) \
-$(patsubst %, -l %, $(ELISP_PACKAGES)) \
-$(PACKAGE_PATHS) \
--f batch-byte-compile $<
-
-$(PACKAGE_NAME).elt: $(PACKAGE_NAME).el
- $(EXEC_NAME) -Q --batch \
-$(PACKAGE_PATHS) \
-$(patsubst %, -l %, $(ELISP_INCLUDES)) \
-$(patsubst %, -l %, $(ELISP_PACKAGES)) \
--l $< \
--l $(CASUAL_LIB_TEST_INCLUDES) \
--l ../tests/$(ELISP_TEST_INCLUDES) \
--l $(patsubst %, ../tests/test-%, $<) \
--f ert-run-tests-batch-and-exit
-
-regression: clean compile tests
-
-clean:
- rm -f *.elc
+include Makefile--rules.make
diff --git a/lisp/Makefile-info.make b/lisp/Makefile-info.make
index 4ca43576b1..f874c31b40 100644
--- a/lisp/Makefile-info.make
+++ b/lisp/Makefile-info.make
@@ -14,69 +14,12 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
-TIMESTAMP := $(shell /bin/date "+%Y%m%d_%H%M%S")
-
-EMACS_MAC_APP_HOME=/Applications/MacPorts/EmacsMac.app
-EMACS_MAC_APP_SH=$(EMACS_MAC_APP_HOME)/Contents/MacOS/Emacs.sh
-
-ifneq ("$(wildcard $(EMACS_MAC_APP_SH))","")
- EXEC_NAME=$(EMACS_MAC_APP_SH)
-else
- EXEC_NAME=emacs
-endif
+include Makefile--defines.make
PACKAGE_NAME=casual-info
ELISP_INCLUDES=casual-info-variables.el casual-info-utils.el
ELISP_PACKAGES=casual-info-settings.el
ELISP_TEST_INCLUDES=casual-info-test-utils.el
-CASUAL_BASE_DIR=$(HOME)/Projects/elisp
-CASUAL_LIB_DIR=$(CASUAL_BASE_DIR)/casual
-CASUAL_LIB_LISP_DIR=$(CASUAL_LIB_DIR)/lisp
-CASUAL_LIB_TEST_INCLUDES=$(CASUAL_LIB_DIR)/tests/casual-lib-test-utils.el
-EMACS_CONFIG_DIR=$(HOME)/.config/emacs
PACKAGE_PATHS=-L $(CASUAL_LIB_LISP_DIR)
-
-.PHONY: tests compile regression
-
-.SUFFIXES: .el .elc .elt
-
-.el.elc :
- $(EXEC_NAME) -Q --batch $(patsubst %, -l %, $(ELISP_INCLUDES)) \
--f batch-byte-compile $<
-
-.el.elt :
- $(EXEC_NAME) -Q --batch \
-$(PACKAGE_PATHS) \
-$(patsubst %, -l %, $(ELISP_INCLUDES)) \
--l $< \
--l $(CASUAL_LIB_TEST_INCLUDES) \
--l $(patsubst %, ../tests/%, $(ELISP_TEST_INCLUDES)) \
--l $(patsubst %, ../tests/test-%, $<) \
--f ert-run-tests-batch-and-exit
-
-tests: $(ELISP_PACKAGES:.el=.elt) $(ELISP_INCLUDES:.el=.elt)
$(PACKAGE_NAME).elt
-
-compile: $(ELISP_PACKAGES:.el=.elc) $(ELISP_INCLUDES:.el=.elc)
$(PACKAGE_NAME).elc
-
-$(PACKAGE_NAME).elc: $(PACKAGE_NAME).el
- $(EXEC_NAME) -Q --batch $(patsubst %, -l %, $(ELISP_INCLUDES)) \
-$(patsubst %, -l %, $(ELISP_PACKAGES)) \
-$(PACKAGE_PATHS) \
--f batch-byte-compile $<
-
-$(PACKAGE_NAME).elt: $(PACKAGE_NAME).el
- $(EXEC_NAME) -Q --batch \
-$(PACKAGE_PATHS) \
-$(patsubst %, -l %, $(ELISP_INCLUDES)) \
-$(patsubst %, -l %, $(ELISP_PACKAGES)) \
--l $< \
--l $(CASUAL_LIB_TEST_INCLUDES) \
--l ../tests/$(ELISP_TEST_INCLUDES) \
--l $(patsubst %, ../tests/test-%, $<) \
--f ert-run-tests-batch-and-exit
-
-regression: clean compile tests
-
-clean:
- rm -f *.elc
+include Makefile--rules.make
diff --git a/lisp/Makefile-isearch.make b/lisp/Makefile-isearch.make
index aa00ad3832..a1b3cd1cbb 100644
--- a/lisp/Makefile-isearch.make
+++ b/lisp/Makefile-isearch.make
@@ -14,27 +14,13 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
-TIMESTAMP := $(shell /bin/date "+%Y%m%d_%H%M%S")
-
-EMACS_MAC_APP_HOME=/Applications/MacPorts/EmacsMac.app
-EMACS_MAC_APP_SH=$(EMACS_MAC_APP_HOME)/Contents/MacOS/Emacs.sh
-
-ifneq ("$(wildcard $(EMACS_MAC_APP_SH))","")
- EXEC_NAME=$(EMACS_MAC_APP_SH)
-else
- EXEC_NAME=emacs
-endif
+include Makefile--defines.make
PACKAGE_NAME=casual-isearch
ELISP_INCLUDES=casual-isearch-utils.el \
casual-isearch-settings.el
ELISP_PACKAGES=
ELISP_TEST_INCLUDES=casual-isearch-test-utils.el
-CASUAL_BASE_DIR=$(HOME)/Projects/elisp
-CASUAL_LIB_DIR=$(CASUAL_BASE_DIR)/casual
-CASUAL_LIB_LISP_DIR=$(CASUAL_LIB_DIR)/lisp
-CASUAL_LIB_TEST_INCLUDES=$(CASUAL_LIB_DIR)/tests/casual-lib-test-utils.el
-EMACS_ELPA_DIR=$(HOME)/.config/emacs/elpa
PACKAGE_PATHS= \
-L $(EMACS_ELPA_DIR)/compat-30.0.0.0 \
-L $(EMACS_ELPA_DIR)/seq-2.24 \
diff --git a/lisp/Makefile-lib.make b/lisp/Makefile-lib.make
index 0cc6ff9d17..3cc284bf03 100644
--- a/lisp/Makefile-lib.make
+++ b/lisp/Makefile-lib.make
@@ -14,23 +14,12 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
-TIMESTAMP := $(shell /bin/date "+%Y%m%d_%H%M%S")
-
-EMACS_MAC_APP_HOME=/Applications/MacPorts/EmacsMac.app
-EMACS_MAC_APP_SH=$(EMACS_MAC_APP_HOME)/Contents/MacOS/Emacs.sh
-
-ifneq ("$(wildcard $(EMACS_MAC_APP_SH))","")
- EXEC_NAME=$(EMACS_MAC_APP_SH)
-else
- EXEC_NAME=emacs
-endif
+include Makefile--defines.make
ELISP_INCLUDES=
ELISP_PACKAGES=
ELISP_TEST_INCLUDES=casual-lib-test-utils.el
PACKAGE_NAME=casual-lib
-CASUAL_BASE_DIR=$(HOME)/Projects/elisp
-EMACS_CONFIG_DIR=$(HOME)/.config/emacs
PACKAGE_PATHS=
.PHONY: tests compile regression
diff --git a/lisp/Makefile-re-builder.make b/lisp/Makefile-re-builder.make
index 9bc39005b4..bcc8377480 100644
--- a/lisp/Makefile-re-builder.make
+++ b/lisp/Makefile-re-builder.make
@@ -14,73 +14,17 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
-TIMESTAMP := $(shell /bin/date "+%Y%m%d_%H%M%S")
-
-EMACS_MAC_APP_HOME=/Applications/MacPorts/EmacsMac.app
-EMACS_MAC_APP_SH=$(EMACS_MAC_APP_HOME)/Contents/MacOS/Emacs.sh
-
-ifneq ("$(wildcard $(EMACS_MAC_APP_SH))","")
- EXEC_NAME=$(EMACS_MAC_APP_SH)
-else
- EXEC_NAME=emacs
-endif
+include Makefile--defines.make
PACKAGE_NAME=casual-re-builder
ELISP_INCLUDES=casual-re-builder-utils.el \
casual-re-builder-settings.el
ELISP_PACKAGES=
ELISP_TEST_INCLUDES=casual-re-builder-test-utils.el
-CASUAL_BASE_DIR=$(HOME)/Projects/elisp
-CASUAL_LIB_DIR=$(CASUAL_BASE_DIR)/casual
-CASUAL_LIB_LISP_DIR=$(CASUAL_LIB_DIR)/lisp
-CASUAL_LIB_TEST_INCLUDES=$(CASUAL_LIB_DIR)/tests/casual-lib-test-utils.el
-EMACS_ELPA_DIR=$(HOME)/.config/emacs/elpa
PACKAGE_PATHS= \
-L $(EMACS_ELPA_DIR)/compat-30.0.0.0 \
-L $(EMACS_ELPA_DIR)/seq-2.24 \
-L $(EMACS_ELPA_DIR)/transient-current \
-L $(CASUAL_LIB_LISP_DIR)
-.PHONY: tests compile regression
-
-.SUFFIXES: .el .elc .elt
-
-.el.elc :
- $(EXEC_NAME) -Q --batch $(patsubst %, -l %, $(ELISP_INCLUDES)) \
--f batch-byte-compile $<
-
-.el.elt :
- $(EXEC_NAME) -Q --batch \
-$(PACKAGE_PATHS) \
-$(patsubst %, -l %, $(ELISP_INCLUDES)) \
--l $< \
--l $(CASUAL_LIB_TEST_INCLUDES) \
--l $(patsubst %, ../tests/%, $(ELISP_TEST_INCLUDES)) \
--l $(patsubst %, ../tests/test-%, $<) \
--f ert-run-tests-batch-and-exit
-
-tests: $(ELISP_PACKAGES:.el=.elt) $(ELISP_INCLUDES:.el=.elt)
$(PACKAGE_NAME).elt
-
-compile: $(ELISP_PACKAGES:.el=.elc) $(ELISP_INCLUDES:.el=.elc)
$(PACKAGE_NAME).elc
-
-$(PACKAGE_NAME).elc: $(PACKAGE_NAME).el
- $(EXEC_NAME) -Q --batch $(patsubst %, -l %, $(ELISP_INCLUDES)) \
-$(patsubst %, -l %, $(ELISP_PACKAGES)) \
-$(PACKAGE_PATHS) \
--f batch-byte-compile $<
-
-$(PACKAGE_NAME).elt: $(PACKAGE_NAME).el
- $(EXEC_NAME) -Q --batch \
-$(PACKAGE_PATHS) \
-$(patsubst %, -l %, $(ELISP_INCLUDES)) \
-$(patsubst %, -l %, $(ELISP_PACKAGES)) \
--l $< \
--l $(CASUAL_LIB_TEST_INCLUDES) \
--l ../tests/$(ELISP_TEST_INCLUDES) \
--l $(patsubst %, ../tests/test-%, $<) \
--f ert-run-tests-batch-and-exit
-
-regression: clean compile tests
-
-clean:
- rm -f *.elc
+include Makefile--rules.make
diff --git a/lisp/casual-dired-settings.el b/lisp/casual-dired-settings.el
index f601f7ab61..d9d3479010 100644
--- a/lisp/casual-dired-settings.el
+++ b/lisp/casual-dired-settings.el
@@ -56,7 +56,14 @@
(casual-lib-checkbox-label
dired-vc-rename-file
"Rename via VC"))
- :transient nil)]
+ :transient nil)
+
+ ("v" "Visit Truename"
+ casual-dired--customize-find-file-visit-truename
+ :description (lambda ()
+ (casual-lib-checkbox-label
+ find-file-visit-truename
+ "Visit Truename")))]
["GNU ‘ls’"
("l" "Use GNU ‘ls’ with “--dired”"
@@ -176,10 +183,19 @@ If non-nil, the permissions bits of the files are
editable."
"Customize `wdired-allow-to-redirect-links'.
Customize the variable `wdired-allow-to-redirect-links'.
-If non-nil, the permissions bits of the files are editable."
+If non-nil, the target of the symbolic links are editable."
(interactive)
(customize-variable 'wdired-allow-to-redirect-links))
+(defun casual-dired--customize-find-file-visit-truename ()
+ "Customize `find-file-visit-truename'.
+
+Customize the variable `find-file-visit-truename'. If non-nil,
+visiting a file uses its truename as the visited-file name. This
+effectively follows a symlink to its actual location."
+ (interactive)
+ (customize-variable 'find-file-visit-truename))
+
(defun casual-dired--customize-dired-group ()
"Call the Dired customization group."
(interactive)
diff --git a/lisp/casual-dired-utils.el b/lisp/casual-dired-utils.el
index 9e3ee2c0c9..667e1bddae 100644
--- a/lisp/casual-dired-utils.el
+++ b/lisp/casual-dired-utils.el
@@ -106,9 +106,17 @@ ASCII-range string."
(transient-define-prefix casual-dired-link-tmenu ()
["Link"
- ("h" "Hard link…" dired-do-hardlink :transient nil)
- ("H" "Hard link names with regexp…" dired-do-hardlink-regexp :transient
nil)
- ("S" "Symbolic link names with regexp…" dired-do-symlink-regexp :transient
nil)]
+ ["Symbolic"
+ ("s" "Absolute…" dired-do-symlink)
+ ("S" "Absolute regexp…" dired-do-symlink-regexp)]
+
+ ["Relative"
+ ("r" "Relative…" dired-do-relsymlink)
+ ("R" "Relative regexp…" dired-do-relsymlink-regexp)]
+
+ ["Hard"
+ ("h" "Hard…" dired-do-hardlink)
+ ("H" "Hard regexp…" dired-do-hardlink-regexp)]]
[:class transient-row
(casual-lib-quit-one)
diff --git a/lisp/casual-dired.el b/lisp/casual-dired.el
index f1f2912013..f661d88557 100644
--- a/lisp/casual-dired.el
+++ b/lisp/casual-dired.el
@@ -56,7 +56,7 @@
("C" "Copy to…" dired-do-copy :transient t)
("R" "Rename…" dired-do-rename :transient t)
("D" "Delete…" dired-do-delete :transient t)
- ("S" "Symlink…" dired-do-symlink :transient nil)
+ ("l" "Link›" casual-dired-link-tmenu :transient nil)
("c" "Change›" casual-dired-change-tmenu :transient nil)
("y" "Type" dired-show-file-type :transient t)
("w" "Copy Name" dired-copy-filename-as-kill :transient nil)
diff --git a/tests/test-casual-dired-settings.el
b/tests/test-casual-dired-settings.el
index 44f6206aeb..b968c4f3b5 100644
--- a/tests/test-casual-dired-settings.el
+++ b/tests/test-casual-dired-settings.el
@@ -38,6 +38,7 @@
(push (casualt-suffix-test-vector "s"
#'casual-dired--customize-dired-listing-switches) test-vectors)
(push (casualt-suffix-test-vector "c"
#'casual-dired--customize-casual-dired-listing-switches) test-vectors)
(push (casualt-suffix-test-vector "p"
#'casual-dired--customize-wdired-allow-to-change-permissions) test-vectors)
+ (push (casualt-suffix-test-vector "v"
#'casual-dired--customize-find-file-visit-truename) test-vectors)
(push (casualt-suffix-test-vector "L"
#'casual-dired--customize-wdired-allow-to-redirect-links) test-vectors)
(push (casualt-suffix-test-vector "u"
#'casual-lib-customize-casual-lib-use-unicode) test-vectors)
(push (casualt-suffix-test-vector "R"
#'casual-dired--customize-dired-vc-rename-file) test-vectors)
diff --git a/tests/test-casual-dired-utils.el b/tests/test-casual-dired-utils.el
index 1b39010707..97ba3ddb91 100644
--- a/tests/test-casual-dired-utils.el
+++ b/tests/test-casual-dired-utils.el
@@ -80,9 +80,13 @@
(casualt-dired-setup)
(let ((test-vectors (list)))
+ (push (casualt-suffix-test-vector "s" #'dired-do-symlink) test-vectors)
+ (push (casualt-suffix-test-vector "S" #'dired-do-symlink-regexp)
test-vectors)
+ (push (casualt-suffix-test-vector "r" #'dired-do-relsymlink) test-vectors)
+ (push (casualt-suffix-test-vector "R" #'dired-do-relsymlink-regexp)
test-vectors)
(push (casualt-suffix-test-vector "h" #'dired-do-hardlink) test-vectors)
(push (casualt-suffix-test-vector "H" #'dired-do-hardlink-regexp)
test-vectors)
- (push (casualt-suffix-test-vector "S" #'dired-do-symlink-regexp)
test-vectors)
+
(casualt-suffix-testbench-runner test-vectors
#'casual-dired-link-tmenu
diff --git a/tests/test-casual-dired.el b/tests/test-casual-dired.el
index 4f6974f95a..91aedf0ef6 100644
--- a/tests/test-casual-dired.el
+++ b/tests/test-casual-dired.el
@@ -42,7 +42,7 @@
(push (casualt-suffix-test-vector "C" #'dired-do-copy) test-vectors)
(push (casualt-suffix-test-vector "R" #'dired-do-rename) test-vectors)
(push (casualt-suffix-test-vector "D" #'dired-do-delete) test-vectors)
- (push (casualt-suffix-test-vector "S" #'dired-do-symlink) test-vectors)
+ (push (casualt-suffix-test-vector "l" #'casual-dired-link-tmenu)
test-vectors)
(push (casualt-suffix-test-vector "c" #'casual-dired-change-tmenu)
test-vectors)
(push (casualt-suffix-test-vector "y" #'dired-show-file-type)
test-vectors)
(push (casualt-suffix-test-vector "w" #'dired-copy-filename-as-kill)
test-vectors)