Author Topic: spaces in directories (may be filenames, too)  (Read 7684 times)

buggyfunbunny

  • Senior Community Member
  • Posts: 233
  • Hero Points: 4
spaces in directories (may be filenames, too)
« on: May 14, 2007, 03:28:23 PM »
I checked the various threads about spaces in Windows paths, but none that addressed that age-old problem:  getting SE to open a file where the directories have spaces.  It will open the file if accessed from within SE's file manager.  But both double-click and right-click/pick from Explorer still "opens" empty buffers for each node on the path with spaces, and not the file. 

Is this insoluble?

SE12/xp

hs2

  • Senior Community Member
  • Posts: 2761
  • Hero Points: 292
Re: spaces in directories (may be filenames, too)
« Reply #1 on: May 14, 2007, 04:05:39 PM »
I bet your (win) file assoc. is NOT "<path-to-slick>\vs.exe" "%1" (see the quotes around %1) :)

HS2

buggyfunbunny

  • Senior Community Member
  • Posts: 233
  • Hero Points: 4
Re: spaces in directories (may be filenames, too)
« Reply #2 on: May 14, 2007, 05:15:59 PM »
no it wasn't.  may be someone could put that in the Help?   :o

buggyfunbunny

  • Senior Community Member
  • Posts: 233
  • Hero Points: 4
Re: spaces in directories (may be filenames, too)
« Reply #3 on: May 14, 2007, 05:26:43 PM »
FWIW, what got me confused was that, typing

filename space

into Help/Search

returns a bunch of stuff, including:

str maybe_quote_filename(_str filename)

Returns: _str

Returns filename, with quotes around it, if it contains a space character. Otherwise filename is returned.

which led me to leap to the conclusion that SE took care of that part of the problem.
mea culpa, mea culpa, mea maxima culpa.



hs2

  • Senior Community Member
  • Posts: 2761
  • Hero Points: 292
Re: spaces in directories (may be filenames, too)
« Reply #4 on: May 14, 2007, 05:43:21 PM »
@BFB: At this stage (win explorer -> ShellExecute or sth.) SE isn't in charge yet - it isn't even launched.
It's up to the explorer to provide the commandline arg-list which is a SPACE separated list of items.
Args w/ SPACEs have to be double-quoted to form 1 arg.

Hope you're even more confused now ;)

HS2

witness9

  • Community Member
  • Posts: 54
  • Hero Points: 2
Re: spaces in directories (may be filenames, too)
« Reply #5 on: May 23, 2007, 03:32:10 PM »
HS2, what is the setting you're referring to in your initial reply?  I don't have txt files associated with Slick but usually have no trouble with a 'Send To' SlickEdit.  However, I'm trying to load a file with spaces in the path now and it will not load.

I tried "<path>\vs.exe" "%1" in my Send To shortcut and then I'd get a blank buffer named %1.

hs2

  • Senior Community Member
  • Posts: 2761
  • Hero Points: 292
Re: spaces in directories (may be filenames, too)
« Reply #6 on: May 23, 2007, 03:49:58 PM »
@witness9:
I was referring to file associations. (see this thread [/url]http://community.slickedit.com/index.php?topic=742.msg3230[/url])
Seems that the sendto shortcut doesn't need any argument and Windows already provides a properly quoted arg.

HS2

witness9

  • Community Member
  • Posts: 54
  • Hero Points: 2
Re: spaces in directories (may be filenames, too)
« Reply #7 on: May 23, 2007, 03:55:46 PM »
 :-\ OK, I feel dumb.  These are really tilda's in the path, not spaces.  Nevertheless, they don't work.  Notepad and TextPad open the files just fine, but SlickEdit won't.  I tried double-clicking from the search results, send-to, open-with, drag-drop. Nothing works.   ???

witness9

  • Community Member
  • Posts: 54
  • Hero Points: 2
Re: spaces in directories (may be filenames, too)
« Reply #8 on: May 23, 2007, 04:37:28 PM »
For what it's worth, I tried this on my 'open network' pc and got this error with a Send To SlickEdit where there are tildes in the path.

OBTW: I'm on XP SP2 w/SE v11.02

hs2

  • Senior Community Member
  • Posts: 2761
  • Hero Points: 292
Re: spaces in directories (may be filenames, too)
« Reply #9 on: May 23, 2007, 04:41:24 PM »
That's really strange...
What's your set-var def_unix_expansion (on cmdline). Should be better '0' on Windows.

HS2

witness9

  • Community Member
  • Posts: 54
  • Hero Points: 2
Re: spaces in directories (may be filenames, too)
« Reply #10 on: May 23, 2007, 04:51:34 PM »
That fixed it.  I think I may have changed that when I was trying to get some kind of emacs behavior to work for one of our team.  (still haven't sold him on SlickEdit)

Many thanks!

hs2

  • Senior Community Member
  • Posts: 2761
  • Hero Points: 292
Re: spaces in directories (may be filenames, too)
« Reply #11 on: May 23, 2007, 04:59:51 PM »
Same for me - and I also stumbled into troubles (filename/path completion in the 'Build' window) time ago and disabled it again :)

HS2