all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#19717: 24.4.50; printing.el still uses ps-eval-switch
@ 2015-01-28 19:09 Jorge A. Alfaro-Murillo
  2016-05-11 17:08 ` Kaushal Modi
  2016-05-23  0:52 ` Paul Eggert
  0 siblings, 2 replies; 5+ messages in thread
From: Jorge A. Alfaro-Murillo @ 2015-01-28 19:09 UTC (permalink / raw)
  To: Vinicius Jose Latorre; +Cc: 19717

Hi Vinicius,

I was trying to modify the variable pr-txt-switches for printing, 
but it is not working. I think that the problem is that the 
function pr-switches tries to use ps-eval-switch, which was 
removed from ps-print.el (see commit 
2cdeb903c57126d3ad5f0cbd72e182584b76ee29).

The problem for pr-txt-print can be fixed by using 
lpr-print-region instead of lpr-region, since the former uses 
switches as an argument. I could submit a patch for that, but I 
think that pr-switches is used for other things as well, so I 
wanted to let you know since you probably can submit a more 
complete patch.

Best,

-- 

Jorge.





^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#19717: 24.4.50; printing.el still uses ps-eval-switch
  2015-01-28 19:09 bug#19717: 24.4.50; printing.el still uses ps-eval-switch Jorge A. Alfaro-Murillo
@ 2016-05-11 17:08 ` Kaushal Modi
  2016-05-12  0:56   ` Stefan Monnier
  2016-05-23  0:52 ` Paul Eggert
  1 sibling, 1 reply; 5+ messages in thread
From: Kaushal Modi @ 2016-05-11 17:08 UTC (permalink / raw)
  To: 19717, jorge.alfaro-murillo, Stefan Monnier

[-- Attachment #1: Type: text/plain, Size: 1609 bytes --]

Hi,

I have attached the below patch in an attempt to fix this. I notice that
printing.el requires lpr.el, and pr-switches function anyways uses
lpr-flatten-list from lpr.el. So there should be no harm using
lpr-eval-switch instead of ps-eval-switch. I have verified that
lpr-eval-switch is the exact same function as the now obsolete
ps-eval-switch; just different names.

Copying Stefan for reviewing and commiting this patch as he was the author
of the commit
http://git.savannah.gnu.org/cgit/emacs.git/commit/?h=emacs-25&id=2cdeb903c57126d3ad5f0cbd72e182584b76ee29
where
ps-eval-switch was removed.

=====

From 4af9c6403b5917aca27490cc331a36dd6e1222c3 Mon Sep 17 00:00:00 2001
From: Kaushal Modi <kaushal.modi@gmail.com>
Date: Wed, 11 May 2016 12:45:42 -0400
Subject: [PATCH] Fix reference to obsolete fn ps-eval-switch

The `lpr-eval-switch' is functionally the same as `ps-eval-switch' which
was obsoleted in 2cdeb903c57126d3ad5f0cbd72e182584b76ee29.  So using
that instead (Bug#19717).

* printing.el (pr-switches): Use lpr-eval-switch instead of ps-eval-switch.
---
 lisp/printing.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/printing.el b/lisp/printing.el
index 3bd5a67..a336aeb 100644
--- a/lisp/printing.el
+++ b/lisp/printing.el
@@ -5673,7 +5673,7 @@ pr-switches
   (or (listp switches)
       (error "%S should have a list of strings" mess))
   (lpr-flatten-list ; dynamic evaluation
-   (mapcar 'ps-eval-switch switches)))
+   (mapcar 'lpr-eval-switch switches)))


 (defun pr-ps-preview (kind n-up filename mess)
-- 
2.6.0.rc0.24.gec371ff

-- 

-- 
Kaushal Modi

[-- Attachment #2: Type: text/html, Size: 2375 bytes --]

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* bug#19717: 24.4.50; printing.el still uses ps-eval-switch
  2016-05-11 17:08 ` Kaushal Modi
@ 2016-05-12  0:56   ` Stefan Monnier
  2016-05-12  1:42     ` Kaushal Modi
  0 siblings, 1 reply; 5+ messages in thread
From: Stefan Monnier @ 2016-05-12  0:56 UTC (permalink / raw)
  To: Kaushal Modi; +Cc: jorge.alfaro-murillo, 19717

> -   (mapcar 'ps-eval-switch switches)))
> +   (mapcar 'lpr-eval-switch switches)))

Fine by me, tho I'd recommend #' rather than '


        Stefan





^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#19717: 24.4.50; printing.el still uses ps-eval-switch
  2016-05-12  0:56   ` Stefan Monnier
@ 2016-05-12  1:42     ` Kaushal Modi
  0 siblings, 0 replies; 5+ messages in thread
From: Kaushal Modi @ 2016-05-12  1:42 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: jorge.alfaro-murillo, 19717

[-- Attachment #1: Type: text/plain, Size: 1216 bytes --]

On Wed, May 11, 2016 at 8:56 PM Stefan Monnier <monnier@iro.umontreal.ca>
wrote:

> Fine by me, tho I'd recommend #' rather than '
>

Sure, here's the updated patch with #' after rebasing to emacs-25 branch.
Thanks!

From 495655b3be76023299d5f9b623f5961314be3244 Mon Sep 17 00:00:00 2001
From: Kaushal Modi <kaushal.modi@gmail.com>
Date: Wed, 11 May 2016 21:37:43 -0400
Subject: [PATCH] Fix reference to obsolete fn ps-eval-switch

The `lpr-eval-switch' is functionally the same as `ps-eval-switch' which
was obsoleted in 2cdeb903c57126d3ad5f0cbd72e182584b76ee29.  So using
that instead (Bug#19717).

* printing.el (pr-switches): Use lpr-eval-switch instead of ps-eval-switch.
---
 lisp/printing.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/printing.el b/lisp/printing.el
index 3bd5a67..d9cc2a3 100644
--- a/lisp/printing.el
+++ b/lisp/printing.el
@@ -5673,7 +5673,7 @@ pr-switches
   (or (listp switches)
       (error "%S should have a list of strings" mess))
   (lpr-flatten-list ; dynamic evaluation
-   (mapcar 'ps-eval-switch switches)))
+   (mapcar #'lpr-eval-switch switches)))


 (defun pr-ps-preview (kind n-up filename mess)
-- 
2.6.0.rc0.24.gec371ff

-- 

-- 
Kaushal Modi

[-- Attachment #2: Type: text/html, Size: 2043 bytes --]

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* bug#19717: 24.4.50; printing.el still uses ps-eval-switch
  2015-01-28 19:09 bug#19717: 24.4.50; printing.el still uses ps-eval-switch Jorge A. Alfaro-Murillo
  2016-05-11 17:08 ` Kaushal Modi
@ 2016-05-23  0:52 ` Paul Eggert
  1 sibling, 0 replies; 5+ messages in thread
From: Paul Eggert @ 2016-05-23  0:52 UTC (permalink / raw)
  To: Kaushal Modi; +Cc: Jorge A. Alfaro-Murillo, Stefan Monnier, 19717-done

Thanks for the patch, Kaushal. I installed it into the emacs-25 branch and am 
closing the bug report.





^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-05-23  0:52 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-28 19:09 bug#19717: 24.4.50; printing.el still uses ps-eval-switch Jorge A. Alfaro-Murillo
2016-05-11 17:08 ` Kaushal Modi
2016-05-12  0:56   ` Stefan Monnier
2016-05-12  1:42     ` Kaushal Modi
2016-05-23  0:52 ` Paul Eggert

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.