eev
[Top][All Lists]
Advanced

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

Re: eepitch with prefixes


From: Tomas Hlavaty
Subject: Re: eepitch with prefixes
Date: Fri, 08 Apr 2022 23:15:50 +0200

Hallo Eduardo,

On Fri 17 Dec 2021 at 04:08, Eduardo Ochs <eduardoochs@gmail.com> wrote:
> I finally found, and implemented, a way to preprocess lines for
> eepitch that I like. It is explained here:
>
>   (find-eepitch-intro "3.3. `eepitch-preprocess-line'")

that is a great hook, thank you!

It took me a while to figure it out.
This is what works for me, straight to the point example
(it would be faster for me to figure it out if it was the first thing in
the above intro):

• (setq eepitch-preprocess-regexp "^#: ")
• (defun eepitch-preprocess-line (line) (replace-regexp-in-string 
eepitch-preprocess-regexp "" line))
#: • (eepitch-shell)
#: • (eepitch-kill)
#: • (eepitch-shell)
#: gnuplot
#: load "foo.plt"
#: plot sin(x)
#: • (defun eepitch-preprocess-line (line) line)
• (eepitch-kill)

On the whole, lots of user specific configuration could be eliminated.

For example, eepitch-preprocess-regexp could be defined in eev
and the default eepitch-preprocess-line could look like this:

(defvar eepitch-preprocess-regexp nil)
(defun eepitch-preprocess-line (line)
  (if eepitch-preprocess-regexp
    (replace-regexp-in-string eepitch-preprocess-regexp "" line)
    line))

One could then simply set the eepitch-preprocess-regexp variable in the
local-variables section of gnuplot-mode buffers.

Even better would be, if eev automatically figured out buffer mode
specific single line comments and dealt with those automatically.
I don't know how to do this.


Another issue I am facing is that my email client indents email threads
with spaces so I cannot run eepitch blocks directly from emails with the
default eepitch config.  It would be great if that worked without any
custom user configuration.

Thank you,

Tomas



reply via email to

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