Recent

Author Topic: Search in Directories should exclude backups  (Read 322 times)

Grahame Grieve

  • Sr. Member
  • ****
  • Posts: 254
Search in Directories should exclude backups
« on: November 28, 2022, 08:37:52 am »
My Lazarus creates backups in a subdirectory called backup. I didn't make it do that, so I think it's automatically configured this way.

When I do a search in directories, searching through my source code, it'd be really great if it didn't search into the backup directories. So many false matches...

KodeZwerg

  • Hero Member
  • *****
  • Posts: 954
  • Fifty shades of code.
    • Delphi & FreePascal
Re: Search in Directories should exclude backups
« Reply #1 on: November 28, 2022, 08:45:17 am »
When I do a search in directories
How do you mean that please?
« Last Edit: Tomorrow at 31:76:97 by KodeZwerg »

dseligo

  • Hero Member
  • *****
  • Posts: 897
Re: Search in Directories should exclude backups
« Reply #2 on: November 28, 2022, 10:09:51 am »
My Lazarus creates backups in a subdirectory called backup. I didn't make it do that, so I think it's automatically configured this way.

When I do a search in directories, searching through my source code, it'd be really great if it didn't search into the backup directories. So many false matches...

You can configure backup in Tools; Options; Environment --> Backup (you can turn it off or give it another extension i.e.).

Searching tools usually have options to control if you want to search in subdirectories.

Grahame Grieve

  • Sr. Member
  • ****
  • Posts: 254
Re: Search in Directories should exclude backups
« Reply #3 on: November 28, 2022, 11:16:34 am »
> When I search in directories

As in, Search.. Find in Files.. choose search in directories

I have to include subdirectories, since the code is in subdirectories, but it would be good to ignore backups. And of course, I can reconfigure it, and have, but this is the default settings.

Nicole

  • Hero Member
  • *****
  • Posts: 634
Re: Search in Directories should exclude backups
« Reply #4 on: November 28, 2022, 11:48:39 am »
Once upon a time, there was a genius Delphi programmer.
Who ever worked with Delphi knows:
backup is tricky.
These files are only dcu, those only backup, third are needed, those you can doe easily a second time...

As he was programmer, he wrote a backup solution and donated it to public.
Just for backup.
The public has no idea, where the donator came from and what his motivation was.

I learnt his "secret", because I once told him, that his open source is the best thing, I ever could imagine for Delphi backup.

So grab it, it does it all, what we need to save our sources.
personal-backup.rathlev-home.de

KodeZwerg

  • Hero Member
  • *****
  • Posts: 954
  • Fifty shades of code.
    • Delphi & FreePascal
Re: Search in Directories should exclude backups
« Reply #5 on: November 28, 2022, 11:56:26 am »
Once upon a time, there was a genius Delphi programmer.
Who ever worked with Delphi knows:
backup is tricky.
These files are only dcu, those only backup, third are needed, those you can doe easily a second time...

As he was programmer, he wrote a backup solution and donated it to public.
Just for backup.
The public has no idea, where the donator came from and what his motivation was.

I learnt his "secret", because I once told him, that his open source is the best thing, I ever could imagine for Delphi backup.

So grab it, it does it all, what we need to save our sources.
personal-backup.rathlev-home.de
The OP does not want to backup anything, he wants to search within IDE for something, including sub-folders with excluding "backup" folder (in delphi terms "__history" & "__recovery")
My way of fixing would be to patch the original Lazarus source code to add option "[] exclude backup" on that search formular.
« Last Edit: Tomorrow at 31:76:97 by KodeZwerg »

tt

  • Full Member
  • ***
  • Posts: 239
  • СЛАВА УКРАЇНІ! / Slava Ukraïni!
Re: Search in Directories should exclude backups
« Reply #6 on: November 28, 2022, 12:12:35 pm »
My Lazarus creates backups in a subdirectory called backup. I didn't make it do that, so I think it's automatically configured this way.

When I do a search in directories, searching through my source code, it'd be really great if it didn't search into the backup directories. So many false matches...

Agree 100%.
Also when searching like this I often edited files in the backup folder due to this.
FPC 3.2.0/Lazarus 2.0.10+dfsg-4+b2 on Debian 11.5
FPC 3.2.2/Lazarus 2.2.0 on Windows 10 Pro 21H2

Bart

  • Hero Member
  • *****
  • Posts: 4887
    • Bart en Mariska's Webstek
Re: Search in Directories should exclude backups
« Reply #7 on: November 28, 2022, 12:15:52 pm »
There already is a feature request for that in the bugtracker.
I'm too lazy to look it up for you.

Bart

 

TinyPortal © 2005-2018