r_emacs | Unsorted

Telegram-канал r_emacs - /r/emacs

70

This channel is a feed for r/emacs. @r_channels @reddit2telegram

Subscribe to a channel

/r/emacs

Emacs for Rust

I just switched from neovim to emacs and one thing I miss is coc.nvim. It has a power to turn a barren neovim into anything I ever want from IDEs. I tried to do something like this and emacs learning curve got me. I cobbled together a simple config with eglot, company and rust-mode, but I can't get import completion to work. Any suggestions?

https://redd.it/17h2rjh
@r_emacs

Читать полностью…

/r/emacs

Can you recommend a version of emacs that works in Windows 98 or older?

The emacs website has versions down to 22, but none of them seem to work correctly on Windows 98. I managed to get emacs 22 running, but it does not display correctly on screen. Only the -nw version runs correctly.

Is there any version that works well on the older OSes?

https://redd.it/17h68kf
@r_emacs

Читать полностью…

/r/emacs

How to follow windows shortcuts in dired

I am trying to use dired on Windows. But, when I attempt to follow a shortcut in dired, it seems to open the shortcut file itself in a buffer instead of following the shortcut to the target directory.

I attempted to follow the installation instructions in this file starting on line 51: https://github.com/hidsh/elisp/blob/master/w32-symlinks.el.

When I byte-compiled the w32-symlinks.el file, Emacs informed me that there were incorrectly escaped quotes in the function located on line 171. I removed those parts of the docstring and byte-compiled the file without error. I also used the following code as specified in the directions.

