[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Org to Markdown programmatically
From: |
Jean Louis |
Subject: |
Re: Org to Markdown programmatically |
Date: |
Wed, 5 May 2021 23:11:15 +0300 |
User-agent: |
Mutt/2.0.6 (2021-03-06) |
* Emanuel Berg via Users list for the GNU Emacs text editor
<help-gnu-emacs@gnu.org> [2021-05-05 18:47]:
> >> Anyway found lots of small mistakes that I corrected. I run
> >> it on all my blog post pages - and this article by far
> >> scored the highest, 79%
> >>
> >> https://dataswamp.org/~incal/blog/box-10/marco-antonio-barrera.html
> >
> > Scored for which term?
>
> Overall score.
Overall score of how, what? Where?
> >>> (let ((my-keywords '("TODO" hi-yellow
> >>> "DONE" hi-green
> >>> "URGENT" hi-red-b)))
> >>> (while my-keywords
> >>> (let ((keyword (pop my-keywords))
> >>> (highlight (pop my-keywords)))
> >>> (highlight-regexp keyword highlight)))))
> >>
> >> Hahaha, creative! :)
> >>
> >> But go get yourself a proper loop, will you :)
> >
> > For me, proper loops in Emacs Lisp are `while' and mapping
> > functions. It gives me more clarity due to old habbits.
>
> `while' is proper but not here as you `pop' twice in the body
> when you can iterate that.
I like popping.
I don't know why would the word "iterate" not relate to `while' here.
Show me how would you iterate on the above function.
When there are 2 elements to take out of the list and do something
with it, I like to pop it twice. Very handy, and why not.
Imagine if there are 3... popping thrice is so much easier than
thinking of what... I have no idea.
> Also my-keywords ... that name, also how it mixes two things,
> plus insists on a certain order without enforcing it.
You give me too much thinking here, more than it was necessary for the
function to work.
> Ever heard that once you pop you can't stop? That's what's going to
> happen, I'm afraid.
Since I have started changing `dolist' to `while' that is what
happened, there is often pop.
> > `dolist' and `dotimes', or cl-loop, I will never use in
> > Emacs Lisp. I may use it in Common Lisp.
>
> Sorry, but your boycott notwithstanding, they are still Elisp
> functions, so actually you can't use them in CL :P
Maybe I am just bored. `while' loops seem to me easier
understandable, visible. Times change.
--
Jean
Take action in Free Software Foundation campaigns:
https://www.fsf.org/campaigns
Sign an open letter in support of Richard M. Stallman
https://stallmansupport.org/
https://rms-support-letter.github.io/
- Re: Org to Markdown programmatically, (continued)
- Re: Org to Markdown programmatically, Emanuel Berg, 2021/05/05
- Re: Org to Markdown programmatically, Emanuel Berg, 2021/05/05
- Re: Org to Markdown programmatically, Stefan Monnier, 2021/05/05
- Re: Org to Markdown programmatically, Emanuel Berg, 2021/05/05
- Re: Org to Markdown programmatically, Emanuel Berg, 2021/05/05
- Re: Org to Markdown programmatically, Stefan Monnier, 2021/05/05
- Re: Org to Markdown programmatically, Jean Louis, 2021/05/05
- Re: Org to Markdown programmatically, Emanuel Berg, 2021/05/05
- Re: Org to Markdown programmatically, Jean Louis, 2021/05/05
- Re: Org to Markdown programmatically, Emanuel Berg, 2021/05/05
- Re: Org to Markdown programmatically,
Jean Louis <=
- Re: Org to Markdown programmatically, Emanuel Berg, 2021/05/05
- Re: Org to Markdown programmatically, Jean Louis, 2021/05/05
- Re: Org to Markdown programmatically, Emanuel Berg, 2021/05/05
- Re: Org to Markdown programmatically, Jean Louis, 2021/05/05
- Re: Org to Markdown programmatically, Emanuel Berg, 2021/05/05
- Re: Org to Markdown programmatically, Jean Louis, 2021/05/05
- Re: Org to Markdown programmatically, Emanuel Berg, 2021/05/05
- Re: Org to Markdown programmatically, Jean Louis, 2021/05/05
- Re: Org to Markdown programmatically, Jean Louis, 2021/05/22