unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* How to use Emacs-lisp without editing .emacs file?
@ 2010-02-05 20:29 sayeo87
  2010-02-06  6:00 ` Suvayu Ali
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: sayeo87 @ 2010-02-05 20:29 UTC (permalink / raw)
  To: Help-gnu-emacs


How would I enter emacs-lisp such as 

"""
;; highlight brackets
(require 'paren)
(show-paren-mode 1)
"""

WITHIN emacs itself? I do not have access to the .emacs file as I am using
an emacs instance within another program run as another user.
-- 
View this message in context: http://old.nabble.com/How-to-use-Emacs-lisp-without-editing-.emacs-file--tp27473505p27473505.html
Sent from the Emacs - Help mailing list archive at Nabble.com.





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

* Re: How to use Emacs-lisp without editing .emacs file?
  2010-02-05 20:29 sayeo87
@ 2010-02-06  6:00 ` Suvayu Ali
  2010-02-06  7:29   ` Pierre Lorenzon
  2010-02-06 10:00 ` Peter Dyballa
       [not found] ` <mailman.792.1265450452.14305.help-gnu-emacs@gnu.org>
  2 siblings, 1 reply; 6+ messages in thread
From: Suvayu Ali @ 2010-02-06  6:00 UTC (permalink / raw)
  To: sayeo87; +Cc: Help-gnu-emacs

On Friday 05 February 2010 12:29 PM, sayeo87 wrote:
>
> How would I enter emacs-lisp such as
>
> """
> ;; highlight brackets
> (require 'paren)
> (show-paren-mode 1)
> """
>
> WITHIN emacs itself? I do not have access to the .emacs file as I am using
> an emacs instance within another program run as another user.

I am no expert but maybe you can write all your customisations in a file 
where you have write access and eval the entire file at the start of 
your session?

If your customisations are a couple of lines then you can always write 
it in the *scratch* buffer, and use `C-j' or mark the region and do `M-x 
eval-region'.

Hope this helps.
-- 
Suvayu

Open source is the future. It sets us free.




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

* Re: How to use Emacs-lisp without editing .emacs file?
       [not found] <mailman.787.1265435768.14305.help-gnu-emacs@gnu.org>
@ 2010-02-06  7:21 ` Teemu Likonen
  0 siblings, 0 replies; 6+ messages in thread
From: Teemu Likonen @ 2010-02-06  7:21 UTC (permalink / raw)
  To: help-gnu-emacs

* 2010-02-05 12:29 (-0800), sayeo wrote:

> How would I enter emacs-lisp such as 

> ;; highlight brackets
> (require 'paren)
> (show-paren-mode 1)

That "require" command is not needed. Emacs will load paren.el
automatically when you call show-paren-mode function.


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

* Re: How to use Emacs-lisp without editing .emacs file?
  2010-02-06  6:00 ` Suvayu Ali
@ 2010-02-06  7:29   ` Pierre Lorenzon
  0 siblings, 0 replies; 6+ messages in thread
From: Pierre Lorenzon @ 2010-02-06  7:29 UTC (permalink / raw)
  To: fatkasuvayu+linux; +Cc: yeosuanaik, Help-gnu-emacs

From: Suvayu Ali <fatkasuvayu+linux@gmail.com>
Subject: Re: How to use Emacs-lisp without editing .emacs file?
Date: Fri, 05 Feb 2010 22:00:36 -0800

> On Friday 05 February 2010 12:29 PM, sayeo87 wrote:
>>
>> How would I enter emacs-lisp such as
>>
>> """
>> ;; highlight brackets
>> (require 'paren)
>> (show-paren-mode 1)
>> """
>>
>> WITHIN emacs itself? I do not have access to the .emacs file as
>> I am using
>> an emacs instance within another program run as another user.
> 
> I am no expert but maybe you can write all your customisations
> in a file where you have write access and eval the entire file
> at the start of your session?
> 
> If your customisations are a couple of lines then you can
> always write it in the *scratch* buffer, and use `C-j' or mark
> the region and do `M-x eval-region'.

  If the code is particularly short you can type esc : then
  type the code in the minibuffer and finally press enter to
  evaluate. Anyway you'll have to do it each time you start a
  new emacs session.

  Pierre



> 
> Hope this helps.
> -- 
> Suvayu
> 
> Open source is the future. It sets us free.
> 
> 




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

* Re: How to use Emacs-lisp without editing .emacs file?
  2010-02-05 20:29 sayeo87
  2010-02-06  6:00 ` Suvayu Ali
@ 2010-02-06 10:00 ` Peter Dyballa
       [not found] ` <mailman.792.1265450452.14305.help-gnu-emacs@gnu.org>
  2 siblings, 0 replies; 6+ messages in thread
From: Peter Dyballa @ 2010-02-06 10:00 UTC (permalink / raw)
  To: sayeo87; +Cc: Help-gnu-emacs

Put the statements into the *scratch* buffer, mark the region, and  
then execute any of eval-expression or eval-region. You could also try  
eval-buffer...

--
Greetings

   Pete                           <]
              o        __o         |__    o       HPV, the real
     ___o    /I       -\<,         |o \  -\),-%     high speed!
___/\ /\___./ \___...O/ O____.....`-O-'-()--o_________________





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

* Re: How to use Emacs-lisp without editing .emacs file?
       [not found] ` <mailman.792.1265450452.14305.help-gnu-emacs@gnu.org>
@ 2010-02-06 22:49   ` jpkotta
  0 siblings, 0 replies; 6+ messages in thread
From: jpkotta @ 2010-02-06 22:49 UTC (permalink / raw)
  To: help-gnu-emacs

On Feb 6, 4:00 am, Peter Dyballa <Peter_Dyba...@Web.DE> wrote:
> Put the statements into the *scratch* buffer, mark the region, and  
> then execute any of eval-expression or eval-region. You could also try  
> eval-buffer...
>
> --
> Greetings
>
>    Pete                           <]
>               o        __o         |__    o       HPV, the real
>      ___o    /I       -\<,         |o \  -\),-%     high speed!
> ___/\ /\___./ \___...O/ O____.....`-O-'-()--o_________________

I like eval-last-sexp (C-x C-e) because it works in just about every
mode.  And there is ielm (M-x ielm) which gives you an Emacs Lisp REPL.


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

end of thread, other threads:[~2010-02-06 22:49 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <mailman.787.1265435768.14305.help-gnu-emacs@gnu.org>
2010-02-06  7:21 ` How to use Emacs-lisp without editing .emacs file? Teemu Likonen
2010-02-05 20:29 sayeo87
2010-02-06  6:00 ` Suvayu Ali
2010-02-06  7:29   ` Pierre Lorenzon
2010-02-06 10:00 ` Peter Dyballa
     [not found] ` <mailman.792.1265450452.14305.help-gnu-emacs@gnu.org>
2010-02-06 22:49   ` jpkotta

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