Copy to system clipboard

2013-06-12 Thread Marco
Hi,

there are plenty of tutorials that suggest a mapping like

  bind C-y run "tmux show-buffer | xclip -selection clipboard -i"

to be able to copy to the system clipboard. This, however, involves
an unnecessary copy step. Is there a possibility to directly copy to
the clipboard after enter has been pressed? Example:

∙ go selection mode with prefix[
∙ start selection with space
∙ select the text and press enter

After the last step, I'd like the snippet to be in the system
clipboard. Is this possible?

Marco


signature.asc
Description: Digital signature
--
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev___
tmux-users mailing list
tmux-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tmux-users


Re: Copy to system clipboard

2013-06-12 Thread Thomas Adam
Hi,

On 12 June 2013 15:05, Marco  wrote:
> Hi,
>
> there are plenty of tutorials that suggest a mapping like
>
>   bind C-y run "tmux show-buffer | xclip -selection clipboard -i"
>
> to be able to copy to the system clipboard. This, however, involves
> an unnecessary copy step. Is there a possibility to directly copy to
> the clipboard after enter has been pressed? Example:
>
> ∙ go selection mode with prefix[
> ∙ start selection with space
> ∙ select the text and press enter
>
> After the last step, I'd like the snippet to be in the system
> clipboard. Is this possible?

For some systems (such as OSX) you have no choice but to emulate
this---and indeed, with some terminals, you have no choice but to do
this manually.  tmux supports native clipboard support for XTerm, and
there's an OSC extension (unofficially) for rxvt-unicode to do this
natively.

-- Thomas Adam

--
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
___
tmux-users mailing list
tmux-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tmux-users


Re: Error compiling tmux (1.5-)1.8.2 on OS X 10.7

2013-06-12 Thread Nicholas Marriott
Can you try tmux from Git? Thanks

 Original message 
From: Almog Kurtser  
Date: 10/06/2013  11:43  (GMT+00:00) 
To: tmux-users@lists.sourceforge.net 
Subject: Error compiling tmux (1.5-)1.8.2 on OS X 10.7 
 
Hi, I'm receiving the following error when running `./configure && make  2>&1` 
in OS X 10.7:

checking for a BSD-compatible install... /usr/local/bin/ginstall -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/local/bin/gmkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking build system type... i686-apple-darwin11.4.0
checking host system type... i686-apple-darwin11.4.0
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking whether gcc and cc understand -c and -o together... yes
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking bitstring.h usability... yes
checking bitstring.h presence... yes
checking for bitstring.h... yes
checking curses.h usability... yes
checking curses.h presence... yes
checking for curses.h... yes
checking dirent.h usability... yes
checking dirent.h presence... yes
checking for dirent.h... yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking for inttypes.h... (cached) yes
checking libutil.h usability... no
checking libutil.h presence... no
checking for libutil.h... no
checking ncurses.h usability... yes
checking ncurses.h presence... yes
checking for ncurses.h... yes
checking ndir.h usability... no
checking ndir.h presence... no
checking for ndir.h... no
checking paths.h usability... yes
checking paths.h presence... yes
checking for paths.h... yes
checking pty.h usability... no
checking pty.h presence... no
checking for pty.h... no
checking for stdint.h... (cached) yes
checking sys/dir.h usability... yes
checking sys/dir.h presence... yes
checking for sys/dir.h... yes
checking sys/ndir.h usability... no
checking sys/ndir.h presence... no
checking for sys/ndir.h... no
checking sys/tree.h usability... no
checking sys/tree.h presence... no
checking for sys/tree.h... no
checking term.h usability... yes
checking term.h presence... yes
checking for term.h... yes
checking util.h usability... yes
checking util.h presence... yes
checking for util.h... yes
checking for gcc that whines about -I... yes
checking for glibc... no
checking for library containing clock_gettime... no
checking for pkg-config... /usr/local/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for LIBEVENT... yes
checking for library containing setupterm... -lcurses
checking for b64_ntop... no
checking for b64_ntop with -lresolv... yes
checking for library containing inet_ntoa... none required
checking for library containing socket... none required
checking for socket in -lxnet... no
checking for CMSG_DATA... yes
checking for library containing imsg_init... no
checking for library containing forkpty... none required
checking for closefrom... no
checking for daemon... yes
checking for setenv... yes
checking for strlcpy... yes
checking for strlcat... yes
checking for asprintf... yes
checking for fgetln... yes
checking for strcasestr... yes
checking for strsep... yes
checking for strtonum... no
checking for strnvis... no
checking for getopt... yes
checking whether optarg is declared... yes
checking whether optind is declared... yes
checking whether optreset is declared... yes
checking if system getopt should be avoided... no
checking for bzero... yes
checking for dirfd... no
checking for setproctitle... no
checking for sysconf... yes
checking for BSD-style unsigned types... yes
checking whether TAILQ_PREV is declared... yes
checking whether TAILQ_REPLACE is declared... no
checking for __progname... yes
checking whether F_CLOSEM is declared... no
checking for /proc/$$... no
checking platform... darwin
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: executing depfiles commands
gcc -DPACKAGE_NAME=\"tmux\" -DPACKAGE_TARNAME=\"tmux\" 
-DPACKAGE_VERSION=\"1.8\" -DPACKAGE_STRING=

Re: [PATCH] Accept alternative spellings of "colour"

2013-06-12 Thread Nicholas Marriott
Hi. I don't see a need for this. How frustrating is it really to have to change 
one letter? We consistently use colour, it's not like we mix the spellings.

 Original message 
From: Romain Francoise  
Date: 09/06/2013  17:00  (GMT+00:00) 
To: Nicholas Marriott  
Cc: tmux-users@lists.sourceforge.net 
Subject: [PATCH] Accept alternative spellings of "colour" 
 
Using colors from the 256-color set is a bit annoying at times because
tmux only accepts the British spelling "colour123" where xterm uses
"color123" and Emacs (which has the very useful M-x list-colors-display)
uses "color-123".

To make customization less frustrating, accept all variants as input
while still using the original spelling for output (used in
show-options).

(Nicholas, please reindent the local variables as necessary.)

diff --git a/colour.c b/colour.c
index da1cb42..f207986 100644
--- a/colour.c
+++ b/colour.c
@@ -39,6 +39,11 @@ struct colour_rgb {
/* 256 colour RGB table, generated on first use. */
struct colour_rgb *colour_rgb_256;

+/* Alternative spellings. */
+const char *colour_spellings[] = {
+   "colour-", "colour", "color-", "color", NULL
+};
+
voidcolour_rgb_generate256(void);
u_int   colour_rgb_distance(struct colour_rgb *, struct colour_rgb *);
int colour_rgb_find(struct colour_rgb *);
@@ -198,6 +203,7 @@ colour_fromstring(const char *s)
const char   *cp;
struct colour_rgbrgb;
int  n;
+   const char   **sp;

if (*s == '#' && strlen(s) == 7) {
for (cp = s + 1; isxdigit((u_char) *cp); cp++)
@@ -210,11 +216,13 @@ colour_fromstring(const char *s)
return (colour_rgb_find(&rgb) | 0x100);
}

-   if (strncasecmp(s, "colour", (sizeof "colour") - 1) == 0) {
-n = strtonum(s + (sizeof "colour") - 1, 0, 255, &errstr);
-if (errstr != NULL)
-return (-1);
-return (n | 0x100);
+   for (sp = colour_spellings; *sp != NULL; sp++) {
+if (strncasecmp(s, *sp, strlen(*sp)) == 0) {
+n = strtonum(s + strlen(*sp), 0, 255, &errstr);
+if (errstr != NULL)
+return (-1);
+return (n | 0x100);
+}
}

if (strcasecmp(s, "black") == 0 || (s[0] == '0' && s[1] == '\0'))
--
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev___
tmux-users mailing list
tmux-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tmux-users


[PATCH] Disable 'normal' mode in copy-mode's prompt

2013-06-12 Thread Ben Boeckel
None of the common commands are hooked up, so disabling it should help
avoid confusion about input being ignored after an accidental ESC.
---
 window-copy.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/window-copy.c b/window-copy.c
index 7e078bd..6f90fe7 100644
--- a/window-copy.c
+++ b/window-copy.c
@@ -826,6 +826,9 @@ window_copy_key_input(struct window_pane *wp, int key)
break;
}
 
+   /* Force 'insert' mode since normal mode commands aren't handled here. 
*/
+   data->mdata.mode = 0;
+
window_copy_redraw_lines(wp, screen_size_y(s) - 1, 1);
return (0);
 }
-- 
1.8.2.1


--
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
___
tmux-users mailing list
tmux-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tmux-users