From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?UTF-8?Q?=C5=81ukasz?= Stelmach Newsgroups: gmane.emacs.bugs Subject: bug#22611: [PATCH] Call ps-encode-header-string-function for plain strings too Date: Tue, 9 Feb 2016 22:07:51 +0100 Message-ID: <1455052071-4582-1-git-send-email-stlman@poczta.fm> References: <8760xxa95g.fsf%stlman@poczta.fm> NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1455052090 15157 80.91.229.3 (9 Feb 2016 21:08:10 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 9 Feb 2016 21:08:10 +0000 (UTC) Cc: =?UTF-8?Q?=C5=81ukasz?= Stelmach To: 22611@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Feb 09 22:07:58 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1aTFVu-0006YM-BA for geb-bug-gnu-emacs@m.gmane.org; Tue, 09 Feb 2016 22:07:58 +0100 Original-Received: from localhost ([::1]:60625 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aTFVt-0007Fg-HJ for geb-bug-gnu-emacs@m.gmane.org; Tue, 09 Feb 2016 16:07:57 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:45336) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aTFV3-00065s-VS for bug-gnu-emacs@gnu.org; Tue, 09 Feb 2016 16:07:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aTFV0-0006UR-Lh for bug-gnu-emacs@gnu.org; Tue, 09 Feb 2016 16:07:05 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:53035) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aTFV0-0006UB-HP for bug-gnu-emacs@gnu.org; Tue, 09 Feb 2016 16:07:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84) (envelope-from ) id 1aTFV0-00061H-Db for bug-gnu-emacs@gnu.org; Tue, 09 Feb 2016 16:07:02 -0500 X-Loop: help-debbugs@gnu.org In-Reply-To: <8760xxa95g.fsf%stlman@poczta.fm> Resent-From: =?UTF-8?Q?=C5=81ukasz?= Stelmach Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 09 Feb 2016 21:07:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 22611 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 22611-submit@debbugs.gnu.org id=B22611.145505198023082 (code B ref 22611); Tue, 09 Feb 2016 21:07:02 +0000 Original-Received: (at 22611) by debbugs.gnu.org; 9 Feb 2016 21:06:20 +0000 Original-Received: from localhost ([127.0.0.1]:33943 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aTFUK-00060D-Ij for submit@debbugs.gnu.org; Tue, 09 Feb 2016 16:06:20 -0500 Original-Received: from smtpo.poczta.interia.pl ([217.74.65.156]:41077) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aTFUI-000600-Jg for 22611@debbugs.gnu.org; Tue, 09 Feb 2016 16:06:19 -0500 X-Interia-R: Interia X-Interia-R-IP: 31.178.206.205 X-Interia-R-Helo: Original-Received: from localhost (31-178-206-205.dynamic.chello.pl [31.178.206.205]) (using TLSv1 with cipher ECDHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by www.poczta.fm (INTERIA.PL) with ESMTPSA; Tue, 9 Feb 2016 22:06:06 +0100 (CET) X-Mailer: git-send-email 2.4.6 X-Interia-Antivirus: OK X-IPL-POID: 4 X-IPL-SAS-SPAS: 1.4 X-IPL-SAS-UREP: 0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=interia.pl; s=biztos; t=1455051972; bh=FGiIu7YM5QhIecses3NjYpAwBJyW8C9OY77IuDJzixE=; h=X-Interia-R:X-Interia-R-IP:X-Interia-R-Helo:From:To:Cc:Subject: Date:Message-Id:X-Mailer:X-Interia-Antivirus:X-IPL-POID: X-IPL-SAS-SPAS:X-IPL-SAS-UREP; b=YLQVRACnRvGRH2pwvZIZZyzrRRbaM3z63LDci++UgwsdXfSbzy2r4DQoc1Khn2Cs9 SpsNnAYSrpDXkpcCswlpPqA1irTIhs/0G3Moir4yLTISs1iXhAkKFDwlTWDqRjybtZ rBIgX1RC5HuAKcYpqnkvGsWXyy/y8bagZfZOPNt0= X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:112828 Archived-At: The function needs to be called for plain strings too to ensure the BitmapDict contains required characters and Unicode characters in the headers are printed properly. --- lisp/ps-print.el | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lisp/ps-print.el b/lisp/ps-print.el index 7333709..999398e 100644 --- a/lisp/ps-print.el +++ b/lisp/ps-print.el @@ -4761,7 +4761,11 @@ page-height == ((floor print-height ((th + ls) * zh)) * ((th + ls) * zh)) - th ;; Literal strings should be output as is -- the string must contain its own ;; PS string delimiters, '(' and ')', if necessary. ((stringp content) - (ps-output content)) + (if (functionp ps-encode-header-string-function) + (dolist (l (funcall ps-encode-header-string-function + content fonttag)) + (ps-output l)) + (ps-output content))) ;; Functions are called -- they should return strings; they will be inserted ;; as strings and the PS string delimiters added. -- 2.4.6