Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
emacsclient under windows
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  8 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Doug Lewan  
View profile  
 More options Jun 20 2012, 9:53 am
Newsgroups: gnu.emacs.help
From: Doug Lewan <do...@shubertticketing.com>
Date: Wed, 20 Jun 2012 13:53:58 +0000
Local: Wed, Jun 20 2012 9:53 am
Subject: emacsclient under windows

I'd like to use emacsclient as an editor under windows. That is I'd like to have it be the default editor for an application that we use.

Of course, that application [sometimes] uses windows-style paths and those paths aren't handled well by either emacs or emacsclient. (It looks like both, I'm guessing.)

Is there a "correct" and "natural way" of getting emacs to recognize things like X:\your\name\here?

,Douglas
Douglas Lewan
Shubert Ticketing
(201) 489-8600 ext 224


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Juanma Barranquero  
View profile  
 More options Jun 20 2012, 10:00 am
Newsgroups: gnu.emacs.help
From: Juanma Barranquero <lek...@gmail.com>
Date: Wed, 20 Jun 2012 16:00:34 +0200
Local: Wed, Jun 20 2012 10:00 am
Subject: Re: emacsclient under windows

On Wed, Jun 20, 2012 at 3:53 PM, Doug Lewan <do...@shubertticketing.com> wrote:
> Of course, that application [sometimes] uses windows-style paths and those
> paths aren't handled well by either emacs or emacsclient. (It looks like
> both, I'm guessing.)

What version of Emacs are you using, and which problem are you seeing
with windows-style paths?

    Juanma


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Juanma Barranquero  
View profile  
 More options Jun 20 2012, 10:01 am
Newsgroups: gnu.emacs.help
From: Juanma Barranquero <lek...@gmail.com>
Date: Wed, 20 Jun 2012 16:01:49 +0200
Local: Wed, Jun 20 2012 10:01 am
Subject: Re: emacsclient under windows

> What version of Emacs are you using, and which problem are you seeing
> with windows-style paths?

[Or perhaps "which version" and "what problem". Damn impersonal
interrogative pronouns.]

    Juanma


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Doug Lewan  
View profile  
 More options Jun 20 2012, 10:23 am
Newsgroups: gnu.emacs.help
From: Doug Lewan <do...@shubertticketing.com>
Date: Wed, 20 Jun 2012 14:23:08 +0000
Local: Wed, Jun 20 2012 10:23 am
Subject: RE: emacsclient under windows
Juanma,

Thanks for catching my transgression.

emacs-version: 23.4
OS: CYGWIN on Windows 7

The symptom:

If I run  emacsclient X:\your\name\here  in one place, then emacs sees that as a simple filename, so it tries to find, e.g. /home/dougl/src/X:\your\name\here (if the client was run in C:\cygwin\home\dougl\src).


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Juanma Barranquero  
View profile  
 More options Jun 20 2012, 10:29 am
Newsgroups: gnu.emacs.help
From: Juanma Barranquero <lek...@gmail.com>
Date: Wed, 20 Jun 2012 16:29:14 +0200
Local: Wed, Jun 20 2012 10:29 am
Subject: Re: emacsclient under windows

On Wed, Jun 20, 2012 at 4:23 PM, Doug Lewan <do...@shubertticketing.com> wrote:
> Thanks for catching my transgression.

Transgression?

> emacs-version: 23.4
> OS: CYGWIN on Windows 7

I confess I know next to nothing about the Cygwin port, but, are you
mixing Cygwin with a non-Cygwin Emacs build, perhaps?

    Juanma


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Eli Zaretskii  
View profile  
 More options Jun 20 2012, 12:41 pm
Newsgroups: gnu.emacs.help
From: Eli Zaretskii <e...@gnu.org>
Date: Wed, 20 Jun 2012 19:41:19 +0300
Local: Wed, Jun 20 2012 12:41 pm
Subject: Re: emacsclient under windows

