From: Jean Louis <bugs@gnu.support>
To: Gottfried <gottfried@posteo.de>
Cc: "help-gnu-emacs@gnu.org" <help-gnu-emacs@gnu.org>
Subject: Re: wie kann ich Emacs so einstellen, dass ich drucken kann
Date: Sat, 17 Dec 2022 12:00:10 +0300 [thread overview]
Message-ID: <Y52FGkVKhK0TJnLB@protected.localdomain> (raw)
In-Reply-To: <bd56020f-dd94-0851-357f-a5b1ef72b9ba@posteo.de>
[-- Attachment #1: Type: text/plain, Size: 2360 bytes --]
* 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))))
😎
--
Jean
Take action in Free Software Foundation campaigns:
https://www.fsf.org/campaigns
In support of Richard M. Stallman
https://stallmansupport.org/
[-- Attachment #2: Saturday-December-17-2022-11-59-20.pdf --]
[-- Type: application/pdf, Size: 24879 bytes --]
next prev parent reply other threads:[~2022-12-17 9:00 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 [this message]
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
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=Y52FGkVKhK0TJnLB@protected.localdomain \
--to=bugs@gnu.support \
--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).