summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app-emacs/markdown-mode')
-rw-r--r--app-emacs/markdown-mode/Manifest1
-rw-r--r--app-emacs/markdown-mode/files/markdown-mode-2.5-markdown-command.patch13
-rw-r--r--app-emacs/markdown-mode/files/markdown-mode-2.5-test.patch30
-rw-r--r--app-emacs/markdown-mode/markdown-mode-2.5.ebuild31
4 files changed, 75 insertions, 0 deletions
diff --git a/app-emacs/markdown-mode/Manifest b/app-emacs/markdown-mode/Manifest
index 90217be7d132..97627f5d4bbf 100644
--- a/app-emacs/markdown-mode/Manifest
+++ b/app-emacs/markdown-mode/Manifest
@@ -1 +1,2 @@
DIST markdown-mode-2.4.tar.gz 211229 BLAKE2B 49a369d1b418634449cdac3103e1b107b5dd839edba6a3329539b80cf21bfb0f01aa436ec6deb256bfb5f03ef73b716943730adc4a87b52262dfccbd7923556e SHA512 8bf2acd7f402c036c57521340d26cea150935964f04f1343c2e17147d63226c815150be62c0b79a2ba48e55b3155d94f38caf1ec43c21d4f32dee6e73cc261a0
+DIST markdown-mode-2.5.tar.gz 218329 BLAKE2B ea4f3e316383951c00e6a68e388db228567b7a06ac87bb268f28c026a8518e9a8516f27d137c79c24727bd71c785a6e9f1217d160e472abc7bdba2c5bda17f16 SHA512 6bb4d79a5a4c3d3891fc8be4d357fa6dccae9f3eeb8f6c04f840da6cfe6875090ebcc0b1a74961e2a4ac1a59389781fa37ef2420383019983705c2cc66db5b8e
diff --git a/app-emacs/markdown-mode/files/markdown-mode-2.5-markdown-command.patch b/app-emacs/markdown-mode/files/markdown-mode-2.5-markdown-command.patch
new file mode 100644
index 000000000000..99ed3d2149b7
--- /dev/null
+++ b/app-emacs/markdown-mode/files/markdown-mode-2.5-markdown-command.patch
@@ -0,0 +1,13 @@
+dev-python/markdown2 installs its command as markdown2
+
+--- markdown-mode-2.5/markdown-mode.el
++++ markdown-mode-2.5/markdown-mode.el
+@@ -94,7 +94,7 @@
+ :group 'text
+ :link '(url-link "https://jblevins.org/projects/markdown-mode/"))
+
+-(defcustom markdown-command (let ((command (cl-loop for cmd in '("markdown" "pandoc" "markdown_py")
++(defcustom markdown-command (let ((command (cl-loop for cmd in '("markdown" "pandoc" "markdown2" "markdown_py")
+ when (executable-find cmd)
+ return (file-name-nondirectory it))))
+ (or command "markdown"))
diff --git a/app-emacs/markdown-mode/files/markdown-mode-2.5-test.patch b/app-emacs/markdown-mode/files/markdown-mode-2.5-test.patch
new file mode 100644
index 000000000000..0bd1e8b7f667
--- /dev/null
+++ b/app-emacs/markdown-mode/files/markdown-mode-2.5-test.patch
@@ -0,0 +1,30 @@
+This test seems to expect interactive input, therefore disable.
+
+--- markdown-mode-2.5/tests/markdown-test.el
++++ markdown-mode-2.5/tests/markdown-test.el
+@@ -6643,25 +6643,6 @@
+ (should (string= (markdown-wiki-link-link) "Zettel Markdown")))
+ (kill-buffer)))))
+
+-(ert-deftest test-markdown-ext/wiki-link-search-under-project ()
+- "Test that searching link under project root."
+- (let ((markdown-enable-wiki-links t)
+- (markdown-link-space-sub-char " ")
+- (markdown-wiki-link-search-type '(project))
+- (expected (expand-file-name "wiki/pr590/Guide/Zettel Markdown/math.md"
+- markdown-test-dir)))
+- (progn
+- (find-file (expand-file-name "wiki/pr590/Guide/Plugin/Link.md" markdown-test-dir))
+- (unwind-protect
+- (progn
+- (markdown-mode)
+- (re-search-forward "math")
+- (goto-char (match-beginning 0))
+- (markdown-wiki-link-p) ;; create match-data
+- (let ((link (markdown-convert-wiki-link-to-filename (markdown-wiki-link-link))))
+- (should (string= (expand-file-name link) expected))))
+- (kill-buffer)))))
+-
+ (ert-deftest test-markdown-ext/wiki-link-major-mode ()
+ "Test major-mode of linked page."
+ (let ((markdown-enable-wiki-links t)
diff --git a/app-emacs/markdown-mode/markdown-mode-2.5.ebuild b/app-emacs/markdown-mode/markdown-mode-2.5.ebuild
new file mode 100644
index 000000000000..6fbdac47a46a
--- /dev/null
+++ b/app-emacs/markdown-mode/markdown-mode-2.5.ebuild
@@ -0,0 +1,31 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+NEED_EMACS=25.1
+
+inherit elisp
+
+DESCRIPTION="Major mode for editing Markdown-formatted text files"
+HOMEPAGE="https://jblevins.org/projects/markdown-mode/"
+SRC_URI="https://github.com/jrblevin/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-3+"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="test"
+RESTRICT="!test? ( test )"
+
+RDEPEND="|| (
+ app-text/pandoc
+ dev-python/markdown2
+ dev-python/markdown
+ )"
+BDEPEND="test? ( app-text/pandoc )"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-2.5-markdown-command.patch
+ "${FILESDIR}"/${PN}-2.5-test.patch
+)
+SITEFILE="50${PN}-gentoo.el"
+DOCS="CHANGES.md CONTRIBUTING.md README.md"