返回   cpper编程论坛 > 灌水/杂烩/BT
注册账号 论坛帮助 会员列表 日历事件 搜索 今日新帖 标记版面已读

灌水/杂烩/BT 所有非技术的东西都往这里来

回复
 
LinkBack 主题工具 显示模式
  #1 (permalink)  
旧 2006-04-05
Elminster 的头像
超级版主
 
注册日期: 2002-09-09
帖子: 1,764
Elminster 正向着好的方向发展
默认 有谁在 windows 下面用 msvc 编译过 emacs-unicode-2 的么?

最近两天心血来潮,想在 windows 下面用上 emacs-unicode-2 ,就 cvs 了源码下来。我对 mingw 和 cygwin 的编译器和 make 不是很信任,拿了 msvc 来编译,结果吃了一些苦头。嗯嗯,这里总结一下:

首先,vs.net 2005 是不能用的。在这个版本里面,微软不知道哪根神经出了点贵恙,居然把 CRT 的单线程版本 libc.lib 给去了,nmake 的时候会报 libc.lib 无法找到。我当时怎么也没往这个方向想,还以为环境什么地方设错了,找了半天才发现真的没这东西,只好杀进 makfile 把 libc.lib 改成 libcmt.lib 。随后又是一个非常诡异的编译错误,号称 windows 自己的 time.h 里面有个函数返回了数组 …… 打开一看,全是宏定义,实在懒得看了,卸了 2005 重装 2003 了事。

其次,GnuWin32 那帮东西也不咋样。为了在编译的时候加上图形支持,需要加上一堆 Gnu 的图形库,libjpeg/gif/png 之类。这一堆文件下载起来够烦的,sourceforge 那是有名的慢。搞下来之后编译还不顺当,configure.bat 报告都正确的情况,编译到 jpeg 支持的时候过不去。看错误信息定位进去,居然是使用了 UINT16 和 UINT8 却没有定义 …… 有一点点 faint 。随手补上两个 typedef 就能过去了。

最后,emacs 自己的东西也表现不佳。先是 configure.bat 在检测图形库支持的时候一会这个格式没有一会那个格式没有,却不报准确原因,只说头文件找不到 —— 头文件明明在那里的。我自己翻了 configure.bat 的源文件,它是写一个两行的 junk.c 文件尝试编译来看的,自己重复一遍这个操作,发现是它在尝试编译的时候找不到 emacs 包里自己的一些头文件 …… 不想改了,直接把对应的目录加到 include 路径里,果然就没事了。接着又是 emacs 自己编译自己的 elisp 文件过不去,每次跑到 leim/lao.el 就退出。我对 elisp 没啥心得,进去以后也看不出错在哪里。google 了一下,发现 leim 也就是一些国际化的输入法包(这 lao.el 是哪国的输入法?老挝?),干脆不要了,在 makefile 里面把对应的这一项禁掉了事。

唉唉,总而言之一句话,真是麻烦啊。从下午开始弄,折腾到现在才搞定。好在效果还不错 ,不然 ……
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
回复时引用此帖
  #2 (permalink)  
旧 2006-04-05
高级会员
 
注册日期: 2006-02-11
帖子: 139
zero 正向着好的方向发展
默认

早已放弃在windows下使用emacs
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
回复时引用此帖
  #3 (permalink)  
旧 2006-04-05
Elminster 的头像
超级版主
 
注册日期: 2002-09-09
帖子: 1,764
Elminster 正向着好的方向发展
默认

引用:
作者: zero
早已放弃在windows下使用emacs
why?emacs 在 windows 下面还是很好用的呀。
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
回复时引用此帖
  #4 (permalink)  
旧 2006-04-05
高级会员
 
注册日期: 2006-02-11
帖子: 139
zero 正向着好的方向发展
默认

人懒,要设这个那个的太麻烦。不像linux下,有很多工具可以用,比如什么拼写检查啊什么的。而且要连任何一个编译器都要自己设置一下,太麻烦。而且我用emacs,也就写写脚本程序,makefile,和latex。这些有的在windows下有更好的替代品,或者说emacs在windows下不如在linux下方便,要么就是win下面根本不用这些东西。

你不妨具体说说你用emacs在win下面做些什么,然后稍微介绍一下配置的过程。
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
回复时引用此帖
  #5 (permalink)  
旧 2006-04-05
普通会员
 
注册日期: 2006-02-18
帖子: 46
wintereagle 正向着好的方向发展
默认

你肯定没念,B教主万岁!天福永享寿与天齐!你这多炮塔教众当的也太不转业了.
直接去下NQemacs.
装好了,上来交流一下.emacs配置哈
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
回复时引用此帖
  #6 (permalink)  
旧 2006-04-06
Elminster 的头像
超级版主
 
注册日期: 2002-09-09
帖子: 1,764
Elminster 正向着好的方向发展
默认

