Skip to content

Use replace-buffer-contents and remove cruft - #19

Merged
proofit404 merged 1 commit into
pythonic-emacs:masterfrom
plapadoo:master
Feb 27, 2019
Merged

proofit404 merged 1 commit into
pythonic-emacs:masterfrom
plapadoo:master

Conversation

@pmiddend

Copy link
Copy Markdown
Contributor

/u/_noctuid told me in (https://www.reddit.com/r/emacs/comments/at1f7h/elisp_apply_patch_to_buffer/)[this reddit thread] that replace-buffer-contents is a better choice for replacing buffers in emacs. It seems to work, and doesn't need the original-* variables.

@proofit404

Copy link
Copy Markdown
Contributor

Thanks! Make sense.

@proofit404
proofit404 merged commit e106f49 into pythonic-emacs:master Feb 27, 2019
@mattfung

Copy link
Copy Markdown

@pmiddend thanks for the contrib, just wondering, what version of emacs are you using?

The reason I ask is because replace-buffer-contents doesn't seem to be defined in emacs 25 on Ubuntu.

Version: GNU Emacs 25.2.2

Symbol’s function definition is void: replace-buffer-contents

@dakra

dakra commented Feb 27, 2019

Copy link
Copy Markdown
Member

replace-buffer-contents got introduced in Emacs 26.1

@dakra

dakra commented Feb 27, 2019

Copy link
Copy Markdown
Member

It may be a good idea to replace most of this package with https://github.com/purcell/reformatter.el

@proofit404

Copy link
Copy Markdown
Contributor

@pmiddend Could you provide patch compatible with earlier Emacs versions?

@pmiddend

Copy link
Copy Markdown
Contributor Author

@proofit404 I'm afraid I can't since I'm not an elisp guru and I have no setup to test older emacs versions. Sorry :(

@proofit404

Copy link
Copy Markdown
Contributor

I need to revert this, unfortunately.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants