emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Convert README.org to plain text README while installing package


From: Philip Kaludercic
Subject: Re: Convert README.org to plain text README while installing package
Date: Sun, 26 Jun 2022 10:25:26 +0000

Stefan Monnier <monnier@iro.umontreal.ca> writes:

>> The following should address most of your points, just one question,
>
> Nicely hidden inside the signature :-)
>
>> > - Your code may end up "rendering" a Markdown file for no obvious benefit
>> >   since the rendering is a no-op (tho I think this is very hypothetical
>> >   and likely can't happen because of other constraints).
>> Why should this be?  Both this and the previous iteration of the patch
>> check (eq (car readme-content) 'text/plain), and currently there is only
>> text/plain (which includes markdown) and text/org?
>
> text/plain does not include markdown.  Markdown files will have type
> text/markdown.

But in that case, markdown files could still be "rendered", by replacing
regular double quotes with fancy quotes, removing unnecessary code
blocks, etc.

E.g. using "pandoc -t plain", this file

--8<---------------cut here---------------start------------->8---
# This is a title

So and so *this* and __that__, "they say", yes!

some more stuff
===============

How about some [code](https://code.com)?

```lisp
(defun call-me () (call-me) (call-me) (anytime))
```

or like this

    $ ls -l

### The Remainder

So what is left?

* A list
* A number list
  1. one
  2. two
  3. three
* a horizontal rule

---

that's it
--8<---------------cut here---------------end--------------->8---

is converted into

--8<---------------cut here---------------start------------->8---
This is a title

So and so this and that, “they say”, yes!

some more stuff

How about some code?

    (defun call-me () (call-me) (call-me) (anytime))

or like this

    $ ls -l

The Remainder

So what is left?

-   A list
-   A number list
    1.  one
    2.  two
    3.  three
-   a horizontal rule

------------------------------------------------------------------------

that’s it
--8<---------------cut here---------------end--------------->8---

While not perfect (and I am not arguing to necessarily use pandoc), I do
think that there is enough that can be done with markup while still
dealing with plain text.

>
>         Stefan



reply via email to

[Prev in Thread] Current Thread [Next in Thread]