> From: Doug Lewan <do...@shubertticketing.com>
> Date: Wed, 20 Jun 2012 14:23:08 +0000

> emacs-version: 23.4
> OS: CYGWIN on Windows 7

> The symptom:

> If I run  emacsclient X:\your\name\here  in one place, then emacs sees that as a simple filename, so it tries to find, e.g. /home/dougl/src/X:\your\name\here (if the client was run in C:\cygwin\home\dougl\src).

That's because you are using a Cygwin build of Emacs, which doesn't
recognize native Windows file names without help.

Use the native Windows build of Emacs, and your problems will be gone.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Doug Lewan  
View profile  
 More options Jun 21 2012, 11:57 am
Newsgroups: gnu.emacs.help
From: Doug Lewan <do...@shubertticketing.com>
Date: Thu, 21 Jun 2012 15:57:15 +0000
Local: Thurs, Jun 21 2012 11:57 am
Subject: RE: emacsclient under windows

Well, I never found a "natural" way to handle DOS pathnames, but the following seems to do what I want.

(defun dos-find-file-hook ()
  "Handle DOS path names by converting them to CYGWIN paths."
  (let ((fname "dos-find-file-hook")
     (dos-path-re ".+/\\(?1:.\\):\\(?2:.+$\\)")
     (dos-drive)
     (dos-path)
     (cygwin-path)
     (filename (buffer-file-name))
     (dos-to-cygwin-path (lambda (p)
                      (let ((ret p))
                     (while (string-match (regexp-quote "\\") ret)
                       (setq ret (concat (substring ret 0 (match-beginning 0)) "/" (substring ret (match-end 0)))))
                     ret))))
    (cond ((string-match dos-path-re filename)
        (setq dos-drive (substring filename (match-beginning 1) (match-end 1)))
        (setq dos-path  (substring filename (match-beginning 2) (match-end 2)))
        (setq cygwin-path (concat "/cygdrive/"
                          dos-drive
                          ;; Ensure a '/' here.
                          (unless (string-match (concat "^" (regexp-quote "\\")) dos-path) "/")
                          (funcall dos-to-cygwin-path dos-path)))
        (find-file cygwin-path)
        ;; emacs under CYGWIN is smart enough to know that this is the same file,
        ;; so we don't have to clean up.
        ;; I.e. No need to kill a buffer named after a DOS file.
        )
       (t t))))

(add-hook 'find-file-hooks 'dos-find-file-hook)

,Doug

From: help-gnu-emacs-bounces+dougl=shubertticketing....@gnu.org [mailto:help-gnu-emacs-bounces+dougl=shubertticketing....@gnu.org] On Behalf Of Doug Lewan
Sent: Wednesday, 2012 June 20 09:54
To: help-gnu-em...@gnu.org
Subject: emacsclient under windows

I'd like to use emacsclient as an editor under windows. That is I'd like to have it be the default editor for an application that we use.

Of course, that application [sometimes] uses windows-style paths and those paths aren't handled well by either emacs or emacsclient. (It looks like both, I'm guessing.)

Is there a "correct" and "natural way" of getting emacs to recognize things like X:\your\name\here?

,Douglas
Douglas Lewan
Shubert Ticketing
(201) 489-8600 ext 224


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ken Goldman  
View profile  
 More options Jun 21 2012, 3:42 pm
Newsgroups: gnu.emacs.help
From: Ken Goldman <kgold...@us.ibm.com>
Date: Thu, 21 Jun 2012 15:42:43 -0400
Local: Thurs, Jun 21 2012 3:42 pm
Subject: Re: emacsclient under windows
I stay away from cygwin.  I use gnuserv/gnuclient and it works well
under windows.  I set many file associations to gnuclientw, and double
click works.  Drag and drop from the desktop or Windows Explorer also
works.  Tilde works.  Etc.

On 6/20/2012 10:23 AM, Doug Lewan wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »