From: Live System User <nyc4bos@aol.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 33570@debbugs.gnu.org
Subject: bug#33570: 26.1.90; Weirdness with prefix arg and kmacro-end-and-call-macro
Date: Sun, 02 Dec 2018 06:28:41 -0500 [thread overview]
Message-ID: <87y3982mmu.fsf@aol.com> (raw)
In-Reply-To: <835zwcbdf3.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 02 Dec 2018 09:22:56 +0200")
Eli Zaretskii <eliz@gnu.org> writes:
>> From: Live System User <nyc4bos@aol.com>
>> Date: Sat, 01 Dec 2018 21:28:47 -0500
>>
>> Macro:
>>
>> 5*; ;; self-insert-command
>> C-a ;; move-beginning-of-line
>> C-n ;; next-line
>>
>>
>> What I was trying to do was to comment out some lines in
>> an elisp file by adding semi-colons, going back to the
>> begining of the line and then positoning to the next line.
>>
>> I tested the macro via "C-x e" (kmacro-end-and-call-macro)
>> to make sure it gave the results that I wanted which it did.
>> So I then added a prefix argument:
>>
>> C-u 20 C-x e
>> and saw this:
>>
>> ;;;;;(setq magit-blame-heading-format "%-20a %C %s %H")
>> ;;;;;
>> ;;;;;(setq magit-branch-read-upstream-first nil)
>> ;;;;;(setq magit-branch-arguments nil)
>> ;;;;;
>> ;;;;;;; FIXME: ADD https://github.com/wuliuxiansheng/Emacs_Configuration/blob/;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;master/lisp/init-vc.el
>>
>> It looks like the macro did not go to the next line but stayed
>> on line 41 of a 51-line buffer.
>>
>> What happened?
>
> I don't know, since you didn't show the text before the change, and
> you only show 6 lines out of 20 that should have been changed.
That's because the next lines remained the same:
(setq magit-diff-refine-hunk 'all) ; refine all hunks instead of just the
; selected one
which you'll notice did NOT add the semi-colons to those 2 lines
nor any subsequent lines.
The original text starting from the point where rhe macro was
called::
(setq magit-display-buffer-function
#'magit-display-buffer-fullframe-status-v1)
(defadvice magit-status (around magit-fullscreen activate)
(window-configuration-to-register :magit-fullscreen)
ad-do-it
(delete-other-windows))
(global-set-key "\C-c\g" 'magit-status)
(defun magit-quit-session ()
"Restores the previous window configuration and kills the magit buffer"
(interactive)
(magit-mode-quit-window)
(jump-to-register :magit-fullscreen))
;(define-key magit-status-mode-map (kbd "Q") 'magit-quit-session)
;; Show commit SHA in blame mode.
(setq magit-blame-heading-format "%-20a %C %s %H")
(setq magit-branch-read-upstream-first nil)
(setq magit-branch-arguments nil)
;; FIXME: ADD https://github.com/wuliuxiansheng/Emacs_Configuration/blob/master/lisp/init-vc.el
(setq magit-diff-refine-hunk 'all) ; refine all hunks instead of just the
; selected one
;; make diff chunks stand out a bit more:
;(set-face-background 'magit-diff-hunk-heading-highlight "#5d4d7a")
>
>> Is there an issue with logical/visual lines and its
> interection with "C-a" and/or "C-n" used in keyboard
> macros?
C-n moves by visual lines by default, is that what you asked?
Is the long line above ";; FIXME:..." (with the line continuation
indicator) 1 visual line and also it's 2 logical ones?
IIUC, this would mean that C-n would go to the (logical) line:
r/lisp/init-vc.e;
and not to the next (visual) line which starts with:
(setq magit-diff-refine-hunk ...
Thanks.
next prev parent reply other threads:[~2018-12-02 11:28 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-02 2:28 bug#33570: 26.1.90; Weirdness with prefix arg and kmacro-end-and-call-macro Live System User
2018-12-02 7:22 ` Eli Zaretskii
2018-12-02 11:28 ` Live System User [this message]
2018-12-02 13:50 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87y3982mmu.fsf@aol.com \
--to=nyc4bos@aol.com \
--cc=33570@debbugs.gnu.org \
--cc=eliz@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.