all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* how to byte-compile .el files automatically after save?
@ 2007-08-06 23:48 sunway
  2007-08-07  2:29 ` Robert D. Crawford
  0 siblings, 1 reply; 11+ messages in thread
From: sunway @ 2007-08-06 23:48 UTC (permalink / raw)
  To: help-gnu-emacs

i have tried after-save-hook, but that will make emacs byte-compile
other file other than *.el after save.

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

* Re: how to byte-compile .el files automatically after save?
  2007-08-06 23:48 how to byte-compile .el files automatically after save? sunway
@ 2007-08-07  2:29 ` Robert D. Crawford
  2007-08-07  3:15   ` Emacs brianjiang
  2007-08-07  4:26   ` how to byte-compile .el files automatically after save? sunway
  0 siblings, 2 replies; 11+ messages in thread
From: Robert D. Crawford @ 2007-08-07  2:29 UTC (permalink / raw)
  To: help-gnu-emacs

sunway <sunwayforever@gmail.com> writes:

> i have tried after-save-hook, but that will make emacs byte-compile
> other file other than *.el after save.

Here is one:

(add-hook 'emacs-lisp-mode-hook
	  '(lambda ()
	     (make-local-hook 'after-save-hook)
	     (add-hook 'after-save-hook
		       '(lambda ()
			  (byte-compile-file buffer-file-name)) 
		       nil t)))

rdc
-- 
Robert D. Crawford                                      rdc1x@comcast.net

You'll feel devilish tonight.  Toss dynamite caps under a flamenco dancer's
heel.

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

* Emacs
  2007-08-07  2:29 ` Robert D. Crawford
@ 2007-08-07  3:15   ` brianjiang
  2007-08-07  6:28     ` Emacs Herbert Euler
  2007-08-07 21:05     ` Emacs Eli Zaretskii
  2007-08-07  4:26   ` how to byte-compile .el files automatically after save? sunway
  1 sibling, 2 replies; 11+ messages in thread
From: brianjiang @ 2007-08-07  3:15 UTC (permalink / raw)
  To: help-gnu-emacs

 
My Emacs always get stuck every time I click the "print" button at the
toolbar by accident. It will not response the input any more after then
and C-g cannot break it. And then I have to kill it using Task Manager
(I use Emacs in Window XP).

What is the problem? How can I avoid it? Thanks.

Regards,
Brian

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

* Re: how to byte-compile .el files automatically after save?
  2007-08-07  2:29 ` Robert D. Crawford
  2007-08-07  3:15   ` Emacs brianjiang
@ 2007-08-07  4:26   ` sunway
  2007-08-07 15:37     ` Peter Dyballa
  1 sibling, 1 reply; 11+ messages in thread
From: sunway @ 2007-08-07  4:26 UTC (permalink / raw)
  To: help-gnu-emacs

On 8 7 ,   10 29 , "Robert D. Crawford" <rd...@comcast.net> wrote:
> sunway <sunwayfore...@gmail.com> writes:
> > i have tried after-save-hook, but that will make emacs byte-compile
> > other file other than *.el after save.
>
> Here is one:
>
> (add-hook 'emacs-lisp-mode-hook
>           '(lambda ()
>              (make-local-hook 'after-save-hook)
>              (add-hook 'after-save-hook
>                        '(lambda ()
>                           (byte-compile-file buffer-file-name))
>                        nil t)))
>
> rdc
> --
> Robert D. Crawford                                      rd...@comcast.net
>
> You'll feel devilish tonight.  Toss dynamite caps under a flamenco dancer's
> heel.

that works,but how to get rid of the *Compile-log* when byte-compile
the file?
every time when i save the *.el, the *Compile-log* will appear, which
is quite annoying.

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

* RE: Emacs
  2007-08-07  3:15   ` Emacs brianjiang
@ 2007-08-07  6:28     ` Herbert Euler
  2007-08-07  8:38       ` Emacs brianjiang
  2007-08-07 21:05     ` Emacs Eli Zaretskii
  1 sibling, 1 reply; 11+ messages in thread
From: Herbert Euler @ 2007-08-07  6:28 UTC (permalink / raw)
  To: brianjiang, help-gnu-emacs

>How can I avoid it? Thanks.

Perhaps you can avoid it by removing the print button:

(delete-if (lambda (button)
	     (and (consp button)
		  (eq (car button) 'print-buffer)))
	   tool-bar-map)

Regards,
Guanpeng Xu

_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today it's FREE! 
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/

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

* RE: Emacs
  2007-08-07  6:28     ` Emacs Herbert Euler
