From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Yuri Khan Newsgroups: gmane.emacs.help Subject: Re: How to commit hunks using VC? Date: Sat, 27 Oct 2018 02:34:16 +0700 Message-ID: References: <87sh0s7say.fsf@example.com> <83tvl8obl4.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1540582376 30555 195.159.176.226 (26 Oct 2018 19:32:56 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 26 Oct 2018 19:32:56 +0000 (UTC) Cc: help-gnu-emacs To: Stefan Monnier Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Oct 26 21:32:52 2018 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gG7qm-0007r8-4t for geh-help-gnu-emacs@m.gmane.org; Fri, 26 Oct 2018 21:32:52 +0200 Original-Received: from localhost ([::1]:33929 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gG7ss-0006aU-H1 for geh-help-gnu-emacs@m.gmane.org; Fri, 26 Oct 2018 15:35:02 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33615) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gG7sR-0006aP-4Y for help-gnu-emacs@gnu.org; Fri, 26 Oct 2018 15:34:35 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gG7sQ-0003Ci-0C for help-gnu-emacs@gnu.org; Fri, 26 Oct 2018 15:34:35 -0400 Original-Received: from mail-oi1-x233.google.com ([2607:f8b0:4864:20::233]:39868) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gG7sM-00036M-KE for help-gnu-emacs@gnu.org; Fri, 26 Oct 2018 15:34:31 -0400 Original-Received: by mail-oi1-x233.google.com with SMTP id e3-v6so2014556oiy.6 for ; Fri, 26 Oct 2018 12:34:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=a+suYVx4u2YIVQT6XKuR3UkFuAXYMzFySd98mIySo3g=; b=u0zrDBjqT2jFlGFlU08Ljps0S8v5+7GZXoOin0jPAzYVFYhom/WFMIpcNVW/9EWhJj Q3O0FczKmZvroFHLv/UyTJ80B8T/6doh7bq4+zKg8qV0owBDfFn07xQNdKClo0FibSeD QGPTfHIPkdPc/iUJyHGQQY5ANpaLJW8Y8kuUJW7Gsz32X5uOaAk6IoLHnmj9tSSXelpn MIppqtPhiPq1zwnoEGKQqIyHPXiW+6HJGAJ6/7A27ou8SPUZ1EaNasfGEsc2xe0LLrFc 19+e1DqiEKjhCM/IgelnfyphrFUrH82clyUU+pZMMh5Cn+9jh9M7tMgtR7CyS5JFsUbC 13Sg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=a+suYVx4u2YIVQT6XKuR3UkFuAXYMzFySd98mIySo3g=; b=jJ4M0V3hGcEZGq01l6siekV/9u2fBiMkBxKAxxtFbbYRvCuAFZqXmaDz+A67UPJlNE Id9xq9KCVhpEam2++Y60OYmODUoL3ZO+DpzlhOvAkwn1C1NMs/ntS3dW+nO2XbuoRyGr dH7XAWyqdLj/HRswq6RIjz3lzC5rmiZh9jt2LGoWU78sPYxGJnS7ZTzv+BRQIKdnNem1 wutMqoSR5lHfln9TLwM9hoRXr58C9Mv+lNswFLZHVyM3X6viwSHaEdtFEHPVihvUGfAt 90y0NTTYi/VwZlUvbt50JTebzkpt0XMG9ArOJmv+/Yffy2VClpWGVt45rit6bnvD0l0C fseA== X-Gm-Message-State: AGRZ1gKKAUx84rTaooka9ljTK/kGjY7oNdc/RelRYP2qXp7wXlZ5mWOt T2Fr4U9qSB4Kgui71gnN0d7UO3D4suFiTFYWd38= X-Google-Smtp-Source: AJdET5fcfDc3MFMsZRyBm5I2CKTEIB3WKYcgI+d2T1H302D6ZWVzgaFnkwVLfwcYP0u+ACHXk+N3Q4njZeq0xC2wq78= X-Received: by 2002:aca:df45:: with SMTP id w66-v6mr3069762oig.143.1540582468442; Fri, 26 Oct 2018 12:34:28 -0700 (PDT) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::233 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:118428 Archived-At: On Sat, Oct 27, 2018 at 1:45 AM Stefan Monnier w= rote: > - I often find that I need to install only part of a hunk, which is > easy to do if you go through "stash + edit + commit + unstash". You have a pretty complex definition of easy. In Magit, the status buffer displays a diff of my workspace against the current branch, and I can stage lines in the marked region, or the hunk at point, or the file at point, or all modified files, by pressing =E2=80=98s=E2=80=99. Then, I commit by pressing =E2=80=98c c=E2=80= =99. If I need to commit a change that is finer than a single line, I can press =E2=80=98RET=E2=80=99 on the relevant line in the diff, which takes m= e to the buffer of the file at point, with point on the corresponding line. I can edit the line, save the file, switch to the status buffer, stage the line, switch back to the file, and undo the changes so that I could put them in the next commit. Stash never enters the picture. (If the goal is to use VC specifically, then I don=E2=80=99t know the answe= r.)