As a workaround to the pinning issue, commenting out the StartupWMClass line in /usr/share/applications/emacsclient.desktop allows pinning the Emacs (GUI) desktop entry and doesn't add another icon. The two desktop entries share the same StartupWMClass and I don't know how gnome shell would be able to associate the windows to icons correctly in that situation.
As a workaround to the pinning issue, commenting out the StartupWMClass line in /usr/share/ applications/ emacsclient. desktop allows pinning the Emacs (GUI) desktop entry and doesn't add another icon. The two desktop entries share the same StartupWMClass and I don't know how gnome shell would be able to associate the windows to icons correctly in that situation.