Author Topic: Build (.process) buffer  (Read 493 times)

jporkkahtc

  • Senior Community Member
  • Posts: 2335
  • Hero Points: 198
  • Text
Build (.process) buffer
« on: June 14, 2021, 08:55:22 pm »
So, I virtually never use the build tool in an editor window.

Just now, slickedit crashed (a/v).
When I restarted it, "Build (.process)" showed up as one of my buffers.

I've had this buffer show up occasionally recently, but I can't say for sure how - as I don't necessarily noticed when it does come up.

For this crash I'm reasonably sure that I didn't have this buffer before the crash.

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 6004
  • Hero Points: 467
Re: Build (.process) buffer
« Reply #1 on: June 15, 2021, 12:53:05 pm »
Not sure why that would happen. It would be more likely to happen if one of the files being restored no longer exists. Even then, it's not supposed to happen.

Dennis

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 3401
  • Hero Points: 465
Re: Build (.process) buffer
« Reply #2 on: June 15, 2021, 05:51:24 pm »
There is an option to restore the build window.  (Tools > Options... > Application Options > Auto Restore > Auto restore build window).

This does not remotely explain why you got a crash, but, if you happen to have this option enabled, and you had the build window open as an editor window before the crash (or in the last saved history before the crash), this would explain the Build window restoring.

jporkkahtc

  • Senior Community Member
  • Posts: 2335
  • Hero Points: 198
  • Text
Re: Build (.process) buffer
« Reply #3 on: June 15, 2021, 05:58:55 pm »
Thanks, I'll turn that auto-restore off.
Most likely, .process was a buffer before the crash.
Still, *something* is triggering .process to be a buffer.

Hm...I wonder - is this related to the problem of TBFind being docked?
See: https://community.slickedit.com/index.php/topic,18212.0.html

jporkkahtc

  • Senior Community Member
  • Posts: 2335
  • Hero Points: 198
  • Text
Re: Build (.process) buffer
« Reply #4 on: June 21, 2021, 08:21:31 pm »
Thanks to graeme here: https://community.slickedit.com/index.php/topic,18230.0.html
I tracked down where .process is being opened.

I occasionally invoke this macro:
_command void git_blame()
Code: [Select]
name_info(','VSARG2_READ_ONLY|VSARG2_REQUIRES_MDI_EDITORCTL)
{
    _macro('R',1);
    concur_command("git gui blame " p_buf_name);
}
and it opens .process as a buffer.

Is there a way to make it not do that?

Dan

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 2625
  • Hero Points: 141
Re: Build (.process) buffer
« Reply #5 on: June 21, 2021, 09:25:24 pm »
You could use
Code: [Select]
shell("git gui blame ":+maybe_quote_filename(p_buf_name),'A');
This will use a command shell to launch it.  The 'A' is the asynchronous option.

Dennis

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 3401
  • Hero Points: 465
Re: Build (.process) buffer
« Reply #6 on: June 21, 2021, 09:51:59 pm »
@jporkkhtc:

The build window is going to be a buffer, need to have something as backing for the Build tool window.  If you do not want the Build window to show up as an editor control (a document tab), then right click in the Build tool window and uncheck "Send Output to Editor Window"

jporkkahtc

  • Senior Community Member
  • Posts: 2335
  • Hero Points: 198
  • Text
Re: Build (.process) buffer
« Reply #7 on: July 13, 2021, 10:14:36 pm »
The function "shell()" does the trick.

WRT build window: Normally when running stuff from Slickedit, the "Build (.process)" buffer is not visible in the "Files" tool, and doesn't show up as an editor window.

For whatever reason, concur_command() does the equivalent of toggle_process_tab_output, and the shell() command does not.


BTW, "Send Output to Editor Window" appears to always be checked in the context menu of the Build tool.

Dennis

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 3401
  • Hero Points: 465
Re: Build (.process) buffer
« Reply #8 on: July 13, 2021, 10:42:04 pm »
The "Send Output to Editor Window" option is supposed to remain checked even if you close the "Build (.process)" document tab, because the option is still enabled, so that the next time you do a build or activate the build window, it will show up as an editor window.   Unchecking the option means the output only goes to the Build tool window.  However, looking over the code, something is definitely wrong.  I'll have to do some source code archeology to figure out when (and why) this got so convoluted.

The "Build (.process)" item only shows up in the Files tool window when it is open as an editor window.

Dennis

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 3401
  • Hero Points: 465
Re: Build (.process) buffer
« Reply #9 on: July 14, 2021, 12:01:16 am »
The problem with "Send Output to Editor Window" remaining checked will be fixed in the next hot fix for 25.0.2.