Monday, August 24, 2009

对你的炒股生涯绝对有指导意义(转)

英雄本色里小马哥说过一句话:不要以为看了几本书,就可以混黑社会了,你试过被人用枪指着头,喝完整瓶的威士忌吗?
  做股票也一样。看懂几本股票分析的书很容易,分析的头头是道上天入地很容易,甚至个把月挣个几十万也很容易,不过,朋友,在你有点飘飘然的时候,在你盘算着是今年还是明年挣到一千万的时候,我要对你棒喝一声:哥们,悠着点,没什么是容易的,做股票也一样。
  老天是公平的,给你一样,就要拿走另一样。换句通俗话说,别光看贼吃肉了,你那是没看到贼挨打呢。
  你如果试过一天赚上或赔掉你半生的工资收入而面不改色,夜梦安稳,那么恭喜你,你开始进入做股票的初段,也就是说,你开始入门了。但是,这入门的代价太大了,也许是早生华发,也许是妻离子散。一将功成万骨枯,更多的人,已经永远倒在了万里长征的雪山草地上。
  因此我的建议是:第一,我不建议你做股票。第二,如果你一定坚持要做,那就少拿点钱做吧。第三,如果一开始就赔钱,那是好事。如果一开始就大赚,那这个人就快废了。
  为什么?因为钱来的太容易。一念贪心起,八万障门开。听到很多人跟我说他又赚了多少多少时,我只是笑笑;听到很多人摩拳擦掌热血沸腾砸锅卖铁要加大投资的时候,我只能摇摇头。我想劝他们收收手,他们会说:大叔,你老了,胆子太小了,富贵险中求,知道不?
  是的,富贵险中求,但周星驰说过:球,不是这样踢地。股票,也不是这样做地。
  财不入急门,孤注一掷的人,最终就是一个败字。靠股票发家致富的人有,但凤毛麟角,而且是风云际会,因缘巧合,中等材质却终成一代大家。而绝顶聪明,机关算尽的人,却是仅得温饱。个中滋味,谁能体会?人生命运,唏嘘几何?
  在我看来,目前股票市场教人赚钱的书,99%是让你赚不到什么钱的。真正能赚钱的方法,就是一张纸。我不说,你永远看不透,我说了,你又会说,切,就这个?假传万卷书,真传一句话。就为这一句话,有的人,恐怕参了十几年,也没有参透。
  时间是位艺术大师,他会慢慢抹平你的暴利,让你重新做回普通人。不要幻想一夜暴富,那样会让你丧失平衡感。所以,请记住三个字:慢慢做。当你学会慢下 来的时候,你将开始能客观的看待自己和环境。当你能客观的时候,你至少能安全一点。当你能让自己安全一点的时候,才能有效保障你的收益。当你能有效保障你 的收益的时候,你的财富才能逐渐累积。
  小富由己,大富在天。股票能不能改变你的命运,不在于股票,他只是个道具,关键的,还是你自己的心。一念天堂,一念地狱。生命中很多事情比股票都重要,这一点永远都不要忘记

  股票是零和游戏,高额的印花税还在抽血,所以不要相信股神的存在,政策+消息+资金推动从来比那些股神经济学家做的好.

Thursday, August 20, 2009

