2011-03-30

emacs: compatibility problem whitespace-mode

On Mar 30, 9:13 am, "Drew Adams" wrote:
> > there seems to be a compatibility problem with whitespace-mode and
> > both http://user42.tuxfamily.org/formfeed-hline/index.htmland
> >http://www.emacswiki.org/emacs/PrettyControlL
> > in short, when one of PrettyControlL or formfeed-hline-mode is loaded,
> > then the unicode in whitespace-mode disappears.
> ...
> > it seems when pretty print is loaded, all those triangle and
> > middle dot doesn't show. same problem happens with formfeed-hline.
> > any idea what's going on?
>
> I replied to your question on Emacs Wiki
> (http://www.emacswiki.org/emacs/PrettyControlL).  I don't know what causes the
> problem, but I can confirm it.  Perhaps someone else can help?  Sorry.

Thanks Drew.

I found that this problem is reproducible without my personal settings on whitespace-mode and pretty-control-l-mode.

New steps to reproduce:

(1) load pretty control mode. (require 'pp-c-l)
(2) turn it on. (pretty-control-l-mode 1)
(3) turn on global-whitespace-mode
(4) now the unicode char ( “·”, middle dot, #xb7) used to indicate spaces are gone.

Some other interesting findings.

• turning off pretty-control-l-mode doesn't help.
• unloading it doesn't fix it neither. (unload-feature 'pp-c-l)
• the problem does not happen if you simply load pp-c-l but doesn't turn it on. Once turned on, the problem happens and cannot be fixed by turning off pp-c-l or unloading it.

The above are tested with pp-c-l but it happens with
http://user42.tuxfamily.org/formfeed-hline/index.html
too as i tested earlier.

Xah

2011-03-26

emacs, windows, cygwin, key problems

On Mar 25, 5:34 pm, KevinSimonson wrote:
> My laptop has Windows 7 Enterprise as its OS, but a few people I know
> there enjoy Unix enough that they had the Cygwin Bash Shell installed
> on their machines, and I have found Unix useful enough in the past
> that I decided I wanted that Bash Shell on my laptop as well.  So when
> I bring up a Command Prompt I'm using Windows 7, but when I click on
> All Programs->Cygwin->Cygwin BashShell>, a window comes up
> that to all intents and purposes is running Unix.
>
> I was very happy to discover that I can run "emacs" in this Bash Shell
> emulation, because there are a lot of editing tasks that Emacs macros
> make a lot easier than other editors I know.  But after my first Emacs
> session I was dismayed to find out that when I typed in > C>, this version of Emacs didn't recognize that key sequence!  At
> first I panicked, but eventually I found out that I could type in > X> "save-buffers-kill-terminal", and that got me out.  That saved the
> contents of the original file, but it's getting to be very irritating
> typing in that long command every time.
>
> Since then I've learned that when I'm done with a file I can type
> to save the file and "kill-emacs", which is a little
> shorter, but it's still a nuisance.
>
> When I type in , the Emacs editor tells me, "C-x C-g
> is undefined".  That's no typo.  It appears to mistake my for
> a !  Is there some way to tell Emacs to let
> be the key sequence for "save-buffers-kill-terminal"?  And to save
> that in my ".emacs" file so that whenever I bring up an Emacs session
> stays the key sequence for "save-buffers-kill-
> terminal"?
>
> Also, is by default the key sequence for "open-line", but I
> hardly ever use that, and find myself using "o" very often,
> so is there some way to tell Emacs to let be the key sequence
> for "other-window", and to save that in my ".emacs" file as well, so
> that every time I bring up Emacs it stays the key sequence for "other-
> window"?
>
> Any information on this would be greatly appreciated!  When I type in
> "emacs -version" it says:
>
> GNU Emacs 23.2.1
> Copyright (C) 2010 Free Software Foundation, Inc.
> GNU Emacs comes with ABSOLUTELY NO WARRANTY.
> You may redistribute copies of Emacs
> under the terms of the GNU General Public License.
> For more information about these matters, see the file named COPYING.
>
> Kevin Simonson

i used cygwin since 1998. I still use cygwin daliy, but these days i don't run emacs inside cygwin.

if i recall correctly, the key problem you encounter can be fixed by some cygwin specific environment variable (or config file, i forgot which.). They have a faq about it, it's a bit complex.

also, there are several GUI based emacs that's almost always more up to date than the one that comes with cygwin (but of course you can always compile you own).

I listed 3 most popular GUI ones, including ones from FSF:

〈Which Emacs to Download for Windows and Mac?〉
http://xahlee.org/emacs/which_emacs.html

also note, emacs's dealing with keys has major difference depending on whether you are running it in a text terminal (such as cygwin shell running on Windows Console), or if you are in a GUI environment. For example, in terminal, emacs cannot distinguish C-‹cap letter› vs C-‹lower case›. In general, running emacs in a GUI environment is much better even if you don't use mouse.

You could run a GUI emacs in X11 from cygwin if you want the whole cygwin unix environment. Or, you could just use emacs Windows port running in Windows. (you can still call cygwin shell & command inside emacs here, of course.)

i've written some experience of running emacs on Windows and Cygwin, you might find interesting.

〈Emacs and Microsoft Windows Tips〉
http://xahlee.org/emacs/emacs_mswin.html

hope that helps.

Xah

emacs, unicode, math symbols input

http://groups.google.com/group/comp.emacs/msg/eed4919307a80db0

On Mar 26, 2:31 pm, RS Wood wrote:
> On 2011-03-10, Xah Lee wrote:
>
> > might be interesting.
>
> > 〈A Curious Look at GNU Emacs's 1000+ Default Keybinding〉
> >http://xahlee.org/emacs/gnu_emacs_keybinding.html
>
> > plain text version follows.
>
> Very interesting.  The C-x 8 series I was unaware of, and I would've
> been glad to know about it as I usually have to change input method
> when I want to type a bit in French or Spanish.  Interesting to see the
> A- notation, for example A-Y for the Yen symbol, doesn't work with a
> modern Alt key.

yes, the C-x 8 is great. Though these days i've setup my own system of keys to input special chars, much like Mac OS's Opt+letter key. (I use Hyper+‹letter›, where the Hyper is Window keyboard's Menu key) This is faster than Ctrl+x 8 ‹letter›.

setting up your own is sometimes desired because the C-x 8 mechanism is mostly for latin symbols, and doesn't contain much math symbols such as infinity ∞, lambda λ, alpha α, arrow →, etc.

here's several ways to setup a symbol keyboard layout. Thru OS mechanism, or with emacs:

〈How to Create a APL or Math Symbols Keyboard Layout〉
http://xahlee.org/kbd/creating_apl_keyboard_layout.html

But if you work with math a lot (e.g. XeTeX, MathML, Mathematica, or functional langs), where you need to input hundreds of math symbols, direct key input is not suitable because it becomes difficult to memorize the exact key combos. For that many symbols, a input system is more suitable. e.g. type “inf” then press a hotkey and it becomes ∞. Same for lambda, whole greek letters, sum, logic and/or/not, all direction of arrows and variations, etc.

here's my math symbols input system:

〈Emacs Unicode Math Symbols Input Mode (xmsi-mode)〉
http://xahlee.org/emacs/xmsi-math-symbols-input.html

it's open source, but donation is much appreciated.

Xah