引用:
作者: zero
人懒,要设这个那个的太麻烦。不像linux下,有很多工具可以用,比如什么拼写检查啊什么的。而且要连任何一个编译器都要自己设置一下,太麻烦。而且我用emacs,也就写写脚本程序,makefile,和latex。这些有的在windows下有更好的替代品,或者说emacs在windows下不如在linux下方便,要么就是win下面根本不用这些东西。

你不妨具体说说你用emacs在win下面做些什么,然后稍微介绍一下配置的过程。
没有吧?emacs 的那些东西在 windows 下大多有 port ,而且很多有 windows 风格的安装程序,很方便。拼写检查用 aspell 就行了呀,下载两个安装程序装一下,.emacs 加两句就是了。

windows 下面我甚少用 emacs 写程序,主要是拿来处理 ini / html / cue 这些带格式的文本,非常好使。最方便的就是可以定义键盘宏,处理一些非常繁琐的编辑工作,效果极佳。还有一大作用就是拿来写 LaTeX ,emacs+auctex 非常好。至于配置过程,基本上都是找网上现成的抄,而且也没什么很复杂的东西。事情多一点的是两个:一是 auctex 需要编译,不过有个 cygwin,很顺利也就过去了;二是字体不好配,这个费了我挺多功夫在网上搜索的,不过配好了也就不用管了。

引用:
作者: wintereagle
你肯定没念,B教主万岁!天福永享寿与天齐!你这多炮塔教众当的也太不转业了.
直接去下NQemacs.
装好了,上来交流一下.emacs配置哈
搞 emacs 那帮人和 B 教主也并不对付呀 ……
俺的 .emacs 配置没啥内容,都是网上七拼八凑来的,侬自己看吧:

(custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(current-language-environment "Chinese-GB18030")
'(show-paren-mode t)
'(transient-mark-mode t))
(custom-set-faces
;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
)



;; Code all below is added by wizard

;; Place for my extra packages ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

(setq load-path (cons "~/.emacs.d" load-path))



;; 中文字体啊!中文字体 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

(setq w32-charset-info-alist
(cons '("gbk" w32-charset-gb2312 . 936) w32-charset-info-alist))

(setq default-frame-alist
(append
'((font . "fontset-gbk")) default-frame-alist))

(create-fontset-from-fontset-spec
"-outline-Courier New-normal-r-normal-normal-14-96-96-96-c-*-fontset-gbk")
(set-fontset-font
"fontset-default" nil
"-outline-宋体-normal-r-normal-*-16-*-96-96-p-*-iso10646-1" nil 'prepend)
(set-fontset-font
"fontset-gbk" 'kana
"-outline-宋体-normal-r-normal-*-16-*-96-96-p-*-iso10646-1" nil 'prepend)
(set-fontset-font
"fontset-gbk" 'han
"-outline-宋体-normal-r-normal-*-16-*-96-96-p-*-iso10646-1" nil 'prepend)
(set-fontset-font
"fontset-gbk" 'cjk-misc
"-outline-宋体-normal-r-normal-*-16-*-96-96-p-*-iso10646-1" nil 'prepend)
(set-fontset-font
"fontset-gbk" 'symbol
"-outline-宋体-normal-r-normal-*-16-*-96-96-p-*-iso10646-1" nil 'prepend)
(set-default-font "fontset-gbk")



;; Code for gnuserv ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

(require 'gnuserv)
(gnuserv-start)
;; 在当前frame打开
(setq gnuserv-frame (selected-frame))
;; 打开后让emacs跳到前面来
(setenv "GNUSERV_SHOW_EMACS" "1")



;; Code for using NTEmacs under cygwin ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

;; This assumes that Cygwin is installed in C:\cygwin (the
;; default) and that C:\cygwin\bin is not already in your
;; Windows Path (it generally should not be).
;;
;(setq exec-path (cons "C:/cygwin/bin" exec-path))
;(setenv "PATH" (concat "C:\\cygwin\\bin;" (getenv "PATH")))
;;
;; NT-emacs assumes a Windows command shell, which you change
;; here.
;;
;(setq shell-file-name "bash")
;(setenv "SHELL" shell-file-name)
;(setq explicit-shell-file-name shell-file-name)
;;
;; This removes unsightly ^M characters that would otherwise
;; appear in the output of java applications.
;;
;(add-hook 'comint-output-filter-functions
; 'comint-strip-ctrl-m)
;;
;; Make NTEmacs supprot cygwin path
;(require 'cygwin-mount)
;(cygwin-mount-activate)



;; Code for spell check ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

(setq-default ispell-program-name "aspell")
(setq-default ispell-local-dictionary "american")
(autoload 'flyspell-mode "flyspell" "On-the-fly spelling checker." t)



;; Code for AUCTeX ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

(load "auctex.el" nil t t)
(setq TeX-auto-save t)
(setq TeX-parse-self t)

(add-hook 'LaTeX-mode-hook 'turn-on-auto-fill)

;; 为 AUCTeX 添加一些额外命令,如 ctex 包装的编译命令,它们能够帮助处理一些中文问题
(setq my-tex-commands-extra
(list
(list "ctex_latex" "ctex -latex \"%s.tex\" & ctex -clean \"%s\"" 'TeX-run-LaTeX nil t)
(list "ctex_pdflatex" "ctex -pdflatex \"%s.tex\" & ctex -clean \"%s\"" 'TeX-run-LaTeX nil t)
(list "ctex_dvipdfmx" "ctex -dvipdfmx \"%s.dvi\"" 'TeX-run-command nil t)
(list "ctex_bibtex" "ctex -bibtex \"%s\"" 'TeX-run-BibTeX nil t)
;; (list "ctex_clean" "clean \"%s\"" 'TeX-run-command nil t)
(list "yap" "yap -1 \"%dS\" \"%d\"" 'TeX-run-discard "non-nil" t)
(list "acrobat" "\"C:/Program Files/Adobe/Acrobat 7.0/Acrobat/Acrobat.exe\" \"%s.pdf\"" 'TeX-run-discard nil t)))
;; (list "acrobat" "start \"%s.pdf\"" 'TeX-run-background nil t)))

;; 添加上面定义的命令
(require 'tex)
(setq TeX-command-list (append TeX-command-list my-tex-commands-extra))

;; preview-latex
;(load "preview-latex.el" nil t t)
;(setq-default TeX-master nil)
;(add-hook 'LaTeX-mode-hook #'LaTeX-install-toolbar)
;(add-hook 'LaTeX-mode-hook 'turn-on-auto-fill)
;(add-hook 'LaTeX-mode-hook 'turn-on-reftex)



;; Come from book "Learning Emacs in 24 Hours" ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

(require 'sams-lib)

;; "file template" support
(require 'template)
(template-initialize)

;; backup settings
(setq kept-old-versions 1)
(setq kept-new-versions 5)

;; "backup folder" support
(require 'backup-dir)
(setq bkup-backup-directory-info
'((t "~/.emacs.d/backup" ok-create full-path)))

;; "convient undo and redo" support
(require 'redo)
(global-set-key [(ctrl +)] (quote redo))

;; "quick browse between buffers"
(load-library "yic-buffer")
(global-set-key [(meta prior)] 'bury-buffer)
(global-set-key [(meta next)] 'yic-next-buffer)

;; "buffer switch list"
;(require 'iswitchb)
;(iswitchb-default-keybindings)

;; "desktop" support
;(load "desktop")
;(Desktop-Load-Default)
;(Desktop-read)

;; autosave bookmark
(setq bookmark-save-flag 1)

;; cool! hippie expand can help you to find anything!
;; like function name, variable name, a long word ... etc.etc.
;(global-set-key "\240" (quote hippie-expand))
;; ~~~~~
;; I use "meta space" here ...



;; Ohter code ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

;; display column number
(setq column-number-mode t)

;; no bell ring, display message on screen
(setq visible-bell t)

;; use "alt-left" & "alt-right" to move from "{[(" to corresbonding ")]}"
(global-set-key [(meta right)] (quote forward-sexp))
(global-set-key [(meta left)] (quote backward-sexp))

;; use spaces instead of tabs for indent
(setq-default indent-tabs-mode nil)

;; don't ask me "yes or no", ask me "y or n"
(fset 'yes-or-no-p 'y-or-n-p)

;; 在标题栏显示buffer的名字
(setq frame-title-format "%b - emacs")

;; 用Shift选取region

;; maximize emacs while startup (Only for NTEmacs)
(w32-send-sys-command 6148

;; 很多人绑定一些比较特殊的键的时候,都搞不清楚在
;; (global-set-key ... 'my-funtion)
;; 里写些什么。特别是在 xterm 里的时候就更不知所措了。其实有一个万无一失的办法保证你一定写对。这个办法就是:

;; 1. 先使用 M-x global-set-key RET 交互式的绑定你的键。
;; 2. 然后 C-x Esc Esc 调出上一条“复杂命令”。

;; 好了,你现在就能在 minibuffer 里看到你应该写在 .emacs 的东西了
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
回复时引用此帖
回复

书签

主题工具
显示模式

发帖规则
不可以发表新主题
不可以发表回复
不可以上传附件
不可以编辑自己的帖子

启用 BB 代码
论坛启用 表情符号
论坛启用 [IMG] 代码
论坛禁用 HTML 代码
Trackbacks are 启用
Pingbacks are 启用
Refbacks are 启用


相似的主题
主题 主题作者 版面 回复 最后发表
Windows启动过程介绍 zweily 技术杂烩 6 2006-03-12 10:45 PM
[BMP]文件格式 codinggirl 技术杂烩 3 2004-07-01 09:40 PM


所有时间均为格林尼治时间 +9。现在的时间是 08:36 AM


Powered by vBulletin® 版本 3.7.0
版权所有 ©2000 - 2009,Jelsoft Enterprises Ltd.
(C) Copy Right All Right Reserved 2001 - 2007

Search Engine Friendly URLs by vBSEO 3.1.0