Opened 2 years ago

Last modified 21 months ago

#13289 in-progress enhancement

TextSearch should open files on specific line

Reported by: KapiX Owned by: phoudoin
Priority: normal Milestone: Unscheduled
Component: Applications/TextSearch Version: R1/Development
Keywords: Cc:
Blocked By: Blocking:
Has a Patch: no 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 (5)

comment:1 Changed 2 years ago by humdinger

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 Changed 2 years ago by axeld

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 Changed 2 years ago by KapiX

@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 2 years ago by KapiX (previous) (diff)

comment:4 Changed 21 months ago by phoudoin

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 to a B_REFS_RECEIVED message handed to the tracker, which will open the preferred app for that file; as usual with tracker.

No be:column yet, as we don't have such information yet. And be:line seems to be supported by Pe too, BTW.

In a second time, I'll

  • add a context menu to allow to open with another app, as possible with tracker.
  • and remove, then, the "Open in Pe"
Last edited 21 months ago by phoudoin (previous) (diff)

comment:5 Changed 21 months ago by phoudoin

Part one done in hrev51529.

Note: See TracTickets for help on using tickets.