Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: To enhance privacy and convenience, open new blank document AND remember current session #11134

Closed
MichelleRobin opened this issue Feb 5, 2022 · 27 comments
Assignees
Labels

Comments

@MichelleRobin
Copy link

MichelleRobin commented Feb 5, 2022

Description of the Issue

In Notepad++, I often need to open a new document to take notes while someone else is able to see the contents of my monitor. For privacy reasons, I don't want them to see my other documents when I launch NPP. It would be very helpful to have the option to launch NPP with a new, blank document, but without having to forgo all of my other session information. I have seen some workarounds for this problem, but I think many people could benefit from having a native feature to address this situation. Many thanks for reading and considering my request. Additionally, as I work in HR, I often take recruitment phone calls and record candidate information in NPP. Since I am not always working in NPP, this feature would be helpful in that I don't have to waste time with an extra keystroke.

Steps to Reproduce the Issue

  1. Launch NPP
  2. If "Remember current session for next launch" is checked, display most recently used file(s)
  3. All documents from the previous session are opened, potentially revealing sensitive/confidential information to all (not a desired outcome!)
  4. <GASP!> and quickly press CTRL+N to hide potentially sensitive/confidential information from being revealed to others.

Expected Behavior

  1. Launch NPP
  2. With the proposed option, a setting will enable NPP to open a new, blank document which has the focus, and also allow "Remember current session for next launch" to function as it currently does.
  3. Experience no stress because sensitive information has not been revealed!

Actual Behavior (This is what happens to me)

  1. Launch NPP
  2. All documents from my previous session are opened, revealing sensitive/confidential information to all.
  3. I quickly press CTRL+N - but it's too late. I experience tremendous embarrassment and stress.
  4. I make a feature request on github, pleading my case.
@dfs-
Copy link

dfs- commented Feb 5, 2022

You could also just launch another instance of N++ using the -multiInst command line parameter.

Or, change the settings to always open with a blank file and just save your last opened files to a Session file.

The problem you describe seems easily workarounded.

@alankilborn
Copy link
Contributor

@MichelleRobin

Tick this and press Ctrl +n before sharing your screen:

image

@MichelleRobin
Copy link
Author

You could also just launch another instance of N++ using the -multiInst command line parameter.

Or, change the settings to always open with a blank file and just save your last opened files to a Session file.

The problem you describe seems easily workarounded.

Where do I change the setting to always open with a blank file? I'm not sure I'm following....

@MichelleRobin
Copy link
Author

MichelleRobin commented Feb 5, 2022

@MichelleRobin

Tick this and press Ctrl +n before sharing your screen:

image

Thank you for the reply. I use NPP as a tool for many daily functions. Maybe I'm taking notes on the phone, maybe I'm removing some formating quickly and pasting back into Word, maybe I'm working on writing a book! At some point in the week, I move notes into various different programs for documentation. Some of the notes are sensitive and some of them are not. So since I use it all day as a tool, if someone comes to my office and wants to work on a project, I quite naturally would start NPP to take notes and that's where I have run into trouble. I'm just looking for a simple way to keep the session and all my notes open but when I relaunch to always have a blank page. Before NPP, I would just open windows notepad and have many windows and it was not nearly as efficient. I truly love the way I don't have to worry about saving all my notes because of the session. It's amazing!

@alankilborn
Copy link
Contributor

but I think many people could benefit from having a native feature to address this situation

I seriously doubt you'd ever see this.

@mja1962
Copy link

mja1962 commented Feb 7, 2022

I am amazed at how simple this request is in concept (I have made the same request myself), yet I have seen nothing but workaround suggestions, and outright resistance to even validating the need for this concept (I am not referring exclusively to this thread).

For a program that hands down gets updated more than any other I have ever used, I am quite surprised that few who post see the merits of this feature. Workarounds tend to be compromises as compared to actual code improvements. Considering the elegant simplicity of NPP as s text editor, coupled with its amazing feature richness and ongoing enhancement, I would have thought that 1) The benefit of having the feature would be immediately realized, and 2) The feature would have been easily integrated.

