texmacs-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Texmacs-dev] Patches: copy/paste and selection handling.


From: Norbert Nemec
Subject: Re: [Texmacs-dev] Patches: copy/paste and selection handling.
Date: Thu, 05 Feb 2009 17:28:51 +0000
User-agent: Thunderbird 2.0.0.19 (X11/20090105)

Bas Spitters wrote:
I have been using them happily ever since you posted them! Thanks.


While I am writing, maybe it is good to note that ^k (kill line) behaves like a cut, while I would expect delete instead.
This is exactly the point where I need the input of emacs-mode users. I can only try to understand the written documentation:

   http://www.gnu.org/software/emacs/manual/html_node/emacs/Killing.html

According to this, there is a clear distinction between "killing" and "deleting". A "kill" places the removed text into the "kill-ring" from where it can be "yanked". In my understanding this actually is a "cut" operation. A "delete" on the other hand eliminates the marked text without a trace.

Even the interaction with other applications is described in detail:

http://www.gnu.org/software/emacs/manual/html_node/emacs/Cut_002fPaste-Other-App.html

To me, this means that the last entry of the "kill-ring" should actually be synchronised with the X11-clipboard and the TeXmacs primary buffer.

However, the text in

   http://www.gnu.org/software/emacs/manual/html_node/emacs/Clipboard.html

seems to contradict this.

My question to Emacs-mode users: Should the kill-ring simply be identical with the primary buffer as it is right now or is there a need for a separate mechanism?

In any case, it seems clear to me that in emacs mode:
a) the [delete] key should delete the text without touching the buffer. (This is what my patch intends to do) b) the [ctrl-k] keys should kill the text, i.e. put it into the buffer (the "cut" operation)

This is emacs behavior as I understand it.


Another issue: when I paste a math formula in a math invironment, I obtain nested math environments.
When you copy a part of a formula, TeXmacs views this as math content:
   math("a+b")
Pasting it into another formula works fine without nesting environment
   <math|c=a+b>

When you copy a complete formula, TeXmacs views it as text content containing a math environment:
   text("<math|a+b>")
Pasting this into a formula results in "encapsulating" the text content:
   <math|c=<with|mode|text|<math|a+b>>>

To me this seems logical, but one might indeed add a bit of intelligence to unpack the nested code when possible.

A helpful solution for the time being is the [ctrl-backspace] sequence that deletes the innermost enclosing tag. Hitting this twice removes the double encapsulation.

An unrelated matter: F3 is sometimes bound to "search-again", sometimes to "save". Is this intended?
This should clearly be fixed. In Windows mode, F3 should be search again and ctrl-S should be save. I fear that this is just one out of many key sequences that should be sorted out for standard conformance...

Greetings,
Norbert





reply via email to

[Prev in Thread] Current Thread [Next in Thread]