unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* glitch when printing from Win 7
@ 2013-06-02 20:12 zeb7k
  2013-06-03  2:38 ` Eli Zaretskii
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: zeb7k @ 2013-06-02 20:12 UTC (permalink / raw)
  To: help-gnu-emacs

When in Windows 7 I often use the print-region command from EMACS (23.2.1) to send text to the printer.  My lpr-command is the name of simple .bat file I use which simply accepts the temp file name that EMACS passes it and tells NotePad.exe to print it.

Well, under conditions I cannot fathom, the name that EMACS passes has some weird escape character at its beginning.  This happens about 5% of the times I try to print.  Once it does happen, it happens consistently.   I end up having to print manually: running NotePad, yanking from EMACS, pasting into NotePad and printing from the NotePad menu.   The next day, the problem is gone.  Kind of annoying.  Any ideas?


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

* Re: glitch when printing from Win 7
  2013-06-02 20:12 glitch when printing from Win 7 zeb7k
@ 2013-06-03  2:38 ` Eli Zaretskii
       [not found] ` <mailman.904.1370227127.22516.help-gnu-emacs@gnu.org>
  2013-07-11 11:12 ` zeb7k
  2 siblings, 0 replies; 9+ messages in thread
From: Eli Zaretskii @ 2013-06-03  2:38 UTC (permalink / raw)
  To: help-gnu-emacs

> Date: Sun, 2 Jun 2013 13:12:29 -0700 (PDT)
> From: zeb7k@hotmail.com
> Injection-Date: Sun, 02 Jun 2013 20:12:29 +0000
> 
> When in Windows 7 I often use the print-region command from EMACS (23.2.1) to send text to the printer.  My lpr-command is the name of simple .bat file I use which simply accepts the temp file name that EMACS passes it and tells NotePad.exe to print it.
> 
> Well, under conditions I cannot fathom, the name that EMACS passes has some weird escape character at its beginning.  This happens about 5% of the times I try to print.  Once it does happen, it happens consistently.   I end up having to print manually: running NotePad, yanking from EMACS, pasting into NotePad and printing from the NotePad menu.   The next day, the problem is gone.  Kind of annoying.  Any ideas?

Show us the "weird escape character" you get.  Is it the same
character every time?



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

* Re: glitch when printing from Win 7
       [not found] ` <mailman.904.1370227127.22516.help-gnu-emacs@gnu.org>
@ 2013-06-03 10:05   ` zeb7k
  2013-06-04 13:41     ` Kevin Rodgers
  0 siblings, 1 reply; 9+ messages in thread
From: zeb7k @ 2013-06-03 10:05 UTC (permalink / raw)
  To: help-gnu-emacs

I will have to wait until it happens again.  I echo the parameter to a log.


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

* Re: glitch when printing from Win 7
  2013-06-03 10:05   ` zeb7k
@ 2013-06-04 13:41     ` Kevin Rodgers
  0 siblings, 0 replies; 9+ messages in thread
From: Kevin Rodgers @ 2013-06-04 13:41 UTC (permalink / raw)
  To: help-gnu-emacs

On 6/3/13 4:05 AM, zeb7k@hotmail.com wrote:
> I will have to wait until it happens again.  I echo the parameter to a log.

If you append the data to log with >> instead of overwriting the log with >,
you would have a complete history and wouldn't have to wait.  :-)

-- 
Kevin Rodgers
Denver, Colorado, USA




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

* Re: glitch when printing from Win 7
  2013-06-02 20:12 glitch when printing from Win 7 zeb7k
  2013-06-03  2:38 ` Eli Zaretskii
       [not found] ` <mailman.904.1370227127.22516.help-gnu-emacs@gnu.org>
@ 2013-07-11 11:12 ` zeb7k
  2013-07-11 17:02   ` Eli Zaretskii
       [not found]   ` <mailman.843.1373562166.12400.help-gnu-emacs@gnu.org>
  2 siblings, 2 replies; 9+ messages in thread
From: zeb7k @ 2013-07-11 11:12 UTC (permalink / raw)
  To: help-gnu-emacs

It finally happened again.

Here are the pertinent commands in my .EMACS startup file:

   (setq lpr-command "P:/PrintFile/PrintFile.bat")
   (setq printer-name nil)
   (setq lpr-headers-switches "/p")

Here is the batch file PrintFile.bat:

echo appdrive is %APPDRIVE% > x:\PrintTrace.log
echo 1 is %1 >> x:\PrintTrace.log
echo 2 is %2 >> x:\PrintTrace.log
regedit.exe /s %APPDRIVE%:\PrintFile\NotePad.reg
NotePad.exe %1 %2

(Sometimes I adjust the font in Notepad and forget to switch it back.  The regedit command simply makes sure Notepad.exe is working with the same font size I always use for printing.)