3×10小趋势分析法(封起De日子)(

3×10小趋势分析法(封起De日子)(2009-08-21 11:56:58)

标签:股票 理财 趋势分析法 个股 大盘 上海 

分类:选股技巧

小趋势分析法

  有时一些高手或者所谓高手,经常在行盘超过1小时之后,准确的预测出大盘当天的走势,他们依靠的是什么呢,就是3×10小趋势分析法。这个神奇的3×10小趋势分析法是怎么回事,如何运用?下面就详细解析一下。

  快速提高看盘分析能力的第一步就是需要掌握要领

  一,在大盘开盘时刻迅速纪录涨跌幅个股比例,具体家数,有无涨跌停股票出现,具体数字是多少?如果几者之间,涨者居多,且两市开盘涨停个股超过10只,则说明市场处于多头完全控制的局面,上涨势头会很强劲。假如没有多少涨停,且下跌个股比较多,超过5成以上,跌幅超过5%的有六成左右,那么,大势调整可能性很大。比如现在的盘面就是这样的意思。

  不管是上涨和下跌,如果仅仅是个股行为,我们可以孤立地判断,但是,如果是板块效应,那么就需要引起我们的重视,比如资源股等2-3个板块集体上涨,那么当天的行情肯定看好,短线买家可以开盘不久后的调整低点杀进,如果开盘下跌是群体的,板块性的,那么,这一天的行情很可能不好,短线者可以逢高卖出,再在收盘时候的低点买回,可以赚进不少筹码。

  看盘者可以将早盘三个重要时间段加以纪录,并进行高低点连线,我们就能够发现市场力道强弱变化,这个做法,应该写在了实盘日志初期不久。

  注意开盘分时图的运行情况,930940的连线情况是,高点没有超过前收盘,低点略比开盘时降低,那么,这个10分钟属于弱市!我们再需要观察两个10分钟时间段。

  请你注意,任何分析方式都有局限性,因此,我们为了提高准确度,必须多参考一些其他对象,这个时候,我们再来看看,权重指标股情况。

  权重指标股涨跌各半,还是由中国平安领衔护盘,考虑到保险类个股已经连涨几天,那么,我们即要当心它的回调,也要观察新的替补阵容的出现。

  第2个时间段。940950,前收盘位置被突破,低点基本和第一个接近,虽略有降低,但是,高点却已经抬高,说明有主力资金向上做多,市面由弱转强,最后趋势需要第三个阶段去巩固。

  现在的盘面特点是,黄色线居上运行,白色线朝下,你必须清楚,黄色线代表的是什么,它代表的是中小盘股,白色线是成分指数,则代表的是成分股,因此,这个上涨力量不是来自大盘股,而是二、三线股,那么,它们是什么呢?现在上涨的股票,是之前讲到的上海本地股。比如中路股份、界龙实业等等,它们已经形成板块。

  这是最简单的看盘分析,请记住,最简单的,恰恰是最有效的,最好,你能够亲手把大盘分时图画出来,把两个10分钟高低点连起来。好,我们观察第三个10分钟。

  看了大盘前两个10分钟运行轨迹,看了现在的热点板块,我们还需要看什么呢?如果你一直是看这个日志,你就会很清楚,我们需要看的是成交量了,个股的成交量可以骗人,大盘的成交量很难骗人。

  第三个10分钟时间段出来了,从950到现在,大盘的3个低点是不是逐步上行?它们的三个高点是不是逐步抬高?是这样的吧。那么,我的结论出来了,今天的大盘运行趋势是先抑后扬,震荡攀升的情况。有一点需要强调就是,成交量还少了一点,因为这个时候上海才220亿。对多头来说,有热点,有板块,有成交量就是好现象。

  看问题切忌一刀切,看了好的一面,也要看坏的一面,我们再看看下跌前几位的个股情况。现在下跌的还是题材股和概念股,下跌个股家数只4成左右,这说明,力量朝多头转移。

  深圳和上海的上涨力量不同,上海涨的是本地股,深圳则是拉的地产权重股,因此,分时图上,黄白两道线都是反的。它们最终需要统一。

  趋势理论的研究,可大,可小,这话什么意思?这话的意思就是,只要你掌握了趋势分析原理,大则可以用到大趋势,小则可以研究权证和期货这些小波动,刚才的把大盘310分钟进行连线分析就是小趋势的应用,这对短线客有帮助。大趋势上,我们要多关注周、月K线,多关注3060日平均线。这些才是指引我们做大买卖,赚大钱的东西,而刚才这些,都是小意思,做准了,也只能够赚一天的钱,我们要的是长期赚钱。

  马上进入09年下半年操作了,怎么制订计划?其实前期已经说得很清楚了,09年下半年就是做到不亏一分钱。下半年不亏,就是为了下一次大机会里,我们再大赚一笔。09年上半年所赚的,全部去打新,二级市场不跌个半死不活就不回来!

  即使你掌握了万千理论和技术,可是,你不懂得休息和调整,只知道义无返顾地杀下去,最终的结果都是不满意的。当下一次市场萧条的时候,随便拣一只股票,不想翻番都困难。因此,讲,做大趋势,还要有大智慧和大谋略。

  技术分析有局限性的。比如,除权价格50元以上抛售黄金股,是我的既定计划,不论是从价值上考虑,还是技术上看,它当时都已经涨出了我的目标位,当天23%的换手,这个数据值是很高的,但是,邮资继续借助"注资"利好疯狂炒做,股票在换庄之后,再飙30%,对这些诱惑,必须保持平静。

  买盘一直推进,从分时图上观察,现在的上涨已经过急,技术上需要压下来,大盘超过45度的急拉,始终会调整下来。

  今天介绍了"3×10"的方式看盘定势,一定要记得,必须和成交量,热点板块多寡等因素结合起来,这样才是有效的,单纯只看一点,未免偏颇。

 

 

Thursday, May 14, 2009

吾今欲换行业为心中所盼之已久事,起此卦以证

目前软件行业之工作并非心中久幕之中医事业。而今心中时有转换之念头,且愈来愈甚。

今起此卦以证心中信念之是非,以励志!

 

吾立志为医者,慈闵道义先行,救死扶伤,无分富贵童叟贵贱。效圣贤,精医业。医一患而一人。

 

南无阿弥陀佛!

 

 

占事:事业
出生时间:1976年 性别:男 起卦方式:电脑自动
起卦时间:200905151321
起卦农历:己丑年四月廿一日未时
立夏:200905051739分   中华预测网
芒种:200906052231分 http://www.zhycw.com
神煞:天乙―寅午 福星―午 日禄―申 羊刃―酉 驿马―寅 桃花―酉 华盖―辰
干支:己丑年 己巳月 庚申日 癸未时
旬空:午未  戌亥  子丑  申酉


六神  伏神    艮宫:风泽中孚(游魂)    艮宫:风山渐(归魂)
         【本 卦】           【变 卦】
滕蛇       ����� 官鬼辛卯木     ����� 官鬼辛卯木 应
勾陈 妻财丙子水 ����� 父母辛巳火     ����� 父母辛巳火  
朱雀       �� �� 兄弟辛未土 世   �� �� 兄弟辛未土  
青龙 子孙丙申金 �� �� 兄弟丁丑土   → ����� 子孙丙申金 世
玄武       ����� 官鬼丁卯木   → �� �� 父母丙午火  
白虎       ����� 父母丁巳火 应 → �� �� 兄弟丙辰土  

【本卦】
  《中孚》:中孚豚鱼,吉,利涉大川。利贞。《彖》曰:中孚,柔在内而刚得中。说而巽,孚乃化邦也。"豚鱼吉",信及豚鱼也。"利涉大川",乘木舟虚也。中孚以"利贞",乃应乎天也。《象》曰:泽上有风,《中孚》。君子以议狱缓死。

  初九:虞吉,有它不燕。《象》曰:"初九""虞吉",志未变也。
● 九二:鹤鸣在阴,其子和之。我有好爵,吾与尔靡之。《象》曰:"其子和之",中心愿也。
  六三:得敌,或鼓或罢,或泣或歌。《象》曰:"或鼓或罢",位不当也。
  六四:月几望,马匹亡,无咎。《象》曰:"马匹亡",绝类上也。
  九五:有孚挛如,无咎。《象》曰:"有孚挛如",位正当也。
  上九:翰音登于天,贞凶。《象》曰:"翰音登于天",何可长也。

【变卦】
  《渐》:女归吉,利贞。《彖》曰:《渐》之进也,"女归吉"也。进得位,往有功也。进以正,可以正邦也。其位刚得中也。止而巽,动不穷也。《象》曰:山上有木,《渐》。君子以居贤德善俗。

  初六:鸿渐于干,小子厉,有言无咎。《象》曰:"小子"之"厉",义"无咎"也。
○ 六二:鸿渐于磐,饮食��,吉。《象》曰:"饮食��",不素饱也。
  九三:鸿渐于陆,夫征不复,妇孕不育,凶,利御寇。《象》曰:"夫征不复",离群丑也。"妇孕不育",失其道也。"利用御寇",顺相保也。
  六四:鸿渐于木,或得其桷,无咎。《象》曰:"或得其桷",顺以巽也。
  九五:鸿渐于陵,妇三岁不孕,终莫之胜,吉。《象》曰:"终莫之胜吉",得所愿也。
  上九:鸿渐于陆,其羽可用为仪,吉。《象》曰:"其羽可用为仪吉",不可乱也。

【友情提示】带●的彖辞可作测事之未来状况,带○的彖辞可作测事之未来演变结果。

Tuesday, April 14, 2009

金融危机下,网络流行的二男二女

经济适用男:

    从物质需求上看,"经济适用男"的经济实力虽然比不上"钻石男",但他们会将大部分收入每月按时上交给老婆,这样便于开展稳健的家庭理财计划;从感情归属 上看,"经济适用男"几乎把所有的时间和精力都投入到家庭生活中,因此他们对老婆忠心不二;从性格能力上看,他们大多是单位里的骨干,做事认真,责任心 强。
    "
经济适用男"的其基本条件:身高1.7米左右,长相一般,皮肤略白,五官圆润,戴近视眼镜,发型传统―――总之,很难让人留下深刻印象。不吸烟、不喝 酒、不赌钱,恋爱经验少之又少。职业范围涉及公务员、教育类、IT行业、机械制造、技术类等,月薪在3000元至10000元之间。
    "
经济适用男"的形象代言人被一致推选为"沙和尚",其当选的理由是,"他是勤恳的好员工,也是最具潜质的好老公、好父亲,可以称之为'潜力股"
   
具体来说,"经济适用男"有以下一些特征:
  1、长相普通,性格温和。
  2、工资不一定高,但收入稳定,工作相对来说比较轻松。
  3、在工作中,总是兢兢业业,任劳任怨。
  4、也许买不起昂贵的戒指作礼物,但有更多的时间陪伴女友逛街、看电视......
  5、与女友意见分歧时,能够耐心倾听、适当让步、和平解决。
  6、能带给女友一种亲切自在的生活,没有多少压力,悠闲而轻松。
  7、尊重女友的人生志向及爱好追求,不会以任何家庭理由牵绊她飞得更高更远。必要时还会勇于做出牺牲,帮助爱人实现人生理想。
  8、作风过硬,纪律严明,对所爱的人忠诚不二。
  9、有极强的家庭责任感,能坚守"终生相伴,永远不离不弃"的誓言。
  总而言之,"比我老公顾家的没我老公有钱,比我老公有钱的没我老公顾家。"这是网上对"经济适用男"的经典描述。

 

 

三低男:
  源自日本,继经济适用男后新流行的 概念。有一篇来自日本的文章说,从前日本女性追求"三高"男人――高学历,高收入,高个子。现在的日本女人,要的是"三低"的男人――低姿态、低风险、低 束缚。"三低男"的流行,表示日本女性想要找"倚靠"的心理渐淡,想要找"陪伴"的心意渐浓。她们已经开始摆脱"一结婚就变成一辈子服务业"的传统宿命。
  简义而言,"三低男",是指低姿态、低风险、低束缚的男性。
  低姿态:"Ladyfirst",换句话说就是不能"大男子主义",必须能真诚有礼地对待女性,尊重女性。
  低风险:从事职业的风险低,有份正当又安定的工作,且不会随意辞职者。
  低束缚:不约束女方,在生活上能各自独立,家事与育儿能共同负担,双方均可以安心从事自己的事业。"三低男"的流行与越来越多的女性独立自主、在家庭中能与男性共同承担经济负担有关。也反映了金融危机下,女性更愿追求安稳的小康生活。

 

 

 

简单方便女:
  "简单方便女"是又称"三不女"。不做作,清爽简单,洗完脸一扎头发就能出门;不拜金,看淡金钱,能自己养活自己;不败家,奉行物美价廉的购物观,会持家过日子;不复杂,感情经历简单,不爱折腾。
  具体来说,"简单方便女"有以下一些特征:
  1、做事做人不张扬,不容易一下子引起别人的注意,从不给旁人威胁感,让人放松。
  2、没有过多花哨的包装,无论做朋友还是**人,她不是回头率最高的那种,但肯定是平实男人最乐意选择的指向。
  3、用情专一,内心善良细腻。
  4、不太讲究虚的或者是浪漫的东西,不是说不喜欢,而是撇开了这些东西,她也能知道如何分清虚情和实意。
  5、懂得站在对方的立场上去考虑事物,也善于和对方沟通,做事能考虑到各方面的感受。
  6、善于谅解别人,所以和她在一起,一点也不会感觉到疲累和压力。
  7、她有很好的内在素质,旁人常常惊讶于她不经意间流露出的修养。

 

 

清汤挂面女:
  清汤挂面女:名词,原意为很朴素、不做任何粉饰和装扮的女子,仿佛用白开水煮的面条一样。而在网络环境里,清汤挂面女一般来形容不拜金、不过分追求时尚、安于平常生活的精神层次容易满足的女子。
  一位经济适用男眼里的清汤挂面女:
   生活不仅仅需要和谐,更需要真实!生活绝对不是天天鲍鱼燕窝,吃多了你也会反胃。经过科学研究,最养人、最适宜人的是土豆和地瓜,作为老陕的我归类于经 济适用男的角色,生活每一天最离不开就是清汤挂面,俺就中意天天清汤挂面足以果腹。 不用太昂贵的成本,不用太繁杂的配料,不用太久时间去煎熬,这就是俺想要的"清汤挂面女"。首先是干干净净亭亭玉立,别总是整得像方便面一样曲里拐弯,俺 更想看到素面朝天而无所畏惧的精神内涵;再就是一回家就能端在手中,热热乎乎能够暖在心窝,营养适中,可别到时候对于健康不利;最后就是真材实料,绝对不 会忽悠。

 

 

OneNow Opens The Doors Of 300000 US Online Stores To You

OneNow Opens The Doors Of 300000 US Online Stores To You

 

http://secure.onenow.com/COMGATEWAY/cgw/

 

 

FW: [SHARE INFO] A free web-based project management tool

 

dotProject is built using free open-source applications and is produced and maintained by a small, but dedicated group of volunteers. dotProject is programmed in PHP, and utilises MySQL for a backend database (although other databases such as Postgres could also be used). Our recommended server platform includes Apache 1.3.27, PHP 4.2+, and MySQL. In the spirit of free, peer-reviewed, open source application development, we would also encourage you to use an operating system such as Linux, FreeBSD, or OpenBSD. However, additional operating systems such as Windows, Mac, and other flavours of *nix are also supported.

DOTPROJECT DEMO

Our dotProject Demo can be accessed at http://www.dotproject.net/demo/

ADMIN Access

This will let you do just about anything except administer the users themselves.

Username: admin

Password: admin

Don't reset the password - it just inconveniences others in the short term.

 

 

Sunday, March 8, 2009

X Selections, Cut Buffers, and Kill Rings

X Selections, Cut Buffers, and Kill Rings.
© 1997, 2002 by Jamie Zawinski <jwz@jwz.org>


This document began as a description of how Emacs and XEmacs deal with copying and pasting text under X11. However, I've noticed that a lot of people are being referred here to answer more general questions of how copying and pasting work under X, or, more specifically, how they should implement copying and pasting in their own X applications. So allow me to summarize...

Selections:

X11 has these things called ``selections.'' They have names. There are really only two you need to know about: the Primary selection and the Clipboard selection. An application is said to ``own'' a selection when it raises its hand and says, ``I have the Primary selection now.'' Only one application can own a selection at a time, so when one app asserts selection ownership, the previous owner loses it.

Asserting ownership of a selection doesn't actually transfer data. When you want to copy text from application A to application B, it goes like this:

  • Copy text in program A: program A asserts selection ownership.
  • Paste text in program B: program B notes that program A owns the selection.
  • program B asks A for the text.
  • program A responds, and sends the text to program B.
  • program B pastes the response.

X10 had these things called ``Cut Buffers'' that were a more limited and wasteful predecessor to selections. They are obsolete; don't use them. Some applications (like xterm) still have legacy support for them, but ignore that.

Clipboard: for when the user has explicitly copied something (e.g., the ``Edit/Copy'' menu item.)
Primary: more ephemeral and implicit: it is for when the user has highlighted or selected something (e.g., dragging the mouse over some text.)
Cut Buffers: Obsolete. Never, ever, ever use them. Ever.

Copy and Paste:

Contrary to what you may have come to believe, copying and pasting text under X11 works pretty much exactly the same way it does under MacOS and Windows. Really. It works like this:

  • Select the text to copy;
  • Pull down the ``Edit'' menu and select ``Copy.''
    This causes the text to become the Clipboard Selection.
  • In another window, pull down the ``Edit'' menu and select ``Paste.''
    This causes the current value of the Clipboard selection to be inserted.

But what about the middle mouse button?

It happens that X11 programs have a second way of copying and pasting text that is orthogonal to the Edit/Copy way described above. This causes confusion, because some people mix the two up. Here's how the other way works:

  • Select the text to copy.
    This causes the text to become the Primary Selection.
  • In another window, click the middle mouse button.
    This causes the current value of the Primary selection to be inserted.

So how do I implement this?

Event: Action:
text highlighted
with mouse
Assert PRIMARY selection ownership.
Edit / Copy Make an internal copy of the highlighted text.
Assert CLIPBOARD selection ownership.
Edit / Paste Retrieve and insert CLIPBOARD selection.
middle button paste,
if implemented
Retrieve and insert PRIMARY selection.

another app asks
for PRIMARY
Send currently-highlighted text, if any.
another app asks
for CLIPBOARD
Send saved copy of last-copied text, if any.
another app becomes
PRIMARY owner
De-highlight text.
another app becomes
CLIPBOARD owner
Discard text copy.

Extra Credit: Content Negotiation

One of the really cool, yet rarely used, features of the selection mechanism is that it can negotiate what data formats to use. It's not just about text. When one application asks another for the selection, part of their communication involves the requester asking the owner for the list of types in which they are capable of delivering the selection data; then the requester picks the format they like best, and asks for it that way.

As a simple example, suppose there is a program displaying text in multiple fonts. When pasting that into a text-only program, you'd want to paste only the text. But when pasting that into a word processor, you'd want to keep the font information: if both applications spoke HTML, they could use that as the intermediate format by which they transferred the data.

More complex things are possible, too: for example, when an image is selected on a web page, the web page displayer could offer to serve that up as raw image bits; or as JPEG data; or as the original URL of the image. When trying to copy and paste an image into a text editor that can't do images, the text editor might decide that the next best thing would be to paste the filename of the image, or the URL.

The content negotiation mechansim is very powerful, and I wish more applications would take advantage of it.

You can experiment with content negotiation with other apps from an XEmacs lisp-interaction buffer. To see what types an app will convert its selection to, make a selection in that app, and then type:

    (get-selection-internal 'PRIMARY 'TARGETS)
    ==> [ TARGETS TIMESTAMP TEXT STRING LENGTH FILE_NAME OWNER_OS HOST_NAME USER CLASS NAME CLIENT_WINDOW PROCESS COMPOUND_TEXT]

    (get-selection-internal 'PRIMARY 'FILE_NAME)
    ==> "http://www.jwz.org/doc/x-cut-and-paste.html"

ICCCM:

The full technical documentation for this stuff is in the X11R6 Inter-Client Communication Conventions Manual, section 2: ``Peer-to-Peer Communication by Means of Selections.''



And now, about Emacs:


Message-ID: <3373165D.511EF610@netscape.com>
Date: Fri, 09 May 1997 05:19:41 -0700
From: Jamie Zawinski <jwz@netscape.com>
Newsgroups: comp.emacs
Subject: Re: x-selection / kill-ring interaction

    > Emacs: (car kill-ring) is always the same as the primary x selection, >        therefore mouse2 and C-y pastes the same. mouse1 sets the >        kill-ring as well as the primary selection.

Unless things have changed since the last time I checked, I don't believe this is true: (car kill-ring) is the same as the primary X selection only if a kill has been made in FSFmacs more recently than text has been selected in another (non-FSFmacs) X application.

    > My question is: did the XEmacs people conduct a poll to determine > which behavior is preferred by the masses? (Actually, RMS asked me > this question).

No, I didn't do any surveys, but I did have a reason (in fact, the FSF behavior existed before the FSFmacs/Lucid Emacs schism occurred, and I changed it in our branch.)

The traditional X model of selection usage is that the primary selection is highly ephemeral: it is what is currently highlighted, and that tends not to stay highlighted for long (as other activity tends to dehighlight it.) For longer-lived data, the clipboard selection is used: this is what is generally associated with the Cut/Paste commands (while the primary selection is associated with click-and-drag, and in some applications, middle-click, which is not the same command as ``paste''.)

In a traditional X app, mouse-drag will own the primary selection, and the Cut/Copy commands will move the primary selection to the clipboard.

Therefore, in the emacs world, the primary selection would more logically correspond to the region between point and mark, when it is in the highlighted state (assuming one is using zmacs-regions, another of my earliest additions to the Lucid Emacs branch.) The clipboard selection would more logically correspond to the topmost element on the kill ring.

I added hooks to make it possible to do this -- when you select a region, it becomes the primary selection -- however, it turned out to not be such a good idea to do this (by default) for the kill-ring (and clipboard selection) for a couple of reasons.

The first reason was bandwidth.

Cut buffers, while officially obsolete, are still used, because there are still old programs (and more importantly, old .Xdefaults files) which cause CUT_BUFFER0 to be pasted in other apps in preference to the primary selection. So Lucid Emacs would update both. Now the problem with cut buffers is that at the time one writes a string into the cut buffer, all that data is transferred to the server immediately (selections don't work that way, with selections, the data is transferred as needed.) So this means that if you killed a lot of text (C-SPC M-> C-w, for example) you'd be sending lots and lots of bits over the wire which you likely didn't need to -- and this was a big deal when on slow connections to X servers. Hardcore emacs users kill large bodies of text all the time.

Granted, such slow server connections aren't very common nowadays, but they were then, when X terminals were still very popular (until 1994 or so, I was still doing a lot of my development on an X terminal that only had a 38.4kbps connection to the host machine.)

But that's just cut buffers, and they're ``obsolete,'' right? But then there's the XClipboard program -- basically, this is a program that sits around and makes it easier to deal with your clipboard (it keeps a history of them, among other things) but one side effect of it is that the clipboard data tends to be transferred from the selecting app to the XClipfnord app right away (with the X server as the middleman) so again, you've got the ``cut buffer'' bandwidth problem again.

The second reason was the Principle of Least Astonishment.

X's notion of clipboards (and selections in general) is binary: there is a selection or there is not; there is something on the clipboard or there is not. Whereas emacs has a kill ring, a history of past kills.

So if you decide that you want the emacs kill ring and the X clipboard selection to be unified, what does that mean? Does it mean that the top element on the ring should always be asserted as the clipboard? Ok, you can make emacs do that easily enough. But then what happens when some other app asks for ownership of the clipboard? Does that mean that that text should automatically be added to the front of emacs's kill ring as well? That would make emacs behave like XClipboard, and thus ``race'' with it for ownership (actually the two would probably get into a tug-of-war with each other.) That's not so good, and pretty tricky to make fail gracefully.

Well anyway, that's not what had been implemented in FSFmacs at the time (it did the kill-ring->selection part, but not the selection->kill-ring part) so I would have had to fix that, but also... even if it was fixed to behave consistently, it would still have the bandwidth problem.

So, I somewhat separated the kill/yank commands and the Cut/Paste commands, in that both kill and Cut write to both the kill-ring and the clipboard; but yank looks only at the kill-ring, while Paste looks only at the clipboard. This means that a naive mouse-using user, who would presumably only be using the Cut/Paste commands, would have everything do what they mean (the clipboard and kill ring would stay in sync, and since the user was mouse-oriented, they wouldn't tend to select truly huge areas semi-inadvertantly, sidestepping the bandwidth issue); but a real emacs user, driving it with the keyboard, would tend to live in the emacs ``space'' until they want to go out to the inter-X-client space by using a different gesture (either the Cut command, or selecting a region). (The region/selection interaction being less problematic since both emacs and X think there either is one or their isn't.)

So that's why.


[ up ]