Skip to content
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

Robot case files have .robot extension #4

Open
ghost opened this issue Jan 20, 2015 · 3 comments
Open

Robot case files have .robot extension #4

ghost opened this issue Jan 20, 2015 · 3 comments

Comments

@ghost
Copy link

ghost commented Jan 20, 2015

Since .txt file can be any text file not only a robot file, it is better to replace this comment statement @http://code.google.com/p/robot-mode/source/browse/trunk/robot-mode.el?r=31 --- ln 8.
(add-to-list 'auto-mode-alist '(".txt'" . robot-mode))
it can be rewritten as
(add-to-list 'auto-mode-alist '(".robot'" . robot-mode))

@imiric
Copy link

imiric commented Apr 28, 2015

I'm not a fan of @madhavan020985's approach, as I prefer not using the extension for this.

Coming from Vim, I used this plugin which could identify Robot files by the file's coding. However, doing the same in Emacs triggers an "Invalid coding system robot'" message, which is understandable. Is there a way of making this work with robot-mode` anyway?

There might be a way of doing that outside of this package, but I'm a newcomer to Emacs/Lisp, so pardon my ignorance.

Thanks!

@janihur
Copy link

janihur commented Nov 14, 2015

I have robot-mode.el in ~/.emacs.d-directory and following in my ~/.emacs.d/init.el:

(setq load-path (cons "~/.emacs.d" load-path))
(autoload 'robot-mode "robot-mode")

The first line of all my test files is:

# -*- mode: robot -*-

Now all test files open in robot mode.

@Apteryks
Copy link

This is addressed in PR e5ff714. The Robot Framework user guide says:

The recommended extension for test case files in the plain text format is .robot.

@sakari This project seems unmaintained, correct? If so, I'll go ahead and create a fork of it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants