From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Mathias Dahl Newsgroups: gmane.emacs.devel Subject: May I do this small change to image-dired now? Date: Sat, 27 Feb 2016 14:21:58 +0100 Message-ID: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a1141ed3c096b93052cc04e43 X-Trace: ger.gmane.org 1456579359 12030 80.91.229.3 (27 Feb 2016 13:22:39 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 27 Feb 2016 13:22:39 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Feb 27 14:22:39 2016 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1aZepS-0005Ub-EL for ged-emacs-devel@m.gmane.org; Sat, 27 Feb 2016 14:22:38 +0100 Original-Received: from localhost ([::1]:54868 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aZepO-0000di-JH for ged-emacs-devel@m.gmane.org; Sat, 27 Feb 2016 08:22:34 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:60968) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aZepA-0000dZ-8o for emacs-devel@gnu.org; Sat, 27 Feb 2016 08:22:21 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aZep9-0006NT-3W for emacs-devel@gnu.org; Sat, 27 Feb 2016 08:22:20 -0500 Original-Received: from mail-yw0-x231.google.com ([2607:f8b0:4002:c05::231]:34171) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aZep8-0006Mm-V1 for emacs-devel@gnu.org; Sat, 27 Feb 2016 08:22:19 -0500 Original-Received: by mail-yw0-x231.google.com with SMTP id h129so89447923ywb.1 for ; Sat, 27 Feb 2016 05:22:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to; bh=+cHuD5wveJoFTSdK7a1H6ZPF1Oxdj0RBIBcqkmv78Iw=; b=VkVQ7eyuaKCW3v4sXjX4+IB8Ez9i74hy8XawMLnckoupTRTZQ9LOe+auWWVAKj/dKi 5NnsvUXXiPeNyN4uwwPXKo8hNnTI8UlFr5rkmsw+u22Da1VRrqybs/wLI1WdqA5ZZIkf s41lwkUptio8co4IU5kggByHaOo4gRl4WottXjiiqN//BuqGAO1SB3WinowbqpQpg0Ce B6q+dI+0tU/01F20HWojhaTyuKkFnayxkcaafuFHcdpamtFbrowX6fOBT8wpc/D8bykJ 3nOJloaYeO3PmHFASyvwQH6PD4HvDLuJEgy0aH2+/BkjRaKH2D2XLgq+em4AF2tYMzkQ sDWA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=+cHuD5wveJoFTSdK7a1H6ZPF1Oxdj0RBIBcqkmv78Iw=; b=YFNKNaxLOT3Znp07ziA2o3qLaRVnQ0LrI0yfq+DL8HtkZuqmCNKaUtb8EbtQk1Sbx4 70rCpuoDUiD0ZYnR8CFMgCZY17oj+zFvYMSN0iGDoaNKTZCKuj88K2SS2hU3wt+dS9FB i3yyao4RZjvNE04nNyT8oQ/9VKaVCIOxxFMMmVl4xoEltODyPb7PHoAOQm4JrlVxJQKo 90iSyWFBlhOq5/Xb4U/Q5cQBQz7vdB7iozZ1JO9btJ0s4jrqNllHKbYg25bRyCgM33o9 zljFmYTZyvg0NwEvbmk7u4YLFa7mQW1lJPoBXPxAPDswgUdaDJnT/BZl15rqHE6L7gP1 E14A== X-Gm-Message-State: AD7BkJKRJMMxvZ7gP0VW31TW6hgBmrtEwn3AdBDhO8C+mTNrb3bx99y5oN+zSTGytPZs1Zf+zp+ru8uFwsophg== X-Received: by 10.129.31.67 with SMTP id f64mr3605541ywf.94.1456579338134; Sat, 27 Feb 2016 05:22:18 -0800 (PST) Original-Received: by 10.129.34.194 with HTTP; Sat, 27 Feb 2016 05:21:58 -0800 (PST) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2607:f8b0:4002:c05::231 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:200714 Archived-At: --001a1141ed3c096b93052cc04e43 Content-Type: text/plain; charset=UTF-8 Hi, I got some inspiration today to actually "maintain" `image-dired' again :) I cloned the Git repo and have committed a small local change. Here is what git show tells me has happened: == Author: Mathias Dahl Date: Sat Feb 27 14:11:02 2016 +0100 Try to preserve the current column when using `image-dired-next-line' and `image-dired-previous-line'. diff --git a/lisp/image-dired.el b/lisp/image-dired.el index a8274f5..67b023d 100644 --- a/lisp/image-dired.el +++ b/lisp/image-dired.el @@ -1143,7 +1143,8 @@ image." (defun image-dired-next-line () "Move to next line and display properties." (interactive) - (forward-line 1) + (let ((goal-column (current-column))) + (next-line)) ;; If we end up in an empty spot, back up to the next thumbnail. (if (not (image-dired-image-at-point-p)) (image-dired-backward-image)) @@ -1155,7 +1156,8 @@ image." (defun image-dired-previous-line () "Move to previous line and display properties." (interactive) - (forward-line -1) + (let ((goal-column (current-column))) + (previous-line)) ;; If we end up in an empty spot, back up to the next ;; thumbnail. This should only happen if the user deleted a ;; thumbnail and did not refresh, so it is not very common. But we == I have two questions: 1. If I git push this change, will it end up on the main Emacs branch (or trunk, Git and VCSes are not my strongest skill...)? I initially cloned the repo using my username on Savannah according to the guideline on EmacsWiki. 2. Is it a good time to do this now? Thanks! /Mathias --001a1141ed3c096b93052cc04e43 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hi,

I got some inspiration today to act= ually "maintain" `image-dired' again :)

<= div>I cloned the Git repo and have committed a small local change. Here is = what git show tells me has happened:

=3D=3D
<= div>
Author: Mathias Dahl <mathias.dahl@gmail.com>
Date: =C2=A0 Sat Feb 27 14:11:02 = 2016 +0100

=C2=A0 =C2=A0 Try to preserve the curre= nt column when using `image-dired-next-line' and `image-dired-previous-= line'.

diff --git a/lisp/image-dired.el b/lisp= /image-dired.el
index a8274f5..67b023d 100644
--- a/lis= p/image-dired.el
+++ b/lisp/image-dired.el
@@ -1143,7 += 1143,8 @@ image."
=C2=A0(defun image-dired-next-line ()
=C2=A0 =C2=A0"Move to next line and display properties."
=C2=A0 =C2=A0(interactive)
- =C2=A0(forward-line 1)
=
+ =C2=A0(let ((goal-column (current-column)))
+ =C2=A0 =C2= =A0(next-line))
=C2=A0 =C2=A0;; If we end up in an empty spot, ba= ck up to the next thumbnail.
=C2=A0 =C2=A0(if (not (image-dired-i= mage-at-point-p))
=C2=A0 =C2=A0 =C2=A0 =C2=A0(image-dired-backwar= d-image))
@@ -1155,7 +1156,8 @@ image."
=C2=A0(def= un image-dired-previous-line ()
=C2=A0 =C2=A0"Move to previo= us line and display properties."
=C2=A0 =C2=A0(interactive)<= /div>
- =C2=A0(forward-line -1)
+ =C2=A0(let ((goal-column (c= urrent-column)))
+ =C2=A0 =C2=A0(previous-line))
=C2=A0= =C2=A0;; If we end up in an empty spot, back up to the next
=C2= =A0 =C2=A0;; thumbnail. This should only happen if the user deleted a
=
=C2=A0 =C2=A0;; thumbnail and did not refresh, so it is not very commo= n. But we
=3D=3D

I have two questi= ons:

1. If I git push this change, will it end up = on the main Emacs branch (or trunk, Git and VCSes are not my strongest skil= l...)? I initially cloned the repo using my username on Savannah according = to the guideline on EmacsWiki.
2. Is it a good time to do this no= w?

Thanks!

/Mathias
=

--001a1141ed3c096b93052cc04e43--