* Compatible .emacs for Gnu and xemacs
@ 2009-06-01 1:46 emacsy
2009-06-01 8:38 ` Peter Dyballa
` (3 more replies)
0 siblings, 4 replies; 9+ messages in thread
From: emacsy @ 2009-06-01 1:46 UTC (permalink / raw)
To: Help-gnu-emacs
Hi All,
I have spent a lot of time customizing my .emacs file to work with GNU emacs
21.
Now I am in a situation where I can only use xemacs.
How is it possible to modify my .emacs file to work with both Gnu Emacs and
xemacs?
Any tips/pointers/links are highly appreciated, could not find anything
online refereeing to this issue.
--
View this message in context: http://www.nabble.com/Compatible-.emacs-for-Gnu-and-xemacs-tp23808905p23808905.html
Sent from the Emacs - Help mailing list archive at Nabble.com.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Compatible .emacs for Gnu and xemacs
2009-06-01 1:46 Compatible .emacs for Gnu and xemacs emacsy
@ 2009-06-01 8:38 ` Peter Dyballa
2009-06-01 16:26 ` Drew Adams
2009-06-01 18:27 ` emacsy
` (2 subsequent siblings)
3 siblings, 1 reply; 9+ messages in thread
From: Peter Dyballa @ 2009-06-01 8:38 UTC (permalink / raw)
To: emacsy; +Cc: Help-gnu-emacs
Am 01.06.2009 um 03:46 schrieb emacsy:
> How is it possible to modify my .emacs file to work with both Gnu
> Emacs and
> xemacs?
(if (string= "21" emacs-major-version)
...)
(if (featurep 'xemacs) ; or 'emacs
...)
--
Greetings
Pete
Programming today is a race between software engineers striving to
build bigger and better idiot-proof programs, and the Universe trying
to produce bigger and better idiots. So far, the Universe is winning.
– Rich Cook
^ permalink raw reply [flat|nested] 9+ messages in thread
* RE: Compatible .emacs for Gnu and xemacs
2009-06-01 8:38 ` Peter Dyballa
@ 2009-06-01 16:26 ` Drew Adams
0 siblings, 0 replies; 9+ messages in thread
From: Drew Adams @ 2009-06-01 16:26 UTC (permalink / raw)
To: 'Peter Dyballa', 'emacsy'; +Cc: Help-gnu-emacs
> (if (string= "21" emacs-major-version) ...)
`emacs-major-version' returns a number, not a string.
(if (= 21 emacs-major-version) ...)
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Compatible .emacs for Gnu and xemacs
2009-06-01 1:46 Compatible .emacs for Gnu and xemacs emacsy
2009-06-01 8:38 ` Peter Dyballa
@ 2009-06-01 18:27 ` emacsy
2009-06-01 18:31 ` Lennart Borgman
` (2 more replies)
[not found] ` <mailman.8292.1243880888.31690.help-gnu-emacs@gnu.org>
2009-06-01 19:01 ` Andreas Röhler
3 siblings, 3 replies; 9+ messages in thread
From: emacsy @ 2009-06-01 18:27 UTC (permalink / raw)
To: Help-gnu-emacs
Thanks for your responses guys.
What I meant is actually porting/migrating my customizations in .emacs to
work with xmeacs.
So now when starting emacs, it picks up all the
colors/functions/bindings...etc
where when starting xemacs, it does not pick up anything from .emacs and
shows plain basic xemacs.
I learned that xemacs uses other files for customizations like .xemacs?
So how could I make my customizations in .emacs be picked up by xemacs?
emacsy wrote:
>
> Hi All,
> I have spent a lot of time customizing my .emacs file to work with GNU
> emacs 21.
> Now I am in a situation where I can only use xemacs.
> How is it possible to modify my .emacs file to work with both Gnu Emacs
> and xemacs?
> Any tips/pointers/links are highly appreciated, could not find anything
> online refereeing to this issue.
>
--
View this message in context: http://www.nabble.com/Compatible-.emacs-for-Gnu-and-xemacs-tp23808905p23819702.html
Sent from the Emacs - Help mailing list archive at Nabble.com.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Compatible .emacs for Gnu and xemacs
2009-06-01 18:27 ` emacsy
@ 2009-06-01 18:31 ` Lennart Borgman
2009-06-01 18:37 ` Drew Adams
2009-06-01 18:48 ` Peter Dyballa
2 siblings, 0 replies; 9+ messages in thread
From: Lennart Borgman @ 2009-06-01 18:31 UTC (permalink / raw)
To: emacsy; +Cc: Help-gnu-emacs
On Mon, Jun 1, 2009 at 8:27 PM, emacsy <hisnawi@hotmail.com> wrote:
>
> Thanks for your responses guys.
> What I meant is actually porting/migrating my customizations in .emacs to
> work with xmeacs.
> So now when starting emacs, it picks up all the
> colors/functions/bindings...etc
> where when starting xemacs, it does not pick up anything from .emacs and
> shows plain basic xemacs.
> I learned that xemacs uses other files for customizations like .xemacs?
> So how could I make my customizations in .emacs be picked up by xemacs?
You will probably get more help on that on an xemacs mailing list. I
suppose people here mostly do not know.
> emacsy wrote:
>>
>> Hi All,
>> I have spent a lot of time customizing my .emacs file to work with GNU
>> emacs 21.
>> Now I am in a situation where I can only use xemacs.
>> How is it possible to modify my .emacs file to work with both Gnu Emacs
>> and xemacs?
>> Any tips/pointers/links are highly appreciated, could not find anything
>> online refereeing to this issue.
>>
>
> --
> View this message in context: http://www.nabble.com/Compatible-.emacs-for-Gnu-and-xemacs-tp23808905p23819702.html
> Sent from the Emacs - Help mailing list archive at Nabble.com.
>
>
>
>
^ permalink raw reply [flat|nested] 9+ messages in thread
* RE: Compatible .emacs for Gnu and xemacs
2009-06-01 18:27 ` emacsy
2009-06-01 18:31 ` Lennart Borgman
@ 2009-06-01 18:37 ` Drew Adams
2009-06-01 18:48 ` Peter Dyballa
2 siblings, 0 replies; 9+ messages in thread
From: Drew Adams @ 2009-06-01 18:37 UTC (permalink / raw)
To: 'emacsy', Help-gnu-emacs
> What I meant is actually porting/migrating my customizations
> in .emacs to
> work with xmeacs.
> So now when starting emacs, it picks up all the
> colors/functions/bindings...etc
> where when starting xemacs, it does not pick up anything from
> .emacs and
> shows plain basic xemacs.
> I learned that xemacs uses other files for customizations
> like .xemacs?
> So how could I make my customizations in .emacs be picked up
> by xemacs?
Look for help about this on the Emacs wiki. Search for `xemacs' in the search
box. Here's one starting place:
http://www.emacswiki.org/emacs/EmacsAndXEmacs
However, the wiki seems to be out of order at the moment - try a little later.
;-)
Things like faces are likely to pose a bit of a problem, IIRC. See the wiki page
about XEmacs extents.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Compatible .emacs for Gnu and xemacs
[not found] ` <mailman.8292.1243880888.31690.help-gnu-emacs@gnu.org>
@ 2009-06-01 18:38 ` Chris Jones
0 siblings, 0 replies; 9+ messages in thread
From: Chris Jones @ 2009-06-01 18:38 UTC (permalink / raw)
To: help-gnu-emacs
emacsy <hisnawi@hotmail.com> writes:
> Thanks for your responses guys.
> What I meant is actually porting/migrating my customizations in .emacs to
> work with xmeacs.
> So now when starting emacs, it picks up all the
> colors/functions/bindings...etc
> where when starting xemacs, it does not pick up anything from .emacs and
> shows plain basic xemacs.
> I learned that xemacs uses other files for customizations like .xemacs?
> So how could I make my customizations in .emacs be picked up by xemacs?
Here's how I do it:
My .emacs starts with this comment:
;; Xemacs doesn't read this file, but we use Xemacs' init file in Emacs.
;; However, Emacs does its own customizations.
After a bunch of code useful only in Emacs rather than Xemacs, it ends
with:
(let ((xemacs-init-file
(expand-file-name "init.el" "~/.xemacs")))
(load-file xemacs-init-file))
Inside the xemacs-init-file file, there is the following comment:
;; Note: this file is shared by FSF Emacs and Xemacs, hence the
;; "(featurep 'xemacs)" conditionializations below.
Then, code that only is needed or works in Xemacs has
(when (featurep 'xemacs) ...)
wrapped around it and code that only is needed or works in Emacs has
(unless (featurep 'xemacs) ...)
wrapped around it.
e.g. the following lines are in init.el:
(when (featurep 'xemacs)
(set-variable 'default-toolbar-visible-p nil))
Hope this helps.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Compatible .emacs for Gnu and xemacs
2009-06-01 18:27 ` emacsy
2009-06-01 18:31 ` Lennart Borgman
2009-06-01 18:37 ` Drew Adams
@ 2009-06-01 18:48 ` Peter Dyballa
2 siblings, 0 replies; 9+ messages in thread
From: Peter Dyballa @ 2009-06-01 18:48 UTC (permalink / raw)
To: emacsy; +Cc: Help-gnu-emacs
Am 01.06.2009 um 20:27 schrieb emacsy:
> I learned that xemacs uses other files for customizations
> like .xemacs?
> So how could I make my customizations in .emacs be picked up by
> xemacs?
Hard-link them: two names for one file.
--
Greetings
Pete
America believes in education: the average professor earns more money
in a year than a professional athlete earns in a whole week.
– Evan Esar
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Compatible .emacs for Gnu and xemacs
2009-06-01 1:46 Compatible .emacs for Gnu and xemacs emacsy
` (2 preceding siblings ...)
[not found] ` <mailman.8292.1243880888.31690.help-gnu-emacs@gnu.org>
@ 2009-06-01 19:01 ` Andreas Röhler
3 siblings, 0 replies; 9+ messages in thread
From: Andreas Röhler @ 2009-06-01 19:01 UTC (permalink / raw)
To: emacsy; +Cc: help-gnu-emacs
emacsy wrote:
> Hi All,
> I have spent a lot of time customizing my .emacs file to work with GNU emacs
> 21.
> Now I am in a situation where I can only use xemacs.
> How is it possible to modify my .emacs file to work with both Gnu Emacs and
> xemacs?
> Any tips/pointers/links are highly appreciated, could not find anything
> online refereeing to this issue.
>
Its important to use a key format accepted by both. I use this for example:
(global-set-key [(control x)(c)] 'electric-buffer-list)
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2009-06-01 19:01 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-06-01 1:46 Compatible .emacs for Gnu and xemacs emacsy
2009-06-01 8:38 ` Peter Dyballa
2009-06-01 16:26 ` Drew Adams
2009-06-01 18:27 ` emacsy
2009-06-01 18:31 ` Lennart Borgman
2009-06-01 18:37 ` Drew Adams
2009-06-01 18:48 ` Peter Dyballa
[not found] ` <mailman.8292.1243880888.31690.help-gnu-emacs@gnu.org>
2009-06-01 18:38 ` Chris Jones
2009-06-01 19:01 ` Andreas Röhler
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).