unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Carbon emacs (OSX) & /usr/bin/emacs using the same .emacs
@ 2008-08-25 19:27 jOHn wONg
  2008-08-25 23:25 ` Peter Dyballa
  2008-08-27 19:06 ` Colin S. Miller
  0 siblings, 2 replies; 5+ messages in thread
From: jOHn wONg @ 2008-08-25 19:27 UTC (permalink / raw)
  To: help-gnu-emacs

Hi all,

in my .emac file, I want to load different things onto different emacs
by a structure such as the followings:

(if (or (eq window-system 'w32) (eq window-system 'win32))
    (progn
     (print "we are in windows!")
     ;; making Emacs to work with Cygwin
     (setenv "PATH" (concat "C:/cygwin/bin;" (getenv "PATH")))
     (setq exec-path (cons "C:/cygwin/bin/" exec-path))
     (require 'setup-cygwin)
     ;; For subprocesses invoked via the shell
     ;; (e.g., "shell -c command")
     (setq shell-file-name explicit-shell-file-name)))

Of course the above is for detecting windows, is there any parameter
that can let me tell the difference between Carbon Emacs and /usr/bin/
emacs Emacs (in darwin shell)?

mac-carbon-version-string is present in Carbon Emacs, and /usr/bin/
emacs is lacking such a variable. However, I do not know how to make
use of this to write the .emacs file (evaluating mac-carbon-version-
string will give me a "void-variable" error in /usr/bin/emacs)

Please suggest! Thanks in advance.


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

* Re: Carbon emacs (OSX) & /usr/bin/emacs using the same .emacs
  2008-08-25 19:27 Carbon emacs (OSX) & /usr/bin/emacs using the same .emacs jOHn wONg
@ 2008-08-25 23:25 ` Peter Dyballa
  2008-08-26 10:45   ` Nikolaj Schumacher
  2008-08-27 19:06 ` Colin S. Miller
  1 sibling, 1 reply; 5+ messages in thread
From: Peter Dyballa @ 2008-08-25 23:25 UTC (permalink / raw)
  To: jOHn wONg; +Cc: help-gnu-emacs


Am 25.08.2008 um 21:27 schrieb jOHn wONg:

> Of course the above is for detecting windows, is there any parameter
> that can let me tell the difference between Carbon Emacs and /usr/bin/
> emacs Emacs (in darwin shell)?


The versions of both Emacsen are different. Emacs-major-version is 21  
for Apple's non-windowing version. The *function* emacs-version (you  
can save its output in a variable) tells quite a lot.

--
Greetings

   Pete       (:
         _    / __    -    -
       _/ \__/_/        -     -
      (´`)      (´`)   -    -
       `´        `´







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

* Re: Carbon emacs (OSX) & /usr/bin/emacs using the same .emacs
  2008-08-25 23:25 ` Peter Dyballa
@ 2008-08-26 10:45   ` Nikolaj Schumacher
  2008-08-26 10:55     ` Peter Dyballa
  0 siblings, 1 reply; 5+ messages in thread
From: Nikolaj Schumacher @ 2008-08-26 10:45 UTC (permalink / raw)
  To: Peter Dyballa; +Cc: help-gnu-emacs, jOHn wONg

Peter Dyballa <Peter_Dyballa@Web.DE> wrote:

> Am 25.08.2008 um 21:27 schrieb jOHn wONg:
>
>> Of course the above is for detecting windows, is there any parameter
>> that can let me tell the difference between Carbon Emacs and /usr/bin/
>> emacs Emacs (in darwin shell)?

Yes, `window-system' is 'mac in Carbon Emacs.  In terminals it is nil.
In both `system-type' is 'darwin.


> The versions of both Emacsen are different. Emacs-major-version is 21  for
> Apple's non-windowing version.

That depends on the OSX version.  10.5 has 22.1.1.

regards,
Nikolaj Schumacher




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

* Re: Carbon emacs (OSX) & /usr/bin/emacs using the same .emacs
  2008-08-26 10:45   ` Nikolaj Schumacher
@ 2008-08-26 10:55     ` Peter Dyballa
  0 siblings, 0 replies; 5+ messages in thread
From: Peter Dyballa @ 2008-08-26 10:55 UTC (permalink / raw)
  To: Nikolaj Schumacher; +Cc: help-gnu-emacs, jOHn wONg


Am 26.08.2008 um 12:45 schrieb Nikolaj Schumacher:

>> The versions of both Emacsen are different. Emacs-major-version is  
>> 21  for
>> Apple's non-windowing version.
>
> That depends on the OSX version.  10.5 has 22.1.1.


No, who told Apple that GNU Emacs was updated?! At least the  
*variable* emacs-version is 22.2 for Carbon Emacs. And as I  
mentioned, the function gives more details for distinction.

--
Mit friedvollen Grüßen

   Pete

Sometimes I think the surest sign that intelligent life exists  
elsewhere in the universe is that none of it has tried to contact us.
			– Bill Watterson, in his comic strip Calvin and Hobbes







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

* Re: Carbon emacs (OSX) & /usr/bin/emacs using the same .emacs
  2008-08-25 19:27 Carbon emacs (OSX) & /usr/bin/emacs using the same .emacs jOHn wONg
  2008-08-25 23:25 ` Peter Dyballa
@ 2008-08-27 19:06 ` Colin S. Miller
  1 sibling, 0 replies; 5+ messages in thread
From: Colin S. Miller @ 2008-08-27 19:06 UTC (permalink / raw)
  To: help-gnu-emacs

jOHn wONg wrote:
> Hi all,
> 
> in my .emac file, I want to load different things onto different emacs
> by a structure such as the followings:
> 
> (if (or (eq window-system 'w32) (eq window-system 'win32))
>     (progn
>      (print "we are in windows!")
>      ;; making Emacs to work with Cygwin
>      (setenv "PATH" (concat "C:/cygwin/bin;" (getenv "PATH")))
>      (setq exec-path (cons "C:/cygwin/bin/" exec-path))
>      (require 'setup-cygwin)
>      ;; For subprocesses invoked via the shell
>      ;; (e.g., "shell -c command")
>      (setq shell-file-name explicit-shell-file-name)))
> 
> Of course the above is for detecting windows, is there any parameter
> that can let me tell the difference between Carbon Emacs and /usr/bin/
> emacs Emacs (in darwin shell)?
> 
> mac-carbon-version-string is present in Carbon Emacs, and /usr/bin/
> emacs is lacking such a variable. However, I do not know how to make
> use of this to write the .emacs file (evaluating mac-carbon-version-
> string will give me a "void-variable" error in /usr/bin/emacs)
> 
> Please suggest! Thanks in advance.

Hi,
I don't use Carbon, but you might be able to do something useful
with invocation-path, which contains the directory containing the
current emacs binary.

HTH,
Colin S. Miller


-- 
Replace the obvious in my email address with the first three letters of the hostname to reply.


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

end of thread, other threads:[~2008-08-27 19:06 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-08-25 19:27 Carbon emacs (OSX) & /usr/bin/emacs using the same .emacs jOHn wONg
2008-08-25 23:25 ` Peter Dyballa
2008-08-26 10:45   ` Nikolaj Schumacher
2008-08-26 10:55     ` Peter Dyballa
2008-08-27 19:06 ` Colin S. Miller

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