dieter-wilhelm / apdl-mode

An Emacs mode for investigating and coding APDL (Ansys Parametric Design Language). Its full documentation is on:
http://dieter-wilhelm.github.io/apdl-mode
41 stars 7 forks source link

Cannot access local help via Tramp with apdl-browse-ansys-help #11

Closed averter closed 2 years ago

averter commented 4 years ago

Hi,

Thank you for this wonderful package. I've recently installed it from melpa and ran into a problem when trying to access the help functionality through the C-c C-b keybinding. To give some context, I'm writing APDL on a linux server through tramp. I've set the Installation directory successfully and when I hit C-c C-b over a FINISH command, apdl-mode doesn't find the local html file and eww returns url-file: File does not exist: file:////ssh:myname@myremote:/ansys_inc/v140/commonfiles/help/en-us/help/ans_cmd/Hlp_C_FINISH.html I think the problem are the trailing forward (///) slashes that preced the ssh command, because the file Hlp_C_FINISH.html and its path exist/are correct. Thanks in advance for any help.

dieter-wilhelm commented 4 years ago

Hello @averter

I'm sorry for this. I never had the need to use tramp for apdl coding :-). Let's see: First of all file:/// is working for me locally on Ubuntu with EWW. It seems that file: is also working under Linux and with a locally installed Ansys help. :-)

Just pushed it on Github. Could you please update the mode on Melpa and check, if it is working for you now? Or are you using melpa stable?

averter commented 4 years ago

Thanks for your quick reply. I am not using melpa-stable, however, after refreshing I can only find the previous commit, i.e. 4ed7d6e0531190c6e614818e19f1472d76dcc33a Temporarily I've changed the files apdl-mode.el and apdl-process.el myself but I still get the same problem. I suspect that tramp and eww don't get along well!

dieter-wilhelm commented 4 years ago

Please wait a bit longer it takes up to 2 hours for Melpa to compile all the latest commits.

averter commented 4 years ago

I've upgraded it now and made some extra tests. The error message is slightly different url-file: File does not exist: file:/ssh:myname@myremote:/ansys_inc/v140/commonfiles/help/en-us/help/ans_cmd/Hlp_C_FINISH.html, so with only one trailing forward slash. I've tried to do eww-open-file and use tramp syntax for the file /ssh:myname@myremote:/ansys_inc/v140/commonfiles/help/en-us/help/ans_cmd/Hlp_C_FINISH.html but the error is the same and by default it puts exactly three trailing forward slashes. Unfortunately, I can't find any example online of someone trying to open an html file located on a remote server using eww or w3m. I suspect that tramp and eww don't work well together.

dieter-wilhelm commented 4 years ago

One could ask on emacs.help..

Is it possible for you to access the online help of Ansys in a browser on your machine?

Can you access this html file Hlp_C_FINISH.html with tramp in Emacs without using EWW?

averter commented 4 years ago

No, I cannot access the online help of Ansys (don't want to create an online account), and yes, I can edit the html file with tramp in emacs, so I have access to the file/it exists.

dieter-wilhelm commented 4 years ago

I tried now to read a file with EWW remotely with TRAMP and I can't reach it either.

So I've asked in gmane.emacs.help for ideas. In the worst case I'll report this as a EWW bug.

dieter-wilhelm commented 4 years ago

Michael Albinus (the tramp guy :-) already hinted at a workaround: (eww-open-file (file-local-copy "/ssh:wawa:/tmp/Hlp_C_FINISH.html")) As long as EWW is not supporting remote files you could copy a temporary file on your machine.

What do you think of this workaround? We could write a small apdl-mode wraper around such calls..

averter commented 4 years ago

I'm surprised that eww doesn't support such functionality. It's an interesting solution. The only shortcoming is that it's probably slower than accessing it directly on the remote or via the online help system. Yes, let's try and see how it goes. I think this feature is relevant because ansys can be very demanding computationally, and it will often be installed on remote servers. Don't you agree?

dieter-wilhelm commented 4 years ago

I'm surprised that eww doesn't support such functionality.

Well, eww is rather young and if only few have such a use case..

It's an interesting solution.

Unfortunately Michael also pointed out that with this the links wont work!

The only shortcoming is that it's probably slower than accessing it directly on the remote or via the online help system. Yes, let's try and see how it goes.

I can tell you that for me working under a company VPN using the online help was not usable, it is so slow! I don't think making a local copy of the small html files will be noticable.

What I did is to install just the Ansys help package (1.7 GB vor v201 though) locally, you can download it on the Ansys portal if you have a company account. Or download the respective directory structure from your server. You just need to configure the apdl-help-path I think..

I think this feature is relevant because ansys can be very demanding computationally, and it will often be installed on remote servers. Don't you agree?

I totally agree and I even consider C-c C-b as THE core feature of APDL-Mode for most (WorkBench) users nowadays.

dieter-wilhelm commented 4 years ago

For your information @averter

We might be lucky, Lars Magne Ingebrigtsen (the EWW and Gnus guy :-) is judging the behaviour of EWW as a bug. So I submitted a bug report: (debbugs-gnu-bugs 40425)

And the chances are good that someone will improve EWW in this respect. :-)

