add exclusion with regexp?
Ass the title, I don't want to translate text enclosed with $ or other marks, can I achieve that?
Please provide more details. Explain exactly steps which you performs and expected result. Why you need that functionality? At least show an example which will allow me better understand your request
For example,
you want to be able to select all text in the buffer and translate it but wants google-translate to skip parts of text (lines, paragraphs) which enclosed with $
It is hard for me to understand your needs thus understand required functionality so please provide a little bit more info
in latex mode, $ $ is the inline enviroment for math formulas,
* in $*$ may contain math command, say, $\mathbf{a}$ (a), $\alpha$ so I want to skip this part for conversion.
It would be a great convenience because this feature may be needed in many situations.
think about converting html source code,
is a beginning tag for an environment, of course we don't want to convert the word "body"
Thanks for explanation! Now it is much more clearer! I'm not sure for now how exactly that feature could be implemented and integrated into the google-translate but let me think and see what can be done.
I'll be working on this request as soon as I'll finish #15 and #16
Stay tuned!
I'm not familiar with emacs lisp. But I have some idea. Can it be implemented in the following way?
- ch = peek a character in the block of text for conversion,
-
if (_ch_ is not in _symbols_) -
_str_ += _ch_ -
else -
_strDes_ = translate _str_ -
_begin_ = _ch_ { -
_strDes_ += ch } -
while (peek != begin)
Well, ok, there is no any issue which relates to the algorithm. I'm thinking about the best way to integrate it with google-translate... How the symbols (patterns) will be defined how they will be used etc. Probably it would be good to provide patterns for different modes... May be not. Not sure for now. It needs some time to rethink every aspect of that issue and implement it.
Yes, it seems not as easy as I was thought. there are many patterns I don't want to convert, says $$ ( double dollar environment $$ * $$), [ * ], \begin{equation} * \end{equation}, and so on
This issue tortured me a lot recently. I would be of great appreciate if you don't mind providing a elementary version for just a single character as the symbols.
Yes, it seems not as easy as I was thought.
Yes, that's right!
I would be of great appreciate if you don't mind providing a elementary version for just a single character as the symbols.
Ok! You provided me the example (with html, and now other examples) so for now I don't think only about symbols, but about patterns... ... Anyway after this feature will be implemented it would be great to hear from you feedback: is it good for you or not, what exactly is not good and how it could be improved. I don't like implement it just for the sake of itself. It needs to be useful. And as you are expecting that feature it should be useful particularly for you.