@ 2007-08-07  8:38       ` brianjiang
  0 siblings, 0 replies; 11+ messages in thread
From: brianjiang @ 2007-08-07  8:38 UTC (permalink / raw)
  To: herberteuler, help-gnu-emacs

Good. Thanks.
 

-----Original Message-----
From: Herbert Euler [mailto:herberteuler@hotmail.com] 
Sent: 2007年8月7日 14:28
To: Brian Jiang; help-gnu-emacs@gnu.org
Subject: RE: Emacs

>How can I avoid it? Thanks.

Perhaps you can avoid it by removing the print button:

(delete-if (lambda (button)
	     (and (consp button)
		  (eq (car button) 'print-buffer)))
	   tool-bar-map)

Regards,
Guanpeng Xu

_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today it's FREE! 
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/

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

* Re: how to byte-compile .el files automatically after save?
  2007-08-07  4:26   ` how to byte-compile .el files automatically after save? sunway
@ 2007-08-07 15:37     ` Peter Dyballa
  0 siblings, 0 replies; 11+ messages in thread
From: Peter Dyballa @ 2007-08-07 15:37 UTC (permalink / raw)
  To: sunway; +Cc: help-gnu-emacs


Am 07.08.2007 um 06:26 schrieb sunway:

> that works,but how to get rid of the *Compile-log* when byte-compile
> the file?

Make the hook wait some time that compilation is finished, then  
delete the buffer – can be done in Elisp!

--
Greetings

   Pete

You can learn many things from children.  How much patience you have,
for instance.
                 -- Franklin P. Jones

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

* Re: Emacs
  2007-08-07  3:15   ` Emacs brianjiang
  2007-08-07  6:28     ` Emacs Herbert Euler
@ 2007-08-07 21:05     ` Eli Zaretskii
  2007-08-08  2:48       ` Emacs brianjiang
  1 sibling, 1 reply; 11+ messages in thread
From: Eli Zaretskii @ 2007-08-07 21:05 UTC (permalink / raw)
  To: help-gnu-emacs

> Date: Tue, 7 Aug 2007 11:15:33 +0800
> From: <brianjiang@gdnt.com.cn>
> 
> My Emacs always get stuck every time I click the "print" button at the
> toolbar by accident. It will not response the input any more after then
> and C-g cannot break it. And then I have to kill it using Task Manager
> (I use Emacs in Window XP).

What does the following command display in the echo area?

     M-: printer-name RET

And what version of Emacs is that?

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

* RE: Emacs
  2007-08-07 21:05     ` Emacs Eli Zaretskii
@ 2007-08-08  2:48       ` brianjiang
  2007-08-08 18:26         ` Emacs Eli Zaretskii
  0 siblings, 1 reply; 11+ messages in thread
From: brianjiang @ 2007-08-08  2:48 UTC (permalink / raw)
  To: eliz, help-gnu-emacs

"M-: printer-name RET" displays "PRN". The version is "This is GNU Emacs 22.1.1 (i386-mingw-nt5.1.2600)"

I have never configured the printer for Emacs since I never try to use Emacs to print anything before. But in my computer, the printer has been setup and works well for other programs (and actually it doesn't need a separated printer setup for those programs. I just setup the printer in the system and then other programs can printe well. But it seems Emacs doesn't act in the same way.).

Regards,
Brian 


-----Original Message-----
From: help-gnu-emacs-bounces+brianjiang=gdnt.com.cn@gnu.org [mailto:help-gnu-emacs-bounces+brianjiang=gdnt.com.cn@gnu.org] On Behalf Of Eli Zaretskii
Sent: 2007年8月8日 5:06
To: help-gnu-emacs@gnu.org
Subject: Re: Emacs

> Date: Tue, 7 Aug 2007 11:15:33 +0800
> From: <brianjiang@gdnt.com.cn>
> 
> My Emacs always get stuck every time I click the "print" button at the 
> toolbar by accident. It will not response the input any more after 
> then and C-g cannot break it. And then I have to kill it using Task 
> Manager (I use Emacs in Window XP).

What does the following command display in the echo area?

     M-: printer-name RET

And what version of Emacs is that?


