The protocol buffers package from Google includes protobuf-mode, a basic Emacs mode for editing protocol buffers. If the "emacs" user flag has been set, this mode should be installed as per your typical emacs package. Somehow the vim syntax support is there, but the emacs support isn't. Reproducible: Always Steps to Reproduce: 1. USE="emacs" emerge protobuf 2. Start emacs. 3. M-x load-lib "protobuf-mode" Actual Results: "Library not found" Expected Results: "Loading protobuf-mode...done" Workaround is to download and install protobuf-mode yourself.
Adding emacs team for some help with this.
Created attachment 192281 [details, diff] protobuf-2.1.0.ebuild-emacs.patch This is a patch agains protobuf-2.1.0 ebuild which adds support for emacs.
Created attachment 192283 [details] files/70protobuf-gentoo.el This is site file for protobuf-mode.
I'm getting following error: * Compiling GNU Emacs Elisp files ... In toplevel form: protobuf-mode.el:157:1:Error: Unknown language "protobuf" since it got no `c-mode-prefix' property * elisp-compile: batch-byte-compile failed [ !! ] * * ERROR: dev-libs/protobuf-2.1.0 failed. * Call stack: * ebuild.sh, line 49: Called src_compile * environment, line 4457: Called die * The specific snippet of code: * elisp-compile protobuf-mode.el || die "elisp-compile failed!"; * The die message: * elisp-compile failed! * * If you need support, post the topmost build error, and the call stack if relevant. * A complete build log is located at '/var/tmp/portage/dev-libs/protobuf-2.1.0/temp/build.log'. * The ebuild environment file is located at '/var/tmp/portage/dev-libs/protobuf-2.1.0/temp/environment'. * !!! When you file a bug report, please include the following information: GENTOO_VM=sun-jdk-1.6 CLASSPATH="" JAVA_HOME="/opt/sun-jdk-1.6.0.13" JAVACFLAGS="-source 1.5 -target 1.5" COMPILER="javac" and of course, the output of emerge --info emacs team: could you help with this?
(In reply to comment #2) > Created an attachment (id=192281) [edit] > protobuf-2.1.0.ebuild-emacs.patch Patch looks good. Two little things: - "emacs? ( virtual/emacs )" should also be added to DEPEND because Emacs is needed at build time for byte compilation. + if use emacs; then + cd "${S}/editors/" + elisp-compile protobuf-mode.el || die "elisp-compile failed!" + fi - The "cd" is not necessary, elisp-compile with the full path should work. (In reply to comment #4) > protobuf-mode.el:157:1:Error: Unknown language "protobuf" since it got no > `c-mode-prefix' property Same error here, both with Emacs 22.3 and 23.0.93. I'll look into it.
Created attachment 192287 [details, diff] protobuf-2.1.0.ebuild-emacs.patch Thank you Ulrich, this is updated patch.
Created attachment 192289 [details, diff] Fix error with byte-compilation in Emacs Attached patch should fix the byte-compile problem. And I just noticed another little thing in the site-init file: you should either change "csv-mode" to "protobuf", or omit the header comment altogether (elisp-site-file-install will then add an appropriate header itself).
Wow. That was quick! Nice work guys. Should I mark this as FIXED or wait for it to be rolled out to the portage tree?
(In reply to comment #8) > Should I mark this as FIXED or wait for it to be rolled out to the > portage tree? "FIXED" = A fix for this bug is checked into the tree and tested. Typically the package's maintainer will mark the bug as fixed after committing the fix to the Portage tree.
Committed, thank you Ulrich for helping with this.