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: wie kann ich Emacs so einstellen, dass ich drucken kann Date: Sun, 18 Dec 2022 05:04:11 -0300 Message-ID: References: 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="24886"; mail-complaints-to="usenet@ciao.gmane.io" To: Gottfried , "help-gnu-emacs@gnu.org" Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Sun Dec 18 09:04:58 2022 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 1p6ofK-0006EY-BG for geh-help-gnu-emacs@m.gmane-mx.org; Sun, 18 Dec 2022 09:04:58 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p6oew-0001Vt-Px; Sun, 18 Dec 2022 03:04:35 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p6oeo-0001Vd-PK for help-gnu-emacs@gnu.org; Sun, 18 Dec 2022 03:04:27 -0500 Original-Received: from mail-io1-xd35.google.com ([2607:f8b0:4864:20::d35]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p6oem-0008UD-Qq for help-gnu-emacs@gnu.org; Sun, 18 Dec 2022 03:04:26 -0500 Original-Received: by mail-io1-xd35.google.com with SMTP id z144so3298549iof.3 for ; Sun, 18 Dec 2022 00:04:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=PpBOI9wYHrIeoj2J2IzghVr/AthCtt5rITppuChXoVs=; b=Lzgwgfg69dRnYaWSXOL/7o1ICeDGo2O7Pt/mNMgO0ZAfQtYA67MYvUCXFToquo1Lkj B3HG7qFr50kaVGAZyxHFZCoWM2xxS8GkcOoavbFnF+UeOksf6xuNhf4r5bD6iyylr/y7 nvbiDZ4xWNc/4VQsyaJdUw7EJ3g0ZrCUCgHwkRQKvAoe2DfMPuZWxkoZzV9U2OJBpaeS 00Z7y6EaOvchP3piojYLx1818od6zetS4xNwQ3usv/iAEngw5wgOPVnxE5unHiuQzdy/ /Ero1HYyKbNifRRrp2nGPzVOsGoDRyapJeXVFRL+r/FX5IfqrdpYyjP2WvAcEpQhpTLq pOBg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=PpBOI9wYHrIeoj2J2IzghVr/AthCtt5rITppuChXoVs=; b=S8A6iMZkatUZQgSMYJGT8pdIyMxIBICHmfRpRJcBqMF4Y/0G/zbpt7+88RfMddN3B1 BqdXcArqmGyl/2fp74PiPRQNUtilPN4zndBF+Q0g0paA5/u5A7sy/nNZy7gG9djjLXXx ZWjHRgi1BJGtuxFdYDWXZwaZ4/73L+M1VBhUzO7U41AdkICX2nRqgBj36ZQjCDMRp033 uk8x5Cog9JbPnli33PjjF/bGuX4sAMNsHsNjm5yNpbfxB7mEq79RAAAdUbxM+dc1ig0+ 3tV8BhwwyKQq9X7ZVDeRa5ox67TqbkIuQ9E9a/ibSP+IQEMEVsaCQK7MFSGlxLv2PVkJ q7dw== X-Gm-Message-State: ANoB5plCa0DZe1roaobT4BEYzO5qUy8pM+cFzXl0ZaJUx6tQqCGSsS6K fd660oEO5mydnL85giQZ45Lcabb4g84bur6MSGI= X-Google-Smtp-Source: AA0mqf4mHyEbMBi0s4cH9Md8X0quwrys2U7SL+olH3wtk38S5Ux2pon1GsTVV5bwDQFi536wlIZ/sK5obdaakPEFr/E= X-Received: by 2002:a5e:8d18:0:b0:6e4:b7b8:c5db with SMTP id m24-20020a5e8d18000000b006e4b7b8c5dbmr1324702ioj.189.1671350663156; Sun, 18 Dec 2022 00:04:23 -0800 (PST) In-Reply-To: Received-SPF: pass client-ip=2607:f8b0:4864:20::d35; envelope-from=eduardoochs@gmail.com; helo=mail-io1-xd35.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.29 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-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.help:141853 Archived-At: On Sat, 17 Dec 2022 at 06:02, Jean Louis wrote: > > * Gottfried [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=C3=BCtzt, au= ch > Emoticons. Daher k=C3=B6nnen 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 fi= le 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 fil= e-name)))) > > =F0=9F=98=8E Hi Jean Louis, What are the definitions of `rcd-paps-process-buffer' and `rcd-temp-file-name'? Thanks in advance! Eduardo