Opened 8 years ago

Last modified 5 years ago

#13289 assigned enhancement

TextSearch should open files on specific line

Reported by: KapiX Owned by: nobody
Priority: normal Milestone: Unscheduled
Component: Applications/TextSearch Version: R1/Development
Keywords: Cc:
Blocked By: Blocking:
Platform: All

Description

Currently it only does this when "Open in Pe" is enabled.

Three solutions:

  • Let the user change the editor.
  • Open files with /bin/open.
  • Add be:line and be:column to B_REFS_RECEIVED message like /bin/open does.

IMO "Open in Pe" should be removed completely. It depends on an application that doesn't have to be in the system, and sometimes doesn't even work because of missing symbols.

Change History (6)

comment:1 by humdinger, 8 years ago

Doing it like "open", i.e. launching with the preferred app, won't cut it. HTML files would be opened in the browser, which probably isn't what we want. An idea would be listing all apps that handle "text/*" MIME typed files in a submenu under "Settings | Open files in >".

comment:2 by axeld, 8 years ago

I like humdingers suggestion; be:line and be:column should be set already, or I wouldn't know how the Pe feature is supposed to work. I think StyledEdit should support this, too, so it could actually be the default.

comment:3 by KapiX, 8 years ago

@humdinger: That rules out option 2. Still, if "Open in Pe" is disabled the file is opened in preferred app. Adding the attributes shouldn't hurt. At worst, the app will ignore them. http://cgit.haiku-os.org/haiku/tree/src/apps/text_search/GrepWindow.cpp#n1180

@axeld: It uses Pe-specific parameter. http://cgit.haiku-os.org/haiku/tree/src/apps/text_search/GrepWindow.cpp#n1511 EDIT: ... and Pe-specific message code.

Last edited 8 years ago by KapiX (previous) (diff)

comment:4 by phoudoin, 7 years ago

Owner: changed from waddlesplash to phoudoin
Status: newin-progress

I will go to the solution 3:

  • launch preferred app for the file
  • add be:line *and* line to a B_REFS_RECEIVED message handed to the tracker, which will open the preferred app for that file.
  • and remove the "Open in Pe"

No be:column yet, as we don't have such information yet.

Version 0, edited 7 years ago by phoudoin (next)

comment:5 by phoudoin, 7 years ago

Part one done in hrev51529.

comment:6 by phoudoin, 5 years ago

Owner: changed from phoudoin to nobody
Status: in-progressassigned
Note: See TracTickets for help on using tickets.