[elpa] master 54ea974 2/2: * gited.el (gited-mark-remembered): Insert the marker and fontify the row.

2017-06-30 Thread Tino Calancha
branch: master
commit 54ea9742bc80efb498cb0576f54b5cc9f943314b
Author: Tino Calancha 
Commit: Tino Calancha 

* gited.el (gited-mark-remembered): Insert the marker and fontify the row.
---
 packages/gited/gited.el | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/packages/gited/gited.el b/packages/gited/gited.el
index 2cf11ea..164b288 100644
--- a/packages/gited/gited.el
+++ b/packages/gited/gited.el
@@ -10,9 +10,9 @@
 ;; Compatibility: GNU Emacs: 24.4
 ;; Version: 0.2.5
 ;; Package-Requires: ((emacs "24.4") (cl-lib "0.5"))
-;; Last-Updated: Sat Jul 01 12:04:28 JST 2017
+;; Last-Updated: Sat Jul 01 12:05:35 JST 2017
 ;;   By: calancha
-;; Update #: 667
+;; Update #: 668
 
 ;;
 ;;
@@ -2806,8 +2806,8 @@ Each element of ALIST looks like (BRANCH . MARKERCHAR)."
   chr (cdr elt))
 (when (gited-goto-branch branch)
   (beginning-of-line)
-  (delete-char 1)
-  (insert chr))
+  (gited-insert-marker-char chr)
+  (gited-fontify-marked-branch-name chr))
 
 (defun gited-fontify-current-branch ()
   "Set font for current branch."



[elpa] master 25a8505 1/2: * gited.el (gited-goto-branch): Return point on success.

2017-06-30 Thread Tino Calancha
branch: master
commit 25a85050828932e69021206a29b302f7a1621558
Author: Tino Calancha 
Commit: Tino Calancha 

* gited.el (gited-goto-branch): Return point on success.
---
 packages/gited/gited.el | 7 ---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/packages/gited/gited.el b/packages/gited/gited.el
index 9e5b505..2cf11ea 100644
--- a/packages/gited/gited.el
+++ b/packages/gited/gited.el
@@ -10,9 +10,9 @@
 ;; Compatibility: GNU Emacs: 24.4
 ;; Version: 0.2.5
 ;; Package-Requires: ((emacs "24.4") (cl-lib "0.5"))
-;; Last-Updated: Mon Jun 26 08:41:10 JST 2017
+;; Last-Updated: Sat Jul 01 12:04:28 JST 2017
 ;;   By: calancha
-;; Update #: 666
+;; Update #: 667
 
 ;;
 ;;
@@ -2519,7 +2519,8 @@ Return buffer position on success, else nil."
 (let ((row (cl-position branch (gited-listed-branches) :test #'equal)))
   (goto-char (point-min))
   (forward-line (if (overlays-at (point-min)) (1+ row) row))
-  (gited--goto-column (1+ gited-branch-idx)
+  (gited--goto-column (1+ gited-branch-idx))
+  (point
 
 (defun gited-next-marked-branch (arg &optional wrap opoint)
   "Move to the next ARG marked branch.



[elpa] master updated (7d2a306 -> 54ea974)

2017-06-30 Thread Tino Calancha
calancha pushed a change to branch master.

  from  7d2a306   Fix indentation in rnc-mode
   new  25a8505   * gited.el (gited-goto-branch): Return point on success.
   new  54ea974   * gited.el (gited-mark-remembered): Insert the marker and 
fontify the row.


Summary of changes:
 packages/gited/gited.el | 11 ++-
 1 file changed, 6 insertions(+), 5 deletions(-)



[elpa] master eaef5b0: * gited.el (gited-update): Preserve marks in Gited buffer.

2017-06-30 Thread Tino Calancha
branch: master
commit eaef5b06c7ddaadc4b3880cf139f4bc3ec6f694c
Author: Tino Calancha 
Commit: Tino Calancha 

* gited.el (gited-update): Preserve marks in Gited buffer.
---
 packages/gited/gited.el | 8 +---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/packages/gited/gited.el b/packages/gited/gited.el
index 164b288..01c7a96 100644
--- a/packages/gited/gited.el
+++ b/packages/gited/gited.el
@@ -10,9 +10,9 @@
 ;; Compatibility: GNU Emacs: 24.4
 ;; Version: 0.2.5
 ;; Package-Requires: ((emacs "24.4") (cl-lib "0.5"))
-;; Last-Updated: Sat Jul 01 12:05:35 JST 2017
+;; Last-Updated: Sat Jul 01 13:19:13 JST 2017
 ;;   By: calancha
-;; Update #: 668
+;; Update #: 669
 
 ;;
 ;;
@@ -1077,11 +1077,13 @@ date are hidden from view."
   (interactive)
   (unless (derived-mode-p major-mode 'gited-mode)
 (user-error "Cannot enable Gited mode in this buffer"))
-  (let ((target-br (ignore-errors (gited-get-branchname)))
+  (let ((marks (gited-remember-marks 1 (point-max)))
+(target-br (ignore-errors (gited-get-branchname)))
 (at-headr-p (gited-at-header-line-p))
 (hide-details gited-hide-details-mode))
 (gited-list-branches gited-ref-kind nil 'update)
 (gited-hide-details-mode (if hide-details 1 0))
+(when marks (gited-mark-remembered marks)) ; Preserve marks.
 (if (not at-headr-p)
 (gited-goto-branch target-br)
   (gited-goto-branch gited-current-branch



[elpa] master 6ec6ff0: gited-do-sync-with-trunk: New command

2017-06-30 Thread Tino Calancha
branch: master
commit 6ec6ff09d5c52fdb6cc98eea265b5e6d3db8787f
Author: Tino Calancha 
Commit: Tino Calancha 

gited-do-sync-with-trunk: New command

* gited.el (gited-do-sync-with-trunk): New command.  Bind it to 'T'.
(gited--sync-with-trunk-target-name): New defun extracted from
`gited-sync-with-trunk'.
(gited--sync-with-trunk-target-name): Use it.
(gited-sync-with-trunk): Idem.  Signal error if BRANCH-TARGET already exits.
Update docstring.
---
 packages/gited/gited.el | 40 ++--
 1 file changed, 30 insertions(+), 10 deletions(-)

diff --git a/packages/gited/gited.el b/packages/gited/gited.el
index 01c7a96..8f0bcf4 100644
--- a/packages/gited/gited.el
+++ b/packages/gited/gited.el
@@ -10,9 +10,9 @@
 ;; Compatibility: GNU Emacs: 24.4
 ;; Version: 0.2.5
 ;; Package-Requires: ((emacs "24.4") (cl-lib "0.5"))
-;; Last-Updated: Sat Jul 01 13:19:13 JST 2017
+;; Last-Updated: Sat Jul 01 13:24:22 JST 2017
 ;;   By: calancha
-;; Update #: 669
+;; Update #: 670
 
 ;;
 ;;
@@ -2135,21 +2135,26 @@ Optional arg WRITE-FILE if non-nil, then write the 
patches to disk."
(string< (buffer-name x) (buffer-name y)))
  )))
 
+(defun gited--sync-with-trunk-target-name (&optional branch)
+  (unless branch (setq branch (gited-get-branchname)))
+  (if (string-match "-new\\([0-9]*\\)\\'" branch)
+  (format "%s%d" (substring branch 0 (match-beginning 1))
+  (1+ (string-to-number (match-string 1 branch
+(concat branch "-new1")))
+
 (defun gited-sync-with-trunk (branch-target)
   "Extract latest patches in branch at point and apply then into BRANCH-TARGET.
 BRANCH-TARGET is a new branch copied from (car (gited-trunk-branches)).
+
 The effect is similar than merge the branch at point with the trunk;
 one difference is that we don't modify the trunk, instead we copy it;
-another difference that we don't get a 'Merge branch...' commit in the log.
-this command set BRANCH-TARGET current."
+another difference is that we don't get a 'Merge branch...' commit in the log.
+This command sets BRANCH-TARGET current."
   (interactive
(let* ((br (gited-get-branchname))
   (prompt
(format "Syncronized '%s' into new branch: " br))
-  (def (if (string-match "-new\\([0-9]*\\)\\'" br)
-   (format "%s%d" (substring br 0 (match-beginning 1))
-   (1+ (string-to-number (match-string 1 br
- (concat br "-new1"
+  (def (gited--sync-with-trunk-target-name br)))
  (list
   (completing-read prompt
(gited-listed-branches)
@@ -2159,6 +2164,8 @@ this command set BRANCH-TARGET current."
   (unless (gited-remote-repository-p)
 (user-error "This command only works for repositories \
 tracking a remote repository"))
+  (when (gited-branch-exists-p branch-target)
+(user-error "Branch '%s' already exists" branch-target))
   (if (null (ignore-errors (gited-extract-patches nil t)))
   (user-error "No new patches to apply")
 ;; If branch-target doesn't exists create it as copy of master.
@@ -2179,10 +2186,23 @@ tracking a remote repository"))
 (setq buf-patches (cdr buf-patches)
   buf-commits (cdr buf-commits)
   (gited-checkout-branch branch-target)
-  (gited-update)
   (message "Successfully applied and committed %d commits!"
num-commits
 
+(defun gited-do-sync-with-trunk (&optional dont-ask)
+  (interactive "P")
+  (dolist (br (or (gited-get-marked-branches) (list (gited-get-branchname
+(let* ((prompt
+(format "Syncronized '%s' into new branch: " br))
+   (def (gited--sync-with-trunk-target-name br))
+   (target
+(if dont-ask def
+  (completing-read
+   prompt (gited-listed-branches)
+   nil nil def
+  (gited-sync-with-trunk target)))
+  (gited-update))
+
 (defun gited-bisecting-p ()
   "Return non-nil if a Git bisect is on process."
   (zerop (gited-git-command '("bisect" "log"
@@ -3298,7 +3318,7 @@ in the active region."
 (define-key map (kbd "C-c c") 'gited-commit)
 (define-key map (kbd "w") 'gited-copy-branchname-as-kill)
 (define-key map (kbd "e") 'gited-extract-patches)
-(define-key map (kbd "T") 'gited-sync-with-trunk)
+(define-key map (kbd "T") 'gited-do-sync-with-trunk)
 (define-key map (kbd "M") 'gited-merge-branch)
 (define-key map (kbd "c") 'gited-checkout-branch)
 (define-key map (kbd "v") 'gited-visit-branch-sources)



[elpa] master 064f681: * gited.el (gited-do-sync-with-trunk): Add docstring. Update file header.

2017-06-30 Thread Tino Calancha
branch: master
commit 064f681d187eba3069cce38f162511d20b37f01d
Author: Tino Calancha 
Commit: Tino Calancha 

* gited.el (gited-do-sync-with-trunk): Add docstring.  Update file header.
---
 packages/gited/gited.el | 54 +++--
 1 file changed, 30 insertions(+), 24 deletions(-)

diff --git a/packages/gited/gited.el b/packages/gited/gited.el
index 8f0bcf4..778c9d7 100644
--- a/packages/gited/gited.el
+++ b/packages/gited/gited.el
@@ -10,9 +10,9 @@
 ;; Compatibility: GNU Emacs: 24.4
 ;; Version: 0.2.5
 ;; Package-Requires: ((emacs "24.4") (cl-lib "0.5"))
-;; Last-Updated: Sat Jul 01 13:24:22 JST 2017
+;; Last-Updated: Sat Jul 01 15:47:21 JST 2017
 ;;   By: calancha
-;; Update #: 670
+;; Update #: 671
 
 ;;
 ;;
@@ -142,14 +142,15 @@
 ;;   `gited-copy-branch', `gited-copy-branchname-as-kill',
 ;;   `gited-delete-branch', `gited-diff',
 ;;   `gited-do-delete', `gited-do-flagged-delete',
-;;   `gited-do-kill-lines', `gited-edit-commit-mode',
-;;   `gited-extract-patches', `gited-fetch-remote-tags',
-;;   `gited-finish-commit-edit', `gited-flag-branch-deletion',
-;;   `gited-goto-branch', `gited-goto-first-branch',
-;;   `gited-goto-last-branch', `gited-kill-line',
-;;   `gited-list-branches', `gited-log',
-;;   `gited-log-last-n-commits', `gited-mark',
-;;   `gited-mark-branches-by-date', `gited-mark-branches-containing-commit',
+;;   `gited-do-kill-lines', `gited-do-sync-with-trunk',
+;;   `gited-edit-commit-mode', `gited-extract-patches',
+;;   `gited-fetch-remote-tags', `gited-finish-commit-edit',
+;;   `gited-flag-branch-deletion', `gited-goto-branch',
+;;   `gited-goto-first-branch', `gited-goto-last-branch',
+;;   `gited-kill-line', `gited-list-branches',
+;;   `gited-log', `gited-log-last-n-commits',
+;;   `gited-mark', `gited-mark-branches-by-date',
+;;   `gited-mark-branches-containing-commit',
 ;;   `gited-mark-branches-containing-regexp', `gited-mark-branches-regexp',
 ;;   `gited-mark-local-tags', `gited-mark-merged-branches',
 ;;   `gited-mark-unmerged-branches', `gited-merge-branch',
@@ -190,20 +191,20 @@
 ;;   `gited--mark-merged-or-unmerged-branches-spec', `gited--merged-branch-p',
 ;;   `gited--move-to-end-of-column', `gited--output-buffer',
 ;;   `gited--patch-or-commit-buffer', `gited--set-output-buffer-mode',
-;;   `gited--stash-branch', `gited--update-padding',
-;;   `gited--valid-ref-p', `gited-all-branches',
-;;   `gited-async-operation-sentinel', `gited-at-header-line-p',
-;;   `gited-bisecting-p', `gited-branch-exists-p',
-;;   `gited-buffer-p', `gited-commit-title',
-;;   `gited-current-branch', `gited-current-branches-with-marks',
-;;   `gited-current-state-list', `gited-dir-under-Git-control-p',
-;;   `gited-edit-commit', `gited-fontify-current-branch',
-;;   `gited-fontify-marked-branch-name', `gited-format-columns-of-files',
-;;   `gited-get-branchname', `gited-get-commit',
-;;   `gited-get-date', `gited-get-element-in-row',
-;;   `gited-get-last-commit-time', `gited-get-mark',
-;;   `gited-get-marked-branches', `gited-git-command',
-;;   `gited-git-command-on-region',
+;;   `gited--stash-branch', `gited--sync-with-trunk-target-name',
+;;   `gited--update-padding', `gited--valid-ref-p',
+;;   `gited-all-branches', `gited-async-operation-sentinel',
+;;   `gited-at-header-line-p', `gited-bisecting-p',
+;;   `gited-branch-exists-p', `gited-buffer-p',
+;;   `gited-commit-title', `gited-current-branch',
+;;   `gited-current-branches-with-marks', `gited-current-state-list',
+;;   `gited-dir-under-Git-control-p', `gited-edit-commit',
+;;   `gited-fontify-current-branch', `gited-fontify-marked-branch-name',
+;;   `gited-format-columns-of-files', `gited-get-branchname',
+;;   `gited-get-commit', `gited-get-date',
+;;   `gited-get-element-in-row', `gited-get-last-commit-time',
+;;   `gited-get-mark', `gited-get-marked-branches',
+;;   `gited-git-command', `gited-git-command-on-region',
 ;;   `gited-hide-details-update-invisibility-spec',
 ;;   `gited-insert-marker-char', `gited-internal-do-deletions',
 ;;   `gited-last-commit-title', `gited-listed-branches',
@@ -2190,6 +2191,11 @@ tracking a remote repository"))
num-commits
 
 (defun gited-do-sync-with-trunk (&optional dont-ask)
+  "Run `gited-sync-with-trunk' in the marked branches.
+If optional arg DONT-ASK is non-nil, then do not promt user for the
+target branch.  Otherwise, prompt user.
+If no marked files use the branch at point.
+Called interactively with a prefix set DONT-ASK to non-nil."
   (interactive "P")
   (dolist (br (or (gited-get-marked-branches) (list (gited-get-branchname
 (let* ((prompt



[elpa] master f7f195a: * gited.el (gited-do-sync-with-trunk): Fix typo in docstring.

2017-06-30 Thread Tino Calancha
branch: master
commit f7f195a4e9c7e6d6db4fc1b4faaea0b76fd417a8
Author: Tino Calancha 
Commit: Tino Calancha 

* gited.el (gited-do-sync-with-trunk): Fix typo in docstring.
---
 packages/gited/gited.el | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/packages/gited/gited.el b/packages/gited/gited.el
index 778c9d7..e9c3f29 100644
--- a/packages/gited/gited.el
+++ b/packages/gited/gited.el
@@ -10,9 +10,9 @@
 ;; Compatibility: GNU Emacs: 24.4
 ;; Version: 0.2.5
 ;; Package-Requires: ((emacs "24.4") (cl-lib "0.5"))
-;; Last-Updated: Sat Jul 01 15:47:21 JST 2017
+;; Last-Updated: Sat Jul 01 15:51:52 JST 2017
 ;;   By: calancha
-;; Update #: 671
+;; Update #: 672
 
 ;;
 ;;
@@ -2192,7 +2192,7 @@ tracking a remote repository"))
 
 (defun gited-do-sync-with-trunk (&optional dont-ask)
   "Run `gited-sync-with-trunk' in the marked branches.
-If optional arg DONT-ASK is non-nil, then do not promt user for the
+If optional arg DONT-ASK is non-nil, then do not prompt user for the
 target branch.  Otherwise, prompt user.
 If no marked files use the branch at point.
 Called interactively with a prefix set DONT-ASK to non-nil."