From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eduardo Ochs Newsgroups: gmane.emacs.help Subject: Re: Workshop to save M$ Windows users - help needed Date: Sun, 3 Oct 2021 16:15:11 -0300 Message-ID: References: <837deua1sd.fsf@gnu.org> <834k9y9ysj.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="17534"; mail-complaints-to="usenet@ciao.gmane.io" Cc: help-gnu-emacs To: Eli Zaretskii Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Sun Oct 03 21:16:38 2021 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mX6yT-0004M3-Vl for geh-help-gnu-emacs@m.gmane-mx.org; Sun, 03 Oct 2021 21:16:38 +0200 Original-Received: from localhost ([::1]:53286 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mX6yP-0004Lw-Gm for geh-help-gnu-emacs@m.gmane-mx.org; Sun, 03 Oct 2021 15:16:33 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:37826) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mX6xL-0004Lm-L0 for help-gnu-emacs@gnu.org; Sun, 03 Oct 2021 15:15:28 -0400 Original-Received: from mail-pl1-x635.google.com ([2607:f8b0:4864:20::635]:38426) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mX6xJ-0001wn-Kt; Sun, 03 Oct 2021 15:15:27 -0400 Original-Received: by mail-pl1-x635.google.com with SMTP id x4so9665862pln.5; Sun, 03 Oct 2021 12:15:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=ifqm+JKPK2TNo/qrrVKemc7wHAvA/3zQJ9oCv3vPcuc=; b=U5ZeznjIyYUKMoUzl7VYjDQop7ABvKCGh/rMZFY6R3jzyWT+OU6ldnc3FfrTiqs7YP PrZfm6IKiCXzcOJLU6qaP39vFfnVwx3v4BRkn7vY7tmrWI6lnkh4YhAtgExEp0+o2NYb /xYh2JGIsZsjiHpOH+k0H7IUNCDEc6PmNoDtCkf6b0QlDwLe/i5sNH8hueCf3nXxmsrf fAViUl7kKX0WZpD3OuNdsaQWV6sc2O8PbOC2A1fOsMV2ncVU2EKEZHJ4FWZ7QGIhcNT/ ws5RpnZwcy+oDzzsdeHuqemaVw/69bHnlKH+C7bsTghXOqBvfdrDmS/h7hiQzoD9c/4Y CmsQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=ifqm+JKPK2TNo/qrrVKemc7wHAvA/3zQJ9oCv3vPcuc=; b=tvPN+bgKViuZfan0uOvDDQEUT1oHItnb019q7ide7cFHYWmQKUHeTpgGQxu88qVKAh W9P/o3IGS7qthFV8knFl4SG0xzXQUNNRH15sxjeJIzhpLnXk7QiGb0fQ6RGhnv1ENgtb z3l4dcMTd9iFB/zoHzuRIHyWgzlDbSXkaqb9rMEVUXmVklLGGWGzuFXz/F3ptSY0oPIt OtLhCZ3MvO7dy2sM3+BF1wqgsInWqrty4RBmIuoUco801weFPrSP+yhIa9ggyykLsEjM 57mgPGCYPuoqIZUvz7KJeJlgKrVxZbMFhiUqx6rCF3XTWwRI16H8h9xOQtfBwlacsUNz rd4Q== X-Gm-Message-State: AOAM530cNS62JLOiAYvLUPdtVgGpQNxqrj/DLYFp0YLLIS1NBLK5dded 30AEkKMtKYBvcQz+pfQbTi/hdKzvlKC9jgaz7FP/NmNopGs= X-Google-Smtp-Source: ABdhPJw9UIbYMqksI3hbTDLU3A/rtgDQaxZoc5QJFwro54nQhX4yOym4YkRZHXlUDdiPnFYNRxEeka3+FhHMqvwImBs= X-Received: by 2002:a17:902:b68b:b0:13a:1239:b8d9 with SMTP id c11-20020a170902b68b00b0013a1239b8d9mr19645014pls.25.1633288523299; Sun, 03 Oct 2021 12:15:23 -0700 (PDT) In-Reply-To: <834k9y9ysj.fsf@gnu.org> Received-SPF: pass client-ip=2607:f8b0:4864:20::635; envelope-from=eduardoochs@gmail.com; helo=mail-pl1-x635.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:133527 Archived-At: On Sun, 3 Oct 2021 at 07:41, Eli Zaretskii wrote: > > Do you really need that? The Windows Explorer can unzip files just > fine, and a browser or Emacs itself can be used to fetch files. Hi Eli, Let me start by showing some kinds of useful one-liners. 1. (find-eev-quick-intro "2. Evaluating Lisp" "M-0 M-e") (find-eev-quick-intro "3.1. Non-elisp hyperlinks" "M-x brff") (find-emacs-keys-intro "5. Undoing") The first sexp above opens the sandboxed tutorial called `find-eev-quick-intro', searches for the first occurrence of the string "2. Evaluating Lisp" in it, and then searches for the first occurrence of the string "M-0 M-e" after that. 2. (find-firefox-page "http://foo/bar/Coetzee99.pdf" 4) (find-firefox-page "~/Coetzee99.pdf" 4) The two sexps above use Firefox as a PDF viewer to open a remote PDF and a local PDF on page 4. In low-level terms what they do is: (find-bgprocess '("firefox" "http://foo/bar/Coetzee99.pdf#page=3D4"= )) (find-bgprocess '("firefox" "file:///home/edrx/Coetzee99.pdf#page=3D4"= )) 3. (find-testblsvideo "2:33" "f8 here starts a new Lua interpreter") This sexp plays the video about test blocks starting from 2:33. Let me pretend here that I would have time enough in the workshop to show that it has two "natural" definitions. Its first natural definition would use the copy of that video at youtube, and would use Firefox to open this URL: http://www.youtube.com/watch?v=3DfpsF_M55W4o#t=3D2m33s Its second natural definition supposes that we have downloaded the .mp4 file of that video, that is here, http://angg.twu.net/eev-videos/2021-test-blocks.mp4 to some hardcoded location, like: /tmp/foo/bar/2021-test-blocks.mp4 and it supposes that everyone in the workshop has the mpv video player installed. In low-level terms, what this second definition runs is: (find-bgprocess '("mpv" "/tmp/foo/bar/2021-test-blocks.mp4" "--start=3D2:33" "--fs" "--osd-level=3D2")) 4. (find-pdf-text "~/Coetzee99.pdf" (+ -110 127) "wrong thoughts") This is a variant of the sexps in item 2. It is not trivial to make `find-pdf-text' work on Windows, but that function is a fixture of my workshops on LaTeX. Let me pretend that I would be able to present it, just because it is a very nifty function and it will be good karma to give that function a bit more of visibility. That sexp converts the file ~/Coetzee99.pdf to text by running: pdftotext -layout -enc Latin1 /home/edrx/Coetzee99.pdf - then puts the output in a temporary buffer, finds the page 17, i.e., (+ -110 127), in it by counting formfeeds, and searches for the first occurrence of the string "wrong thoughts" in that buffer starting from the beginning of page 17. So, consider again these sexps: (find-eev-quick-intro "2. Evaluating Lisp" "M-0 M-e") (find-eev-quick-intro "3.1. Non-elisp hyperlinks" "M-x brff") (find-emacs-keys-intro "5. Undoing") (find-firefox-page "http://foo/bar/Coetzee99.pdf" 4) (find-firefox-page "~/Coetzee99.pdf" 4) (find-testblsvideo "2:33" "f8 here starts a new Lua interpreter") (find-pdf-text "~/Coetzee99.pdf" (+ -110 127) "wrong thoughts") all of them are easy to understand, easy to use - if you have the right files and if you know how to use `M-e', that is roughly equivalent to `C-e C-x C-e' -, easy to modify in useful ways (by changing their arguments), easy to save in your notes with cut and paste, and easy to share by chat. Two of these sexps need files in hardcoded places - I used ~/Coetzee99.pdf and /tmp/foo/bar/2021-test-blocks.mp4 in the examples above, but many functions in eev use a convention, explained here, http://angg.twu.net/eev-intros/find-psne-intro.html in which the name of the local copy is derived from the URL like this, http://www.gnu.org/software/emacs/emacs-paper.html -> $S/http/www.gnu.org/software/emacs/emacs-paper.html and the environment variable S is $HOME/snarf. Also, if we put the point on the url below http://www.gnu.org/software/emacs/emacs-paper.html and type M-x brep we get a temporary buffer containing something like this, =E2=80=A2 (eepitch-shell) =E2=80=A2 (eepitch-kill) =E2=80=A2 (eepitch-shell) mkdir -p $S/http/www.gnu.org/software/emacs/ cd $S/http/www.gnu.org/software/emacs/ wget -nc 'http://www.gnu.org/software/emacs/emacs-paper.html' So several things in the workshop will be much easier if everybody has wget in the path. An un(tg)zipper is not very important - I only realized this after my previous e-mail - but wget is. [[]], Eduardo Ochs http://angg.twu.net/#eev