[FORK] Tangential Discussion about what advice is "on topic"
-
Please DO NOT post non-Notepad++ solutions here; it’s a violation of the policy of this Community.
In fact, this posting should be taken down, but I won’t insist on that if there is disagreement.
-
@Alan-Kilborn my apologies; I assumed that the Run feature would respect the script’s directory, but that doesn’t seem to be the case. Added a line to account for that.
-
So you think by putting a non-Notepad++ solution into a Run menu entry makes it a Notepad++ solution, on-topic for this forum? I say: Nope.
-
@Alan-Kilborn IMO, this isn’t that different from the posts that assist users with using the Python plugin to run a Python script.
-
IMO, this isn’t that different from the posts that assist users with using the Python plugin to run a Python script.
Most PythonScript solutions still make use of the files that are actively open in Notepad++, so at least making use of the interface for the files. Your batch file above has nothing to do with Notepad++, other than it’s possible to run through the Run menu.
My general rule of thumb for the “hierarchy” of answers:
- If it’s native Notepad++ solution, it’s completely on-topic.
- If Notepad++ doesn’t have it natively, then suggesting a plugin is reasonable. It’s also reasonable if the plugin offers some major advantage over the native N++ solution
- If there isn’t a specific plugin that does it, suggesting a PythonScript solution is reasonable, or if the PythonScript solution has an obvious advantage.
- helping with the PythonScript is reasonable, but getting too far into the “teaching Python” instead of “what are the specifics that are needed to interface the script to N++” is frowned upon
- NppExec solutions fall into this category as well
- Only give a non-N++ solution if none of the above have been presented yet (and thus there’s a strong indication that there isn’t a way)
- if you must give one of these, keep it brief, and if there are questions, direct them to find help outside the
Easy Run menu solutions (ie,
cmd /c "$(FULL_CURRENT_PATH)"
) are reasonable, as they fit somewhere between the category1 and category3 solution – especially if you’re then indicating how to make them easier to run from the Run menu (using shortcuts, etc). As the Run commands get more complicated, or if they require writing and executing a batch solution, then they are straying into the weeds of a category3. And if it’s just a command-line solution which someone has shoe-horned into a Run command as an excuse to make it “on topic”, it is frowned upon.I will generally let a brief #4 (or shoe-horned #3) slide, as long as the topic doesn’t focus on that solution, and the original asker doesn’t harp on that solution to the exclusion of the more native ones. But if it starts taking over, I am more likely to discourage further discussion down that path.
Unfortunately, on this post, the brief excursion turned into a full-born meta-tangent, spending more bandwidth on the meta than on the actual task at hand.
If the OP comes back with questions about the MultiReplace plugin solution or Mail Merge solution, then he can ask questions about those. But if there’s a problem with the command-line/batch solution, since that doesn’t require the N++ interface, I’d prefer that we direct him to search elsewhere if he wants help with looping in batch files, etc.
-
@PeterJones said in Replace A name for 300 others in the list and save.:
Your batch file above has nothing to do with Notepad++, other than it’s possible to run through the Run menu.
In my defense, I did recommend creating the script in NP++ before adding the pieces about running it from within NP++, but I agree that this is still borderline given that I forgot to explicitly mention the Run feature at first. I also half-expected the individual files to be ready for the replacement stage already, but that part was easy to account for if they weren’t.
I’m sure that the other methods work well, but at first glance, the setup work seemed a bit complicated if you didn’t already have those tools in place. So, the batch-based solution seemed to have a distinct ease-of-implementation advantage even before I remembered the RunMe plugin (which is quick to install and use).
-
@mathlete2 said:
IMO, this isn’t that different from the posts that assist users with using the Python plugin to run a Python script.
If the “PythonScript” is merely a Python program, that really could be run outside of Notepad++, then I agree. But most scripts that people share here are tightly bound to the Notepad++ extensions to Python that the PythonScript plugin provides, specifically via the
notepad
andeditor
objects. -
P PeterJones referenced this topic on
-
I personally did not mind @mathlete2’s solution. People can learn a little bit about running scripts from Notepad++ such as that
cd %~p0
thing, a little bit about Run/Run and its[Save]
button hidden in plain sight, a little bit about batch file stuff, and a little bit about PowerShell stuff.The bit about Run/Run vs RunMe went over my head and so I’ll stick to thinking about offering a solution where you use Notepad++ in ANSI mode to directly enter the machine code for a mailmerge.exe app…
-
@mkupper
cd %~p0
is a vunerable line of Batch code. An example:C:\&test>type test1.cmd cd %~p0 echo errorlevel: %errorlevel% echo path: "%~p0" echo cd: "%cd%" pause C:\&test>test1.cmd C:\&test>cd \ & test\ 'test\' is not recognized as an internal or external command, operable program or batch file. C:\>echo errorlevel: 9009 errorlevel: 9009 C:\>echo path: "\&test\" path: "\&test\" C:\>echo cd: "C:\" cd: "C:\" C:\>pause Press any key to continue . . .
The
cd
fails, the following code is run and the current directory has changed toC:\
instead ofC:\&test
. Bad syntax mistakes like this can cause harm depending on the following code. There is no knowing what other users with the characters they may use as path names.cd %~p0 || exit /b 1
is still bad syntax though at least it may exit on error to avoid any further harm. Paths should be quoted in Batch to avoid issues with paths with special characters socd "%~p0" || exit /b 1
is safer. -
I am not sure which amazes me more – that MS didn’t put
&
in the list of disallowed path name characters, despite the fact that it is absolutely a special character in the shell, and most of the the other disallowed characters were there because of the shell-specialness; or that people are still trying to focus on the esoterica of the cmd.exe batch syntax in the thread that enumerates why it’s off topic in this forum. :-) I hope I never get to the point that I’m looking forward to the next big burst of questions questions all about the same thing, like Gaps in the UI border from a few years back, or all the recent DirectWrite-caused issues with the GUI, just so that there’s something for us to focus on that can stay on-topic. -
Hello, @donho, @alan-kilborn, @peterjones and All,
For the first time, I"m going to express my annoyance ! Due to the language barrier, this post may seem disjointed and/or incomplete !
@alan-kilborn, you said :
So you think by putting a non-Notepad++ solution into the Run menu entry makes it a Notepad++ solution, on-topic for this forum?
Of course, it’s not a true N++ solution but it’s a solution !
You also said :
Please DO NOT post non-Notepad++ solutions here; it’s a violation of the policy of this Community
I do not understand your determination to track down the few answers proposing these solutions : the number of these particular posts are very few compared to the total number of posts of our forum ! Searching for the strings F5 + cmd /c + cmd /k returns
555
posts and the last post edited, right now, is the post101063
, from @peterjones, giving a ratio of555/101063
, so0,5 %
!Anyway, as the
Run
menu is a native part of Notpead++, why couldn’t I use this functionality to expose a solution which cannot be easily doable with Notepad++ ? Of course, by nature, it is generally associated to external batch scripts !
@peterjones, you said, to this purpose :
And if it’s just a command-line solution which somenone has shoe-horned into a Run command as an excuse to make it “on topic”, it is frowned upon.
OK. Then, what is the purpose(s) of the
Run
menu ? Because, if some people is so upset because of possible off-topic posts, we could ask @donho to totally suppress this menu and integrate the few remaining options, of theRun
menu, in other N++ menus !
As @donho created this forum, it seems to me that Don is the only person which has authority to tell us what we should speak of or not in our forum !
After all, we could consider that all the N++ plugins are also external programs which allow us to realize tasks not doable with Notepad++, too !
By extension, you could also say that I should move to a regex forum as my numerous regex answers certainly “pollute” this forum which should stay dedicated on main N++ features like syntax-highlighting, code folding, line operations, highlighting, macros, multiple-documents, double-view, simultaneous editing, indentation, automatic back-up, Line bookmarking…
As you can see, I’m a bit disturbed by these recent positions ! To sum up, I’d say that we’re all looking to optimize the use of our beloved editor, even if, sometimes, it means thinking outside the box !
Please note that this post should not be taken as an invitation to abuse alternate solutions, using the
Run
menu, but simply as a possible solution in some rare cases.Best Regards,
guy038
-
@guy038 said in [FORK] Tangential Discussion about what advice is "on topic":
Of course, it’s not a true N++ solution but it’s a solution !
I have to support @guy038 on this.
No one has a duty to help anyone in this forum.
Once someone chooses to help someone with something that began as a reasonable question grounded in Notepad++, I don’t see a rationale for complaining because they want to continue to be helpful, even if that strays from the pure scope of Notepad++. I think we should respect that contributor’s willingness to provide assistance.
If a moderator (or anyone, I guess) really thinks that someone is actively encouraging off-topic use of this forum by answering too many follow-up questions that should be addressed elsewhere, perhaps a private message to that effect would be in order.
It’s not my forum, it’s not up to me, but for what it’s worth, I don’t like it when I get the sense that we’re prioritizing pettiness about what is and isn’t suitable use of the forum over being helpful to folks who come here looking for help. I understand that there’s a limit. I just think being a friendly and helpful place is more important that being a strictly “on-topic” place.
-
@guy038 ,
Wow, I didn’t know you could get annoyed. ;-) Sorry it was us who finally did it.
Then, what is the purpose(s) of the
Run
menu?It’s to run external programs or processes. And if PersonX wanted to ask “how to I run
myCoolCommandLine.exe -input CURRENT_FILENAME
from inside Notepad++?”, I would be happy to answer "the Run menu allows you to run a command, so you could do Run > Run… and inputcmd /c myCoolCommandLine.exe -input "$(FULL_CURRENT_FILE)"
", and then give some more hints as to how to save those, add a keyboard shortcut, encourage the use of quotes around the filename, etc.But if personX came back and said, “how do I do XYZ in myCoolCommandLine.exe”, I would say, “sorry, I don’t know that tool; and since Notepad++, not myCoolCommandLine, is the focus of the forum, it’s off-topic to delve into how to use that external tool”.
So, to reiterate, I do not think the Run menu is off topic for this forum. What I do think is that we need to focus our answers on the Notepad++ side of things, rather than getting into the details of the external programs, whether they are myCoolCommandLine.exe or python.exe or cmd.exe or powershell.exe.
it’s the same reason that PythonScript solutions are reasonable, when they are focused on the
notepad
andeditor
objects, but if someone just shoehorns using the PythonScript plugin to run a python program that has no interaction with Notepad++ itself, then it’s strayed off-topic for the forum.we could ask @donho to totally suppress this menu
None of us want that.
I can tell that you are upset. But to bring it back to the discussion that prompted this tangent, the question was originally asked in the context of Notepad++, and answered with both a PythonScript solution (which does make significant use of the editor and notepad objects, thus interfacing with Notpead++) and a plugin solution; with two in-Notepad++ answers, both of which could have solved the problem, there wasn’t a need for details on a cmd.exe batch solution. Could that batch be run from inside Notepad++, through the Run menu or NppExec? Of course, and I do such things all the time – but that doesn’t mean that getting into the guts of that batch file are really on-topic for the forum.
but simply as a possible solution in some rare cases.
This, I 100% agree with. If there hadn’t been a PythonScript and plugin answer suggested already, I would have been bothered less by the batch file. If the Run-menu portion of the suggestion (remember, the original post had no mention of the Run menu, and was instead just talking about a batch file), it would have bothered me less, but I still would have recommended just focusing on the mechanics of how to use it from the Run menu, rather than diving into the gory details of the batch itself. I don’t mind the rare excursions, as long as they don’t take the focus of this forum, or of any given Topic, too far away from Notepad++.
-
@Coises said in [FORK] Tangential Discussion about what advice is "on topic":
If a moderator (or anyone, I guess) really thinks that someone is actively encouraging off-topic use of this forum by answering too many follow-up questions that should be addressed elsewhere, perhaps a private message to that effect would be in order.
I tend to agree – both because it’s more polite, and because it helps prevent the “meta discussion” from taking over. But, in this case, once it had already been made public, the discussion needed to stay public – which is why I moved it from the original topic to this FORK, so that it wouldn’t clutter solving the original person’s problem. But, in the future, I will try to keep my responses to straying off topic private, unless there is a good reason
with something that began as a reasonable question grounded in Notepad++
For any solution that can be done inside Notepad++, or reasonably started in the context of hoping it could be done inside Notepad++, it could easily stray into alternate solutions that have no need for Notepad++. If there’s no way to do it in Notepad++, I have no problem with a brief mention of the other possibilities, as long as further discussion is moved away from the forum when it strays from close-to-Notepad++ to the nitty-gritty details of the non-Notepad++ discussion. But if there’s already been one or more Notepad++ or close-to-Notepad++ suggestions/solutions provided, I don’t see a need for straying into the further-afield solutions, or at least holding off on them until it’s been shown that the close-to-Notepad++ solutions aren’t sufficient.
-
@guy038 said in [FORK] Tangential Discussion about what advice is "on topic":
As @donho created this forum, it seems to me that Don is the only person which has authority to tell us what we should speak of or not in our forum !
But @donho also entrusted you and me with Admin powers, and a few others with Moderator powers, to be able to handle the day-to-day aspects of the Forum. And in the absence of Don weighing in on every decision, I do my best with what I’ve been given, as do you.
And when another moderator (such as you) has already weighed in on a discussion – maybe by continuing the slightly off-topic parts of a discussion – I generally try to hold back and let that original “decision” stand, because it’s rarely a “completely off topic” discussion.
If @donho does come in and give a clearer understanding on what he believes to be on topic and off topic, I will adjust my decision-making thresholds based on his input. Until then, I will do my best to muddle through, and to straddle the line between being too authoritarian and having a hands-off approach where the Notepad++ Community becomes just another Stack Exchange for answering every possible computer question just because part of the solution might be typed in Notepad++.
And in this case, while I supported Alan’s assertion that it’s off topic, I do try to temper my decisions with things like “tend to” and “suggeset” and “encourage”, rather than “STOP NOW”, because I don’t want to become super-authoritarian (even though I admit I have a tendency toward that end of the spectrum).
To sum up: I just want to help people with using Notepad++ to solve their text editing needs, and I want Notepad++ to stay the focus of every question, even though some answers may stray for a time.
-
@PeterJones said in [FORK] Tangential Discussion about what advice is "on topic":
But, in the future, I will try to keep my responses to straying off topic private, unless there is a good reason
I’d rather that the default be that conversations, even if a bit off topic, be in the public forum unless there is a good reason to send a private or direct message.
@guy038 said in [FORK] Tangential Discussion about what advice is "on topic":
As @donho created this forum, it seems to me that Don is the only person which has authority to tell us what we should speak of or not in our forum !
The general theme of Notepad++ and its community seems to lean towards promoting counter-authority and promoting free speech. I assume that includes allowing for people posting something to the forum that is not 100% in alignment with Notepad++.
-
@PeterJones
I agree in principle with @guy038 and @Coises that people legitimately offering help should not be discouraged from doing so.There seem to be some forum categories that are not strictly NPP-related (AFAICT), like humor, and blogs.
Maybe a new category could be created for general help or solutions. Not sure how that would affect moderating duties, but any “normal” NPP user who doesn’t want to see posts that are not strictly NPP-related could easily ignore such a category.
Seeing that this thread is located in General Discussion, I wonder what sort of “general” discussions are inappropriate (other than a few obvious ones).
I will sprint over to the FAQs to see if anything I’ve said here is answered there, so don’t pounce on me just yet! :-)
-
@Jim-Dailey said in [FORK] Tangential Discussion about what advice is "on topic":
Seeing that this thread is located in General Discussion, I wonder what sort of “general” discussions are inappropriate (other than a few obvious ones).
My guess is that in the Founding Days (before I had joined), that the General Discussion was meant as a catch-all for things that weren’t specifically Notepad++ questions. I have steered it to be more “General Discussion about Notepad++” in contrast to “help wanted with Notepad++”, but that might just be my interpretation and preference, and thus I steered it that way. I cannot be certain of the original purpose. You had an earlier start here than I did, so you might have a better perspective than me, in that case.
I will sprint over to the FAQs to see if anything I’ve said here is answered there, so don’t pounce on me just yet! :-)
I wrote those FAQs, so they are obviously biased toward my preferences for the Forum.
-
@mkupper said in [FORK] Tangential Discussion about what advice is "on topic":
The general theme of Notepad++ and its community seems to lean towards promoting counter-authority and promoting free speech
Indeed. I may have strayed too authoritarian, despite trying to stay a “moderate moderator”.
-
@PeterJones said in [FORK] Tangential Discussion about what advice is "on topic":
You had an earlier start here than I did, so you might have a better perspective than me, in that case.
I couldn’t really say. For me it seems like admonishing people for being “off-topic” occurs more frequently as time goes by, but that may or may not be accurate.