From: Felipe Contreras Date: Sat, 2 Nov 2013 13:55:48 +0000 (+1800) Subject: [PATCH 15/21] vim: rename internal notmuch_rb variables X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=e592e03efc1403cf93d0826ad44d8afd747dd7e9;p=notmuch-archives.git [PATCH 15/21] vim: rename internal notmuch_rb variables --- diff --git a/04/48025dbfa96ddc0b92371570ce358d9c1981e6 b/04/48025dbfa96ddc0b92371570ce358d9c1981e6 new file mode 100644 index 000000000..90d0a2377 --- /dev/null +++ b/04/48025dbfa96ddc0b92371570ce358d9c1981e6 @@ -0,0 +1,243 @@ +Return-Path: +X-Original-To: notmuch@notmuchmail.org +Delivered-To: notmuch@notmuchmail.org +Received: from localhost (localhost [127.0.0.1]) + by olra.theworths.org (Postfix) with ESMTP id D2C33431FAF + for ; Sat, 2 Nov 2013 07:03:56 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: -0.799 +X-Spam-Level: +X-Spam-Status: No, score=-0.799 tagged_above=-999 required=5 + tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, + FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled +Received: from olra.theworths.org ([127.0.0.1]) + by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) + with ESMTP id IfoR+sY+fyjn for ; + Sat, 2 Nov 2013 07:03:52 -0700 (PDT) +Received: from mail-ob0-f170.google.com (mail-ob0-f170.google.com + [209.85.214.170]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) + (No client certificate requested) + by olra.theworths.org (Postfix) with ESMTPS id B03E2429E26 + for ; Sat, 2 Nov 2013 07:03:14 -0700 (PDT) +Received: by mail-ob0-f170.google.com with SMTP id wp18so5656740obc.15 + for ; Sat, 02 Nov 2013 07:03:14 -0700 (PDT) +DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; + h=from:to:cc:subject:date:message-id:in-reply-to:references; + bh=zIf4aHXvGo9zM/qheYYu4qkdphw2uu6/k6cAGfuavcA=; + b=kAwbiJpDlSlhwJoQkPHJbf5jpbNZZAlTPbP5lWlr8Z51itXnlGUarXMlS4Ozm8fMuR + mjoVcOMxxKooFHSOhAwVMHfRr0nvFUanvSpQMjhPYAjhVqOH5kbL00apRr/cczgO6EGH + VkeHRPf846JdEt/efFLYwrqkbLtgDQs+C2mY2PE7lEwfePnQRNWrQKUYITBf3r804jb3 + C8bcU+jgrqqCUF60LS2bWcRqQsFTJbs/jPUYogqbG79378XCLm4+UdcfvPyDGi5NFJhT + bg48IkZF9lBvlQ/3p2u8mizAoKlM961cXdY5yDMP3dBaceqvG6GQkutT2kdvvAd5zhuV + /p8w== +X-Received: by 10.60.60.105 with SMTP id g9mr6463795oer.8.1383400994234; + Sat, 02 Nov 2013 07:03:14 -0700 (PDT) +Received: from localhost (187-162-140-241.static.axtel.net. [187.162.140.241]) + by mx.google.com with ESMTPSA id + jz7sm24741703oeb.4.2013.11.02.07.03.12 for + (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); + Sat, 02 Nov 2013 07:03:13 -0700 (PDT) +From: Felipe Contreras +To: notmuch@notmuchmail.org +Subject: [PATCH 15/21] vim: rename internal notmuch_rb variables +Date: Sat, 2 Nov 2013 07:55:48 -0600 +Message-Id: <1383400554-1832-16-git-send-email-felipe.contreras@gmail.com> +X-Mailer: git-send-email 1.8.4.2+fc1 +In-Reply-To: <1383400554-1832-1-git-send-email-felipe.contreras@gmail.com> +References: <1383400554-1832-1-git-send-email-felipe.contreras@gmail.com> +X-BeenThere: notmuch@notmuchmail.org +X-Mailman-Version: 2.1.13 +Precedence: list +List-Id: "Use and development of the notmuch mail system." + +List-Unsubscribe: , + +List-Archive: +List-Post: +List-Help: +List-Subscribe: , + +X-List-Received-Date: Sat, 02 Nov 2013 14:03:57 -0000 + +Now we are the official one. + +Signed-off-by: Felipe Contreras +--- + vim/notmuch.vim | 59 ++++++++++++++++++++++++++------------------------------- + 1 file changed, 27 insertions(+), 32 deletions(-) + +diff --git a/vim/notmuch.vim b/vim/notmuch.vim +index 42c5f18..4e4dfb0 100644 +--- a/vim/notmuch.vim ++++ b/vim/notmuch.vim +@@ -1,4 +1,4 @@ +-if exists("g:loaded_notmuch_rb") ++if exists("g:loaded_notmuch") + finish + endif + +@@ -6,16 +6,16 @@ if !has("ruby") || version < 700 + finish + endif + +-let g:loaded_notmuch_rb = "yep" ++let g:loaded_notmuch = "yep" + +-let g:notmuch_rb_folders_maps = { ++let g:notmuch_folders_maps = { + \ '': 'folders_show_search()', + \ 's': 'folders_search_prompt()', + \ '=': 'folders_refresh()', + \ 'c': 'compose()', + \ } + +-let g:notmuch_rb_search_maps = { ++let g:notmuch_search_maps = { + \ 'q': 'kill_this_buffer()', + \ '': 'search_show_thread(1)', + \ '': 'search_show_thread(2)', +@@ -28,7 +28,7 @@ let g:notmuch_rb_search_maps = { + \ 'c': 'compose()', + \ } + +-let g:notmuch_rb_show_maps = { ++let g:notmuch_show_maps = { + \ 'q': 'kill_this_buffer()', + \ 'A': 'show_tag("-inbox -unread")', + \ 'I': 'show_tag("-unread")', +@@ -43,41 +43,41 @@ let g:notmuch_rb_show_maps = { + \ 'c': 'compose()', + \ } + +-let g:notmuch_rb_compose_maps = { ++let g:notmuch_compose_maps = { + \ ',s': 'compose_send()', + \ ',q': 'compose_quit()', + \ } + +-let s:notmuch_rb_folders_default = [ ++let s:notmuch_folders_default = [ + \ [ 'new', 'tag:inbox and tag:unread' ], + \ [ 'inbox', 'tag:inbox' ], + \ [ 'unread', 'tag:unread' ], + \ ] + +-let s:notmuch_rb_date_format_default = '%d.%m.%y' +-let s:notmuch_rb_datetime_format_default = '%d.%m.%y %H:%M:%S' +-let s:notmuch_rb_reader_default = 'mutt -f %s' +-let s:notmuch_rb_sendmail_default = 'sendmail' +-let s:notmuch_rb_folders_count_threads_default = 0 ++let s:notmuch_date_format_default = '%d.%m.%y' ++let s:notmuch_datetime_format_default = '%d.%m.%y %H:%M:%S' ++let s:notmuch_reader_default = 'mutt -f %s' ++let s:notmuch_sendmail_default = 'sendmail' ++let s:notmuch_folders_count_threads_default = 0 + + if !exists('g:notmuch_rb_date_format') +- let g:notmuch_rb_date_format = s:notmuch_rb_date_format_default ++ let g:notmuch_rb_date_format = s:notmuch_date_format_default + endif + + if !exists('g:notmuch_rb_datetime_format') +- let g:notmuch_rb_datetime_format = s:notmuch_rb_datetime_format_default ++ let g:notmuch_rb_datetime_format = s:notmuch_datetime_format_default + endif + + if !exists('g:notmuch_rb_reader') +- let g:notmuch_rb_reader = s:notmuch_rb_reader_default ++ let g:notmuch_rb_reader = s:notmuch_reader_default + endif + + if !exists('g:notmuch_rb_sendmail') +- let g:notmuch_rb_sendmail = s:notmuch_rb_sendmail_default ++ let g:notmuch_rb_sendmail = s:notmuch_sendmail_default + endif + + if !exists('g:notmuch_rb_folders_count_threads') +- let g:notmuch_rb_folders_count_threads = s:notmuch_rb_folders_count_threads_default ++ let g:notmuch_rb_folders_count_threads = s:notmuch_folders_count_threads_default + endif + + function! s:new_file_buffer(type, fname) +@@ -146,7 +146,7 @@ endfunction + function! s:show_reply() + ruby open_reply get_message.mail + let b:compose_done = 0 +- call s:set_map(g:notmuch_rb_compose_maps) ++ call s:set_map(g:notmuch_compose_maps) + autocmd BufUnload call s:compose_unload() + startinsert! + endfunction +@@ -154,7 +154,7 @@ endfunction + function! s:compose() + ruby open_compose + let b:compose_done = 0 +- call s:set_map(g:notmuch_rb_compose_maps) ++ call s:set_map(g:notmuch_compose_maps) + autocmd BufUnload call s:compose_unload() + startinsert! + endfunction +@@ -365,7 +365,7 @@ ruby << EOF + end + EOF + setlocal nomodifiable +- call s:set_map(g:notmuch_rb_show_maps) ++ call s:set_map(g:notmuch_show_maps) + endfunction + + function! s:search_show_thread(mode) +@@ -388,7 +388,7 @@ ruby << EOF + search_render($cur_search) + EOF + call s:set_menu_buffer() +- call s:set_map(g:notmuch_rb_search_maps) ++ call s:set_map(g:notmuch_search_maps) + autocmd CursorMoved call s:show_cursor_moved() + endfunction + +@@ -404,27 +404,22 @@ function! s:folders() + call s:new_buffer('folders') + ruby folders_render() + call s:set_menu_buffer() +- call s:set_map(g:notmuch_rb_folders_maps) ++ call s:set_map(g:notmuch_folders_maps) + endfunction + + "" root + + function! s:set_defaults() + if exists('g:notmuch_rb_custom_search_maps') +- call extend(g:notmuch_rb_search_maps, g:notmuch_rb_custom_search_maps) ++ call extend(g:notmuch_search_maps, g:notmuch_rb_custom_search_maps) + endif + + if exists('g:notmuch_rb_custom_show_maps') +- call extend(g:notmuch_rb_show_maps, g:notmuch_rb_custom_show_maps) ++ call extend(g:notmuch_show_maps, g:notmuch_rb_custom_show_maps) + endif + +- " TODO for now lets check the old folders too +- if !exists('g:notmuch_rb_folders') +- if exists('g:notmuch_folders') +- let g:notmuch_rb_folders = g:notmuch_folders +- else +- let g:notmuch_rb_folders = s:notmuch_rb_folders_default +- endif ++ if !exists('g:notmuch_folders') ++ let g:notmuch_folders = s:notmuch_folders_default + endif + endfunction + +@@ -613,7 +608,7 @@ ruby << EOF + + def folders_render() + $curbuf.render do |b| +- folders = VIM::evaluate('g:notmuch_rb_folders') ++ folders = VIM::evaluate('g:notmuch_folders') + count_threads = VIM::evaluate('g:notmuch_rb_folders_count_threads') + $searches.clear + folders.each do |name, search| +-- +1.8.4.2+fc1 +