(add-hook 'dired-load-hook

(lambda () (require 'w32-symlinks)))

But, when I use dired to follow a Windows shortcut it still opens it as a file.


Is there another file explorer package that I can use? Is there another solution?

Thank you for your time.


https://redd.it/17h1s3k
@r_emacs

Читать полностью…

/r/emacs

Emacs blessings!
https://redd.it/17gu75t
@r_emacs

Читать полностью…

/r/emacs

Script in Elisp to generate a unified RSS feed with several feeds
https://github.com/tanrax/self-rssingle.el

https://redd.it/17gqyq1
@r_emacs

Читать полностью…

/r/emacs

New package: mini-echo.el

Repository: mini-echo

Echo buffer status in minibuffer window, get rid of mode-line.

features:
- light-weight, very simple structure and no many configs compared to
feebleline, mini-mdoeline, awesome-tray...
- don't use mode-line at all, same experience in terminal
- port lots of segments from doom-modeline

Have a try!

https://redd.it/17gd9ph
@r_emacs

Читать полностью…

/r/emacs

emacs(Fcall_interactively+0x45b)[0x55895d187bab]
/usr/bin/../lib/emacs/29.1/native-lisp/29.1-b9da317a/preloaded/simple-fab5b0cf-a050dc2b.eln(F636f6d6d616e642d65786563757465_command_execute_0+0x2b5)[0x7f99bc7cb975]
emacs(Ffuncall+0x10b)[0x55895d18efeb]
/usr/bin/../lib/emacs/29.1/native-lisp/29.1-b9da317a/preloaded/simple-fab5b0cf-a050dc2b.eln(F657865637574652d657874656e6465642d636f6d6d616e64_execute_extended_command_0+0x1e9)[0x7f99bc7ca649]
emacs(Ffuncall+0x10b)[0x55895d18efeb]
emacs(Ffuncall_interactively+0x37)[0x55895d187737]
emacs(Ffuncall+0x10b)[0x55895d18efeb]
...
[1] 1651212 IOT instruction (core dumped) emacs -Q

https://redd.it/17g6npv
@r_emacs

Читать полностью…

/r/emacs

xwidget-webkit has started crashing Emacs sessions

I built Emacs 29.1 from source a few months ago and it was working pretty smoothly as far as I could tell -- I was mainly using the elfeed-webkit package -- until I tried to use it today and my Emacs session crashed. I was mainly using it in daemon mode, but evem just running emacs -Q and then M-x xwidget-webkit-browse-url RET wikipedia.org results in the error at the end of this post (sorry for the wall of text).

From the EmacsWiki and from reading /etc/PROBLEMS, I tried to use xwidgets-webkit again with SNAP=1 SNAP_NAME=1 SNAP_REVISION=1 emacs -Q, but it results in the same error.

It's probably an issue with my system rather than Emacs -- I'm running this on Manjaro Linux, and emacs-version gives:

GNU Emacs 29.1 (build 2, x8664-pc-linux-gnu, GTK+ Version 3.24.38, cairo version 1.17.8) of 2023-08-28

What can I do to fix this?

(Below follows the error message referred to previously:)

Overriding existing handler for signal 10. Set JSC
SIGNALFORGC if you want WebKit to use a different signal
X protocol error: GLXBadWindow on protocol request 152
Serial no: 9165

When compiled with GTK, Emacs cannot recover from X disconnects.
This is a GTK bug: https://gitlab.gnome.org/GNOME/gtk/issues/221
For details, see etc/PROBLEMS.
Fatal error 6: Aborted

(emacs:1651212): GLib-WARNING : 19:56:32.608: gmaincontextprepare() called recursively from within a source's check() or prepare() member.

(emacs:
1651212): GLib-WARNING **: 19:56:32.608: gmaincontextcheck() called recursively from within a source's check() or prepare() member.
Backtrace:
emacs(emacsbacktrace+0x53)[0x55895d109393]
emacs(terminate
duetosignal+0xb1)0x55895cf87759
emacs(+0x8e777)0x55895cf88777
emacs(+0x1b5484)0x55895d0af484
emacs(+0x1b5564)0x55895d0af564
emacs(+0x1b583b)0x55895d0af83b
/usr/lib/libX11.so.6(XError+0x11c)[0x7f99d59b374c]
/usr/lib/libX11.so.6(+0x44858)[0x7f99d59b3858]
/usr/lib/libX11.so.6(+0x44915)[0x7f99d59b3915]
/usr/lib/libX11.so.6(
XEventsQueued+0x5a)0x7f99d59b39aa
/usr/lib/libX11.so.6(XPending+0x58)0x7f99d59a62c8
/usr/lib/libgdk-3.so.0(+0x87a28)0x7f99d618ea28
/usr/lib/libglib-2.0.so.0(+0x5a40b)0x7f99d5b2a40b
/usr/lib/libglib-2.0.so.0(+0xb8099)0x7f99d5b88099
/usr/lib/libglib-2.0.so.0(gmaincontextpending+0x2d)[0x7f99d5b280ad]
/usr/lib/libgtk-3.so.0(gtk
eventspending+0x13)[0x7f99d63ecfe3]
emacs(+0x1a58bd)[0x55895d09f8bd]
emacs(gobble
input+0x109)0x55895d0f57a9
emacs(unblockinput+0x56)[0x55895d0f5be6]
emacs(Fmake
xwidget+0x467)0x55895d223ed7
/home/nonreligous/.emacs.d/eln-cache/29.1-b9da317a/xwidget-9ccb93b3-12fdd1c0.eln(F787769646765742d696e73657274xwidgetinsert0+0x4d)[0x7f99a215a1cd]
emacs(funcall
subr+0x2a4)0x55895d1912d4
emacs(Ffuncall+0x10b)0x55895d18efeb
/home/nonreligous/.emacs.d/eln-cache/29.1-b9da317a/xwidget-9ccb93b3-12fdd1c0.eln(F787769646765742d7765626b69742d2d6372656174652d6e65772d73657373696f6e2d627566666572xwidgetwebkitcreatenewsessionbuffer0+0x1d1)0x7f99a215e971
emacs(Ffuncall+0x10b)0x55895d18efeb
/home/nonreligous/.emacs.d/eln-cache/29.1-b9da317a/xwidget-9ccb93b3-12fdd1c0.eln(F787769646765742d7765626b69742d6e65772d73657373696f6exwidgetwebkitnewsession0+0x52)[0x7f99a215eae2]
emacs(Ffuncall+0x10b)[0x55895d18efeb]
/home/nonreligous/.emacs.d/eln-cache/29.1-b9da317a/xwidget-9ccb93b3-12fdd1c0.eln(F787769646765742d7765626b69742d676f746f2d75726c
xwidgetwebkitgotourl0+0x106)0x7f99a215f056
emacs(Ffuncall+0x10b)0x55895d18efeb
/home/nonreligous/.emacs.d/eln-cache/29.1-b9da317a/xwidget-9ccb93b3-12fdd1c0.eln(F787769646765742d7765626b69742d62726f7773652d75726cxwidgetwebkitbrowseurl0+0x109)[0x7f99a215b2e9]
emacs(Ffuncall+0x10b)[0x55895d18efeb]
emacs(Ffuncall
interactively+0x37)0x55895d187737
emacs(Ffuncall+0x10b)0x55895d18efeb
emacs(Fapply+0x149)0x55895d1918d9

Читать полностью…

/r/emacs

quoting inside this block
`(("pori"
;;; order of the components do not matter, but the list that follow this must be ordered
:components ("agam" "pori-posts" "pori-static" "pori-rss"))

("pori-posts"
:base-directory "~/agam/projects/blogs/vanangamudi.gitlab.io/posts/"
:base-extension "org"
:recursive t

:exclude "README\\|TODO\\|draft\\|kuri\\|template"

:publishing-function org-html-publish-to-html
:publishing-directory "~/public/pori/posts"

:auto-sitemap t
:sitemap-filename "index.org"
:sitemap-file-entry-format "%d *%t*"
:sitemap-sort-files anti-chronologically
:sitemap-title "கட்டுரைகள் (Articles)"

:sitemap-style list
:sitemap-sort-files anti-chronologically
:html-head ,html-posts-head
:html-preamble ,html-posts-preamble
:html-postamble ,html-posts-postamble
:html-head-extra "<link rel=\"icon\" type=\"image/x-icon\" href=\"/favicon.ico\"/>")

("pori-static"
:base-directory "~/agam/projects/blogs/vanangamudi.gitlab.io/static"
:base-extension ,site-attachments

:recursive t
:publishing-directory "~/public/pori/static/"
:publishing-function org-publish-attachment)

("pori-rss"
:base-directory "~/agam/projects/blogs/vanangamudi.gitlab.io/posts"
:base-extension "org"
:recursive t

:publishing-directory "~/public/pori/posts"
:publishing-function (org-rss-publish-to-rss)

:rss-extension "xml"
:html-link-home "https://pori.vanangamudi.org/"
:html-link-use-abs-url t
:html-link-org-files-as-html t

:section-numbers nil
:exclude ".*" ;; To exclude all files...
;;; () are important ("index.org")
;;; otheriwse we end with error
;;; Debugger entered--Lisp error: (wrong-type-argument stringp 105)
;;; expand-file-name(105 "~/agam/projects/blogs/vanangamudi.gitlab.io/posts/")
;;;
:include ("index.org") ;; ... except index.org.
:table-of-contents nil
)

;;; must last because the posts section generates
;;; sitemap into posts.org under this directory and
;;; for the main index.org to include posts.org this has to run last
("agam"
:base-directory "~/agam/projects/blogs/vanangamudi.gitlab.io"
:base-extension "org"

:exclude "README\\|TODO\\|draft\\|kuri\\|template\\|server-config"
;; apparently the following do not work for :exclude
;; "\\(:?README\\|TODO\\|draft\\|kuri\\|template\\)"
;;,(regexp-opt '("kuri" "TODO" "README" "draft" "template"))

:publishing-function org-html-publish-to-html
:publishing-directory "~/public/pori/"

:auto-sitemap t
:sitemap-filename "index.org"
:sitemap-file-entry-format "%d *%t*"
:sitemap-sort-files anti-chronologically
:sitemap-title "அகம்"

:sitemap-style list
:sitemap-sort-files anti-chronologically

:html-head ,html-posts-head
:html-preamble ,html-posts-preamble
:html-head-extra "<link rel=\"icon\" type=\"image/x-icon\" href=\"/favicon.ico\"/>")

))

(provide 'publish)
;;; publish.el ends here


&#x200B;

https://redd.it/17fzthl
@r_emacs

Читать полностью…

/r/emacs

Org-publish: Sorting posts based on data in the org file

Sitemap (index.org) does not follow reverse chronological (:sitemap-sort-files anti-chronologically) order even though it is how I configured. The #+date: is ignored rendering the index.org sorted based on the timestamp of the file instead of this attribute. How do I configure org-publish to use this attribute instead of the timestamp from the file.

#+SETUPFILE: ../templates/post.org
#+TITLE: Best Curve Fitting - Least Square Error Method
#+author: vanangamudi
#+date: <28-06-2011>

Here is the directory structure for my blog. I keep this versioned in gitlab.

$ tree
.
├── favicon.ico
├── kuri.org
├── lisp
│   └── ox-rss.el
├── logs
│   └── setupfile-rebase.log
├── posts
│   ├── castle-thought-built-at-seashore.org
│   ├── cheru-secondary-brain.org
│   ├── clang-excercises.org
│   ├── control-systems-bode-plot.org
│   ├── tamil
│   │   └── logistic-regression.org
│   ├── the-first-one-on-chatbots.org
│   └── thoughts-on-dnn-and-agi.org
├── posts.org
├── publish.el
├── publish.sh
├── README.org
├── server-config
│   ├── pori.vanangamudi.org
│   └── setup-nginx.org
├── static
│   ├── css
│   │   └── style.css
│   ├── images
│   │   ├── 0033.jpg
│   │   ├── accelerometer.jpg
│   │   ├── bevel.jpg
│   └── js
│   ├── org-info.js
│   └── org-info-src.js
└── templates
└── post.org


This is the command I run to compile the posts into html and push them to remote server.

emacs --batch --no-init-file --load publish.el --funcall org-publish-all

here is my publish.el config for publishing my blog.

(setq user-emacs-directory "~/agam/projects/blogs/vanangamudi.gitlab.io/.emacs")
(require 'package)
(package-initialize)
;;(add-to-list 'package-archives '("org" . "https://orgmode.org/elpa/") t)
(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/") t)
;;(package-refresh-contents)
;;(package-install 'org-plus-contrib)
(package-install 'htmlize)
(setq debug-on-error t)

;;; important otherwise ox-rss won't load
(add-to-list 'load-path "lisp/")

(require 'org)
(require 'ox-publish)
(require 'ox-rss)


(setq user-full-name "வணங்காமுடி (vanangamudi)")

(setq org-export-with-section-numbers nil
org-export-with-smart-quotes t
org-export-with-toc nil)

(setq org-html-divs '((preamble "header" "top")
(content "main" "content")
(postamble "footer" "postamble"))
org-html-container-element "section"
org-html-metadata-timestamp-format "%Y-%m-%d"
org-html-checkbox-type 'html
org-html-html5-fancy t
org-html-validation-link nil
org-html-doctype "html5")

(defvar site-attachments
(regexp-opt '("jpg" "jpeg" "gif" "png" "svg" "webp"
"ico" "cur" "css" "js" "woff" "html" "pdf"))
"File types that are published as static files.")

(setq org-publish-timestamp-directory "org-timestamps/")

(defconst html-posts-head "<link rel=\"stylesheet\" type=\"text/css\" href=\"/style.css\" />")

(defconst html-preamble "<a href=\"/\">Home</a>")
(defconst html-posts-preamble
;;;TODO rss file name should be rss.xml
(concat html-preamble "
<a href=\"/posts/index.html\">Blog</a>
<a href=\"/posts/index.xml\"> Feed
<img id=\"rss-logo\" src=\"/static/images/rss-logo.png\" width=\"16\" height=\"16\">
</a>
<script data-isso=\"/isso-comments\" src=\"/isso-comments/js/embed.min.js\"></script>
" ))

(defconst html-posts-postamble "<section id=\"isso-thread\"></section>")


(setq user-home "/home/vanangamudi/"
pori-dir "public/pori")

(setq org-publish-project-alist
;; note that this line begins with a back tick not single quote
;; and there is no single

Читать полностью…

/r/emacs

Can Emacs do this? – Yes, Emacs can do this
https://www.youtube.com/shorts/U8-KM6WfzcU

https://redd.it/17g0kcm
@r_emacs

Читать полностью…

/r/emacs

bookmark+ or dogears or ?

Hi,

Can you give a little help which package/function (maybe one from the title ones) what can give me an experience like other editors "go back" function.
Please share yours configuration if you have one.


https://redd.it/17g17m2
@r_emacs

Читать полностью…

/r/emacs

Syntax highlighting in microemacs (mg)

Recently, I started using the Mg editor.

I love using it way more than GNU Emacs but it is missing syntax highlighting.

Is there a way to implement syntax highlighting for C in Mg?

https://redd.it/17fq1ty
@r_emacs

Читать полностью…

/r/emacs

My story with Emacs, Beware, novices! (Church of Emcs Secret Conferences leaked text)

Some four years past, my life was simple. I used of vim .. occasionally found
refuge with jackbrains IDEs, used a splendid open-source calendar application
and notion for note taking. That was life.

But, lo and behold, there arrived a fateful day, when I, in my quest for a PDF
viewer capable of illuminating the sacred texts with vibrant cute yellow highlights, did
consult the Arch Wiki. And thus, the sacred scripture of the wiki proclaimed it:
"GNU Emacs, sire!" From that moment forth, my existence was irrevocably altered,
and my life took on new meaning.

Forsooth, as I contemplated, there existed nary a tool that could attain the
heights of my own prowess, as witnessed within the hallowed confines of elisp.

Yet, as the days and years flowed onward, a vexing truth did unfurl its
troubling wings within the chambers of my soul. A discontent gnawed at the edges
of my being, for the enchantment of Emacs held me captive, leaving me bereft of
escape. All else that I encountered in the vast expanse of digital tools and
systems seemed archaic and disordered when placed in the shadow of Emacs'
grandeur.

For while I marveled at its limitless capabilities and intricate wisdom, I
remained forever unsatisfied. Each quest for efficiency led me deeper into its
labyrinthine depths, where an insatiable hunger for perfection persisted, much
like the boundless sea whose depths are never truly plumbed.

A ceaseless longing for a more refined configuration, a more potent package, or
a more elegant elisp blocks danced within my thoughts. The very thing that had
once set me free, had now become the golden cage in which I resided, unable to
break its enchantment and return to a world of simplicity and contentment.

Let it be known, O ye novices who venture into the alluring embrace of Emacs,
heed the tale of my journey as a cautionary fable. For, as you traverse the path
of this venerable text editor, be mindful of the siren song that sings of
boundless power and unparalleled control. The allure of Emacs, with its arcane
keybindings and vast sea of extensions, may cast a potent spell upon thy heart.

be wary, for it can ensnare thee in a web of complexity and unending quests for
perfection. The very attributes that grant thee mastery may, in turn, become the
chains that bind thee in an eternal quest for more. As you delve deeper, the
simplicity you once knew may fade into obscurity, and other tools may appear
dull and obsolete in comparison.

https://redd.it/17fg7t6
@r_emacs

Читать полностью…

/r/emacs

can't move to the beginning of defun in CC-mode 5.34.1

Hi, I'm new to emacs and trying to get my way through the cc-mode for editing c/c++ files in the manual, it says to activate h cc-mode using the ``c-mode`` symbol and use ``C-M-a`` keybinding to move to beginning of the function, but when I do it, it says ``M-a undefined`` in the mini-buffer. How do I fix it. I have tried look in the manual and net but could get any lead...

https://redd.it/17f9vfu
@r_emacs

Читать полностью…

/r/emacs

Share your org-mode agenda theme/screenshot (elisp included to auto-generate based on sample org file)

Code is:

(progn
(with-temp-buffer
(insert
(with-current-buffer (url-retrieve-synchronously "https://raw.githubusercontent.com/alphapapa/org-ql/bd2dd12a417df5403954576756d9c24273d94379/tests/data.org")
(goto-char url-http-end-of-headers)
(buffer-substring (point) (point-max))))
;; remove sunrise stuff throwing error
(goto-char (point-min))
(while (re-search-forward "^%%(org-super-agenda--test-diary-sunrise)\\|^%%(org-super-agenda--test-diary-sunset)" nil t)
(replace-match "" nil nil))
(write-file "/tmp/tmp.org"))
(let ((org-agenda-files '("/tmp/tmp.org"))
(org-agenda-finalize-hook nil))
(org-agenda-list nil "2017-07-05"))
(delete-other-windows))

Thanks to /u/alphapapa for good data for this purpose.

I've attached what mine looks like, but basically just default modus dark theme.

Why? If you live in your org-agenda, you probably care about how it looks to some extent.

Maybe we can share cool parts that improve our living spaces :)

https://redd.it/17h6qvt
@r_emacs

Читать полностью…

/r/emacs

Ivy/counsel results order

Hi.

Ainother day, another emacs doubt.

I'm using ivy-mode, and when I do M-x and write, the order of candidates for completion seems weird for me. I figure it obeys some logic, but I'd like to change it. For example:

I do M-x and write coun bu

Results are:

counsel-switch-buffer (this one is selected by default)

counsel-ibuffer

counsel-buffer-or-recentf

counsel-minibuffer-history

For me, counsel-buffer-or-recent should be the first candidate, since that's the one with shortest "distance" between a match for coun and a match for bu. Is there a way to make results be sorted by this? So that those 4 candidate should appear like:

counsel-buffer-or-recentf

counsel-ibuffer

counsel-minibuffer-history

counsel-switch-buffer

Another example. I make M-x package-install then write consu. There are almost 15 results before consult. Being the shortest one matching perfectly the string, IMHO this should be the first candidate.

Another example, M-x dire. Results:

A couple of logical results (because they start with dired-)

tramp-crypt-add-directory

dired-jump-other-window

How is it that dired-jump appears after tramp-crypt-add-directory if the match for dire is further in the tramp-... candidate?

Any hint on this?

Thanks in advance.

https://redd.it/17h2y34
@r_emacs

Читать полностью…

/r/emacs

Why the journey of learning Emacs and Elisp in 2023 is so hard ?

Hey there.

I'm a fan of Emacs, like you folks.

I use Emacs org every day, mainly for my teaching class. Furthermore, I learn Emacs for three years ago.

But I struggle to achieve my learning of Elisp. For example, taping lisp and elisp code with evil/lispy is a true nightmare (I use Prelude with few modes, btw), not to mention when I type code block within org.

I knew the learning curve is hard. But I didn't expect that much frustration to learn it. The documentation is austere. So few examples are given. There is too little blogs or books about Emacs, specifically about org and babel.

To illustrate my point, let's take the «*this*» kind-of macro in babel, that I found TODAY by CHANCE in this page : https://orgmode.org/manual/Results-of-Evaluation.html.

It's a game changer for a lot of my code, and would deserve a whole page to illustrate it. But no, it's given in a «niche» example.

Don't be mistaken, I found Babel/Org/Emacs wonderful, but what a pain in the ass to learn it !

For such an old and wise piece of software, I can't understand why we don't have a smooth learning experience with Emacs. A lot of people could benefit Org/Emacs, without the big hinder of the «lack» of documentation (mostly examples).

Am I the only one to experience this ?

&#x200B;

https://redd.it/17guh3z
@r_emacs

Читать полностью…

/r/emacs

Indentation in yaml-ts-mode

Am I missing something or does the new yaml-ts-mode not having any rules for indentation? Seems odd in a language where indentation is semantically relevant.

GNU Emacs 29.1 (build 2, x86_64-unknown-linux-gnu, GTK+ Version 3.24.38, cairo version 1.16.0) of 2023-08-03


Treesitter grammar installed and loaded via:

(use-package treesit-auto
:config
(add-to-list 'global-treesit-auto-modes '(not org-mode))
(setq treesit-auto-install t)
(global-treesit-auto-mode))


https://redd.it/17gtxmr
@r_emacs

Читать полностью…

/r/emacs

using ruff format with emacs to reformat python files

Just a PSA that ruff https://github.com/astral-sh/ruff now supports reformatting python files which is a much faster python reformatter than black/darker/yapf !

I enabled it quickly in emacs using spurcell's [emacs-reformatter](https://github.com/purcell/emacs-reformatter) mode:

(use-package reformatter
:hook
(python-mode . ruff-format-on-save-mode)
(python-ts-mode . ruff-format-on-save-mode)
:config
(reformatter-define ruff-format
:program "ruff"
:args `("format" "--stdin-filename" ,buffer-file-name "-")))

https://redd.it/17gqjsy
@r_emacs

Читать полностью…

/r/emacs

Redumping with pdumper

Thanks to Andreas (the original author of gccmacs), we can now "redump" Emacs even with some natively compiled elisp in the mix. I've been cautious in my experiments so far, but: this works on Windows!

From a MSYS2/MINGW64 bash shell:

$ bin/emacs --batch -Q -eval '(let ((custom-theme-load-path (list "<path>/.emacs.d/elpa/cyberpunk-2019-theme-20191008.1133/"))) (require '"'"'erc) (load-theme '"'"'cyberpunk-2019 t) (enable-theme '"'"'cyberpunk-2019) (dump-emacs-portable "erc.pdmp"))'

$ bin/runemacs.exe --dump-file erc.pdmp -fs -l <my-erc-setup>

This seems to get a "fullboth" frame with my theme pretty fast. Note, I can't trigger connection quite yet at that point; the runemacs call is loading my full init, and some parts that take a further moment.

Also, the first command, which created the custom portable dump called "erc.pdump" loaded by the second command, was nearly instant. Here's a look at what this did to size of the the pdmp file.

-rw-r--r-- 2 corwi corwi 16200096 Oct 24 18:10 src/emacs.pdmp
-rw-r--r-- 2 corwi corwi 16200096 Oct 24 18:10 src/emacs-30.0.50.3.pdmp
-rw-r--r-- 1 corwi corwi 16200096 Oct 24 18:10 src/bootstrap-emacs.pdmp
-rw-r--r-- 1 corwi corwi 16506656 Oct 24 18:35 +cl-lib.pdmp
-rw-r--r-- 1 corwi corwi 20006368 Oct 25 00:30 erc+cl-lib.pdmp
-rw-r--r-- 1 corwi corwi 19764904 Oct 25 00:43 erc.pdmp

&#x200B;

https://redd.it/17g6n6e
@r_emacs

Читать полностью…

/r/emacs

`xwidget-webkit` has started crashing Emacs sessions

I built Emacs 29.1 from source a few months ago and it was working pretty smoothly as far as I could tell -- I was mainly using the `elfeed-webkit` package -- until I tried to use it today and my Emacs session crashed. I was mainly using it in `daemon` mode, but evem just running `emacs -Q` and then `M-x xwidget-webkit-browse-url RET wikipedia.org` results in the error at the end of this post (sorry for the wall of text).

From [the EmacsWiki](https://www.emacswiki.org/emacs/EmacsXWidgets) and from reading /etc/PROBLEMS, I tried to use `xwidgets-webkit` again with `SNAP=1 SNAP_NAME=1 SNAP_REVISION=1 emacs -Q`, but it results in the same error.

It's probably an issue with my system rather than Emacs -- I'm running this on Manjaro Linux, and `emacs-version` gives:

GNU Emacs 29.1 (build 2, x86_64-pc-linux-gnu, GTK+ Version 3.24.38, cairo version 1.17.8) of 2023-08-28

What can I do to fix this?

(Below follows the error message referred to previously:)

Overriding existing handler for signal 10. Set JSC_SIGNAL_FOR_GC if you want WebKit to use a different signal
X protocol error: GLXBadWindow on protocol request 152
Serial no: 9165

When compiled with GTK, Emacs cannot recover from X disconnects.
This is a GTK bug: https://gitlab.gnome.org/GNOME/gtk/issues/221
For details, see etc/PROBLEMS.
Fatal error 6: Aborted

(emacs:1651212): GLib-WARNING **: 19:56:32.608: g_main_context_prepare() called recursively from within a source's check() or prepare() member.

(emacs:1651212): GLib-WARNING **: 19:56:32.608: g_main_context_check() called recursively from within a source's check() or prepare() member.
Backtrace:
emacs(emacs_backtrace+0x53)[0x55895d109393]
emacs(terminate_due_to_signal+0xb1)[0x55895cf87759]
emacs(+0x8e777)[0x55895cf88777]
emacs(+0x1b5484)[0x55895d0af484]
emacs(+0x1b5564)[0x55895d0af564]
emacs(+0x1b583b)[0x55895d0af83b]
/usr/lib/libX11.so.6(_XError+0x11c)[0x7f99d59b374c]
/usr/lib/libX11.so.6(+0x44858)[0x7f99d59b3858]
/usr/lib/libX11.so.6(+0x44915)[0x7f99d59b3915]
/usr/lib/libX11.so.6(_XEventsQueued+0x5a)[0x7f99d59b39aa]
/usr/lib/libX11.so.6(XPending+0x58)[0x7f99d59a62c8]
/usr/lib/libgdk-3.so.0(+0x87a28)[0x7f99d618ea28]
/usr/lib/libglib-2.0.so.0(+0x5a40b)[0x7f99d5b2a40b]
/usr/lib/libglib-2.0.so.0(+0xb8099)[0x7f99d5b88099]
/usr/lib/libglib-2.0.so.0(g_main_context_pending+0x2d)[0x7f99d5b280ad]
/usr/lib/libgtk-3.so.0(gtk_events_pending+0x13)[0x7f99d63ecfe3]
emacs(+0x1a58bd)[0x55895d09f8bd]
emacs(gobble_input+0x109)[0x55895d0f57a9]
emacs(unblock_input+0x56)[0x55895d0f5be6]
emacs(Fmake_xwidget+0x467)[0x55895d223ed7]
/home/nonreligous/.emacs.d/eln-cache/29.1-b9da317a/xwidget-9ccb93b3-12fdd1c0.eln(F787769646765742d696e73657274_xwidget_insert_0+0x4d)[0x7f99a215a1cd]
emacs(funcall_subr+0x2a4)[0x55895d1912d4]
emacs(Ffuncall+0x10b)[0x55895d18efeb]
/home/nonreligous/.emacs.d/eln-cache/29.1-b9da317a/xwidget-9ccb93b3-12fdd1c0.eln(F787769646765742d7765626b69742d2d6372656174652d6e65772d73657373696f6e2d627566666572_xwidget_webkit__create_new_session_buffer_0+0x1d1)[0x7f99a215e971]
emacs(Ffuncall+0x10b)[0x55895d18efeb]
/home/nonreligous/.emacs.d/eln-cache/29.1-b9da317a/xwidget-9ccb93b3-12fdd1c0.eln(F787769646765742d7765626b69742d6e65772d73657373696f6e_xwidget_webkit_new_session_0+0x52)[0x7f99a215eae2]
emacs(Ffuncall+0x10b)[0x55895d18efeb]
/home/nonreligous/.emacs.d/eln-cache/29.1-b9da317a/xwidget-9ccb93b3-12fdd1c0.eln(F787769646765742d7765626b69742d676f746f2d75726c_xwidget_webkit_goto_url_0+0x106)[0x7f99a215f056]
emacs(Ffuncall+0x10b)[0x55895d18efeb]
/home/nonreligous/.emacs.d/eln-cache/29.1-b9da317a/xwidget-9ccb93b3-12fdd1c0.eln(F787769646765742d7765626b69742d62726f7773652d75726c_xwidget_webkit_browse_url_0+0x109)[0x7f99a215b2e9]
emacs(Ffuncall+0x10b)[0x55895d18efeb]
emacs(Ffuncall_interactively+0x37)[0x55895d187737]
emacs(Ffuncall+0x10b)[0x55895d18efeb]
emacs(Fapply+0x149)[0x55895d1918d9]

Читать полностью…

/r/emacs

What is the function for reading text line by line from the command line in batch mode?

I want to write a script to process the contents of a text file line by line, and came across this example on
Emacs wiki - https://www.emacswiki.org/emacs/BatchMode

emacs --batch --eval "(while t (print (eval (read))))"

So I adjusted it to emacs --batch --eval "(while t (print (read)))" and the prompt Lisp expression: is always displayed.

─○ emacs --batch --eval "(while t (print (read)))"
Lisp expression: fdfdfds

fdfdfds
Lisp expression: dsfdsfdfds

Lisp expression: ^C%

When I try a command like cat text1.txt | emacs --batch --eval "(while t (print (read)))" it barfs completely, so read is definitely not the function for this, unless I'm failing to pass some necessary options to it.

https://redd.it/17g50ft
@r_emacs

Читать полностью…

/r/emacs

Org-publish: Sorting posts based on data in the org file

Sitemap (index.org) does not follow reverse chronological (`:sitemap-sort-files anti-chronologically`) order even though it is how I configured. The `#+date:` is ignored rendering the [index.org](https://index.org) sorted based on the timestamp of the file instead of this attribute. How do I configure org-publish to use this attribute instead of the timestamp from the file.

#+SETUPFILE: ../templates/post.org
#+TITLE: Best Curve Fitting - Least Square Error Method
#+author: vanangamudi
#+date: <28-06-2011>

Here is the directory structure for my blog. I keep this versioned in gitlab.

$ tree
.
├── favicon.ico
├── kuri.org
├── lisp
│   └── ox-rss.el
├── logs
│   └── setupfile-rebase.log
├── posts
│   ├── castle-thought-built-at-seashore.org
│   ├── cheru-secondary-brain.org
│   ├── clang-excercises.org
│   ├── control-systems-bode-plot.org
│   ├── tamil
│   │   └── logistic-regression.org
│   ├── the-first-one-on-chatbots.org
│   └── thoughts-on-dnn-and-agi.org
├── posts.org
├── publish.el
├── publish.sh
├── README.org
├── server-config
│   ├── pori.vanangamudi.org
│   └── setup-nginx.org
├── static
│   ├── css
│   │   └── style.css
│   ├── images
│   │   ├── 0033.jpg
│   │   ├── accelerometer.jpg
│   │   ├── bevel.jpg
│   └── js
│   ├── org-info.js
│   └── org-info-src.js
└── templates
└── post.org


This is the command I run to compile the posts into html and push them to remote server.

emacs --batch --no-init-file --load publish.el --funcall org-publish-all

here is my publish.el config for publishing my blog.

(setq user-emacs-directory "~/agam/projects/blogs/vanangamudi.gitlab.io/.emacs")
(require 'package)
(package-initialize)
;;(add-to-list 'package-archives '("org" . "https://orgmode.org/elpa/") t)
(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/") t)
;;(package-refresh-contents)
;;(package-install 'org-plus-contrib)
(package-install 'htmlize)
(setq debug-on-error t)

;;; important otherwise ox-rss won't load
(add-to-list 'load-path "lisp/")

(require 'org)
(require 'ox-publish)
(require 'ox-rss)


(setq user-full-name "வணங்காமுடி (vanangamudi)")

(setq org-export-with-section-numbers nil
org-export-with-smart-quotes t
org-export-with-toc nil)

(setq org-html-divs '((preamble "header" "top")
(content "main" "content")
(postamble "footer" "postamble"))
org-html-container-element "section"
org-html-metadata-timestamp-format "%Y-%m-%d"
org-html-checkbox-type 'html
org-html-html5-fancy t
org-html-validation-link nil
org-html-doctype "html5")

(defvar site-attachments
(regexp-opt '("jpg" "jpeg" "gif" "png" "svg" "webp"
"ico" "cur" "css" "js" "woff" "html" "pdf"))
"File types that are published as static files.")

(setq org-publish-timestamp-directory "org-timestamps/")

(defconst html-posts-head "<link rel=\"stylesheet\" type=\"text/css\" href=\"/style.css\" />")

(defconst html-preamble "<a href=\"/\">Home</a>")
(defconst html-posts-preamble
;;;TODO rss file name should be rss.xml
(concat html-preamble "
<a href=\"/posts/index.html\">Blog</a>
<a href=\"/posts/index.xml\"> Feed
<img id=\"rss-logo\" src=\"/static/images/rss-logo.png\" width=\"16\" height=\"16\">
</a>
<script data-isso=\"/isso-comments\" src=\"/isso-comments/js/embed.min.js\"></script>
" ))

(defconst html-posts-postamble "<section id=\"isso-thread\"></section>")


(setq user-home "/home/vanangamudi/"
pori-dir "public/pori")

(setq org-publish-project-alist
;; note that this line begins with a back tick not single quote
;; and there is no single

Читать полностью…

/r/emacs

What is yours configuration for python?

I am new to python. I guess there are libraries called numpy, anaconda etc. What the best init.el setup for this. (I want to work on ML or Data Science)

https://redd.it/17g1jw3
@r_emacs

Читать полностью…

/r/emacs

org-ql-open-link (new command offers links in matching Org entries with completion and opens the selected one directly)
https://github.com/alphapapa/org-ql#org-ql-open-link

https://redd.it/17g04yr
@r_emacs

Читать полностью…

/r/emacs

Weekly Tips, Tricks, &c. Thread

This is a thread for smaller, miscellaneous items that might not warrant a full post on their own.

See this search for previous "Weekly Tips, Tricks, &c." Threads.

Don't feel constrained in regards to what you post, just keep your post vaguely, generally on the topic of emacs.

https://redd.it/17fzvmx
@r_emacs

Читать полностью…

/r/emacs

Emacs, open file in Xcode at same line
https://redd.it/17fj16p
@r_emacs

Читать полностью…

/r/emacs

How to make all temp buffers open in specific window?

In a 2 window setup, is there a way to make all temporary popup buffers (help, compile, occur, etc) always open in a specific window?

For example, I have a left and right window. I do most of my work in the left window. When I lookup something in help it opens in the right window which is what I want.

But let's say I'm in the right window already and look up help, it will open in the left window. Is there a way to make it always open in the right?

https://redd.it/17fards
@r_emacs

Читать полностью…

/r/emacs

Failing to load auctex when installed via elpaca

I have installed the auctex via elpaca but unable to load it. how to do that. please help

https://redd.it/17f5yd4
@r_emacs

Читать полностью…
Subscribe to a channel