[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: wset for frames
From: |
Erich Ruff |
Subject: |
Re: wset for frames |
Date: |
Tue, 02 Nov 2021 15:46:32 +0100 |
User-agent: |
mu4e 1.6.1; emacs 27.2 |
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 <=
- Re: wset for frames, Eduardo Ochs, 2021/11/02
- Re: wset for frames, Eduardo Ochs, 2021/11/02
- 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