Emacs can't work with ibus to input chinese - emacs

My Emacs editor can't work with ibus chinese input method, ibus shows "No input window" when cursor is on Emacs.
I run Emacs with alias like LC_CTYPE="zh_CN.UTF-8" emacs, It actually works before, but I have no idea why it doesn't work now, maybe some system update I think.
About my system: Gentoo Linux with Gnome3, I installed Emacs23 and Emacs24, and both of them can't work with ibus now.
PS: Ibus works on other programs, Emacs can display chinese characters well.

It seems the problem only happen on Gentoo. Because system update clear up some fonts. The solution is to install the missing fonts:
emerge media-fonts/font-adobe-75dpi x11-apps/bdftopcf media-fonts/font-alias media-fonts/font-util
Then after logout and re-login, I can use input method again.

I solve this problem via installing ibus.el and this seems like emacs GTK UI's problem.

make sure that ibus is configured correctly by opening the default text editor for your distribution (Mousepad, Leafpad...?), typing control-space and seeing if you can enter Chinese. If you cant you may have to install a Chinese input method or add an input method in the ibus settings.
next make sure you have the emacs, ibus mode installed. If you are using a Debian based distribution, the package you want to install will be listed as 'ibus-el'.
After installing ibus-el usually control-space will activate and allow you to cycle through your input methods; however, on some of my machines I have to help emacs to get ibus mode started by typing M-x ibus-mode.

Related

I am trying to use :g in Vim doesn't work "Command :g[lobal] is not yet implemented" i get in the status line

I wanted to try vim for a bit, and get used to it... i got stuck with trying to replicate Ctrl+D functionality of VScode... so I've tried couple Google solutions.
This is What I've tried when I got that error:
:g/oldword/norm newword
I see lots of people do search patterns like this, but it's annoying I get this message, without being able to find solution on google :D
I know I can solve this issue with /word then cgn newword and then just repeat with . operator, BUT, I want to be able to use the global command for searching patterns and stuff, for other purposes too, and it stresses me out that I can't make it work!
Here is the error I am getting.
Any help is extremely appreciated / welcome! Thanks.
Edit: Forgot to mention: We are talking about Vim for VScode, not the gvim installation stuff. Will try to install that too, and update the question.
Edit2: Okay so apparently, after instalilng gvim (from official site) and ran it through vim command in cmd prompt, the official vim can run the :g commands.
Like (for example) if you want to search for <a> and replace it with <router-link> you can do so by: :g/<a>/norm ciw<router-link>
Which means:
:g/<a>/norm run a global (file) search for pattern <a>
ciw - change in word
<router-link> the replacement pattern for <a>
Note: The same should be done for </a> after that :D
The problem still exists tho.
While the native vim exe (outside of vscode) works and can run these stuffs, I still need to fix the vscode one (the extension that is). It is defo nice to have syntax highlighting and correction.
What you are using is not Vim. It is a Vim emulator which, like all Vim emulators, can't be expected to be either complete or accurate. Its only relationship with Vim is that it tries and fails to imitate it.
Some of the Vim stuff you will find on the internet will work in that VSCode extension exactly as it does in Vim, some of it will work but partially or differently, and most of it, like :g, will simply not work.
There is nothing you can do about that except, maybe, contributing to the project.
If you want support for the global command in VSCode, install Neovim and the VSCode extension for it:
for those who expected this to work but it doesn't, it's possibly because you need to have installed neovim (firstly) and then vscode-neovim extension (secondly) https://marketplace.visualstudio.com/items?itemName=asvetliakov.vscode-neovim
Source: https://github.com/VSCodeVim/Vim/issues/2346
The easiest way to get this working is to enable neovim in the VS Code Vim extension you're using.
Once you have installed Neovim on your operating system, you can enable it within VSCode inside the Preferences: User Settings window:
Enable the Vim: Enable Neovim option (vim.enableNeovim)
Set the path to Neovim inside the Vim: Neovim Path setting (vim.neovimPath)
Restart VSCode
Source: https://www.barbarianmeetscoding.com/boost-your-coding-fu-with-vscode-and-vim/integrating-vscode-with-neovim/#enabling-neovim-inside-vscode

VSCode on Linux Mint, integrated terminal not able to type anything

