- Sponsor
-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
mc.lib typo: linenog #3044
Comments
By the way, I don't get this whole lineno feature...
First of all, for most applications it just doesn't work right now because they require the line number to precede the filename, with apparently 'vim' and 'mcedit' being the only exceptions (they accept both possible orders). E.g. 'emacs +10 /etc/services' opens that file at line 10, but 'emacs /etc/services +10' as currently invoked by mc simply ignores the line number. So mc.lib should look like
Second, as mc has no way of knowing the previous or the desired offset, I believe this feature is only useful if I toggle between using external and internal editor (or viewer), so mc can open with the external utility at the position I left it using the internal one. Seems to be a very rare use case for me. Or I might miss something.
Joe (and probably others too) has a feature that it remembers the last offset on its own and opens the file there, unless overridden from command line. So, in case of 'joe', correctly passing the line number by mc would cause more harm than good, it would enforce mc's own belief of the desired line number, rather than the last one seen by a previous invocation of joe.
Seems to me that a bad design luckily doesn't work because it's implemented incorrectly :D
I might be wrong of course, and YMMV. |
|
As per comment 1, this is really not fixed. The line number after the filename doesn't work in most the apps. Even if it worked, the feature would have questionable usefulness, probably would cause more problem than advantage. Shall we reopen this one, or file a new bug? |
|
|
|
Sorry, I still don't get it. You closed it a second time by addressing the easy parts and not the real issue. Repeating, for your convenience:
I'm using the joe editor. With the old buggy order of command line parameters the conceptually faulty desired behavior of passing a line number luckily didn't work, hence joe opened the file where the cursor was recently (joe remembered this itself). With the new partial "fix" joe always opens the file at the first line, since a "+1" is always passed to it preceding the filename. mc has no way of knowing the desired line number, and it asks joe not to use the one joe itself remembered. Makes absolutely no sense to me, and I find it a significant usability regression from 4.8.10.
Could you please clarify what's the intended behavior, and how is mc supposed to know the desired line number that it passes to the applications?
I believe that for any editor that remembers the last cursor position for the files it opens (joe is one of these, I'm not sure about any other editors), %lineno should not be passed to the editor at all. |
Replying to egmont:
What about #2206? |
With that in mind, I believe the right solution would be to:
What do you think? |
Replying to egmont:
It sounds reasonably. But I think this is an issue for new ticket nevertheless. |
Okay, let's continue in #3117. |
Important
This issue was migrated from Trac:
egmont
(@egmontkob)mc.lib has a typo. "less=%filename +%linenog" instead of "+%lineno"
(forwarded from https://mail.gnome.org/archives/mc-devel/2013-April/msg00001.html)
The text was updated successfully, but these errors were encountered: