unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Eduardo Ochs <eduardoochs@gmail.com>
To: Gottfried <gottfried@posteo.de>,
	"help-gnu-emacs@gnu.org" <help-gnu-emacs@gnu.org>
Subject: Re: wie kann ich Emacs so einstellen, dass ich drucken kann
Date: Sun, 18 Dec 2022 05:04:11 -0300	[thread overview]
Message-ID: <CADs++6j9b-JxWUqVdsK8pUjFJ1HZMA6kdr-Bn-wHcj7roNUM2Q@mail.gmail.com> (raw)
In-Reply-To: <Y52FGkVKhK0TJnLB@protected.localdomain>

On Sat, 17 Dec 2022 at 06:02, Jean Louis <bugs@gnu.support> wrote:
>
> * Gottfried <gottfried@posteo.de> [2022-12-14 19:40]:
> > Hallo,
> > ich wollte einen Puffer ausdrucken (das erste Mal)
> > und es gab diese Fehlermeldung:
>
> So far best tool to print Emacs buffers that I have found is the
> command `paps' as it supports correctly Unicode, also emoticons. Thus
> you may try by installing `paps' tool from your Operating System
> distribution.
>
> Das beste Werkzeug zum Drucken von EMACS-Puffern, die ich gefunden
> habe, ist der Befehl "paps", weil es richtig Unicode unterstützt, auch
> Emoticons. Daher können Sie es versuchen, indem Sie das "PAPS"-Tool
> aus Ihrer Betriebssystemverteilung installieren.
>
> dov/paps: A text to postscript converter through pango:
> https://github.com/dov/paps
>
> Ich verwende folgende Funktionen:
>
> (defun rcd-command-output-from-input (program input &rest args)
>   "Return output string from PROGRAM with given INPUT string and optional ARGS."
>   (let* ((output (with-temp-buffer
>                    (insert input)
>                    (apply #'call-process-region nil nil program t '(t nil) nil args)
>                    (buffer-string))))
>     output))
>
> I am too often using landscape, you can adjust it for your needs.
>
> (defun rcd-paps-process (text &optional format title &rest args)
>   (let* ((format (or format "pdf"))
>          (title (or title (buffer-name)))
>          (length (length title))
>          (max 45)
>          (title (if (> length max) (substring title 0 max) title)))
>     (apply 'rcd-command-output-from-input "paps" text "--format" format "--landscape" "--title" title "--header" args)))
>
> (defun string-to-file-force (string file)
>   "Prints string into file, matters not if file exists. Return FILE as file name."
>   (with-temp-file file
>     (insert string))
>   file)
>
> (defun rcd-paps-text-to-pdf (text &optional file-name title)
>   (let* ((output (rcd-paps-process text "pdf" title))
>          (file-name (or file-name (concat (file-name-as-directory (getenv "HOME")) (read-string "File name without .pdf extension: ") ".pdf"))))
>     (string-to-file-force output file-name)))
>
> (defun rcd-paps-buffer-to-pdf-view ()
>   (interactive)
>   (let ((output (rcd-paps-process-buffer))
>         (file-name (rcd-temp-file-name nil "pdf")))
>     (sleep-for 1)
>     (start-process "evince" nil "evince" (string-to-file-force output file-name))))
>
> 😎

Hi Jean Louis,

What are the definitions of `rcd-paps-process-buffer'
and `rcd-temp-file-name'?

Thanks in advance!
  Eduardo



  parent reply	other threads:[~2022-12-18  8:04 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-14 16:38 wie kann ich Emacs so einstellen, dass ich drucken kann Gottfried
2022-12-14 17:27 ` Philip Kaludercic
2022-12-16 15:27   ` printing Gottfried
2022-12-16 22:26     ` printing Michael Heerdegen
2022-12-17  6:29       ` printing tomas
2022-12-17  7:41         ` printing Emanuel Berg
2022-12-17 13:48     ` printing Gottfried
2022-12-17 16:30       ` printing tomas
2022-12-14 21:30 ` wie kann ich Emacs so einstellen, dass ich drucken kann Michael Heerdegen
2022-12-17  9:00 ` Jean Louis
2022-12-17  9:29   ` Michael Heerdegen
2022-12-17  9:41     ` Jean Louis
2022-12-17 10:34       ` Michael Heerdegen
2022-12-17 10:39         ` Michael Heerdegen
2022-12-18  8:04   ` Eduardo Ochs [this message]
2022-12-18 17:18     ` Jean Louis
2022-12-18 22:34       ` rcd-paps.el (was: Re: wie kann ich Emacs...) Eduardo Ochs
2022-12-19 12:50         ` rcd-paps.el Jean Louis
2022-12-18 12:06   ` wie kann ich Emacs so einstellen, dass ich drucken kann Gottfried
2022-12-18 17:20     ` Jean Louis
2022-12-19 13:49       ` Gottfried
2022-12-19 17:19         ` Jean Louis
2022-12-27 16:10           ` wie kann ich Emacs so einstellen, dass ich drucken kann (printing in Emacs) Gottfried
2022-12-27 17:35             ` Jean Louis
2022-12-27 16:39           ` wie kann ich Emacs so einstellen, dass ich drucken kann (printing with paps) Gottfried
2022-12-27 16:47             ` Gottfried
2022-12-27 17:37               ` Jean Louis
2022-12-28 16:31                 ` printing with paps Gottfried
2022-12-30 14:26                   ` Jean Louis
2022-12-31 12:09                     ` Gottfried
2022-12-31 22:53                       ` Jean Louis
2022-12-31 23:46                         ` Jean Louis
2023-01-01 14:24                           ` Gottfried
2023-01-01 14:53                             ` Jean Louis
  -- strict thread matches above, loose matches on Subject: below --
2022-12-17 16:08 wie kann ich Emacs so einstellen, dass ich drucken kann Drew Adams
2022-12-18  2:07 ` Michael Heerdegen
2022-12-18  7:00   ` tomas
2022-12-18  7:24   ` Jean Louis

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CADs++6j9b-JxWUqVdsK8pUjFJ1HZMA6kdr-Bn-wHcj7roNUM2Q@mail.gmail.com \
    --to=eduardoochs@gmail.com \
    --cc=gottfried@posteo.de \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).