[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: wset for frames
From: |
Eduardo Ochs |
Subject: |
Re: wset for frames |
Date: |
Tue, 2 Nov 2021 13:30:12 -0300 |
Also here:
http://angg.twu.net/eev-current/eev-template0.el.html#lexical-binding
On Tue, 2 Nov 2021 at 13:26, Eduardo Ochs <eduardoochs@gmail.com> wrote:
>
> That's a very good approach!
>
> I would rewrite it as two functions: one that just receives tla,
> TLA, and fname, and uses ee-template0 to produce a big string
> from them, and a second one that processes the current line,
> obtains tla, TLA, and fname, calls the first function, and
> inserts the string that the first one produces. I'll send you
> some examples later. Ah, btw, I started to rewrite your code with
> ee-template0, but I didn't finish because I found something more
> urgent - below.
>
> Did you try to use ee-template0? Did you fail? I just wrote an
> explanation - much better than the previous one - for why it
> needs dynamic binding... it is here:
>
> (find-wgeta-elisp "http://angg.twu.net/eev-current/eev-template0.el"
> "lexical-binding")
>
> More later! =),
> Eduardo
>
> On Tue, 2 Nov 2021 at 11:51, Erich Ruff <erich_ruff@t-online.de> wrote:
> >
> >
> > Hello Eduardo,
> >
> > here is my code - if you can improve it: please do so!
> >
> > ----
> >
> > if your cursor stands on the line beginning with --> (code-tla-pdf
> > call --> write-tlas
> >
> > (code-tla-pdf 'fig1
> > "/mnt/fichte/fuchs_erich-fichte_im_gespraech_1_1762-1798.pdf")
> >
> >
> > (defun write-tlas ()
> > "take a code-tla-pdf line and create
> > defun to txt-version of pdf
> > find-wset to open it in a persistent frame"
> > (interactive)
> > (let* ((beg (line-beginning-position))
> > (end (line-end-position))
> > (strx (buffer-substring-no-properties beg end))
> > (tlax (nth 1 (split-string strx )))
> > (tla (replace-regexp-in-string "'" "" tlax))
> > (fnamex (nth 2 (split-string strx )))
> > (fname (replace-regexp-in-string ")" "" fnamex))
> > (posa "(&rest pos-spec-list")
> > (posb "pos-spec-list")
> > (ia "(interactive)\n")
> > (apply "(apply 'find-pdf-txt")
> > (posz "pos-spec-list")
> > (TLA (concat (capitalize tla) "x"))
> > (fwset "(find-wset \"F_\" ")
> > (wrest (concat "`(" tla "x" " ,@pos-spec-list)))"))
> > (alla (concat "\n(defun " tla "x" " " posa ")\n" ia " " apply " "
> > fname " " posb "))\n"))
> > (allb (concat "\n(defun " TLA " " posa ")\n" ia " " fwset " \""
> > TLA "\"" " " wrest "\n"))
> > )
> > (forward-line 1)
> > (insert alla)
> > (forward-line 1)
> > (insert allb)
> > (forward-line 1)
> > (insert ";; ")
> > (cl-loop for i from 1 to 80 do (insert "-"))
> > (insert "\n\n")
> > )
> > )
> >
> > Cheers
> > Erich
> >
> >
> > On Di 02 Nov 2021 at 11:25, Eduardo Ochs <eduardoochs@gmail.com> wrote:
> >
> > > Please share!
> > > I'll try to fix find-wset "F".
- wset for frames, Erich Ruff, 2021/11/01
- Re: wset for frames, Eduardo Ochs, 2021/11/01
- Re: wset for frames, Erich Ruff, 2021/11/01
- Re: wset for frames, Eduardo Ochs, 2021/11/01
- Re: wset for frames, Erich Ruff, 2021/11/02
- Re: wset for frames, Eduardo Ochs, 2021/11/02
- Re: wset for frames, Erich Ruff, 2021/11/02
- Re: wset for frames, Eduardo Ochs, 2021/11/02
- Re: wset for frames,
Eduardo Ochs <=
- Re: wset for frames, Erich Ruff, 2021/11/05
- Re: wset for frames, Eduardo Ochs, 2021/11/06
- Re: wset for frames, Erich Ruff, 2021/11/07
- Re: wset for frames, Eduardo Ochs, 2021/11/15
- Re: wset for frames, Erich Ruff, 2021/11/03
- Re: wset for frames, Eduardo Ochs, 2021/11/03
- Re: wset for frames, Erich Ruff, 2021/11/03
- Re: wset for frames, Eduardo Ochs, 2021/11/03