averter commented 4 years ago

Many thanks for the update @dieter-wilhelm. So at the end this issue ends up classed as a bug from eww - I'll be looking forward to a new version. Should I close this issue or do you want me to leave it open? Thanks again for your support.

dieter-wilhelm commented 4 years ago

You are very welcome and thanks for your feedback! I suggest to leave it open as long as this bug is not resolved, even if it isn't a bug in A-M, maybe it can be useful as a warning for others...

dieter-wilhelm commented 4 years ago

By the way of your FINISH command, I realised today that the abbreviation facility was broken in A-M. Now you can type `1 and SPACE or C-j again (backquote and one, as for the first line before another processor :-). Have fun with Emacs!

dieter-wilhelm commented 2 years ago

I'm closing this issue because Lars Ingebrigtsen, together with Michael Albinus, fixed this today in the master branch of Emacs. (I checked it for the ssh method of Tramp.)

I hope that Corwin Brust will soon build the next binary snapshots of Emacs-29 for Windows (Emacs-28 will be the next release).

Currently the snapshots are put here: http://alpha.gnu.org/gnu/emacs/pretest/windows/

yangdawei commented 2 years ago

这是来自QQ邮箱的假期自动回复邮件。您好,我已收到您的邮件。

dieter-wilhelm commented 2 years ago

这是来自QQ邮箱的假期自动回复邮件。您好,我已收到您的邮件。

Could you please translate this into English? :-)

Thank you

duweizhuo commented 2 years ago

I can help with that ;-)
"This is a holiday auto-reply email from QQ Mailbox. Hello, I have received your email."




---- 回复的原邮件 ----
发件人 H. Dieter ***@***.***>
日期 2022年02月21日 06:34
收件人
抄送至
主题 Re: [dieter-wilhelm/apdl-mode] Cannot access local help via Tramp with apdl-browse-ansys-help (#11)

这是来自QQ邮箱的假期自动回复邮件。您好,我已收到您的邮件。

Could you please translate this into English? :-)

Thank you


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <dieter-wilhelm/apdl-mode/issues/11/1046335697@github.com>

yangdawei commented 2 years ago

Thanks for duweizhuo. It's auto-reply email with a meanlingless greeting. And wish Dielter and his apdl-mode project good luck.

杨大伟 哈尔滨工业大学交通科学与工程学院桥梁工程系

电话:0451-86282486 手机:138-9570-2978

@.*** 地址:黑龙江省哈尔滨市南岗区黄河路73号  150090

 

------------------ 原始邮件 ------------------ 发件人: "dieter-wilhelm/apdl-mode" @.>; 发送时间: 2022年2月21日(星期一) 上午9:04 @.>; @.**@.>; 主题: Re: [dieter-wilhelm/apdl-mode] Cannot access local help via Tramp with apdl-browse-ansys-help (#11)

I can help with that ;-)<br/>&quot;This is a holiday auto-reply email from QQ Mailbox. Hello, I have received your email.&quot;<br/><html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> </head> <body> <br/><br/><br/><div class="ntes-mailmaster-quote" style="padding-top: 1px; padding-bottom: 1px" > <div style=" margin-top: 2em; margin-bottom: 1em; font-size: 14px; line-height: 1.25; color: #78787a; " >---- 回复的原邮件 ----</div> <div style=" margin-bottom: 1em; font-size: 12px; line-height: 1.25; color: #232324; padding: 0.5em 0.25em; border-radius: 0.67em; background-color: #f0f0f0; " > <table width="100%" cellpadding="0" cellspacing="9" border="0"> <tr> <td valign="top" style=" width: 4.25em; font-size: 12px; line-height: 1.25; color: #78787a; " > 发件人 </td> <td valign="top" style=" font-size: 12px; line-height: 1.25; color: #232324; word-break: break-all; " > <a class="mail-from" style="text-decoration:none;color:#0886e8;" @.">H. Dieter @.&gt;</a> </td> </tr> <tr> <td valign="top" style=" width: 4.25em; font-size: 12px; line-height: 1.25; color: #78787a; " > 日期 </td> <td class="mail-date" valign="top" style=" font-size: 12px; line-height: 1.25; color: #232324; word-break: break-all; " > 2022年02月21日 06:34 </td> </tr> <tr style=""> <td valign="top" style=" width: 4.25em; font-size: 12px; line-height: 1.25; color: #78787a; " > 收件人 </td> <td valign="top" style=" font-size: 12px; line-height: 1.25; color: #232324; word-break: break-all; " > <a class="mail-to" style="text-decoration:none;color:#0886e8;" @.**@.&gt;</a> </td> </tr> <tr style=""> <td valign="top" style=" width: 4.25em; font-size: 12px; line-height: 1.25; color: #78787a; " > 抄送至 </td> <td valign="top" style=" font-size: 12px; line-height: 1.25; color: #232324; word-break: break-all; " > <a class="mail-cc" style="text-decoration:none;color:#0886e8;" @.**@.&gt;</a> </td> </tr> <tr> <td valign="top" style=" width: 4.25em; font-size: 12px; line-height: 1.25; color: #78787a; " > 主题 </td> <td class="mail-subject" valign="top" style=" font-size: 12px; line-height: 1.25; color: #232324; word-break: break-all; " > Re: [dieter-wilhelm/apdl-mode] Cannot access local help via Tramp with apdl-browse-ansys-help (#11) </td> </tr> </table> </div> <div><p></p> <blockquote> <p dir="auto">这是来自QQ邮箱的假期自动回复邮件。您好,我已收到您的邮件。</p> </blockquote> <p dir="auto">Could you please translate this into English? :-)</p> <p dir="auto">Thank you</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">&mdash;<br />Reply to this email directly, <a href="https://github.com/dieter-wilhelm/apdl-mode/issues/11#issuecomment-1046335697"&gt;view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AB6VZHDK6ZTELBIEL43EDHTU4FUAXANCNFSM4L4GWCTQ"&gt;unsubscribe</a>.<br />You are receiving this because you are subscribed to this thread.<img src="https://github.com/notifications/beacon/AB6VZHG4B47GHC6O2HYZ4VTU4FUAXA5CNFSM4L4GWCT2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOHZO5BUI.gif" height="1" width="1" alt="" /><span style="color: transparent; font-size: 0; display: none; visibility: hidden; overflow: hidden; opacity: 0; width: 0; height: 0; max-width: 0; max-height: 0; mso-hide: all">Message ID: <span>&lt;dieter-wilhelm/apdl-mode/issues/11/1046335697</span><span>@</span><span>github</span><span>.</span><span>com&gt;</span></span></p> <script type="application/ld+json">[ { @.": "http://schema.org", @.": "EmailMessage", "potentialAction": { @.": "ViewAction", "target": "https://github.com/dieter-wilhelm/apdl-mode/issues/11#issuecomment-1046335697", "url": "https://github.com/dieter-wilhelm/apdl-mode/issues/11#issuecomment-1046335697", "name": "View Issue" }, "description": "View this Issue on GitHub", "publisher": { @.": "Organization", "name": "GitHub", "url": "https://github.com" } } ]</script></div> </div> </body> </html> — Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android. You are receiving this because you commented.Message ID: @.***>

dieter-wilhelm commented 2 years ago

Thanks for duweizhuo. It's auto-reply email with a meanlingless greeting. And wish Dielter and his apdl-mode project good luck. 杨大伟 哈尔滨工业大学交通科学与工程学院桥梁工程系 电话

I'm sorry, I forgot that you are subscribed to this project. I understand now this message, thanks.