Is it bad manners to mark your territory? Is it a bad idea to mention in a paper that I plan to address some of the questions it rises in a future paper? 

Background: While discussing some results from a recent preprint with other people, we came to the conclusion that with similar methods we can prove a much more general statement. In fact, we are working on it now, and already have some preliminary results (not quite as general as we hope to get though). Now, while revising the original preprint, which I hope to send to a journal soon, I am faced with a dillema: Should I mention that we are currently working on the more general problem, and hope to publish its solution in an upcoming paper? It is a very natural generalisation, so I certainly should mention the problem itself as a possible future direction.

Positives: The positive aspects of mentioning the future project are, I think, quite self-evident. For us, it gives marginally more peace of mind (people are less likely to try and obtain our future result if they know we are working on it), and marginally more publicity (possibly someone will be interested in the problem after reading the first paper and will look up the upcoming one later). For the public, it gives a fair warning (so less chance someone will start working on this problem and be disappointed we did it first) and a reference for where future results might be found. 

Negatives: There are also several reasons why mentioning the future project may be counterproductive, and/or/hence put us in bad light. I'm not sure how valid the following concerns are.


I'm claiming rights to something that's not mine. Until we have a proof of the new result, we have no special rights to it; while here I am, claiming the problem as ours. This may especially irritate people who would also like to work on the problem, but now feel compelled not to.
I'm obstructing future progress. Perhaps someone would have produced a better solution to our problem if we didn't deter them. This is especially important if at some point we discover that our project was overly optimistic and that we do not have a solution in the end. 
I'm putting irrelevant things in the paper. Someone might argue that the purpose of a mathematics paper is to communicate mathematics. References to past papers serve to give credit where credit is due and to enable the reader to look them up. Conjectures and divagations about future directions are also fair game, as they are ultimately about mathematics. But writing about our future directions is about as relevant as saying that I'll be working on the problem while listening to classical music and doodling on a piece of white paper with a green pen.


(If relevant - my field is pure mathematics. Perspectives from other disciplines are very welcome.)

Edit to clarify: My impression is that for questions like that, there is a clear-cut (but often unwritten) set of rules which say what you can and cannot do in a paper. If this is a border-line case where the decision is genuinely opinion-based, then I would be very eager to learn this as well.
This is a great question, but I think it's slightly misformulated. What you are thinking of doing is neither "bad manners", nor can it really be considered "marking your territory" in all but an extremely weak (so weak as to be essentially meaningless in my opinion) sense. The correct question is the one you ask in the body of the question: is it a good idea? And specifically, is it a good way to build a solid reputation for yourself and to maximize the impact of your work?

The principle at work here is that in general it's a bad idea to brag about achievements you haven't yet attained. You might think that by doing so you are "marking your territory", but that's simply not the case: in reality it is fair game for anyone to publish a proof to a claim that you say you plan to prove in a future paper (and if they publish a proof using a different technique than the one you use, as you suggested, then that is even more legitimate and there is even less concern that they will be deterred by your "territory-marking", to the extent that such a concern exists at all). On the other hand, by trying to lay claim to results of which you do not currently have a written proof you undermine your own credibility: no one knows whether you will follow through on your promises, and everyone has seen cases of people making such claims and never following through, and would therefore be quite likely to be very skeptical of your claims (both the present claims and any claims by you they will encounter in future papers). So, by and large, bragging about as-of-yet-unattained achievements is not a winning strategy, and I'd advise against it in all but a handful of circumstances.

So when is it appropriate to advertise planned future follow-up work at the end of a math paper? I can think of two situations where it may not be a bad idea:


You have a 90%-complete manuscript of the future work and have a very high degree of confidence that you can complete it in a very short period of time, and you believe that advertising the future work helps make your current paper seem more attractive. (But be very careful: predictions of this sort tend to be wildly optimistic. I am speaking from personal experience, which I'm guessing is shared by almost everyone who has been publishing in pure math for more than a few years...)
Your intent is not to advertise the future work in a selfish, territory-marking sort of way, but rather to advertise directions for follow-up work that you believe are of interest to the community in an altruistic sort of way that makes it clear that anyone is free to pursue those directions. It's still perfectly fine to imply that you plan to do so yourself, just don't expect that this gives you any special rights that prevent others from beating you to the punch. For example, you can write something like:


  To conclude, an interesting open problem is whether a non-Riemannian hypersquare exists. We believe the techniques of the current paper can be used to show that the answer is positive, and plan to address this in future work.