_______________________________________________
help-gnu-emacs mailing list
help-gnu-emacs@gnu.org
http://lists.gnu.org/mailman/listinfo/help-gnu-emacs

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

* Re: Emacs
  2007-08-08  2:48       ` Emacs brianjiang
@ 2007-08-08 18:26         ` Eli Zaretskii
  2007-08-09  1:18           ` Emacs brianjiang
  0 siblings, 1 reply; 11+ messages in thread
From: Eli Zaretskii @ 2007-08-08 18:26 UTC (permalink / raw)
  To: help-gnu-emacs

> Date: Wed, 8 Aug 2007 10:48:32 +0800
> From: <brianjiang@gdnt.com.cn>
> 
> "M-: printer-name RET" displays "PRN". The version is "This is GNU Emacs 22.1.1 (i386-mingw-nt5.1.2600)"
> 
> I have never configured the printer for Emacs since I never try to use Emacs to print anything before. But in my computer, the printer has been setup and works well for other programs (and actually it doesn't need a separated printer setup for those programs. I just setup the printer in the system and then other programs can printe well. But it seems Emacs doesn't act in the same way.).

Then I suggest to download and install PrintFile
(http://www.lerup.com/printfile/), and then configure Emacs to use
that program as the printer driver.  Something like this (in your
~/.emacs file):

 (setq printer-name nil)
 (setq lpr-command "C:/Program Files/PrintFile/prfile32.exe")
 (setq lpr-switches '("/q"))
 (setq ps-lpr-command "C:/Program Files/PrintFile/prfile32.exe")
 (setq ps-lpr-switches '("/q"))

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

* RE: Emacs
  2007-08-08 18:26         ` Emacs Eli Zaretskii
@ 2007-08-09  1:18           ` brianjiang
  0 siblings, 0 replies; 11+ messages in thread
From: brianjiang @ 2007-08-09  1:18 UTC (permalink / raw)
  To: eliz, help-gnu-emacs

Thanks. Will have a try later.

Regards,
Brian 

-----Original Message-----
From: help-gnu-emacs-bounces+brianjiang=gdnt.com.cn@gnu.org [mailto:help-gnu-emacs-bounces+brianjiang=gdnt.com.cn@gnu.org] On Behalf Of Eli Zaretskii
Sent: 2007年8月9日 2:26
To: help-gnu-emacs@gnu.org
Subject: Re: Emacs

> Date: Wed, 8 Aug 2007 10:48:32 +0800
> From: <brianjiang@gdnt.com.cn>
> 
> "M-: printer-name RET" displays "PRN". The version is "This is GNU Emacs 22.1.1 (i386-mingw-nt5.1.2600)"
> 
> I have never configured the printer for Emacs since I never try to use Emacs to print anything before. But in my computer, the printer has been setup and works well for other programs (and actually it doesn't need a separated printer setup for those programs. I just setup the printer in the system and then other programs can printe well. But it seems Emacs doesn't act in the same way.).

Then I suggest to download and install PrintFile (http://www.lerup.com/printfile/), and then configure Emacs to use that program as the printer driver.  Something like this (in your ~/.emacs file):

 (setq printer-name nil)
 (setq lpr-command "C:/Program Files/PrintFile/prfile32.exe")  (setq lpr-switches '("/q"))  (setq ps-lpr-command "C:/Program Files/PrintFile/prfile32.exe")  (setq ps-lpr-switches '("/q"))


_______________________________________________
help-gnu-emacs mailing list
help-gnu-emacs@gnu.org
http://lists.gnu.org/mailman/listinfo/help-gnu-emacs

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

end of thread, other threads:[~2007-08-09  1:18 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-08-06 23:48 how to byte-compile .el files automatically after save? sunway
2007-08-07  2:29 ` Robert D. Crawford
2007-08-07  3:15   ` Emacs brianjiang
2007-08-07  6:28     ` Emacs Herbert Euler
2007-08-07  8:38       ` Emacs brianjiang
2007-08-07 21:05     ` Emacs Eli Zaretskii
2007-08-08  2:48       ` Emacs brianjiang
2007-08-08 18:26         ` Emacs Eli Zaretskii
2007-08-09  1:18           ` Emacs brianjiang
2007-08-07  4:26   ` how to byte-compile .el files automatically after save? sunway
2007-08-07 15:37     ` Peter Dyballa

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.