Not trying to start a debate over this, but in my experience, this feature would be a definite improvement for folks like MichelleRobin and myself. I am sure that no user takes advantage of every one of NPP's features, and of course, I have no idea how many people would want/appreciate/use this feature, but when I first poked around in "Preferences", I was actually surprised that it wasn't already there. ¯_(ツ)_/¯

@alankilborn
Copy link
Contributor

Sorry, I'm a long-time user and I just don't see the point of what you guys are talking about. That's not to invalidate your need in any way, probably it is just me. I thought of some more workarounds, but, I will keep them to myself because they are really not wanted. Good luck to you.

@MichelleRobin
Copy link
Author

Thanks for the reply MJA1962 and the support. :) I truly see the value of this feature. I don't know who is in charge of updating this program, but apparently whoever is responding to this post cannot see the value - so I guess I should have little hope in it getting updated. Most programs open and start with a new blank page. It's just that I love the feature of the extra tabs in NPP and not having to save the session or flip through multiple document windows. However, if it's too hard to envision why this would be a useful feature by most then what can I say but......will you marry me MJA1962? LOL

@mja1962
Copy link

mja1962 commented Feb 8, 2022

@MichelleRobin: Some people marry for love, others marry for money - why not marry for code? If it'll help to get the feature implemented, then I accept! ;) If this doesn't get the feature implemented, well - at least we have something in common...and that's a start!

(So much fuss over what is likely one line of code - two at worst)

@alankilborn: I think you can see the point - I am pretty sure that my new fiancée and I have made it abundantly clear by now - the point is that we would like to save a keystroke or two, for the reasons of improved convenience and privacy. There is nothing complicated, mysterious or obscure about it. I just don't think it is a feature that you need or want - but I think the point is clear to see, wouldn't you agree (even if you don't like the point)?

P.S. - I hope no offense is taken by this post; none is intended. :)

@alankilborn
Copy link
Contributor

Congratulations on the impending nuptials! :-)

I've already bowed out of the conversation about usefulness of the proposed feature, so I won't say any more about that... except it isn't about me "liking the point" or not; everyone likes what they like, want what they want.

So much fuss over what is likely one line of code - two at worst

What would possess you to say something like that? I assure you that is very wrong.
Even the change to the user manual describing the new feature would be more than 2 lines...

In the "expected behavior" section, this was said:

With the proposed option...

What does the proposed option look like?
In detail, please, what are the changes to Preferences and / or command line arguments and / or anywhere else in the software user interface, in order to bring your idea into existence?

@mja1962
Copy link

mja1962 commented Feb 8, 2022

Alan,

My programming experience is limited to VB, but I really did think that it could be accomplished with a simple line (or two) of code. Apologies if that is an oversimplification.

I imagined that the code would look something like this:
NPP_Flowchart

I don't know if "Execute CTRL-N code" would work literally, but I'm sure you get the idea.

Here is what I imagine the checkbox looks like:

NPP_Preferences

I hadn't thought about command line arguments, but perhaps: npp.exe [-newdoc] ??

I hope this information is useful, and I would be happy to provide any other information if it could be helpful.

Best,
Michael

@dfs-
Copy link

dfs- commented Feb 8, 2022

Apart from the discussion if this feature is useful, one might to get this going using the PythonScript plugin.

Setting it to startup type strict (instead of lazy) and then adding the single line notepad.new() to the startup.py file should do the trick.

I know it‘s a workaround, but I don‘t see any downsides besides not having an option in the settings pane.

@ArkadiuszMichalski
Copy link
Contributor

The request for a blank tab has already been discussed:
#9535
#5527

@alankilborn
Copy link
Contributor

@dfs-

Workarounds are clearly NOT wanted, even if they work. :-)
Your PythonScript workaround would totally work, and posters could have their desired modification RIGHT NOW. But, they don't want workarounds.

@alankilborn
Copy link
Contributor

@mja1962

I was soliciting further input on the UI design because sometimes when things are asked for, people have an idea of how they should be represented, but they don't share that part of the idea.

The flowchart was a bit extreme and not really what was asked for, but it will be considered bonus material. :-)

I hadn't thought about command line arguments

Another reason I asked...

@MichelleRobin
Copy link
Author

MichelleRobin commented Feb 9, 2022 via email

@truemous
Copy link

@dfs- Thanks for your solution, works perfect for me.

