diff options
Diffstat (limited to 'app-emacs/markdown-mode')
7 files changed, 205 insertions, 34 deletions
diff --git a/app-emacs/markdown-mode/Manifest b/app-emacs/markdown-mode/Manifest index 4cfeb84fe301..ceeb193b9d34 100644 --- a/app-emacs/markdown-mode/Manifest +++ b/app-emacs/markdown-mode/Manifest @@ -1 +1 @@ -DIST markdown-mode-2.3.el 387130 BLAKE2B acb583126a6f952835537f9e386df5f9a8fda5e49a14520e153c0cc99fc58cca596607b282f9f7070b001fe8165d50adb9abb81de1b03ae102cf2061de587810 SHA512 0820c5ae585e0f5ee8fef9eca40f2de2ad632a2559ea7f447cd19ded592de38bf2f3df8491796c15eb06723fe2af904335535af145356c7a7f9f855612263aaf +DIST markdown-mode-2.6.tar.gz 222181 BLAKE2B 173ba3e152bc4fa45548833bbf87e4e00a56fa2150874b8c3ef395e8364cabeebbe7ab1e582dd55bd531b2a130191b3e79db410b126b6edc8f0573f742b47a33 SHA512 fbfb7a98bb0c562d501d6b1c40987751233ccf386864db43296e02bcaf7d2b8c8d634f1411b91662947e90f33466728101ec0018d2abf46df936f7b19a79b371 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/files/markdown-mode-2.6-remove-failing-tests.patch b/app-emacs/markdown-mode/files/markdown-mode-2.6-remove-failing-tests.patch new file mode 100644 index 000000000000..4d1396dcb12e --- /dev/null +++ b/app-emacs/markdown-mode/files/markdown-mode-2.6-remove-failing-tests.patch @@ -0,0 +1,91 @@ +--- a/tests/markdown-test.el ++++ b/tests/markdown-test.el +@@ -6756,46 +6756,6 @@ x|" + (markdown-indent-region (line-beginning-position) (line-end-position) nil) + (should (string-equal (buffer-string) " #. abc\n def\n")))) + +-(ert-deftest test-markdown-ext/wiki-link-rules () +- "Test wiki link search rules and font lock for missing pages." +- (let ((markdown-enable-wiki-links t) +- (markdown-wiki-link-fontify-missing t) +- (markdown-wiki-link-search-type '(project))) +- (progn +- (find-file (expand-file-name "wiki/root" markdown-test-dir)) +- (unwind-protect +- (progn +- (markdown-mode) +- ;; search rules +- (should (string-match-p +- "/sub/foo$" +- (markdown-convert-wiki-link-to-filename "foo"))) +- (should (string-equal +- (markdown-convert-wiki-link-to-filename "doesnotexist") +- "doesnotexist")) +- ;; font lock +- (markdown-test-range-has-property 1 11 'font-lock-face 'markdown-link-face) +- (markdown-test-range-has-property 14 33 'font-lock-face 'markdown-missing-link-face) +- (markdown-test-range-has-property 36 42 'font-lock-face 'markdown-link-face) +- (markdown-test-range-has-property 45 60 'font-lock-face 'markdown-missing-link-face)) +- (kill-buffer))) +- (progn +- (find-file (expand-file-name "wiki/sub/foo" markdown-test-dir)) +- (unwind-protect +- (progn +- (markdown-mode) +- ;; search rules +- (should (string-match-p +- "/wiki/root$" +- (markdown-convert-wiki-link-to-filename "root"))) +- (should (string-equal +- (markdown-convert-wiki-link-to-filename "doesnotexist") +- "doesnotexist")) +- ;; font lock +- (markdown-test-range-has-property 1 16 'font-lock-face 'markdown-missing-link-face) +- (markdown-test-range-has-property 19 26 'font-lock-face 'markdown-link-face)) +- (kill-buffer))))) +- + (ert-deftest test-markdown-ext/wiki-link-keep-match-data () + "Test that markdown-wiki-link-p keeps expected match data. + Detail: https://github.com/jrblevin/markdown-mode/pull/590" +@@ -7185,41 +7145,6 @@ foo(bar=None) + (cl-loop for ov in (overlays-in (car bounds) (cdr bounds)) + thereis (overlay-get ov 'flyspell-overlay)))) + +-(ert-deftest test-markdown-flyspell/check-word-p () +- "Test for `flyspell'." +- (skip-unless (executable-find ispell-program-name)) +- (markdown-test-string "aaa +- +-``` +-bbb +-``` +- +-ccc +- +-`ddd` +- +-eee +- +-<!-- fff --> +- +-@ref9999 +-" +- (flyspell-buffer) +- (search-forward "aaa") +- (should (markdown-test-flyspell-incorrect-word-p)) +- (search-forward "bbb") ;; in code block +- (should-not (markdown-test-flyspell-incorrect-word-p)) +- (search-forward "ccc") +- (should (markdown-test-flyspell-incorrect-word-p)) +- (search-forward "ddd") ;; in inline code +- (should-not (markdown-test-flyspell-incorrect-word-p)) +- (search-forward "eee") +- (should (markdown-test-flyspell-incorrect-word-p)) +- (search-forward "fff") ;; in comment +- (should-not (markdown-test-flyspell-incorrect-word-p)) +- (search-forward "@ref") ;; pandoc reference +- (should-not (markdown-test-flyspell-incorrect-word-p)))) +- + (ert-deftest test-markdown-flyspell/remove-overlay () + "Test non-dictionary word in code block with `flyspell-mode'. + Details: https://github.com/jrblevin/markdown-mode/issues/311" diff --git a/app-emacs/markdown-mode/markdown-mode-2.3.ebuild b/app-emacs/markdown-mode/markdown-mode-2.3.ebuild deleted file mode 100644 index 1a8f2d0437c3..000000000000 --- a/app-emacs/markdown-mode/markdown-mode-2.3.ebuild +++ /dev/null @@ -1,24 +0,0 @@ -# Copyright 1999-2018 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI=5 - -inherit elisp - -DESCRIPTION="Major mode for editing Markdown-formatted text files" -HOMEPAGE="https://jblevins.org/projects/markdown-mode/" -SRC_URI="https://stable.melpa.org/packages/${P}.el" - -LICENSE="GPL-2+" -SLOT="0" -KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux" - -RDEPEND="|| ( dev-python/markdown2 dev-python/markdown )" - -S="${WORKDIR}" - -SITEFILE="50${PN}-gentoo.el" - -src_unpack() { - cp "${DISTDIR}"/${P}.el ${PN}.el || die -} diff --git a/app-emacs/markdown-mode/markdown-mode-2.6.ebuild b/app-emacs/markdown-mode/markdown-mode-2.6.ebuild new file mode 100644 index 000000000000..379c5c74a197 --- /dev/null +++ b/app-emacs/markdown-mode/markdown-mode-2.6.ebuild @@ -0,0 +1,55 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit elisp optfeature + +DESCRIPTION="Major mode for editing Markdown-formatted text files" +HOMEPAGE="https://jblevins.org/projects/markdown-mode/" + +if [[ ${PV} == *9999* ]] ; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/jrblevin/${PN}.git" +else + SRC_URI="https://github.com/jrblevin/${PN}/archive/v${PV}.tar.gz + -> ${P}.tar.gz" + KEYWORDS="amd64 ~arm64 ~x86 ~amd64-linux ~x86-linux" +fi + +LICENSE="GPL-3+" +SLOT="0" +IUSE="test" +RESTRICT="!test? ( test )" + +RDEPEND=" + || ( + dev-python/markdown2 + dev-python/markdown + virtual/pandoc + ) +" +BDEPEND=" + test? ( + virtual/pandoc + || ( + app-text/aspell[l10n_en] + app-text/hunspell[l10n_en] + ) + ) +" + +PATCHES=( + "${FILESDIR}"/${PN}-2.5-markdown-command.patch + "${FILESDIR}"/${PN}-2.5-test.patch + "${FILESDIR}"/${PN}-2.6-remove-failing-tests.patch +) + +DOCS=( CHANGES.md CONTRIBUTING.md README.md ) +SITEFILE="50${PN}-gentoo.el" + +pkg_postinst() { + elisp_pkg_postinst + + optfeature "editing Markdown source code blocks" app-emacs/edit-indirect +} diff --git a/app-emacs/markdown-mode/metadata.xml b/app-emacs/markdown-mode/metadata.xml index 40217af13785..b2e9a0fad2fd 100644 --- a/app-emacs/markdown-mode/metadata.xml +++ b/app-emacs/markdown-mode/metadata.xml @@ -1,12 +1,18 @@ <?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> + <pkgmetadata> -<maintainer type="person"> - <email>naota@gentoo.org</email> -</maintainer> -<maintainer type="project"> - <email>gnu-emacs@gentoo.org</email> - <name>Gentoo GNU Emacs project</name> -</maintainer> -<stabilize-allarches/> + <maintainer type="person"> + <email>naota@gentoo.org</email> + <name>Naohiro Aota</name> + </maintainer> + <maintainer type="project"> + <email>gnu-emacs@gentoo.org</email> + <name>Gentoo GNU Emacs project</name> + </maintainer> + <stabilize-allarches /> + <upstream> + <bugs-to>https://github.com/jrblevin/markdown-mode/issues/</bugs-to> + <remote-id type="github">jrblevin/markdown-mode</remote-id> + </upstream> </pkgmetadata> |