Author Topic: Why is "Sort" grayed out?  (Read 813 times)

Researcher5

  • Community Member
  • Posts: 15
  • Hero Points: 0
Why is "Sort" grayed out?
« on: April 19, 2018, 11:56:23 am »
I'm a 20-year user of VS, new to v22.
I open a text file, Select-All, go to the Tool menu, and Sort is grayed out.

Why is Sort grayed out?  How do I sort?

Thanks - Researcher5

Dan

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 2167
  • Hero Points: 113
Re: Why is "Sort" grayed out?
« Reply #1 on: April 19, 2018, 12:42:26 pm »
I can't reproduce this.  What kind of file are you working with?  How many lines are selected?

Researcher5

  • Community Member
  • Posts: 15
  • Hero Points: 0
Re: Why is "Sort" grayed out?
« Reply #2 on: April 19, 2018, 01:05:09 pm »
When I open *any* file, Sort is grayed out (the only thing grayed out in the Tools menu).  Happens every time.
Sorry -- Selecting appears to be a red herring.
I can print all screens and send you anything you need.
Thanks - Researcher5

Lee

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 1190
  • Hero Points: 114
Re: Why is "Sort" grayed out?
« Reply #3 on: April 19, 2018, 01:10:11 pm »
Is the file Read Only?  It would be disabled in that case, I can't recall if there are any others.

Dan

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 2167
  • Hero Points: 113
Re: Why is "Sort" grayed out?
« Reply #4 on: April 19, 2018, 01:16:05 pm »
The only thing I see required for that to be on is that the current control is an editor control.  Lee is right, read only would certainly do it.

Researcher5

  • Community Member
  • Posts: 15
  • Hero Points: 0
Re: Why is "Sort" grayed out?
« Reply #5 on: April 19, 2018, 01:29:06 pm »
I'm actively writing to the file from another process/window.
Does that make it "read-only?"  I'd like to open, sort, and save sections of it to a new filename while it's actively being written to.  Sometimes the runs take 30-50 hours, so I'd like to open it and grab pieces during a run.

VS v9 has allowed this for years (open the live file, sort it, write the sorted file to a new filename)

Thanks - Researcher5

Dan

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 2167
  • Hero Points: 113
Re: Why is "Sort" grayed out?
« Reply #6 on: April 19, 2018, 01:33:14 pm »
Check your File settings.  There is one for "load partially" above a certain size.  You might need to up it if the file is big enough.  It looks like the default is 8MB.

Just out of curiosity, what version are you upgrading from?

Researcher5

  • Community Member
  • Posts: 15
  • Hero Points: 0
Re: Why is "Sort" grayed out?
« Reply #7 on: April 19, 2018, 01:33:59 pm »
P.S.  Moment of head shaking -- why can't I sort a Read-only file?  Is there some setting I need to make to allow this?  (I have 100,000s of read-only text files on this computer.)

Researcher5

  • Community Member
  • Posts: 15
  • Hero Points: 0
Re: Why is "Sort" grayed out?
« Reply #8 on: April 19, 2018, 01:36:54 pm »
Dan, thanks for the right question:
I'm upgrading from v9, which has been stable and reliable for years, but looks awful on a 4k display.

I really want a v9 that looks great in 4k, and will pay you $1,000s for it.  I need *no* function in v22.

(An extremely happy customer who has turned unhappy.)

Dan

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 2167
  • Hero Points: 113
Re: Why is "Sort" grayed out?
« Reply #9 on: April 19, 2018, 01:42:59 pm »
Well, we'll figure this out and turn you back into a happy customer I hope.

You can't sort read-only files because you can't type in them or perform other modifications either.  You can change the setting at the bottom right for the buffer, and then decline to change the file on disk.

What happens if you run "gui-sort" on the SlickEdit command line?

Researcher5

  • Community Member
  • Posts: 15
  • Hero Points: 0
Re: Why is "Sort" grayed out?
« Reply #10 on: April 19, 2018, 01:43:36 pm »
OK, found it:
- Load entire file ON
- Load partially OFF
- Count number of lines ON (great news: this never worked in v9)

Researcher5

  • Community Member
  • Posts: 15
  • Hero Points: 0
Re: Why is "Sort" grayed out?
« Reply #11 on: April 19, 2018, 01:49:41 pm »
"You can't sort read-only files because you can't type in them or perform other modifications either."

Yes, let's find a fix for that.

64GB of RAM, 8TB of Raid0 SSD, Xeon
I open 2GB files regularly.

Thanks

Dan

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 2167
  • Hero Points: 113
Re: Why is "Sort" grayed out?
« Reply #12 on: April 19, 2018, 01:51:09 pm »
What happens if you run "gui-sort" on the SlickEdit command line?

To get to the SlickEdit command line click on the message line at the bottom of the editor (to the left of the line indicator and other indicators).  You can also you Esc in almost any emulation (certainly not Vim).
« Last Edit: April 19, 2018, 02:00:06 pm by Dan »

jporkkahtc

  • Senior Community Member
  • Posts: 1659
  • Hero Points: 154
  • Text
Re: Why is "Sort" grayed out?
« Reply #13 on: April 19, 2018, 09:58:55 pm »
In: Tools > Options > Editing > General
There is the option "Protect read-only mode"
Turn that option OFF.

Researcher5

  • Community Member
  • Posts: 15
  • Hero Points: 0
Re: Why is "Sort" grayed out?
« Reply #14 on: April 21, 2018, 02:42:44 am »
Thanks -- that worked (Protect read-only mode -- OFF).