harbour-editor icon indicating copy to clipboard operation
harbour-editor copied to clipboard

Feature request: Option to autosave text files directly to original $FILE

Open Self-Perfection opened this issue 8 years ago • 8 comments
trafficstars

In my use case it is more convenient to have Editor. autosave modified file directly to $FILE and not to extra file $FILE~. I'd like to have an option to switch to this behaviour instead of default one.

Self-Perfection avatar May 18 '17 14:05 Self-Perfection

I agree with this idea. I will try to implement it when I will have free time :)

GoAlexander avatar May 24 '17 08:05 GoAlexander

Mmmh, such an option is a little bit dangerous for an average user. But when defaulting to "off", it is one's own responsibility to enable it.

Consequently no backup file (<filename>~) should be created or written to, when this option is active.

Olf0 avatar Jun 03 '17 01:06 Olf0

@Olf0 I want to implement this behavior only as option. Default behavior will be as by now.

GoAlexander avatar Jun 03 '17 11:06 GoAlexander

On the contrary I'd like to note that "Quick note" feature almost covers what I need. If Editor. gets a way to start directly in "Quick note" mode (see #87) I'll drop my request for this optional switch for autosave feature.

Self-Perfection avatar Jun 03 '17 15:06 Self-Perfection

@GoAlexander

I want to implement this behavior only as option. Default behavior will be as by now.

Understood (as I wrote), but the intended core message in my comment above was originally the second paragraph.

But now (in the light of @Self-Perfection's last message, directly above) I would like to emphasise, that IMO an editor should never automatically save changes to the original file. This just calls for mishaps. Saving to the original file (and any other one, except for backup files with a "~" appended) should always be done explicitly (i.e. on user request). But this is just my advice; Editor. is your baby and hence feel free to decide as you like.

Olf0 avatar Jun 05 '17 04:06 Olf0

@Self-Perfection It is not exactly want you want in this PR but I pushed commit which has new option to disable autosave: 92a888fca23ddb10305d416f3615e1c779bd3274 Are you satisfied with it? Can I close this PR?

Same in context of #88

GoAlexander avatar May 05 '18 21:05 GoAlexander

@GoAlexander my goal is to use Editor. for quick storing of notes in txt file. For now shortest path for is following

  1. Tap on special icon on the app list to to open notes file (I have created custom ~/.local/share/applications/note.desktop launcher with Exec=harbour-editor /home/nemo/note.txt)
  2. Edit note
  3. Tap "save"
  4. Close app

I'd like to have it a bit simpler. So how can I get rid of requirement to tap "save"?

I can't rely on autosave feature. With autosave modified note would end up in /home/nemo/note.txt~ - that is not where I need it to be. So I've asked for an option to save directly to original file (this issue).

But there is "quick note" option now. Maybe it can do the trick? Nope, with this option the sequence is even longer:

  1. Launch Editor.
  2. Pull to get access for menu
  3. Tap on "quick note" command
  4. Edit note
  5. Close app

If only I could get to "quick note" mode directly, just by tapping on icon in app list... That is the goal of #87

As you can see disabling autosave does not help me for my task. Though it is ineed helpful as it let me to avoid #88

Self-Perfection avatar Jun 01 '18 15:06 Self-Perfection