Here is the contents of PrintTrace.log as viewed in fundamental mode:

appdrive is P 
1 is /p 
2 is \213\257\250t:\Temp\EP4252h0o 

Note the three octal characters in front of the file name.  This is what's gumming things up.  Why is this happening?


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

* Re: glitch when printing from Win 7
  2013-07-11 11:12 ` zeb7k
@ 2013-07-11 17:02   ` Eli Zaretskii
       [not found]   ` <mailman.843.1373562166.12400.help-gnu-emacs@gnu.org>
  1 sibling, 0 replies; 9+ messages in thread
From: Eli Zaretskii @ 2013-07-11 17:02 UTC (permalink / raw)
  To: help-gnu-emacs

> Date: Thu, 11 Jul 2013 04:12:25 -0700 (PDT)
> From: zeb7k@hotmail.com
> 
> Here are the pertinent commands in my .EMACS startup file:
> 
>    (setq lpr-command "P:/PrintFile/PrintFile.bat")
>    (setq printer-name nil)
>    (setq lpr-headers-switches "/p")
> 
> Here is the batch file PrintFile.bat:
> 
> echo appdrive is %APPDRIVE% > x:\PrintTrace.log
> echo 1 is %1 >> x:\PrintTrace.log
> echo 2 is %2 >> x:\PrintTrace.log
> regedit.exe /s %APPDRIVE%:\PrintFile\NotePad.reg
> NotePad.exe %1 %2
> 
> (Sometimes I adjust the font in Notepad and forget to switch it back.  The regedit command simply makes sure Notepad.exe is working with the same font size I always use for printing.)
> 
> Here is the contents of PrintTrace.log as viewed in fundamental mode:
> 
> appdrive is P 
> 1 is /p 
> 2 is \213\257\250t:\Temp\EP4252h0o 
> 
> Note the three octal characters in front of the file name.  This is what's gumming things up.  Why is this happening?

Which version of Emacs is that?  And what is the value of
buffer-file-coding-system in the buffer which you tried to print?



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

* Re: glitch when printing from Win 7
       [not found]   ` <mailman.843.1373562166.12400.help-gnu-emacs@gnu.org>
@ 2013-07-11 17:33     ` zeb7k
  2013-07-11 18:21       ` Eli Zaretskii
       [not found]       ` <mailman.858.1373567307.12400.help-gnu-emacs@gnu.org>
  0 siblings, 2 replies; 9+ messages in thread
From: zeb7k @ 2013-07-11 17:33 UTC (permalink / raw)
  To: help-gnu-emacs

GNU Emacs 23.2.1 (i386-mingw-nt6.1.7601) of 2010-05-08 on G41R2F1


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

* Re: glitch when printing from Win 7
  2013-07-11 17:33     ` zeb7k
@ 2013-07-11 18:21       ` Eli Zaretskii
       [not found]       ` <mailman.858.1373567307.12400.help-gnu-emacs@gnu.org>
  1 sibling, 0 replies; 9+ messages in thread
From: Eli Zaretskii @ 2013-07-11 18:21 UTC (permalink / raw)
  To: help-gnu-emacs

> Date: Thu, 11 Jul 2013 10:33:23 -0700 (PDT)
> From: zeb7k@hotmail.com
> 
> GNU Emacs 23.2.1 (i386-mingw-nt6.1.7601) of 2010-05-08 on G41R2F1

That's quite old.  Any reasons not to try the latest v24.3?



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

* Re: glitch when printing from Win 7
       [not found]       ` <mailman.858.1373567307.12400.help-gnu-emacs@gnu.org>
@ 2013-07-11 21:12         ` zeb7k
  0 siblings, 0 replies; 9+ messages in thread
From: zeb7k @ 2013-07-11 21:12 UTC (permalink / raw)
  To: help-gnu-emacs

I'll upgrade now and post again if need be.  Thanks.


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

end of thread, other threads:[~2013-07-11 21:12 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-02 20:12 glitch when printing from Win 7 zeb7k
2013-06-03  2:38 ` Eli Zaretskii
     [not found] ` <mailman.904.1370227127.22516.help-gnu-emacs@gnu.org>
2013-06-03 10:05   ` zeb7k
2013-06-04 13:41     ` Kevin Rodgers
2013-07-11 11:12 ` zeb7k
2013-07-11 17:02   ` Eli Zaretskii
     [not found]   ` <mailman.843.1373562166.12400.help-gnu-emacs@gnu.org>
2013-07-11 17:33     ` zeb7k
2013-07-11 18:21       ` Eli Zaretskii
     [not found]       ` <mailman.858.1373567307.12400.help-gnu-emacs@gnu.org>
2013-07-11 21:12         ` zeb7k

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).