Closed fab6 closed 3 years ago
I am running python 3.9.1 on a macos.
Thanks for reporting this! The problem is that until now the script assumes that the closing parenthesis is never immediately followed by the variable name (e.g. REAL(EB)RS
). But that's an easy fix. I will push it later today because I need to test it first but if you're curious you can already try it yourself:
diff --git a/fortran-tags.py b/fortran-tags.py
index b518736..18494d1 100755
--- a/fortran-tags.py
+++ b/fortran-tags.py
@@ -214,7 +214,7 @@ def process_input(input_text, find_definitions, TAGS='', filepath=''):
if scope_count == 1:
scope = ':fortags_program_scope:'
scope_count = 2
- r = '([ ,:&\t]|^)' + name + r'([ ,(\[=!\*\t]|$)'
+ r = '([ ,:&\t)]|^)' + name + r'([ ,(\[=!\*\t]|$)'
m = re.search(r, line_raw)
position = int((m.start()+m.end())/2)
TAGS.append(f'{filepath} {scope_count} {name} {scope} '
Pull the latest version and let me know if there are still issues!
Thank you, this works now. Though I get now the message:
helm-M-x-execute-command: Incorrect format (regenerate using the current version of Fortran-tags) [2 times]
when executing fortran-find-tag. Do you have an idea? Thank you very much!
Could you try remoing FORTAGS
in your working directory and trying again? I'm not sure why it would give this error here. If it persists, then it would be good if you could post the Helm portion of your Emacs configuration. I haven't used Helm myself but I can try to reproduce the error.
Thank you! Hm... still same error. I am using spacemacs with hundres of settings :-( So it might be not so easy to have the same helm settings. I will try it with plain emacs.
Maybe I can test it on a terminal without emacs!?
It is an Emacs statement that gives the error so I don't think it's possible to test it without Emacs. If you know any Lisp, you might be able to debug it by investigating lines 141..148 in fortran-tags.el
. That's where the error originates. Is fortran-tags.py
in your path? If not, you could try replacing "fortran-tags.py" with its full path everywhere in fortran-tags.el
. That's a quick test to see if it works.
Otherwise, I can try to reproduce it on spacemacs but it will take me a bit of time to set it up.
Thank you for your help! Yes, this works now! Actually I did set the complete path in my config, but not in the fortran-tags.el.
Hi,
I am quite new to tagging...
Now, I was trying fortran-tags for a project ( https://github.com/firemodels/fds/tree/master/Source ) Unfortunately I get this error message:
Do you have an advice how to handle this? Thank you!