Hi I'm running Linux Mint 19 and I have just installed vscode using the snapd package manager. I've not used vscode on linux before as my usual editor is emacs. However, on a fresh new install of vscode, the integrated terminal does not work, there is just a non blinking cursor in the top left of the screen, but no prompt and no keyboard strokes are registering. This appears to be a common problem as there are a lot of posts about it if googled, but they are all for Windows versions and none of the solutions that I'm able to try do anything. I've tried to open a new terminal window, but the same thing happens I just get two terminal windows that I now cannot use. I've also tried checking the box that says Code-runner: Run In Terminal, but that does nothing either. What can I do to get this to work please, I looks to me like it is just not connected to either a bash or Zsh(which I normally use). Any help on this would be appreciated.
Instead of starting vscode with its default shell script (usually located on /usr/share/code/bin/code), the integrated terminal only works for me when starting it directly from the compiled binary (typically found on /usr/share/code/code, which is the same as the launcher created by the installer:
/usr/share/code/code --no-sandbox --unity-launch %F
While I searched for a solution in the past I've also noticed that lots of folks solved similar problems just by adding --disable-gpu flag, so might be worth checking out as well.

Emacs OSX 10.13 configuration issue

Recently I pass to Emacs org because is really convenient to me to write note there.
So I installed all packages I needed (principally ORG and EVIL) but I didn't understand how to setup everything.
I installed emacs from brew without using cask, I linked it, and I'm sure that I'm using the version that I installed (26.1).
So in my ~/ folder I have a .emacs file in which I set up evil mode, and I have a /.emacs.d/ in which I have a lot of file. The problem is: whatever I wrote in a ~/.emacs.d/init.el seems doesn't effect emacs.
So I said "whatever, I'm going on github and I installed some complete configurations and then I customized them myself". I tried to install these two configurations.
https://github.com/hrs/dotfiles
https://github.com/larstvei/dot-emacs?files=1
But for some reason, after doing exactly what they say on README.org
nothing happens.
In particular the second link, after install and open emacs said I need to have ~/.cask/.cask.el but I don't have it.
Advice?

Associate ` to <S-dead-grave> in Emacs

What do I have to write in my .emacs file in order to associate the <S-dead-grave> command with inserting the character ` (backtick).
I run GNU Emacs 23.1.1 on Unix.
Background: I run Unix via a shell that runs in Java (Oracle SGD) on a Windows terminal server. I do not have admin access on either system. My keyboard is set to Norwegian. There is apparently some bug in Java causing this to act weird with "dead" characters (like ` is on the Norwegian keyboard) and I have not succeeded in getting my administrator to fix this.
When I click ` followed by a space (as is the way to insert that character with my keyboard layout) in Emacs, I get the error message <S-dead-grave> is undefined. Hence, I believe that if I could define this, I would be able to work around this error.
Within this setup, I am also happy with alternative workarounds.
It's not completely clear to me whether you run Emacs in GUI mode or in text mode (in a terminal emulator), but based on your description of Emacs's behavior I guess it runs in GUI mode (maybe via some X server on your Windows machine?).
It's strange that you'd get S-dead-grave events, so it might be a bug in your GUI environment (your X server's config?).
But in any case
(global-set-key [S-dead-grave] "`")
might let you work around the problem.
I had the same problem and this bug report discussion reports a solution :
XMODIFIERS= emacs
I did put it into my .bashrc after testing that it works (with XMODIFIERS= emacs && emacs)
This is apparently not needed with emacs 24.4, but I use emacs 24.3.1 and still need it.
If XMODIFIERS= emacs works for you (don't forget space after equal sign), check ~/.xinputrc and /etc/X11/xinit/xinputrc or run im-config and select none. For more info consult debian reference chapter I18N and L10N

Using clipboard/ copy paste results in chinese looking characters (debian sid)

Using Emacs on my linux box (wheezy, awesome,gnome and kde) I run into big trouble using clipboard even from one emacs instance to another.
Everything I put into the clipboard is converted into chinese looking characters in emacs. Only solution is to copy paste into some other editor (e.g. nano, vi) save it and open it in emacs.
I use the same .emacs on my other (ubuntu) computer and on windows 7 with out any trouble. I erased all my previous encoding settings I had without any success.
http://stackoverflow.com/questions/ask
after copy paste gets
栊瑴㩰⼯瑳捡潫敶晲潬⹷潣⽭畱獥楴湯⽳獡k
I run into the same problem today, with a little different environment tho. I've been using Emacs 24.3.1 on Windows 7, then switched to the same version running under Cygwin+XWin with the same .emacs.d config. While clipboard under Windows worked fine, with the config I had under Cygwin/XWin I had the same problem as in the question.
Under terminal it worked fine, with XWin the -Q worked too, so after a little digging, it turned out to be:
;; MS Windows clipboard is UTF-16LE
(set-clipboard-coding-system 'utf-16le-dos)
I don't remember why I added this. I must have copied it from some Emacs Wiki in early days. When I googled it now, it seems like a popular setting in people configs. It turns out, under Windows I don't need this line for clipboard to work properly with Emacs (quick check with some polish diacritical characters), and under Cygwin/XWin it finally started to work.
(sorry, I haven't the reputation to comment, so I leave a clarification request here)
Are you using emacs in a terminal ? if so, which one (konsole, lxterm, xterm...) ?
Are you cut'n'pasting with mouse (middle click) or keyboard ?
Have you any clipboard manager running (eg glipper) ?
Do you get the same behavior if you start without an init file (~/.emacs), that is, using emacs -Q?
If you can come up with a reproducible recipe starting from emacs -Q then, unless you get some solution proposed here, consider filing an Emacs bug report: M-x report-emacs-bug.