From: SourceForge.net <no...@so...> - 2013-04-23 15:59:13
|
Plugin Feature Requests item #3526562, was opened at 2012-05-14 06:28 Message generated for change (Settings changed) made by ezust You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=997936&aid=3526562&group_id=588 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Open Resolution: None Priority: 3 Private: No Submitted By: Victor Engmark (engmark) Assigned to: Nobody/Anonymous (nobody) Summary: recognize buffer properties in emacs format Initial Comment: It would be nice if jEdit could support Emacs mode strings for mode settings. A simple addition would be to include mode strings in the default first line globs. For example, to detect non-executable Perl files which have no extension but whose first line starts with a shebang or "# -*- mode: perl; -*-": {#!/*perl*,*mode: *perl*} A more difficult feature would be the support for overrides of the jEdit mode settings with strings like this: ; -*- mode: Lisp; tab-width: 4; -*- This could make it easier to share files, especially since there is (AFAIK) no way to specify mode settings per directory tree. ---------------------------------------------------------------------- Comment By: Alan Ezust (ezust) Date: 2013-04-23 08:58 Message: I think this should be done in a plugin. Perhaps looking at how EditorConfig works can help a plugin author implement this feature in a new plugin or in editorconfig itself. ---------------------------------------------------------------------- Comment By: Jarek Czekalski (jarekczek) Date: 2012-05-14 09:25 Message: So most part of Victor's request is already done. General recognition of emacs syntax file properties would be desirable though. Let's have this entry for that. Here are the relevant pages from emacs manual: http://www.gnu.org/software/emacs/manual/html_node/emacs/Specifying-File-Variables.html#Specifying-File-Variables http://www.gnu.org/software/emacs/manual/html_node/emacs/Choosing-Modes.html Workaround is having jedit line as a second, because jedit properites needn't be set in the very first line. As the feature is not expected to be applied soon, you could edit your catalog file and enable perl mode recognition changin the FIRST_LINE_GLOB. I think if you have a good working version of catalog file, you could also submit a patch for that file. To patches tracker. That would be a better workaround for the general issue. ---------------------------------------------------------------------- Comment By: Alan Ezust (ezust) Date: 2012-05-14 08:50 Message: in jedit we use = instead of colon (which is used by emacs). http://www.jedit.org/users-guide/buffer-local.html inserting a line like this: # :mode=perl: works for me. ---------------------------------------------------------------------- Comment By: Victor Engmark (engmark) Date: 2012-05-14 08:44 Message: As already mentioned I work with files which have no shebang line (because they are not supposed to be executed on their own), and don't have a *.p[lm]{,.tdy} extension (for unknown reasons), but *do* have a mode line. These are not detected as Perl. Attaching an example file. ---------------------------------------------------------------------- Comment By: Jarek Czekalski (jarekczek) Date: 2012-05-14 08:36 Message: "Would be nice", so it is not a bug, but a feature request. I'm moving it to the correct tracker. I am not sure, but seems like part of the things is already supported. See "Writing edit modes / Installing edit modes" and "Using jedit / Customizing / Buffer-Local properties" chapters of the users guide. Let's have this report for a single thing. Please provide a short file that is not recognized by jedit as a perl file. We already track some regular expressions: FIRST_LINE_GLOB="#!/*perl*" /> I am testing with daily built jedit. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=997936&aid=3526562&group_id=588 |