@shodanx2
Copy link

shodanx2 commented Jun 2, 2023

How is that not a thing already ?

If I click the notepad++ button, I probably want a blank space to write right now.

That doesn't mean I want to give up the session functionality, I love it.

Either a settings checkbox to always add an extra empty tab on launch, or a command line argument to do so.

And to make this a little bit smarter, if the last tab is already a completely blank text file, don't create a new tab, just focus that tab. We don't need unlimited empty tabs piling up every single time notepad++ icon is pressed either.

Not only this should be a thing, but it should be the default behaviour.
If I just clicked the notepad++ icon, and not double clicked on a file, it means I very likely want an empty space to write or paste stuff into.

@dfs-
Copy link

dfs- commented Jun 2, 2023

I frankly couldn’t disagree more on the ”this should be the default behaviour“ part.

But I also do not have this issue as I have a functioning workflow where I open files on demand rather than stacking tabs.

You can still use PythonScript to create your desired behaviour, but alas…

@shodanx2
Copy link

shodanx2 commented Jun 2, 2023

Well, if you open notepad, it means you have something to write.
Something that might be in your clipboard even, that you just need to paste.
I don't see how the middle of a .ini config file is the appropriate place to write this.

The way I see it, if you start notepad++ with no command line parameters you can only want two things.

You want to get back exactly where you were before, same old file and same location.

Or you want an empty scratch space to write right now.

It might make sense to have both of these buttons on the taskbar.

But I think in most case, for most people and most of the time, if they've just started notepad++, they want a new blank scratch space to write.

There's also the case where you click the notepad++ icon but notepad++ was already running.

Did you just want to focus the application, or do you want a new, empty scratch space? In my case, it means I want a new empty scratch space.

I also don't want these empty scratch space to pile up if I don't write anything new in them.

I don't think this obvious feature most user wants should require scripts and mods and work arounds and hacks that will break on the next minor release.

@dfs-
Copy link

dfs- commented Jun 2, 2023

As I don’t have the option for keeping the session between instances enabled I always get greeted by a blank „new 1“ file. ;)

@shodanx2
Copy link

shodanx2 commented Jun 2, 2023

@dfs-
Well, it sounds like you are using the default I propose, except with session disabled

As I've said above, I don't "want to give up the session functionality, I love it."

You would not be impacted in any way by the change.

So please explain how you "couldn’t disagree more"

@mja1962
Copy link

mja1962 commented Jun 2, 2023 via email

@donho
Copy link
Member

donho commented Jun 3, 2023

Personally I don't think it's an useful feature for the most of users. But it's not difficult to implement, and there are still some people who request it. As a result it could be in the future release. However, there will be no GUI to enable this feature, instead, add and delete addNewDocumentOnStartup.xml to enable and disable it.

While there's no session, if this feature is enabled, there'll be 2 blank documents opened on startup - it could be considered as bug, but it is not. I won't work on for reducing to only one blank document, it's not gonna happen. Just want to be clear.

@donho donho self-assigned this Jun 3, 2023
@donho donho added the accepted label Jun 3, 2023
donho added a commit to donho/notepad-plus-plus that referenced this issue Jun 3, 2023
To enable/disable this feature, add/delete "addNewDocumentOnStartup.xml" in "%APPDATA%\Notepad++\" (or beside notepad++.exe if doLocalConf.xml is present).

Fix notepad-plus-plus#11134, fix notepad-plus-plus#9535, fix notepad-plus-plus#5527
@shodanx2
Copy link

shodanx2 commented Jun 5, 2023

sweet thanks !!

@donho donho closed this as completed in 61503a2 Jun 8, 2023
@alincrvan
Copy link

Thank you for implementing this feature

@mja1962
Copy link

mja1962 commented Jun 8, 2023 via email

molsonkiko pushed a commit to molsonkiko/notepad-plus-plus that referenced this issue Jun 13, 2023
To enable/disable this feature, go to New Document section of Preferences dialog, and check/uncheck "Always open a new document in addition at startup" checkbox.

Fix notepad-plus-plus#11134, fix notepad-plus-plus#9535, fix notepad-plus-plus#5527, close notepad-plus-plus#13738
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

9 participants