~arjca/gemtext-mode.el

db132bd69c0927dd755362c3aea99936e4f6776d — arjca 11 months ago 431b3b1 stable
doc: add MELPA installation in README
1 files changed, 19 insertions(+), 4 deletions(-)

M README.md
M README.md => README.md +19 -4
@@ 1,16 1,31 @@
# Gemtext Mode

*gemtext-mode* is a major mode for editing [Gemtext](https://geminiprotocol.net/docs/gemtext.gmi)-formatted text. This mode is a free software, licensed under the [GNU GPL, version 3 or later](LICENSE.txt).
*gemtext-mode* is a major mode for editing [Gemtext](https://geminiprotocol.net/docs/gemtext.gmi)-formatted text with GNU Emacs. This mode is a free software, licensed under the [GNU GPL, version 3 or later](LICENSE.txt).

## Installation

## MELPA

You can install *gemtext-mode* from MELPA.

First, you have to configure GNU Emacs to get packages from MELPA if you haven't yet:
```elisp
(add-to-list 'package-archives
             '("melpa" . "https://melpa.org/packages/") t)
```
Then, you just have to install *gemtext-mode* like any other package:
```elisp
(package-install 'gemtext-mode)
(require 'gemtext-mode)
```

### Direct download

You can manually download and install gemtext-mode :
You can manually download and install *gemtext-mode* :
* Download a stable version of the file `gemtext-mode.el` (check the latest tag on [the Git repository](https://git.sr.ht/~arjca/gemtext-mode.el)), and save it where GNU Emacs can find it (check the list `load-path` of your configuration !) ;
* Add the following lines in your GNU Emacs configuration :
```elisp
(autoload 'gemtext-mode "gemtext-mode"
(autoload 'gemtext-mode "Gemtext"
  "Major mode for Gemtext-formatted text." t)
(add-to-list 'auto-mode-alist '("\\.gmi\\'" . gemtext-mode))
```


@@ 39,6 54,6 @@ The mode, when enabled, highlights the syntax of Gemtext files. It also enables 

* URL: [https://git.carcosa.net/jmcbray/gemini.el](https://git.carcosa.net/jmcbray/gemini.el)

`gemini-mode` is a mode available on `melpa` with similar features: highlighting and some editing utilities. Its source code is very simple, but that simplicity lead to some defects that cannot be (at the best of my knowledge) solved without an important rework. For instance, the mode is struggling with files containing several preformatted text blocks (e.g., it fontifies the content between two blocks as preformatted text); this is due to the way fontification is implemented, based on regular expressions. That design decision make it also inconvenient to implement some features to the mode (e.g., folding sections).
`gemini-mode` is a mode available on MELPA with similar features: highlighting and some editing utilities. Its source code is very simple, but that simplicity lead to some defects that cannot be (at the best of my knowledge) solved without an important rework. For instance, the mode is struggling with files containing several preformatted text blocks (e.g., it fontifies the content between two blocks as preformatted text); this is due to the way fontification is implemented, based on regular expressions. That design decision make it also inconvenient to implement some features to the mode (e.g., folding sections).

`gemtext-mode` was initially a patch for `gemini-mode`, replacing RegExp-based fontification by syntax propertization but ended with a completely different code base. This is why it was not submitted for merging in `gemini-mode`.