GNU bug report logs -
#43847
ERC - prevent yanking multiple lines into IRC (feature request) *patch*
Previous Next
Full log
Message #26 received at 43847 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Many thanks, Noam.
On Wed, Oct 7, 2020 at 11:05 AM Noam Postavsky <npostavs <at> gmail.com> wrote:
>
> I hope an ERC user will follow up (I think Bandali was going over ERC
> patches at some point?), but just some general comments:
I'm hoping Bandali and other ERC users will look, also. I spoke to
someone on ERC today who is using the (prior version), I believe and
has agreed to mention any issues or suggestions. (They agreed with
you about e-l-d-f-c being irrelevant, which seems pretty darned
obvious to me now too.)
> > diff -u "c:/emacs/share/emacs/27.1/lisp/erc/erc.el-27.1" "c:/emacs/share/emacs/27.1/lisp/erc/erc.el"
>
> > +(defun erc-yank (&optional arg)
> > + "Unfill then yank. ARG is handled by `yank', which see."
> > + (interactive)
> > + (insert
> > + (save-excursion
>
> I believe the save-excursion is redundant since all the movement happens
> inside a temp buffer.
Removed save-excursion, thank you.
>
> > + (with-temp-buffer
> > + (yank arg)
> > + (goto-char (point-min))
> > + (let ((fill-column (point-max))
> > + (emacs-lisp-docstring-fill-column t))
>
> I don't think binding emacs-lisp-docstring-fill-column should be needed?
*Smacking of forehead* Right you are.
> > + (fill-paragraph))
>
> The TAB character should be spaces instead. I recommend (setq-default
> indent-tabs-mode nil), or at least
>
> (defun my-lisp-mode-hook ()
> (setq-local indent-tabs-mode nil))
> (add-hook 'emacs-lisp-mode-hook #'my-lisp-mode-hook)
>
> Note that if you edit the git repo, it comes with an indent-tabs-mode=nil
> setting for emacs-lisp-mode in .dir-locals.el.
>
> > + (buffer-string)))))
I'm pulling master now. This version was created after evaling your
suggested one-liner in my erc.el buffer & please let me know if that's
got it.
Again, thanks
Corwin
[erc-yank_002_rm_save-excusrion-and-elsip-docstring-col.patch (application/octet-stream, attachment)]
This bug report was last modified 4 years and 251 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.